]> git.saurik.com Git - bison.git/blame - ChangeLog
Add .gitignore everywhere based on .cvsignore.
[bison.git] / ChangeLog
CommitLineData
0f1d6f10
JD
12008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Add .gitignore everywhere based on .cvsignore.
4 * .gitignore: New.
5 * build-aux/.gitignore: New.
6 * data/.gitignore: New.
7 * doc/.gitignore: New.
8 * etc/.gitignore: New.
9 * examples/.gitignore: New.
10 * examples/calc++/.gitignore: New.
11 * lib/.gitignore: New.
12 * m4/.gitignore: New.
13 * po/.gitignore: New.
14 * runtime-po/.gitignore: New.
15 * src/.gitignore: New.
16 * tests/.gitignore: New.
17
7bd1665a
JD
182008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
19
20 * NEWS (2.3b+): New section, empty for now.
21 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
22
72c5b982
JD
232008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
24
25 * NEWS (2.3b): Update release date since there has been a delay in
26 getting the announcements and tarballs out.
27
bd02cd5d
JD
282008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
29
30 * NEWS: Version 2.3b.
31 * configure.ac (AC_INIT): Likewise.
32 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
33
9126263e
JD
342008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
35
36 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
37 been doing it for years.
38 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
39 (Release Procedure): Add FIXME about make alpha being unmaintained.
40
fa6aa7b3
JD
412008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
42
43 * data/yacc.c: Reformat m4 a little for readability.
44 * src/lalr.c (build_relations): Correct comment.
45
d30b312d
JMG
462008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
47
48 DJGPP specific issue.
49 * djgpp/config.sed: Fixes required to run configure scripts generated
50 by autoconf 2.62.
51
138d4cd9
JD
522008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
53
54 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
55 coordinator@translationproject.org.
56
8f7e2e1f
JD
572008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
58
59 * THANKS: Add Eric Blake.
60
f55efa38
JD
612008-04-23 Eric Blake <ebb9@byu.net>
62
63 Revert prior patch, by working around autoconf regression.
64 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
65 ("Output file name: ("): Uncomment test.
66 ("Output file name: )"): Likewise.
67 Based on an idea from Noah Misch.
68
096c9f9d
JD
692008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
70
71 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
72 2.61. Reported by Juan Manuel Guerrero at
73 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
74 * tests/output.at ("Output file name: ("): Comment out test case for
75 now.
76 ("Output file name: )"): Likewise.
77
0f664b89
JD
782008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
79
80 * GNUmakefile: Update git-version-gen invocation so make dist
81 succeeds.
82
1cfe6375
JD
832008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
84
85 Update to the current gnulib CVS repository, and fix trigraph handling
86 in Bison.
87 * bootstrap: Update gnulib CVS repository URL.
88 (symlink_to_dir): Encapsulate the code that guarantees the destination
89 directory exists into...
90 (check_dst_dir): ... this new function, and...
91 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
92 fail when copying files into lib/uniwidth/.
93 * src/output.c (prepare_symbols): When writing yytname muscles, where
94 symbol names will be encoded in C-string literals, tell quotearg to
95 escape trigraphs. This used to be the default in gnulib.
96 * tests/regression.at (Token definitions): Because of the change in
97 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
98 escapes trigraphs in symbol names. Thus, yytname no longer has
99 trigraphs unnecessarily doubly escaped. Update test case output.
100 Extend test case to be sure Bison's own error messages will no longer
101 have trigraphs in symbol names unnecessarily escaped once.
102
74c52fc8
JD
1032008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
104
105 Fix make dist infinite loop reported by Juan Manuel Guerrero at
106 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
107 * .cvsignore: Add .version.
108 * .version.in: New.
109 * bootstrap.conf (gnulib_modules): Add git-version-gen.
110 * configure.ac (AC_CONFIG_FILES): Add .version.
111 * build-aux/.cvsignore: Add git-version-gen.
112
8e55b3aa
JD
1132008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
114
115 * NEWS (2.3a+): Mention that -g now takes an argument.
116 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
117 consistency. Update the -g and -x entries now that they take
118 arguments. Use brackets to indicate optional arguments.
119 * src/getargs.c (usage): Explain the relationship between arguments of
120 long and short options more completely. Document --defines and -d
121 separately since the former takes an argument but, for POSIX Yacc, the
122 latter does not.
123 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 124 (getargs): Sort cases.
8e55b3aa 125
59c5ac72
AD
1262008-02-28 Akim Demaille <demaille@gostai.com>
127
128 * doc/bison.texinfo: Fix a few typos.
129
118d4978
AD
1302008-02-28 Akim Demaille <akim@epita.fr>
131
132 * doc/bison.texinfo (Bison Options): Document -W.
133 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
134
7020f1e9
AD
1352008-02-28 Akim Demaille <akim@epita.fr>
136
137 * src/getargs.c (short_options): Split and sort for readability.
138 -g and -x take optional arguments, just like their long options.
139 * build-aux/cross-options.pl: Use /x to make the regexp easier to
140 understand.
141 Fix the handling of $opt which resulted in all the argument to be
142 considered as optional.
143
59da312b
JD
1442008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
145
146 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
147 say its interface is experimental.
148 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
149 Java.
150 (Bison Options): In the -L and --language entry, mention Java.
151 (Java Bison Interface): Say the interface is experimental.
152 * src/getargs.c (usage): Mention -L and --language.
153
154 * NEWS (2.3a+): Say the push parsing interface is experimental.
155 * doc/bison.texinfo (Push Decl): Likewise.
156 (Decl Summary): Likewise in the "%define api.push_pull" entry.
157 (Push Parser Function): Likewise.
158 (Pull Parser Function): Likewise.
159 (Parser Create Function): Likewise.
160 (Parser Delete Function): Likewise.
161 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
162 yypull_parse, and yypush_parse entries.
163
164 * NEWS (2.3a+): Mention XML support, and say the schema is
165 experimental.
166 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
167 * src/getargs.c (usage): Say the XML schema is experimental.
168
169 * NEWS (2.3a+): Say option instead of flag.
170
2bb3ebec
WP
1712008-02-21 Wojciech Polak <polak@gnu.org>
172
173 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
174 text.
175
333e670c
JD
1762008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
177
178 Fix impure push parser compile error reported by Bob Rossi at
179 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
180 * data/yacc.c: Clean up whitespace in the output a little.
181 (yypstate_allocated): Define for impure push parsers regardless of
182 whether the pull interface is also requested.
183 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
184 check impure push parsers without the pull interface.
185
186 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
187 yyerror takes arguments specified by %parse-param while yypstate_new
188 does not.
189 * doc/bison.texinfo (Parser Create Function): Document that
190 yypstate_new returns 0 for multiple impure parser instances.
191 * tests/push.at (Push Parsing: Multiple impure instances): Update
192 expected stderr output.
193
798096e1
JD
1942008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
195
196 * runtime-po/POTFILES.in (push.c): Remove.
197
9ca7f077
JD
1982008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
199
200 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
201 * data/push.c: Rename to...
202 * data/yacc.c: ... this, overwriting it.
203 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
204 `%push-pull-parser' -> `%define api.push_pull "both"'.
205 Remove old yacc.c tests, and update push.c tests to yacc.c.
206
42ee26bb
JD
2072008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
208
209 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
210 `"%code top" blocks' instead of `%code "top" blocks'.
211 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
212 Clean up whitespace in the output a little.
213
b1cc23c4
JD
2142008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
215
216 Fix documentation problems reported by Tim Josling at
217 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
218 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
219 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
220 integers. Explain the effect of literal string aliases on error
221 messages. Copy token 0 documentation from the C++ skeleton
222 documentation.
223
ab7f29f8
JD
2242008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
225
226 Accept a token number in a %left, %right, or %nonassoc for POSIX
227 conformance. Reported by Tim Josling at
228 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
229 * NEWS (2.3a+): Mention.
230 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
231 and code numbers are treated by precedence declarations.
232 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
233 of symbols.1.
234 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
235 of symbol.
236 (symbol.prec): New, just like symbol but allows INT.
237 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
238 longer holds.
239 * tests/regression.at (Token number in precedence declaration): New
240 test case.
241
a924ef36
JMG
2422008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
243
244 DJGPP specific issues.
245 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
246 be changed. Copyright timestamp adjusted.
247 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
248 be changed. Copyright timestamp adjusted.
249 * djgpp/config.site: Copyright timestamp adjusted.
250 * djgpp/config_h.sed: Copyright timestamp adjusted.
251 * djgpp/djunpack.bat: Copyright timestamp adjusted.
252 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
253 filename translation list.
254 * djgpp/subpipe.c (init_subpipe): Check the environment variables
255 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
256 files shall be created. Before trying to use the temp dir where the
257 environment variable points to check that the dir really exists. If
258 not default to the cwd as temp dir. Copyright timestamp adjusted.
259 * djgpp/subpipe.h: Copyright timestamp adjusted.
260 * djgpp/testsuite.sed: Copyright timestamp adjusted.
261
389c8cfd
PE
2622008-01-30 Paul Eggert <eggert@cs.ucla.edu>
263
264 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
265
5d1cfef4
PE
2662008-01-09 Paul Eggert <eggert@cs.ucla.edu>
267
268 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
269 Problem reported by Claudio Saavedra in
270 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
271
e2dcf996
WP
2722008-01-05 Wojciech Polak <polak@gnu.org>
273
274 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
275 document's title with the input grammar file name.
276
da730230
JD
2772007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
278
279 Automate regression testing of the XML/XSLT implementation. Discussed
280 starting at
281 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
282 * configure.ac (XSLTPROC): New substitution.
283 * Makefile.am (maintainer-xml-check): New phony target invoking...
284 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
285 invoking make maintainer-check with BISON_TEST_XML=1.
286 * tests/atlocal.in (XSLTPROC): New.
287 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
288 not to report reachable memory when Bison is expected to have a
289 non-zero exit status and (2) to compare XML/XSLT output with --graph
290 and --report=all output for every working grammar when
291 BISON_TEST_XML=1.
292 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
293 (AT_BISON_CHECK_XML): New.
294 (AT_QUELL_VALGRIND): New.
295 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
296 (AT_CHECK): ... don't redefine this since this was the old way to
297 quell Valgrind.
298 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
299 AT_BISON_CHECK invocations.
300 * tests/c++.at: Likewise.
301 * tests/calc.at: Likewise.
302 * tests/conflicts.at: Likewise.
303 * tests/cxx-type.at: Likewise.
304 * tests/existing.at: Likewise.
305 * tests/glr-regression.at: Likewise.
306 * tests/headers.at: Likewise.
307 * tests/input.at: Likewise.
308 * tests/java.at: Likewise.
309 * tests/output.at: Likewise.
310 * tests/push.at: Likewise.
311 * tests/reduce.at: Likewise.
312 * tests/regression.at: Likewise.
313 * tests/sets.at: Likewise.
314 * tests/skeletons.at: Likewise.
315 * tests/synclines.at: Likewise.
316 * tests/torture.at: Likewise.
317 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
318 tends to hang xsltproc.
319 (Big horizontal): Likewise.
320
408476bc
JD
3212007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
322
323 In XML output, remove redundant class attribute on symbol element.
324 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
325 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
326 look up a symbol to determine whether it's a nonterminal or terminal.
327 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
328 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
329
330 Add prec/assoc information to XML output.
331 * src/gram.c (grammar_rules_print_xml): For each rule that has a
332 %prec, add a percent_prec attribute.
333 * src/print-xml.c (print_grammar): For each terminal that has a
334 precedence or associativity, add a prec or assoc attribute.
335 (xml_indent): New.
336 (xml_puts): Use xml_indent.
337 (xml_printf): Use xml_indent.
338 * src/print-xml.h (xml_indent): Prototype.
339
340 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
341 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
342
d4a26c48
JD
3432007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
344
345 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
346 (bison:ruleByNumber): ... this for clarity.
347 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
348 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
349 (xsl:template match="reduction"): Update.
350 (xsl:template match="item"): Update.
351 (xsl:template match="reduction"): Update.
352
353 In the XML output, don't print the list of rules where symbols appear.
354 Compute it in XSLT instead. Discussed at
355 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
356 * data/xslt/bison.xsl (bison:ruleByLhs): New.
357 (bison:ruleByRhs): New.
358 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
359 bison:ruleByRhs.
360 (xsl:template match="terminal/rule"): Remove.
361 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
362 bison:ruleByRhs.
363 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
364 Remove.
365 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
366 bison:ruleByRhs and mode="number-link" for rule template.
367 (xsl:template match="terminal/rule"): Remove.
368 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
369 bison:ruleByRhs and mode="number-link" for rule template.
370 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
371 Rewrite as...
372 (xsl:template match="rule" mode="number-link"): ... this.
373 * src/print-xml.c (print_grammar): Don't print the list of rules.
374
ef1b4273
JD
3752007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
376
377 Don't let --report affect XML output; always print all information.
378 Discussed at
379 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
380 * src/conflicts.c (log_resolution): Implement.
381 * src/print-xml.c (print_core): Implement.
382 (print_state): Implement.
383 (print_xml): Implement.
384
385 * NEWS (2.3a+): Fix quotes.
386 * src/parse-gram.y (prologue_declaration): For consistency with -v,
387 don't let %verbose clear the list specified by --report.
388
0f6cd9e3
AD
3892007-11-26 Akim Demaille <akim@epita.fr>
390
391 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
392
d80fb37a
JD
3932007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
394
395 In the XML output, list useless and unused symbols and rules with the
396 useful ones and add a "usefulness" attribute. Discussed starting at
397 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
398 * src/gram.c (grammar_rules_partial_print_xml): Remove.
399 (grammar_rules_print_xml): Print all rules instead of just those
400 useful in the grammar, and add a "usefulness" attribute.
401 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
402 * src/print-xml.c (print_rules_useless_in_parser): Remove.
403 (print_grammar): Print all nonterminals instead of just useful ones,
404 and add a "usefulness" attribute to nonterminals and terminals.
405 (print_xml): Don't print a separate "reductions" or
406 "rules-useless-in-parser" element.
407 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
408 (reduce_xml): Remove.
409 (reduce_token_unused_in_grammar): New.
410 (reduce_nonterminal_useless_in_grammar): New.
411 * src/reduce.h (reduce_xml): Remove prototype.
412 (reduce_token_unused_in_grammar): Add prototype.
413 (reduce_nonterminal_useless_in_grammar): Add prototype.
414 * data/xslt/xml2text.xsl: Update for XML changes.
415 * data/xslt/xml2xhtml.xsl: Update for XML changes.
416 * tests/reduce.at (Useless Terminals): Update output.
417 (Useless Rules): Update output.
418 (Reduced Automaton): Update output.
419
420 Say "Terminals unused in grammar" instead of "Unused terminals".
421 * NEWS (2.3a+): Update.
422 * doc/bison.texinfo (Understanding): Update example output.
423 * src/reduce.c (reduce_output): Implement.
424 * data/xslt/xml2text.xsl: Implement.
425 * data/xslt/xml2xhtml.xsl: Implement.
426
1bb2bd75
JD
4272007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
428
429 Accept --report-file=FILE to override the default `.output' filename.
430 * NEWS (2.3a+): Mention.
431 * doc/bison.texinfo (Bison Options): Add an entry.
432 * src/files.c (compute_output_file_names): Don't override
433 spec_verbose_file if already set.
434 * src/getargs.c (usage): Document --report-file.
435 (REPORT_FILE_OPTION): New anonymous enum member.
436 (long_options): Add entry for it.
437 (getargs): Add case for it setting spec_verbose_file.
438
439 * build-aux/cross-options.pl: Don't record a short option just because
440 there's an arg.
441 * doc/.cvsignore: Add yacc.1.
442
a005a9c4
AD
4432007-11-14 Akim Demaille <akim@epita.fr>
444
445 * doc/yacc.1.in: New.
446 * configure.ac, doc/Makefile.am: Adjust.
447 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
448 config.h symbol.
449 Use AC_SUBST for assignments too.
450 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
451
cff03fb2
JD
4522007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
453
454 * src/gram.c: Remove comments that duplicate comments in gram.h.
455
456 When reporting useless rules and nonterminals, say "useless in grammar"
457 instead of "useless", and say "useless in parser" instead of "never
458 reduced". Discussed starting at
459 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
460 * NEWS (2.3a+): Mention this change.
461 * data/xslt/xml2text.xsl: Update output text and expected input XML
462 element names to match changes below.
463 * data/xslt/xml2xhtml.xsl: Likewise.
464 (xsl:template match="bison-xml-report"): Add missing entry in Table of
465 Contents: "Rules useless in parser due to conflicts".
466 * doc/bison.texinfo (Decl Summary): Reword a little.
467 (Understanding): Update example output for changes below.
468 * src/gram.c: (rule_useful_p): Rename to...
469 (rule_useful_in_grammar_p): ... this.
470 (rule_useless_p): Rename to...
471 (rule_useless_in_grammar_p): ... this.
472 (rule_never_reduced_p): Rename to...
473 (rule_useless_in_parser_p): ... this.
474 (grammar_rules_print): Update for renames.
475 (grammar_rules_print_xml): Update for renames.
476 (grammar_rules_never_reduced_report): Rename to...
477 (grammar_rules_useless_report): ... this since it is used for either
478 kind of useless rule.
479 * src/gram.h: Reword comments and update function names in prototypes.
480 * src/main.c (main): Say "rule useless in parser due to conflicts".
481 * src/print-xml.c (print_rules_never_reduced): Rename to...
482 (print_rules_useless_in_parser): ... this, and rename output XML
483 element "rules-never-reduced" to "rules-useless-in-parser".
484 (print_xml): Update for rename.
485 * src/print.c (print_results): Say "Rules useless in parser due to
486 conflicts".
487 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
488 (nonterminals_reduce): Say "nonterminal useless in grammar".
489 (reduce_output): Say "Nonterminals useless in grammar".
490 Say "Rules useless in grammar".
491 (reduce_xml): Rename output XML element "useless" to
492 "useless-in-grammar".
493 (reduce_print): Don't report the count of grammatically useless rules
494 as "rules never reduced" just because %yacc is specified.
495 In the correct report of this count, say nonterminal(s) and rule(s)
496 "useless in grammar".
497 * tests/conflicts.at (S/R in initial): Update expected output.
498 (Defaulted Conflicted Reduction): Likewise.
499 (Unreachable States After Conflict Resolution): Likewise.
500 * tests/existing.at (GNU pic Grammar): Likewise.
501 * tests/reduce.at (Useless Nonterminals): Likewise.
502 (Useless Rules): Likewise.
503 (Reduced Automaton): Likewise.
504 (Underivable Rules): Likewise.
505 (Empty Language): Likewise.
506
66f0441d
JD
5072007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
508
509 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
510 here document and before the EOF so that BSD's implementation of Bourne
511 shell doesn't parse the delimiter as part of the here document.
512 * doc/.cvsignore: Add cross-options.texi.
513 * src/getargs.c (usage): Add a blank line after the warning categories.
514
d0ee4105
PB
5152007-11-08 Paolo Bonzini <bonzini@gnu.org>
516
517 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
518
e8b1fb9b
AD
5192007-11-05 Akim Demaille <akim@epita.fr>
520
521 Remove Id: from bison.1.
522 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
523 (perl -0777 -pi -e 's/\.PP\nId): New.
524 (.x.1): Use it to ignore the version control revision.
525
2f7a96b5
AD
5262007-11-05 Akim Demaille <demaille@gostai.com>
527
528 * build-aux/Makefile.am: Ship cross-options.pl.
529 * doc/Makefile.am: Always refer to cross-options.texi with
530 $(srcdir).
531 (MAINTAINERCLEANFILES): Add it.
532
f4101aa6
AD
5332007-11-04 Akim Demaille <demaille@gostai.com>
534
535 Generate the long/short option cross-table.
536 * build-aux/cross-options.pl: New.
537 * doc/Makefile.am (cross-options.texi): New.
538 * doc/bison.texinfo: Use it.
539
727a1401
AD
5402007-11-04 Akim Demaille <demaille@gostai.com>
541
542 Generate bison.1 using help2man.
543 * doc/common.x, doc/bison.x: New.
544 * doc/Makefile.am (bison.1, .x.1): New.
545 The code is taken from autoconf-2.61/man/Makefile.am.
546 * configure.ac: Look for help2man.
547
6aeb9c57
AD
5482007-11-04 Akim Demaille <demaille@gostai.com>
549
550 Complete --help.
551 * src/getargs.c (usage): Document -W, make it clear that -d,
552 -g and -x have optional arguments.
553
d7be4085
AD
5542007-11-04 Akim Demaille <demaille@gostai.com>
555
556 Find sha1sum when named gsha1sum.
557 * bootstrap (find_tool): New.
558 ($SHA1SUM): New.
559
d9df47b6
JD
5602007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
561
562 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
563 at
564 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
565 * NEWS (2.3a+): Mention.
566 * data/bison.m4 (b4_pure_if): Don't define it here.
567 * data/c.m4 (b4_identification): Depend on individual skeletons to
568 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
569 values of the %define variables api.pure or api.push_pull. Define
570 YYPURE, YYPUSH, and YYPULL accordingly.
571 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
572 glr.cc has already defined b4_pure_flag.
573 * data/push.c: Define b4_pure_if based on `%define api.pure'.
574 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 575 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
576 * doc/bison.texinfo (Pure Decl): Update.
577 (Push Decl): Update.
578 (Decl Summary): Add api.pure to %define entry.
579 In %pure-parser entry, say it's deprecated and reference %define.
580 (Pure Calling): Update.
581 (Error Reporting): Update.
582 (C++ Scanner Interface): Update.
583 (How Can I Reset the Parser): Update.
584 (Table of Symbols): In %pure-parser entry, say it's deprecated and
585 reference %define.
586 * src/getargs.c (pure_parser): Remove global variable.
587 * src/getargs.h (pure_parser): Remove extern.
588 * src/output.c (prepare): Don't define pure_flag muscle.
589 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
590 wrapper around `%define api.pure'.
591 * tests/calc.at (Simple LALR Calculator): Update.
592 (Simple GLR Calculator): Update.
593 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
594 Update.
595 (GLR: Resolve ambiguity, pure, locations): Update.
596 (GLR: Merge conflicting parses, pure, no locations): Update.
597 (GLR: Merge conflicting parses, pure, locations): Update.
598 * tests/glr-regression.at (Uninitialized location when reporting
599 ambiguity): Update
600 * tests/input.at (Unused %define api.pure): New test case.
601 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
602 AT_PURE_IF and AT_PURE_AND_LOC_IF.
603 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
604
c373bf8b
JD
6052007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
606
607 %define push_pull -> %define api.push_pull. Discussed starting at
608 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
609 * data/push.c: Expect the new name.
610 * data/yacc.c: Likewise.
611 * doc/bison.texinfo (Push Decl): Update.
612 (Decl Summary): Update %define entry.
613 (Push Parser Function): Update.
614 (Pull Parser Function): Update.
615 (Parser Create Function): Update.
616 (Parser Delete Function): Update.
617 * tests/calc.at (Simple LALR Calculator): Update.
618 * tests/input.at (%define enum variables): Update.
619 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
620 (Push Parsing: Multiple impure instances): Update.
621 (Push Parsing: Unsupported Skeletons): Update.
622 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
623 (Exploding the Stack Size with Malloc): Update.
624
625 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
626 other entries some.
627
32f19b6b
JD
6282007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
629
630 For the XML output's terminal element, rename @number to @token-number,
631 and add @symbol-number. In the nonterminal element, rename @number to
632 @symbol-number. Discussed starting at
633 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
634 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
635 renames.
636 (xsl:template match="nonterminal"): Likewise.
637 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
638 (xsl:template match="nonterminal"): Likewise.
639 * src/print-xml.c (print_grammar): Implement.
640
255a6b90
JD
6412007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
642
643 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
644 2007-10-11 change, the child elements here are items not rules.
408476bc 645 (xsl:template match="item"): New.
255a6b90
JD
646 (xsl:template match="rule"): Update for new reduced itemset.
647 (xsl:template match="point"): Remove.
648 (xsl:template match="empty"): For consistency with --graph, don't
649 output "/* empty */".
650 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
651 line-wrap, don't pass a negative value as first-line-length since this
652 won't work with the following changes.
653 (xsl:template name="line-wrap"): Simplify slightly.
654 (xsl:template name="ws-search"): Eliminate recursion.
655 * src/print_graph.c (print_core): Don't print a reduction's lookahead
656 set next to an item whose dot is not at the end of the RHS even if it
657 happens to be associated with the same rule.
658
88c78747
JD
6592007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
660
31984206
JD
661 Add %define lr.keep_unreachable_states.
662 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
663 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
664 * src/main.c (main): Implement it.
665 * tests/conflicts.at (Unreachable States After Conflict Resolution):
666 Extend to test it, and fix a typo.
667
6682007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
669
670 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
671 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
672 the example .output text.
673 * tests/regression.at (Extra lookahead sets in report): Improve wording
674 of comments.
675
b7a70162
WP
6762007-10-17 Wojciech Polak <polak@gnu.org>
677
678 * src/print-xml.c (print_grammar): Renamed
679 <terminal> and <nonterminal> attributes:
680 "type" to "number" and "symbol" to "name".
681 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
682 Use new attribute names.
683 (xsl:template match="nonterminal"): Likewise.
684 * data/xslt/xml2xhtml.xsl: Likewise.
685
a0de5091
JD
6862007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
687
688 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
689 (Option Cross Key): Likewise.
690
691 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
692 next to an item whose dot is not at the end of the RHS even if it
693 happens to be associated with the same rule.
694 * src/print.c (print_core): Likewise.
695 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
696 (Resolved SR Conflicts): Update output.
697 * tests/regression.at (Extra lookahead sets in report): New test case.
698
4c20d18d
WP
6992007-10-11 Wojciech Polak <polak@gnu.org>
700
701 * src/print-xml.c (print_core): Remove item set
702 redundancy.
703 * data/xslt/bison.xsl (bison:ruleNumber): New key.
704 Improve processing time. Suggested by Joel E. Denny.
705 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
706 Write xsl:param "required" attribute as comment.
707 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
708 (xsl:template match="rule"): Support new reduced itemset.
709 (xsl:template match="point"): Remove.
710 * data/xslt/xml2xhtml.xsl: Likewise.
711
f506ad1c
JD
7122007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
713
714 * src/getargs.c (version): Update copyright year.
715
21f1b063
JD
7162007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
717
718 Make xml2dot.xsl and --graph produce the same output.
719 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
720 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
721 escaped later.
722 (xsl:template name="output-node"): Use the new escape template instead
723 of the string-replace template directly.
724 (xsl:template name="output-edge"): Likewise.
725 (xsl:template name="escape"): New, escapes backslashes and newlines in
726 addition to quotation marks.
727 * src/graphviz.c (start_graph, output_node, output_edge): Add
728 whitespace to output for legibility.
729
730 Make xml2text.xsl and --report produce the same output, and remove the
731 XML "conflicts" element since a conflict summary is easily extracted
732 from the automaton.
733 * data/xslt/bison.xsl: New.
734 (xsl:template match="state" mode="bison:count-conflicts): New.
735 * data/xslt/xml2text.xsl: Import bison.xsl.
736 (xsl:template match="bison-xml-report"): Instead of styling the
737 "conflicts" element, style the "automaton" element with mode
738 "conflicts". Unlike the former, the latter lists S/R and R/R
739 conflicts for a state on the same line.
740 (xsl:template match="conflicts"): Remove.
741 (xsl:template match="conflict"): Remove.
742 (xsl:template match="terminal"): Line-wrap the list of rules in which
743 the terminal is used.
744 (xsl:template match="nonterminal"): Likewise for nonterminals.
745 (xsl:template match="automaton" mode="conflicts"): New.
746 (xsl:template match="state" mode="conflicts"): New.
747 (xsl:template name="line-wrap"): New.
748 (xsl:template name="ws-search"): New.
749 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
750 (xsl:template match="bison-xml-report"): Instead of styling the
751 "conflicts" element, style the "automaton" element with mode
752 "conflicts."
753 (xsl:template match="conflicts"): Remove.
754 (xsl:template match="conflict"): Remove.
755 (xsl:template match="automaton" mode="conflicts"): New.
756 (xsl:template match="state" mode="conflicts): New.
757 * src/conflicts.c (conflicts_output_xml): Remove.
758 * src/conflicts.h (conflicts_output_xml): Remove prototype.
759 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
760 * src/print.c (print_grammar): Consistently wrap at the 66th column so
761 the corresponding XSLT is easier. Also, never wrap between a word and
762 the comma that follows it.
763
793fbca5
JD
7642007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
765
766 Improve C++ namespace support. Discussed starting at
767 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
768 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
769 b4_namespace_close): New macros that interpret the %define variable
770 "namespace" so its value can contain "::" to indicate nested
771 namespaces.
772 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
773 the above macros.
774 * data/lalr1.cc (b4_namespace): Likewise.
775 * data/location.cc (b4_namespace): Likewise.
776 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
777 inside a new table in the general %define entry. Document `%define
778 namespace' there as well. Point the %name-prefix entry to it since it
779 explains it more completely in the case of C++.
780 (C++ Bison Interface): Mention `%define namespace' instead of
781 %name-prefix.
782 (Table of Symbols): Remove the `%define push_pull' entry. The %define
783 entry suffices.
784 * tests/c++.at (Relative namespace references): New test case.
785 (Absolute namespace references): New test case.
786 (Syntactically invalid namespace references): New test case.
787 * tests/input.at (C++ namespace reference errors): New test case.
788
35b8730d
JD
7892007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
790
791 Add syncline support and location accessor to internal %define
792 interfaces.
793 * data/bison.m4 (b4_percent_define_get_loc): New.
794 (b4_percent_define_get_syncline): New.
795 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
796 (b4_percent_define_default): Record defining location as line 1 rather
797 than 0 for the sake of synchronizing #line's, and define
798 b4_percent_define_syncline(VARIABLE).
799 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
800 * src/muscle_tab.c (muscle_syncline_grow): New.
801 (muscle_code_grow): Use muscle_syncline_grow.
802 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
803 define b4_percent_define_syncline(VARIABLE).
804 (muscle_percent_define_get_loc): New.
805 (muscle_percent_define_get_syncline): New.
806 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
807 remove some unused variables.
808 (muscle_percent_define_default): Record defining location as line 1
809 rather than 0 for the sake of synchronizing #line's, and define
810 b4_percent_define_syncline(VARIABLE).
811 (muscle_percent_define_check_values): Use
812 muscle_percent_define_get_loc.
813 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
814 (muscle_percent_define_get_syncline): Prototype.
815 * tests/skeletons.at (%define Boolean variables: invalid skeleton
816 defaults): Update output for location change.
817 (Complaining during macro argument expansion): Extend to test
818 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
819
7dc4a694
JD
8202007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
821
822 Fix some error-reporting macro bugs.
823 * data/bison.m4 (b4_cat): New.
824 (b4_error, b4_error_at): Use b4_cat to send error directives directly
825 to stdout so they don't become arguments to other macros. Update
826 comments and add examples.
827 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
828 add examples.
829 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
830 after printing the error directive so that M4 doesn't report subsequent
831 problems that are induced by this problem.
832 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
833 instead of just in them. Recognize @\n in both places. Both expand to
834 the empty string. Needed by b4_cat.
835 * tests/skeletons.at (Complaining during macro argument expansion):
836 New test case.
837 (Fatal errors make M4 exit immediately): New test case.
838
d4bd2295
JD
8392007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
840
841 Implement --print-datadir.
842 * src/getargs.c (usage): Mention.
843 (PRINT_DATADIR_OPTION): New anonymous enum member.
844 (long_options): Add entry for it.
845 (getargs): Add case for it calling compute_pkgdatadir.
846 * src/output.c (output_skeleton): Encapsulate data directory
847 computation from here...
848 (prepare): ... and from here...
849 (compute_pkgdatadir): ... into this new function.
850 * src/output.h (compute_pkgdatadir): Prototype.
851
34cdeddf
JD
8522007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
853
854 * src/print-xml.c (escape_bufs): New static global variable
855 replacing...
856 (xml_escape_n): ... the static local variable buf here.
857 (print_xml): Free memory for escape_bufs.
858 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
859
d782395d
JD
8602007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
861
862 Replace `%push-parser' and `%push-pull-parser' with
863 `%define push_pull "push"' and `%define push_pull "both"'.
864 `%define push_pull "pull"' is the default.
865 * doc/bison.texinfo (Push Decl, Push Parser Function,
866 Pull Parser Function, Parser Create Function, Parser Delete Function):
867 Update declarations.
868 (Decl Summary, Table of Symbols): Replace %push-parser and
869 %push-pull-parser entries with a %define push_pull entry.
870 * data/bison.m4 (b4_percent_define_check_values): New macro.
871 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
872 definitions...
873 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
874 definitions...
875 * data/push.c: ... to here and compute them from the value of the
876 %define variable push_pull.
877 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
878 parsing requests here...
879 * data/yacc.c: ... hack this to switch to push.c any time
880 b4_use_push_pull_flag or the %define variable push_pull is set. This
881 will go away when we mv push.c yacc.c.
882 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
883 push parsing is not supported since unused %define variables are
884 reported anyway.
885 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
886 * src/muscle_tab.h (muscle_percent_define_check_values): Update
887 comments for consistency with b4_percent_define_check_values.
888 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
889 muscles.
890 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
891 Remove.
892 (prologue_declaration): Remove %push-parser and %push-pull-parser
893 rules.
894 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
895 * tests/calc.at: Update declarations.
896 * tests/input.at (%define enum variables): New test case.
897 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
898 declaration.
899 (Push Parsing: Multiple impure instances): Update declaration.
900 (Push Parsing: Unsupported Skeletons): New test case.
901 * tests/torture.at (Exploding the Stack Size with Alloca): Update
902 declaration.
903 (Exploding the Stack Size with Malloc): Update declaration.
904
3f999f78
WP
9052007-09-24 Wojciech Polak <polak@gnu.org>
906
907 Add XSLT transformations.
908
909 * data/xslt/xml2dot.xsl: Transform XML into DOT.
910 * data/xslt/xml2text.xsl: Transform XML into plain text.
911 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
912 * data/Makefile.am (xsltdir): New variable.
913 (dist_xslt_DATA): Add xslt/*.xsl files.
914
a4f75309
PE
9152007-09-23 Paul Eggert <eggert@cs.ucla.edu>
916
917 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
918 Problem reported by Wojciech Polak.
919 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
920 (xml_printf): Undo change I made on 21 September; that is,
921 indent 2 spaces, not 1.
922
ad5feac4
JD
9232007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
924
925 Pacify ./configure --enable-gcc-warnings.
926 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
927 `char const *' instead of `char *'.
928 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
929 local variable `sep'.
930
41d7a5f2
PE
9312007-09-21 Paul Eggert <eggert@cs.ucla.edu>
932
933 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
934 elsewhere.
935 * src/print-xml.c: Prefer "const" after types; that's more consistent.
936 (xml_printf): Indent just 1 space for level.
937 (e_char, xlate_char): Remove.
938 (xml_escape_string): Rewrite to avoid undefined behavior (used
939 storage that was freed from the stack).
940 (xml_escape_n): Don't bother checking for subscript error.
941
3f999f78
WP
9422007-09-21 Wojciech Polak <polak@gnu.org>
943
944 Add Bison XML Automaton Report.
41d7a5f2
PE
945
946 Add support for an -x option to generate an XML report.
947 It is not documented yet.
948 * src/print-xml.c: New file.
949 * src/print-xml.h: Likewise.
950 * lib/timevar.def (TV_XML): New var.
951 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
952 * src/conflicts.c: Include print-xml.h.
953 (solved_conflicts_xml_obstack): New var.
954 (log_resolution, conflicts_solve, conflicts_free):
955 Add support for XML report.
956 (conflicts_output_val): New function.
957 * src/conflicts.h (conflicts_output_val): New decl.
958 * src/files.c (spec_xml_file): New var.
959 (compute_output_file_names, output_file_names_free): Add XML support.
960 * src/files.h (spec_xml_file): New decl.
961 * src/getargs.c (xml_flag): New var.
962 (usage, short_options, long_options, getargs): Add XML support.
963 * src/getargs.h (xml_flag): New decl.
964 * src/gram.c: Include print-xml.h.
965 (rule_lhs_print_xml, rule_rhs_print_xml):
966 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
967 New functions.
968 * src/gram.h: Declare external ones.
969 * src/main.c: Include print-xml.h.
970 (main): Add XML support.
971 * src/reduce.c: Include print-xml.h.
972 (reduce_xml): New function.
973 * src/reduce.h: Declare it.
974 * src/state.c: Include print-xml.h.
975 (state_new): Add XML support.
976 (state_rule_lookahead_tokens_print_xml): New function.
977 * src/state.h: Declare it.
978 (struct state): New member solved_conflicts_xml.
979 * src/symtab.c (symbol_class_get_string): New function.
980 * src/symtab.h: Declare it.
981
6d8e724d
PE
9822007-09-21 Paul Eggert <eggert@cs.ucla.edu>
983
984 * GNUmakefile: Switch to coreutils's version.
985 * bootstrap: Likewise.
986 * Makefile.cfg: Adjust to new GNUmakefile.
987 * README-hacking: Likewise.
988
989 Import from gnulib:
990
991 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
992 Bruno Haible <bruno@clisp.org>
993
994 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
995 and is a script that invokes bison. Tighten the code. Add comments.
996
922bdd7f
JD
9972007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
998
999 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1000 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1001 * doc/bison.texinfo (Decl Summary): Fix.
1002 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1003 * tests/input.at (Boolean %define variables): Update output.
1004 * tests/skeletons.at (%define boolean variables: invalid skeleton
1005 defaults): Rename to...
1006 (%define Boolean variables: invalid skeleton defaults): ... this and
1007 update output.
1008
1b17b01d
JD
10092007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1010
1011 In impure push mode, don't allow more than one yypstate to be allocated
1012 since multiple impure parsers would corrupt yynerrs.
1013 * data/push.c (yypstate_allocated): New static global variable
1014 initialized to 0.
1015 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1016 exhaustion if yypstate_allocated is 1, but still return 2.
1017 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1018 already 1. Otherwise, set it to 1.
1019 (yypstate_delete): Set it to 0.
1020 * tests/push.at (Push Parsing: Multiple impure instances): New test
1021 case.
1022
9987d1b3
JD
10232007-08-17 Bob Rossi <bob@brasko.net>
1024
1025 * doc/bison.texinfo (Push Decl): Document the push parser.
1026 (Table of Symbols): Ditto.
1027 (Pure Decl): Ditto.
1028 (Decl Summary): Ditto.
1029 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1030 Parser Create Function, Parser Delete Function):
1031 Add new push parser symbols.
1032 (Table of Symbols): Document push-parser, push-pull-parser,
1033 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1034
f16b0819
PE
10352007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1036
1037 Update to GPLv3.
1038 * doc/gpl-3.0.texi: New file.
1039 * doc/gpl.texi: Remove.
1040 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1041 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1042 * README-hacking, TODO, bootstrap, bootstrap.conf:
1043 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1044 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1045 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1046 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1047 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1048 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1049 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1050 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1051 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1052 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1053 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1054 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1055 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1056 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1057 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1058 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1059 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1060 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1061 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1062 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1063 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1064 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1065 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1066 * src/complain.c, src/complain.h, src/conflicts.c:
1067 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1068 * src/files.h, src/flex-scanner.h, src/getargs.c:
1069 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1070 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1071 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1072 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1073 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1074 * src/print.c, src/print.h, src/print_graph.c:
1075 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1076 * src/reduce.h, src/relation.c, src/relation.h:
1077 * src/revision.h, src/scan-code.h, src/scan-code.l:
1078 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1079 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1080 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1081 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1082 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1083 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1084 * tests/existing.at, tests/glr-regression.at:
1085 * tests/headers.at, tests/input.at, tests/java.at:
1086 * tests/local.at, tests/output.at, tests/push.at:
1087 * tests/reduce.at, tests/regression.at, tests/sets.at:
1088 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1089 * tests/torture.at:
1090 Update to GPLv3.
1091
728c4be2
JD
10922007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1093
1094 Get rid of broken %no-parser, -n, and --no-parser implementation and
1095 documentation.
1096 * TODO: Don't mention them.
1097 * doc/bison.1: Likewise.
1098 * doc/bison.texinfo (Decl Summary): Likewise.
1099 (Bison Options): Likewise.
1100 (Option Cross Key): Likewise.
1101 * src/getargs.c (no_parser_flag): Remove global variable.
1102 (usage): Don't print description of -n and --no-parser.
1103 (long_options): Remove --no-parser entry here.
1104 (getargs): Remove -n case in the switch here.
1105 * src/getargs.h (no_parser_flag): Remove extern.
1106 * tests/regression.at (Web2c Actions): Remove comment that mentions
1107 --no-parser.
1108
5d31a216
JD
11092007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1110
1111 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1112 name user variables starting with `yy'. Just pass NULL instead of a
1113 dummy local &yylval to yypush_parse.
1114 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1115 starting with `yy'.
1116
a2ea208d
JD
11172007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1118
1119 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1120 true since it's then always used regardless of whether yyoverflow is
1121 defined. Reported by Christian Burger at
1122 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1123 * THANKS: Add Christian Burger.
1124
91661ebb
JD
1125 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1126 node names: say "Decl Summary" not "Bison Declaration Summary".
1127
cbd50549
JD
11282007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1129
1130 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1131 determine whether this function has already complained about an invalid
1132 value for a %define boolean variable, don't check whether Bison has
1133 ever examined the value. As written, the check was a tautology.
1134 Instead, record and check for this complaint using a separate muscle.
1135
eb1b0740
JD
11362007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1137
1138 Fix push parsing memory leak reported by Brandon Lucia at
1139 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1140 * THANKS: Add Brandon Lucia.
1141 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1142 but the parse never completed and thus freed it.
1143 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1144 * tests/testsuite.at: Include push.at.
1145 * test/push.at: New.
1146 (Push Parsing: Memory Leak for Early Deletion): New test case.
1147
9d774aff
JD
11482007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1149
1150 Improve handling of multiple S/R conflicts in the same state and of S/R
1151 conflicts involving multiple reductions.
1152 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1153 set for a state here or Bison will abort if it is reassigned on a
1154 later conflicted reduction in the same state.
1155 Similarly, don't finalize and assign the solved conflicts report here
1156 or it will be lost if it is reassigned on a later conflicted reduction
1157 in the same state.
1158 (set_conflicts): Instead, assign them both here after all S/R conflicts
1159 in the state have been fully examined.
1160 * src/print.c (shift_set): Rename to...
1161 (no_reduce_set): ... this.
1162 (print_reductions): Update for rename, and add %nonassoc error action
1163 tokens to no_reduce_set so that, when printing the first remaining
1164 reduction on an error action token, the reduction is enclosed in
1165 brackets.
1166 (print_results): Update for rename.
1167 * tests/conflicts.at (Solved conflicts report for multiple reductions
1168 in a state): New test case.
1169 (%nonassoc error actions for multiple reductions in a state): New test
1170 case.
1171
1172 * src/main.c (main): Don't depend on C99 features.
1173
10159d2a
JD
11742007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1175
1176 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
1177 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1178 uniwidth.
10159d2a 1179
953b3935
JD
11802007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1181
1182 * bootstrap (slurp): Create target directories that don't exist.
1183 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1184
6ce2d93a
JD
11852007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1186
1187 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1188 than item number.
1189 * closure.c (closure): Likewise.
1190 * state.h (reductions): Comment sorting of rules.
1191 (state): Comment sorting of items.
1192
ce3448d5
JD
11932007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1194
1195 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1196 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1197 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1198 definition in order to avoid Gnulib headers since we don't use config.h
1199 here.
1200 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1201 rather than AT_DATA so that config.h is included.
1202
8a86eef0
JD
12032007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1204
1205 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1206 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1207 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1208 and so that YYFPRINTF is guaranteed to be defined here.
1209
b1a81613
JD
12102007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1213 with...
1214 (muscle_percent_define_check_values): ... this more helpful function.
1215 Again, it's not used yet, but it will be.
1216 * src/muscle_tab.h: Likewise.
1217
71b61d4d
JD
1218 Improve some comments in parser table construction.
1219 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1220 (generate_states): Don't mention ruleset, which is internal to closure.
1221 * src/closure.c (closure): Explain sorting of core and itemset, which
1222 is required for this function to behave correctly.
1223 * src/closure.h (closure): Mention sorting.
1224
2a6b783d
JD
12252007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1226
1227 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1228 move the check for disabled transitions to an aver since conflict
1229 resolution hasn't happened yet.
1230
1231 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1232 labels a state as inconsistent just because it has error transitions.
1233 The original form of this check appeared in revision 1.1 of lalr.c,
1234 which was committed on 1991-12-21. Now (at least), changing the
1235 consistency label on such a state appears to have no useful effect in
1236 any of the places it is examined, which I enumerate below. The key
1237 point to understanding each item in this enumeration is that a state
1238 with an error transition is labelled consistent in the first place only
1239 if it has no rules, so the check cannot matter for states that have
1240 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1241 to try to identify its conflicts, and a state must have *rules* to have
1242 conflicts. (2) Labelling a state as inconsistent will affect how
1243 action_row sets the default *rule* for the state. (3) Labelling a
1244 state as inconsistent will cause build_relations to add lookback edges
1245 to *rules* in that state.
1246 * src/state.h (struct state): Word the comment for member consistent
1247 more carefully.
1248
14462c2b
JD
12492007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1250
1251 Don't depend on C99 features.
1252 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1253 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1254 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1255 * src/state.c (state_mark_reachable_states): Fix for-loop.
1256 (state_remove_unreachable_states): Fix for-loop.
1257
1258 Don't widen struct state with member reachable just to temporarily
1259 record reachability. Instead, use a local bitset.
1260 * src/state.h (struct state): Remove member.
1261 * src/state.c (state_new): Don't initialize it.
1262 (state_mark_reachable_states): Rename to...
1263 (state_record_reachable_states): ... this, and use bitset.
1264 (state_remove_unreachable_states): Use bitset.
1265
5a43d418
JD
12662007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1267
1268 * src/Makefile.am (yacc): Quote target action commands properly so
1269 that the yacc script isn't corrupt. Reported by Hans Aberg at
1270 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1271
0c650a20
JD
1272 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1273 the case of pure parsers. Reported by Frans Englich at
1274 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1275 * THANKS: Add Frans Englich.
1276
61fee93e
JD
1277 * NEWS (2.3a+): In the %code entry, reference section `Bison
1278 Declaration Summary' from the manual now since the %code summary has
1279 moved there.
1280 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1281 in the rules section must be terminated by semicolons.
1282
f124d423
JD
12832007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1284
1285 Extend the front-end API for %define variables to more completely
1286 mirror the back-end. This will be useful in the future.
1287 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1288 Update comments to mention the new front-end counterparts of these
1289 macros.
1290 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1291 for muscle_string_decode and muscle_location_decode.
1292 (muscle_string_decode): New static function.
1293 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1294 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1295 functions.
1296 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1297 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1298 implementation more closely.
1299 (muscle_percent_define_invalid_value): New function.
1300 * src/muscle_tab.h (muscle_percent_define_get,
1301 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1302 Prototype.
1303
75ad86ee
JD
13042007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1305
1306 * NEWS (2.3a+): Mention yesterday's state-removal change.
1307 (2.3a): Remove the %language entry, which was added after 2.3a.
1308 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1309 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1310 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1311 tests/existing.at: Update copyright date.
1312
5967f0cf
JD
13132007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1314
1315 If conflict resolution makes states unreachable, remove those states,
1316 report rules that are then unused, and don't report conflicts in those
1317 states.
1318 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1319 New global function.
1320 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1321 function.
1322 * src/main.c (main): After conflict resolution, remove the unreachable
1323 states and update all data structures that reference states by number.
1324 * src/state.c (state_new): Initialize each state's reachable member to
1325 false.
1326 (state_mark_reachable_states): New static function.
1327 (state_remove_unreachable_states): New global function.
1328 * src/state.h (struct state): Add member bool reachable.
1329 (state_remove_unreachable_states): Prototype.
1330 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1331 New test case.
1332 * tests/existing.at (GNU pic Grammar): Update test case output now that
1333 an unused rule is discovered.
1334
b09f4f48
JD
13352007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1336
1337 Minor code cleanup in parser table construction.
1338 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1339 (new_itemsets, save_reductions): Update for rename to nitemset.
1340 * src/closure.c (nritemset): Rename to...
1341 (nitemset): ... this since the "r" appears to meaningless and isn't
1342 used in the comments.
1343 (closure): Update for rename.
1344 * src/closure.h (nritemset): Update extern to...
1345 (nitemset): ... this.
1346 * src/lalr.c (LA): Fix a typo in comments.
1347 * src/print.c (print_core): Update for rename to nitemset.
1348 * src/print_graph.c (print_graph): Likewise.
1349 * src/state.h: Fix some typos in header comments.
1350
bbb44d83
PE
13512007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1352
9b33de72
PE
1353 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1354 still sticks to ASCII. Sorry!
1355
bbb44d83
PE
1356 * README-hacking: New file, taken mostly from coreutils, with changes
1357 for Bison. Contains much of the contents of:
1358 * README-cvs: Remove.
1359 * bootstrap: Sync from gnulib.
1360 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1361 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1362
29553547
JD
13632007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1364
1365 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1366 Setzer.
1367 (Java Differences): Fix some typos.
1368 * THANKS: Add Sebastian Setzer.
1369
01b477c6
PB
13702007-03-07 Paolo Bonzini <bonzini@gnu.org>
1371
730739e4
AD
1372 * data/java.m4 (b4_single_class_if): Remove.
1373 (b4_abstract_if): Look at "%define abstract".
1374 (b4_lexer_if): New.
1375 (b4_union_name): Rename...
1376 (b4_yystype): ... to this. Map to "%define stype".
1377 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1378 b4_maybe_throws): Fix quoting.
1379 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1380 * data/lalr1.java (Lexer interface): Always define.
1381 (Lexer interface within parser class): Remove.
1382 (YYLexer class): New, used when "%code lexer" is present.
1383 (constructor): When "%code lexer" is used, pass %lex-param
1384 to the lexer constructor.
1385 (yylex, yyparse): Remove %lex-param from method invocations
1386 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1387
1388 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1389 abstract". Rename "%define union_name" to "%define stype".
1390 Rename method names according to previous patch.
1391 (Java Scanner Interface): Describe "%code lexer" instead of
1392 "%pure-parser" and "%define single_class".
1393 (Java Differences): Mention "%code lexer".
1394
1395 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1396 Include scanner here, using macros from tests/local.at.
1397 (AT_DATA_CALC_Y): Remove final argument.
1398 (_AT_CHECK_JAVA_CALC): Likewise.
1399 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1400 of %locations and %error-verbose.
1401 (main): Test with and without %lex-param.
1402 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1403 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 1404
122bea3a
JMG
14052007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1406
1407 DJGPP spefic issue. Inhibit the use of disallowed characters for
1408 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1409 and concern testsuite case 46.
1410 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1411 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1412 * djgpp/config.bat: Inhibit the use of disallowed characters.
1413
9611cfa2
JD
14142007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1415
1416 Miscellaneous %define and %code cleanup.
1417 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1418 values are interpreted.
1419 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1420 documentation a little more.
1421 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1422 muscle_percent_define_insert, muscle_percent_code_grow): New
1423 functions/macros.
1424 * src/muscle_tab.h (muscle_percent_define_insert,
1425 muscle_percent_code_grow): Prototype.
1426 * src/parse-gram.y (prologue_declaration): Use
1427 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1428 %define and %code directives.
1429
1430 Make it easy to share %define boolean variables between the front-end
1431 and back-end. Though not used yet, this will be useful in the future.
1432 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1433 Bison uses of names rather than just skeleton uses of names.
1434 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1435 b4_percent_define_skeleton_variables(VARIABLE) to
1436 b4_percent_define_bison_variables(VARIABLE).
1437 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1438 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1439 b4_percent_code_bison_qualifiers(QUALIFIER).
1440 (b4_check_user_names_wrap): Update for renames.
1441 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1442 muscle_percent_define_default): New functions mimicking
1443 b4_percent_define_flag_if and b4_percent_define_default.
1444
1445 For %define variables, report locations for invalid values and
bbb44d83 1446 redefinitions.
9611cfa2
JD
1447 * data/bison.m4 (b4_percent_define_flag_if): Read
1448 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1449 value for VARIABLE.
1450 (b4_percent_define_default): Save a special location in
1451 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1452 must later be reported as invalid.
1453 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1454 functions.
1455 (muscle_percent_define_insert): Record the location of VARIABLE in
1456 muscle percent_define_loc(VARIABLE), and use it to report the previous
1457 location for a redefinition.
1458 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1459 (muscle_percent_define_default): Update like b4_percent_define_default.
1460 (muscle_grow_user_name_list): Rename to...
1461 (muscle_user_name_list_grow): ... this for consistency and use
1462 muscle_location_grow.
1463 * src/muscle_tab.h (muscle_location_grow): Prototype.
1464 * tests/input.at (%define errors): Update expected output.
1465 * tests/skeletons.at (%define boolean variables: invalid skeleton
1466 defaults): New test case.
1467
0bf92491
JD
14682007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1469
1470 * src/print.c (lookahead_set, state_default_rule): Remove.
1471 (print_reductions): Replace state_default_rule invocation with
1472 equivalent use of yydefact, which was computed in token_actions in
1473 tables.c.
1474 (print_results): Don't allocate lookahead_set.
1475
d3b12988
PB
14762007-02-27 Paolo Bonzini <bonzini@gnu.org>
1477
1478 * data/lalr1.java: Prefix all private members with yy.
1479
f57a7536
JD
14802007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1481
1482 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 1483 Sebastien Fricker at
f57a7536 1484 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 1485 * THANKS: Add Sebastien Fricker.
f57a7536
JD
1486 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1487 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1488 accept a variable number of arguments.
1489
6404a5bf
JD
14902007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1491
1492 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1493
e4e09639
JMG
14942007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1495
1496 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1497 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1498 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1499
d7e0a1a7
PE
15002007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1501
1502 Undo my 2007-02-07 change, switching back to the c-strcase module
1503 introduced in the 2007-02-03 change. Bruno Haible reported that
1504 the 2007-02-07 change would be dangerous in Turkish if we add a
1505 language whose name contains "i", since "i" is not lowercase "I"
1506 in Turkish.
1507 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1508 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1509 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1510 * m4/.cvsignore: Remove strcase.m4.
1511 * src/getargs.c: Revert 2007-02-07 change, as follows.
1512 Include c-strcase.h.
1513 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1514
deee93a1
JD
15152007-02-11 Bruno Haible <bruno@clisp.org>
1516
1517 Enable the Java related testsuite tests when the only Java compiler
1518 found is a gcj < 4.3. Discussed at
1519 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1520 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1521
574add85
JD
15222007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1523
1524 * data/Makefile.am: Update copyright date.
1525 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1526 yypstate_new returns NULL.
1527 (yypstate_new): Return NULL if malloc does.
1528 * src/reader.c (packgram): Move translation of rule actions from the
1529 beginning of packgram to...
1530 (check_and_convert_grammar): ... here right before packgram is invoked
1531 so it's easier to write more complete comments, and remove redundant
1532 code.
1533
e785ccf7
JD
15342007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1535
1536 As in semantic actions, make @$ in %initial-action, %destructor, and
1537 %printer imply %locations.
1538 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1539 scanning @$.
1540 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1541 (@$ in %initial-action implies %locations,
1542 @$ in %destructor implies %locations,
1543 @$ in %printer implies %locations): ... these new test cases.
1544
1cfe1ed7
PE
15452007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1546
1547 Undo most of the 2007-02-03 change, switching to the strcase module
1548 now that gnulib strcase has been fixed.
1549 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1550 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1551 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1552 * m4/.cvsignore: Add strcase.m4.
1553 * src/getargs.c: Revert 2007-02-03 change, as follows.
1554 Don't include c-strcase.h.
1555 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1556 strcasecmp has "unspecified behavior" outside the POSIX locale,
1557 but it works fine in practice if at least one argument is ASCII,
1558 as is the case in Bison.
1559
0049ec86
PB
15602007-02-07 Paolo Bonzini <bonzini@gnu.org>
1561
1562 * tests/java.at: Skip tests if only one of javac/java is present.
1563 Reported by Joel E. Denny.
1564 * tests/atlocal.in: Adjust copyright years.
1565
15662007-02-05 Paolo Bonzini <bonzini@gnu.org>
1567
1568 * data/lalr1.java (Stack): Work around old verifiers that disallow
1569 access to the private fields of an inner class, from the outer class.
1570 We can make Stack's fields public because user code doesn't have access
1571 to the instance of Stack used by parse(). Reported by Paul Eggert.
1572
2c2b7220
PE
15732007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1574
1575 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1576 the right spot for these files?
1577 * bootstrap.conf (gnulib_modules): Add c-strcase.
1578 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1579 c-strncasecmp.c.
1580 * src/getargs.c: Include c-strcase.h.
1581 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1582 to avoid unspecified behavior.
1583
b2b81dae
JD
15842007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1585
1586 * doc/bison.texinfo (Decl Summary): Correct typo.
1587
c1d19e10
PB
15882007-01-30 Paolo Bonzini <bonzini@gnu.org>
1589
1590 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1591 Complain if the value does not match empty, "true" or "false".
1592 * data/c++.m4: Adjust default definitions of %define variables.
1593 * data/java.m4: Adjust default definitions of %define variables.
1594 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1595 to above behavior.
1596 * tests/input.at (Boolean %define variables): Test new behavior.
1597
8405b70c
PB
15982007-01-29 Paolo Bonzini <bonzini@gnu.org>
1599
1600 * NEWS: Mention java.
1601 * TODO: Remove things that are done.
1602 * bootstrap.conf: Add javacomp-script and javaexec-script.
1603 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1604
1605 * data/Makefile.am: Add new files.
1606 * data/java-skel.m4: New.
1607 * data/java.m4: New.
1608 * data/lalr1.java: New.
1609
1610 * doc/bison.texinfo: Put "A Complete C++ Example" under
1611 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1612 under Other Languages.
1613
1614 * src/getargs.c (valid_languages): Add Java.
1615 * src/getargs.h (struct bison_language): Update size of string fields.
1616
1617 * tests/Makefile.am: Add java.at.
1618 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1619 * tests/java.at: New.
1620 * tests/testsuite.at: Include it.
1621
3eb82471
JD
16222007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1623
1624 Clean up.
1625 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1626 at_directive_argv arguments so these no longer have to be global
1627 variables. Also, update the implementation for the following changes.
1628 (fail_for_at_directive_too_many_args,
1629 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1630 (at_directive_name): Remove as at_directive_argv[0] will be used for
1631 this now.
1632 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1633 for the directive name.
1634 (at_directive_argc, at_directive_argv): Make these local within
1635 skel_lex instead of global.
1636 (INITIAL): Update directive start action for above changes.
1637 (SC_AT_DIRECTIVE_ARG): Rename to...
1638 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1639 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1640 (scan_skel): Move yylex_destroy to...
1641 (skel_scanner_free): ... here.
1642 * tests/skeletons.at (installed skeleton file name): Rename to...
1643 (installed skeleton file names): ... this.
1644
148d66d8
JD
16452007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1646
1647 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1648 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1649 Summary" not "Directives".
1650 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1651 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1652 since the former is now the more complete one.
1653 (Prologue Alternatives): Likewise and do the same for %defines.
1654 (Table of Symbols): Add summary of %code, add summary of %define, and
1655 move full %code documentation to...
1656 (Decl Summary): ... here for consistency with other entries in these
1657 sections.
1658 Move %define entry in order to keep this list alphabetized.
1659 Reword %define entry a little to put less emphasis on the skeleton
1660 concept, which most users shouldn't have to think about.
1661
665f0c24
PE
16622007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1663
1664 Adjust to recent gnulib changes.
1665 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1666 Add string.h, string_.h, unistd_.h, wchar_.h.
1667 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1668 * src/system.h: Don't include <stpcpy.h>; this is now done by
1669 <string.h>.
1670
592d0b1e
PB
16712007-01-23 Paolo Bonzini <bonzini@gnu.org>
1672
1673 Simplify implementation of unqualified %code, implement macros for
1674 uniform treatment of boolean %define flags. Document %define.
1675 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1676 b4_percent_code_ifdef): New.
1677 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1678 * data/c++.m4: Define default value for global_tokens_and_yystype.
1679 * data/glr.cc: Likewise.
1680 * data/location.cc: Use b4_percent_define_flag_if.
1681
148d66d8 1682 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
1683
1684 * src/parse-gram.y (Unqualified %code): Change muscle name to
1685 b4_percent_code().
1686 (content.opt): Default to empty.
1687
a7867f53
JD
16882007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1689
1690 Implement support for relative and absolute skeleton file names.
1691 Discussed starting at
1692 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1693 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1694 (Bison Options): Document in --skeleton entry.
1695 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1696 full_skeleton can't necessarily hold all of pkgdatadir.
1697 If the specified skeleton file name contains a `/', don't prepend
1698 pkgdatadir.
1699 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1700 file name contains a `/', prepend the grammar file directory.
1701 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1702 * skeletons.at: New file.
1703 (relative skeleton file names): New test case.
1704 (installed skeleton file names): New test case.
1705 * tests/testsuite.at: Include skeletons.at.
1706
1707 * bootstrap: Update copyright to 2007.
1708
830c9b18
PB
17092007-01-17 Paolo Bonzini <bonzini@gnu.org>
1710
1711 * bootstrap: Remove occurrences of .#bootmp from the files.
1712
a8c2e813
AD
17132007-01-17 Akim Demaille <akim@epita.fr>
1714
1715 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1716 nonterminals.
1717 Use per-type %printer.
1718
279cabb6
JD
17192007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1720
1721 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1722 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1723 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1724 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1725 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1726 tests/glr-regression.at, tests/input.at, tests/local.at,
1727 tests/output.at, tests/torture.at: Update copyright to 2007.
1728
bb32f4f2
AD
17292007-01-16 Akim Demaille <akim@epita.fr>
1730
1731 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1732 error code.
1733 (Calc++ Scanner): Exit with failure if we can't open the input
1734 file.
1735 Accept "-" standing for stdin.
1736 (Calc++ Top Level): Print the result only if the parsing was
1737 successful.
1738
7cff04b5
AD
17392007-01-16 Akim Demaille <akim@epita.fr>
1740
1741 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1742
a4e25e1d
JD
17432007-01-15 Paolo Bonzini <bonzini@gnu.org>
1744 and Joel E. Denny <jdenny@ces.clemson.edu>
1745
1746 Clean up %define and %code implementation in M4 some. Most
1747 importantly, rename all related macros to be in the b4_percent_define
1748 and b4_percent_code namespaces. Also, complete support for `.' in
1749 %define variable names and %code qualifiers.
1750 * data/bison.m4 (b4_check_user_names): Check for special
1751 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1752 m4_foreach loops.
1753 (b4_get_percent_define, b4_get_percent_code): Rename to...
1754 (b4_percent_define_get, b4_percent_code_get): ... these.
1755 Extend documentation with examples.
1756 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1757 b4_percent_define_skeleton_variables and
1758 b4_percent_code_skeleton_qualifiers.
1759 Expect any value for the %define variable `foo' to be stored in the
1760 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1761 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1762 expect any unqualified %code blocks to be stored in a macro named
1763 `b4_percent_code_unqualified'.
1764 Use m4_indir so that %define variable names and %code qualifiers can
1765 contain `.', which is allowed by the grammar parser.
1766 (b4_percent_define_default): New macro to set a default value for a
1767 %define variable.
1768 (m4_wrap): Update wrapped code, and fix some underquoting.
1769 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1770 Expect grammar uses of %define variables and %code qualifiers to be
1771 defined in b4_percent_define_user_variables and
1772 b4_percent_code_user_qualifiers.
1773 * data/c++.m4: Use b4_percent_define_default rather than
1774 m4_define_default. Fix some underquoting. Skeleton usage of %define
1775 variable define_location_comparison now implies skeleton usage of
1776 %define variable filename_type.
1777 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1778 data/push.c, data/yacc.c: Update macro names.
1779 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1780 muscle names.
1781
e37c665c
JMG
17822007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1783
1784 DJGPP specific issues.
1785
1786 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1787 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1788
7d2d521f
JD
17892007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1790
1791 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1792 run parsers in all tests so that Valgrind is invoked during
1793 maintainer-check-valgrind.
1794 (Duplicate representation of merged trees): Free all semantic values.
1795 (Duplicated user destructor for lookahead): Likewise.
1796
e0ac9b4b
JD
17972007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1798
1799 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1800 command-line prefix.
1801 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1802 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1803 miss Valgrind messages.
1804 (Exploding the Stack Size with Malloc): Likewise.
1805
78143faa
JD
18062007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1807
1808 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1809 locals. Reported by Juan Manuel Guerrero at
1810 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1811 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1812 Fix some indentation also.
1813 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1814 explaining this issue.
1815
7ecec4dd
JD
18162007-01-09 Paolo Bonzini <bonzini@gnu.org>
1817 and Joel E. Denny <jdenny@ces.clemson.edu>
1818
1819 Simplify union and prologue handling, and escape union and lex/parse
1820 params with digraphs.
1821 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1822 values to the empty string since these are no longer guaranteed
1823 initialized by the front-end.
1824 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1825 braces around b4_user_stype since this is no longer done by the
1826 front-end.
1827 * src/files.c, src/files.h (pre_prologue_obstack,
1828 post_prologue_obstack): Remove.
1829 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1830 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1831 with digraphs. This fixes lex params and parse params.
1832 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1833 * src/output.c (prepare): Remove muscle insertion of the prologues.
1834 (output): Remove freeing of pre_prologue_obstack and
1835 post_prologue_obstack.
1836 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1837 than prologue_augment for prologue parsing so you don't need prologue
1838 obstacks.
5c80250c
JD
1839 (grammar_declaration): For %union RHS, use `braceless' instead of
1840 "{...}" so that braces are already stripped and code is escaped with
1841 digraphs.
7ecec4dd
JD
1842 * src/reader.c (prologue_augment): Remove.
1843 (reader): Remove initialization of pre_prologue_obstack and
1844 post_prologue_obstack.
1845 * src/reader.h (prologue_augment): Remove.
1846
1847 * data/c.m4: Remove stray parenthesis.
1848
16dc6a9e
JD
18492007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1850
1851 Remove quotes from variables names in %define directives and from
1852 qualifiers in %code directives, and restrict the characters that are
1853 allowed in them to M4-friendly ones. For %define, continue to support
1854 the quoted form as a deprecated feature. Discussed starting at
1855 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1856 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1857 %code.
1858 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
1859 (Decl Summary): In %defines entry, update mention of `%code requires'
1860 and `%code provides'.
16dc6a9e
JD
1861 (C++ Location Values): Update %define uses.
1862 (Calc++ Parser Interface): Likewise.
1863 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 1864 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
1865 * src/parse-gram.y (prologue_declaration): For %define variables, use
1866 `variable' instead of `STRING'.
1867 (grammar_declaration): For %code qualifiers, use `ID' instead of
1868 `STRING'.
1869 (variable): New nonterminal that takes an `ID' or a `STRING'.
1870 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1871 and %define uses.
1872 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1873 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1874 (%define errors): Update %define uses.
1875
e9813cd4
JD
18762007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1877
1878 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1879 instead of muscle_insert for %define values so that M4-special
1880 characters are replaced with digraphs.
1881 * tests/input.at (%define errors): Extend to check weird values.
1882
6afc30cc
JD
18832007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1884
1885 Instead of having skeletons declare all valid %define variables and
1886 %code qualifiers, provide macros that retrieve the associated values
1887 and build these lists automatically. Thus Bison will now warn when a
1888 variable or qualifier is not used by the skeleton in the current
1889 invocation regardless of whether it might sometimes be used by that
1890 skeleton in other invocations. Also, move all %define value macros to
1891 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1892 form, which is replaced by %code.
1893 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1894 (b4_check_user_names): ... this, and change the series of valid name
1895 arguments to a single list argument for names used in the skeleton
1896 similar to the existing list argument for names used in the grammar.
1897 Warn instead of complaining.
1898 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1899 values and %code code, to format %code code properly, and to build
1900 lists of all %define variables and %code qualifiers used in the
1901 skeleton: b4_skeleton_percent_define_variables and
1902 b4_skeleton_percent_code_qualifiers.
1903 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1904 Remove, and...
1905 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1906 the skeleton names lists can finish building first. In place of
1907 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1908 expect the lists b4_user_percent_define_variables and
1909 b4_user_percent_code_qualifiers.
1910 * data/c++.m4: Where setting default values for b4_parser_class_name,
1911 b4_location_type, b4_filename_type, b4_namespace, and
1912 b4_define_location_comparison, update their names to the
1913 b4_percent_define_ namespace.
1914 * data/glr.c: Don't use b4_check_percent_define_variables and
1915 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1916 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1917 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 1918 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
1919 * data/location.cc: Use b4_get_percent_define.
1920 * data/push.c: Don't use b4_check_percent_define_variables and
1921 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1922 * data/yacc.c: Likewise, and don't call m4_exit in
1923 b4_use_push_for_pull_if or m4_wrap code will never execute.
1924 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1925 Rename to...
1926 (muscle_grow_user_name_list): ... this for consistency with the
1927 terminology used in bison.m4.
1928 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1929 %define variable names, and rename muscle used_percent_define_variables
1930 to user_percent_define_variables.
1931 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1932 user_percent_code_qualifiers.
1933 (content): Remove.
1934 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1935 {CODE} form is no longer accepted.
1936 * tests/input.at (Reject bad %code qualifiers): Rename to...
1937 (Reject unused %code qualifiers): ... this, and update test output.
1938 (%define error): Update test output.
1939
7eb8a0bc
JD
19402007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1941
1942 Check for unrecognized %define variables similar to checking for
1943 unrecognized %code qualifiers. Check for redefined %define variables.
1944 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1945 generalizes...
1946 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1947 (b4_check_percent_define_variables): New, also wraps it.
1948 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1949 variables using b4_check_percent_define_variables.
1950 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1951 all those exercised in the test suite and all those listed in the
1952 `Default values' section of c++.m4. Are there others?
1953 * data/push.c, data/yacc.c: Declare no valid %define variables.
1954 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1955 similar to muscle_find, but it works even when the muscle stores a
1956 const value.
1957 (muscle_grow_used_name_list): New function for constructing the used
1958 name list muscles that b4_check_for_unrecognized_names requires.
1959 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1960 %define'd more than once. Define the b4_used_percent_define_variables
1961 muscle with muscle_grow_used_name_list.
1962 (grammar_declaration): Abbreviate %code code with
1963 muscle_grow_used_name_list.
1964 * tests/input.at (%define errors): New.
1965
3fc65ead
JD
19662007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1967
1968 Provide warn_at, complain_at, and fatal_at function callbacks to the
1969 skeletons, and use this for %code qualifier complaints.
1970 * data/bison.m4 (b4_error_at): New, invoked by...
1971 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1972 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1973 @fatal_at(...@) directives.
1974 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1975 qualifiers in b4_used_percent_code_qualifiers and to use
1976 b4_complain_at.
1977 * src/location.c, src/location.h (boundary_set_from_string): New global
1978 function.
1979 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1980 function.
1981 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1982 to b4_used_percent_code_qualifiers.
1983 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1984 function.
1985 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1986 (lineno): Rename to...
1987 (out_lineno): ... this so I don't misunderstand it again.
1988 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1989 here; these newlines are in the input but not the output file.
1990 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1991 (at_directive_perform): ... this new static function, and add handling
1992 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1993 directives.
1994 * tests/input.at (Reject bad %code qualifiers): Update test output with
1995 locations and extend.
1996
1997 * tests/output.at (Output file name: [, Output file name: ]): Remove
1998 bogus comment about these tests failing.
1999
1c7b7e1d
JD
20002007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2001
2002 Clean up b4_check_percent_code_qualifiers a little.
2003 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2004 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2005 documentation and add examples.
2006 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2007 qualifiers here.
2008
08af01c2
JD
20092007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2010
2011 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2012 unreliable -- especially when they're hidden inside another macro.
2013 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2014 data/c.m4: Remove m4_divert(-1).
2015 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2016 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2017 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 2018 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
2019 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2020 pushed and popped by m4sugar, should be first on the stack.
2021
2022 Provide warn, complain, and fatal function callbacks to the skeletons.
2023 This provides more flexibility than m4_fatal, improves the error
2024 message format, and captures messages for translation. Discussed
2025 starting at
2026 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2027 * data/bison.m4 (b4_error): New, invoked by...
2028 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2029 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2030 directives. Because these M4 macros might be called when the current
2031 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2032 the previous removal of uses of m4_divert, which caused trouble.
2033 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2034 m4_fatal to report unrecognized %code qualifiers.
2035 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2036 push parser requests.
2037 * data/glr.c: Use b4_complain instead of m4_fatal to report
2038 non-deterministic push parser requests.
2039 Update @output usage to @output(...@) form.
2040 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2041 report missing %defines. Update @output usage to @output(...@) form.
2042 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2043 @output(...@) form.
2044 * src/main.c (main): Invoke skel_scanner_free.
2045 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2046 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2047 obstack_for_string from flex-scanner.h.
2048 (YY_DECL): Use to declare skel_lex static.
2049 (decode_at_digraphs): Remove; now handled in the new
2050 SC_AT_DIRECTIVE_ARG start condition.
2051 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2052 functions.
2053 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2054 at_directive_argv): New static globals.
2055 (INITIAL): Use fail_for_invalid_at.
2056 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2057 recognize the start of a generalized `@directive(...@)' form and
2058 start...
2059 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2060 directive args (using the new obstack_for_string), to decode the
2061 contained @ diagraphs, and to perform the directive. It recognizes
2062 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2063 @output(...@).
2064 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2065 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2066 `@,'.
2067 (scan_skel): Initialize obstack_for_string on the first call.
2068 (skel_scanner_free): New function to free obstack_for_string.
2069 * tests/input.at (Reject bad %code qualifiers): Update test output.
2070
8e0a5e9e
JD
20712007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2072
2073 Consolidate the 4 prologue alternative directives (%code, %requires,
2074 %provides, and %code-top) into a single %code directive with an
2075 optional qualifier field. Discussed at
2076 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2077 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2078 alternatives.
2079 * doc/bison.texinfo (Prologue Alternatives): Update.
2080 (Decl Summary): Update to %code "requires" and %code "provides".
2081 (Calc++ Parser): Update to %code "requires".
148d66d8 2082 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
2083 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2084 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2085 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2086 which are skeleton-specific.
2087 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2088 declare what %code qualifiers it supports and to complain if any other
2089 qualifiers were used in the grammar.
2090 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2091 and b4_user_code([b4_percent_code_provides]) in place of
2092 b4_user_requires and b4_user_provides.
2093 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2094 Add b4_user_code([b4_percent_code_top]) and
2095 b4_user_code([b4_percent_code]).
2096 Invoke b4_check_percent_code_qualifiers.
2097 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2098 PERCENT_REQUIRES): Remove.
2099 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2100 %requires. Rewrite the %code RHS as the unqualified form defining the
2101 muscle b4_percent_code. Add another RHS for the qualified %code form,
2102 which defines muscles of the form b4_percent_code_QUALIFIER and the
2103 b4_used_percent_code_qualifiers muscle.
2104 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2105 PERCENT_REQUIRES): Remove.
2106 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2107 %code "requires" and %code "provides".
2108 * tests/input.at (Reject bad %code qualifiers): New.
2109
95021767
JD
21102007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2111
2112 Use the new code_props interface for destructors and printers.
2113 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2114 printer_location members, and change the type of the destructor and
2115 printer members to code_props.
2116 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2117 symbol_printer_get, semantic_type_destructor_set,
2118 semantic_type_printer_set, default_tagged_destructor_set,
2119 default_tagless_destructor_set, default_tagged_printer_set,
2120 default_tagless_printer_set): Use code_props in arguments and return
2121 types in place of char const * and location.
2122 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2123 since the locations are now contained in the return of
2124 symbol_destructor_get and symbol_printer_get.
2125 * src/output.c (symbol_destructors_output, symbol_printers_output):
2126 Replace with...
2127 (symbol_code_props_output): ... this to eliminate duplicate code.
2128 (output_skeleton): Update to use symbol_code_props_output.
2129 * src/reader.c (symbol_should_be_used): Update use of
2130 symbol_destructor_get.
2131 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2132 Update uses of the various _destructor_set and _printer_set functions.
2133 * src/symtab.c: (default_tagged_destructor_location,
2134 default_tagless_destructor_location, default_tagged_printer_location,
2135 default_tagless_printer_location): Remove since we...
2136 (default_tagged_destructor, default_tagless_destructor,
2137 default_tagged_printer, default_tagless_printer): ... change the type
2138 of these to code_props.
2139 (symbol_new, semantic_type_new, symbol_destructor_set,
2140 semantic_type_destructor_set, symbol_destructor_get,
2141 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2142 symbol_check_alias_consistency, default_tagged_destructor_set,
2143 default_tagless_destructor_set, default_tagged_printer_set,
2144 default_tagless_printer_set): Update.
2145 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2146 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2147 code_props members.
2148 (symbol_print): Use SYMBOL_CODE_PRINT.
2149
f6857bbf
JD
21502007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2151
2152 Use the new code_props interface for rule actions.
2153 * src/symlist.h (symbol_list): Replace action, action_location, and
2154 used members with a code_props action_props member.
2155 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2156 grammar_midrule_action, grammar_current_rule_merge_set,
2157 grammar_current_rule_symbol_append, packgram): Update.
2158 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2159 * src/scan-code.l (handle_action_dollar): Update.
2160 (translate_rule_action): Remove, no longer used.
2161 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2162
7c0c6181
JD
21632007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2164
2165 Use the new code_props interface in parse-gram.y.
2166 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2167 Update all uses of translate_* functions to use the new code_props
2168 interface and to use gram_scanner_last_string_free and
2169 code_scanner_last_string_free where possible.
2170 (grammar_declaration): symbol_list_destructor_set and
2171 symbol_list_printer_set now perform the translation, so don't do it
2172 here. Use gram_scanner_last_string_free where possible.
2173 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2174 translate_code): Remove, no longer used.
2175 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2176 symbol_list_printer_set): Perform code translation here rather than
2177 depending on the caller to do so.
2178
2179 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2180 * src/scan-gram.h (gram_last_string): Remove declaration.
2181 * src/scan-gram.l (last_string): Declare it static.
2182
28e52c0d
JD
21832007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2184
2185 Encapsulate code properties and related functionality for the various
2186 destructors, printers, and actions into a code_props structure and
2187 interface. This patch merely implements code_props in scan-code.h and
2188 scan-code.l. Future patches will rewrite other modules to use it.
2189 Discussed starting at
2190 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2191 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2192 consistently initialize const structs that have an empty location
2193 field.
2194 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2195 to ensure consistency.
2196 * src/scan-code.h (code_props): New structure.
2197 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2198 function, macro, and const global variable for initializing a
2199 code_props with no code.
2200 (code_props_plain_init, code_props_symbol_action_init,
2201 code_props_rule_action_init, code_props_translate_code): The rest of
2202 the new code_props functional interface. Among other things, the init
2203 functions set the code_props kind field so that
2204 code_props_translate_code will know whether to behave like
2205 translate_symbol_action, translate_rule_action, or translate_code.
2206 These old translate functions must remain until all other modules are
2207 updated to use the new code_props interface.
2208 (code_scanner_last_string_free): New function similar to
2209 gram_scanner_last_string_free.
2210 (code_scanner_free): Add documentation.
2211 * src/scan-code.l: Implement the new interface.
2212 (code_lex): Make it static, add a code_props* argument, and remove the
2213 rule argument.
2214 (last_string): New static global similar to the one in scan-gram.l.
2215 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2216 instead of rule.
2217 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2218 code_props since Bison may one day use this information for destructors
2219 and printers.
2220 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2221 (handle_action_dollar): Use symbol_list_n_get and set used flag
2222 directly since symbol_list_n_used_set is removed.
2223 (translate_action): Add a code_props* argument and remove the rule,
2224 action, and location arguments. Pass the code_props* on to code_lex.
2225 (translate_rule_action, translate_symbol_action, translate_code):
2226 Rewrite as wrappers around the new code_props interface.
2227 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2228 it would eventually need to break the encapsulation of code_props.
2229
96034983
JD
22302007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2231
2232 * etc/.cvsignore: New.
2233
945e396c
JD
22342007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2235
2236 Add maintainer-push-check to run maintainer-check using push parsing in
2237 place of pull parsing where available.
2238 * Makefile.am (maintainer-push-check): New.
2239 * data/bison.m4 (b4_use_push_for_pull_if): New.
2240 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2241 appropriately based on their existing values.
2242 (yypush_parse): Don't print push-parser-specific diagnostics if push
2243 parsing is being used in place of pull parsing.
2244 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2245 push.c.
2246 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2247 variable, and insert b4_use_push_for_pull_flag into muscles.
2248 * tests/Makefile.am (maintainer-push-check): New.
2249
7d596384
JD
22502006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2251
2252 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2253 (whether successful or failed) so that yypush_parse can be invoked
2254 again to start a new parse using the same yypstate.
2255 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2256 check multiple yypull_parse invocations on the same yypstate. For pull
2257 mode, extend to check multiple yyparse invocations.
2258 (Exploding the Stack Size with Alloca): Extend to try with
2259 %push-pull-parser.
2260 (Exploding the Stack Size with Malloc): Likewise.
2261
2262 * tests/calc.at (Simple LALR Calculator): Don't specify
2263 %skeleton "push.c" since %push-pull-parser implies that now.
2264 * tests/headers.at (export YYLTYPE): Don't check for the push
2265 declarations. Otherwise, this test case can't be used to see if push
2266 mode can truly emulate pull mode.
2267 * tests/input.at (Torturing the Scanner): Likewise.
2268 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2269 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2270 AT_YACC_IF, which now includes the case of push mode since %skeleton
2271 need not be used for push mode. This will be more intuitive once
2272 push.c is renamed to yacc.c.
2273
7172e23e
JD
22742006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2275
2276 For push mode, convert yyparse from a macro to a function, invoke yylex
2277 instead of passing a yylexp argument to yypull_parse, and don't
2278 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2279 Discussed starting at
2280 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2281 * data/bison.m4 (b4_pull_if): New.
2282 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2283 * data/push.c: Improve M4 quoting a little.
2284 (b4_generate_macro_args, b4_parenthesize): Remove.
2285 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2286 any time a pull parser is requested.
2287 Don't #define this as a wrapper around yypull_parse. Instead, when
2288 both push and pull are requested, make it a function that does that
2289 same thing.
2290 (yypull_parse): If there's a b4_prefix, #define this to
2291 b4_prefix[pull_parse] when both push and pull are requested.
2292 Don't define this as a function unless both push and pull are
2293 requested.
2294 Remove the yylexp argument and hard-code yylex invocation instead.
2295 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2296 %push-parser.
2297 * src/getargs.c (pull_parser): New global initialized to true.
2298 * getargs.h (pull_parser): extern it.
2299 * src/output.c (prepare): Insert pull_flag muscle.
2300 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2301 (prologue_declaration): Set both push_parser and pull_parser = true for
2302 %push-pull-parser. Set push_parser = true and pull_parser = false for
2303 %push-parser.
2304 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2305 %push-parser since there's no backward-compatibility concern here.
2306 Scan %push-pull-parser.
2307 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2308 instead of %push-parser.
2309 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2310 prototype it in the module that calls yyparse.
2311 * tests/input.at (Torturing the Scanner): Likewise.
2312 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2313
2e7944cb
JD
23142006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2315
2316 Update etc/bench.pl. Optimize push mode a little (the yyn change
2317 deserves most of the credit).
2318 * Makefile.am (SUBDIRS): Add etc subdirectory.
2319 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2320 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2321 yytoken, yyval, and yyloc declarations to...
2322 (yyparse or yypush_parse): ... here to improve performance. For
2323 yypush_parse invocations after the first, be sure to assign yyn its old
2324 value again.
2325 (yypstate_new): Don't bother initializing the yyresult field since the
2326 initial value isn't used.
2327 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2328 remove the #define that, in push mode, set it to yyps->NAME.
2329 * etc/Makefile.am: New.
2330 * etc/bench.pl: Remove and build it instead from...
2331 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2332 "tests/bison" from the build directory by default rather than just
2333 invoking "bison" from $PATH.
2334 (calc_grammar): Update push parser code: don't declare yylval globally,
2335 don't define yyparse_wrapper, and don't #define yyparse.
2336 (bench_grammar): Update to check all working combinations of yacc.c,
2337 push.c, impure, pure, pull, and push.
2338
c3d50342
JD
23392006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2340
2341 For push mode, add pull wrappers around yypush_parse.
2342 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2343 (yypull_parse): New function wrapping yypush_parse.
2344 (yyparse): New #define wrapping yypull_parse.
2345 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2346 is declared.
2347 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2348 prototype yylex in the module that calls yyparse, and don't prototype
2349 yyparse there. Otherwise, the yyparse expansion won't compile.
2350 * tests/input.at (Torturing the Scanner): Likewise.
2351
94ebeba5
JD
23522006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2353
2354 Enable push parsers to operate in impure mode. Thus, %push-parser no
2355 longer implies %pure-parser. The point of this change is to move
2356 towards being able to test the push parser code by running the entire
2357 test suite as if %push-parser had been declared.
2358 * data/push.c (yypush_parse): For impure mode, remove the
2359 yypushed_char, yypushed_val, and yypushed_loc arguments.
2360 Instead, declare these as local variables initialized to the global
2361 yychar, yylval, and yylloc.
2362 For the first yypush_parse invocation only, restore the initial values
2363 of these global variables when it's time to read a token since they
2364 have been overwritten.
2365 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2366 %push-parser.
2367 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2368 %pure-parser along with %push-parser since this test case was designed
2369 for pure push parsers.
2370 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2371 (AT_YACC_OR_PUSH_IF): New.
2372 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2373 add a note that it's still wrong for some cases (as it has been for a
2374 while).
2375 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2376 %push-parser no longer implies %pure-parser.
2377
a0633178
JD
23782006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2379
2380 Remove some unnecessary differences between the pull parser code and
2381 the push parser code. This patch enables yynerrs in push mode.
2382 * data/push.c: Reformat M4 a little.
2383 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2384 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2385 because push mode is on. Instead, if pure mode is on, move yynerrs
2386 to...
2387 (b4_declare_parser_state_variables): ... here.
2388 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2389 to yyps->NAME so it can be used in yypush_parse.
2390 (yypush_parse): Don't omit uses of yynerrs in push mode.
2391
8646b6a3
JD
23922006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2393
2394 Fix bug such that the first pushed token's value and location are
2395 sometimes overwritten (sometimes by %initial-action) before being used.
2396 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2397 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2398 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2399 more closely mimic the pull parser logic.
2400 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2401 time to read a token, which is after any initialization of yylval and
2402 yylloc.
2403 (gottoken): Rename label to...
2404 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2405 user namespace.
2406
9baf4d74
JD
24072006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2408
2409 Rearrange initialization of the parser state variables so that the
2410 skeleton doesn't have to have a copy for pull mode and another for push
2411 mode. This patch also fixes at least a bug such that yylloc was not
2412 initialized (with b4_location_initial_line and
2413 b4_location_initial_column) upon calling yypush_parse. However, that
2414 initialization now overwrites the first token's location;
2415 %initial-action assigning @$ already did the same thing, and both bugs
2416 will be fixed in a later patch.
2417 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2418 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2419 yyss, yyvs, yyls, and yystacksize.
2420 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2421 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2422 yylsp.
2423 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2424 yyps->NAME so it can be used in yypush_parse.
2425 (yyparse or yypush_parse): For yypush_parse, don't print the
2426 "Starting parse" diagnostic for invocations after the first.
2427 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2428 yypush_parse, only do it for the first invocation.
2429 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2430 initialization to occur in yypush_parse but only on the first
2431 invocation.
2432
23522164
JD
24332006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2434
2435 * data/push.c: Add CPP guards around push parser declarations in both
2436 the header and the code file.
2437 In the code file, move the push parser declarations to the same place
2438 they appear in the header file.
2439 Clean up the M4 some, especially the inconsistent underquoting in
2440 some b4_c_function_def and b4_c_function_decl uses.
2441
bb010fe5
JD
24422006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2443
2444 Encapsulate the push parser state variables into an M4 macro so the
2445 push skeleton doesn't have to list them again for pull mode's yyparse.
2446 For push mode, remove yypush_parse's local equivalents of these
2447 variables to eliminate unnecessary copying between the two sets at
2448 run-time. This patch also fixes at least a bug related to multiple
2449 %initial-action invocations in push mode.
2450 * data/push.c (b4_declare_parser_variables): Rename to...
2451 (b4_declare_scanner_communication_variables): ... this for clarity and
2452 update both uses.
2453 (b4_declare_yyparse_variables): Remove and move its contents to the one
2454 spot where it was invoked.
2455 (b4_declare_parser_state_variables): New macro containing the parser
2456 state variables required by push mode.
2457 (struct yypstate): Replace all fields but yynew with
2458 b4_declare_parser_state_variables.
2459 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2460 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2461 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2462 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2463 parser state variable declarations with
2464 b4_declare_parser_state_variables.
2465 Don't initialize parser state variables when calling yypush_parse since
2466 yypstate_new already does that.
2467 Invoke the user's initial action only upon the first yypush_parse
2468 invocation.
2469 Remove all code that copies between the local parser state variables
2470 and the yypstate.
2471
2d212f8c
JD
24722006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2473
2474 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2475 prevent a name collision in a future patch where these names will
2476 sometimes be #define'd.
2477 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2478 since it no longer has the same name as the existing argument.
2479 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2480
e6e704dc
JD
24812006-12-19 Paolo Bonzini <bonzini@gnu.org>
2482 and Joel E. Denny <jdenny@ces.clemson.edu>
2483
2484 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2485 that the argument is case-insensitive, and there's no `=' here.
2486 For the %skeleton entry, mention that %language is better.
2487 (Bison Options): Likewise for --language and --skeleton. Move the
2488 --skeleton entry so that the `Tuning the parser' section is sorted
2489 alphabetically on long options.
2490 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2491 %language directive in detail here; cross-reference the %language
2492 documentation instead.
2493 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2494 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 2495 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
2496 * examples/extexi (normalize): Instead of replacing every %require
2497 argument with the current Bison version, just substitute for
2498 `@value{VERSION}'. This guarantees that we're testing what actually
2499 appears in the documentation.
2500 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2501 rather than `@VERSION@'.
2502
0e021770
PE
25032006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2504
fd575f05
PE
2505 * NEWS: Reword the %language news a bit, and put it earlier.
2506
0e021770
PE
2507 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2508 Rewrite to simplify the logic.
2509 (language_argmatch): Likewise.
fd575f05
PE
2510 (program_name): We now own this var.
2511 * src/getargs.h (struct bison_language): Use char[] rather than
2512 const char *.
0e021770
PE
2513
2514 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2515 Java is supported.
2516 * src/complain.c (program_name): Remove decl; no longer needed.
2517 * src/main.c (program_name): Remove; now belongs to getargs.
2518
25192006-12-18 Paolo Bonzini <bonzini@gnu.org>
2520
2521 * NEWS: Document %language.
2522
2523 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2524
2525 * data/c-skel.m4, data/c++-skel.m4: New files.
2526 * data/glr.c: Complain on push parsers.
2527
2528 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2529 over %skeleton.
148d66d8 2530 (Decl Summary): Document %language and %skeleton.
0e021770
PE
2531 (Command line): Document -L.
2532
2533 * examples/extexi: Rewrite %require directive.
2534 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2535
2536 * src/files.c (compute_exts_from_gc): Look in language structure
2537 for .y extension.
2538 (compute_file_name_parts): Check whether .tab should be added.
2539 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2540 (language, skeleton_arg, language_argmatch): New.
2541 (long_options): Add --language.
2542 (getargs): Use skeleton_arg, add -L/--language.
2543 * src/getargs.h: Include location.h.
2544 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2545 * src/output.c (prepare): Pick default skeleton from struct language.
2546 Don't dispatch C skeletons here.
2547 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2548 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2549 * src/scan-gram.l ("%language"): New rule.
2550
2551 * tests/calc.at: Test %skeleton and %language.
2552 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2553 (AT_GLR_IF): Look for %skeleton "glr.cc".
2554 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2555 (AT_YACC_IF): Reject %language.
2556
5691bf57
PE
25572006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2558
db06f0ce
PE
2559 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2560 since it wasn't used; only the typedef name 'semantic_type' is needed.
2561 Also, omit trailing white space.
2562
5691bf57
PE
2563 * bootstrap: Sync from coreutils.
2564 (gnulib_extra_files): Add build-aux/announce.gen.
2565 (slurp): Adjust .gitignore files like .cvsignore files.
2566 * build-aux/announce-gen: Remove from CVS, since bootstrap
2567 now creates this.
2568
791934e4
JD
25692006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2570
2571 Make %push-parser imply %pure-parser. This fixes several bugs; see
2572 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2573 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2574 pure_parser = true.
2575 * data/push.c: Don't bother testing b4_push_if when deciding whether
2576 to expand b4_declare_parser_variables globally.
2577 (yypush_parse): Likewise in here.
2578
2579 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2580 (yy_reduce_print): Reformat M4 for readability.
2581
ee5abb37
JD
25822006-12-15 Bob Rossi <bob@brasko.net>
2583 and Joel Denny <jdenny@ces.clemson.edu>
2584
2585 * data/push.c (yypstate): Add typedef, and update all uses of
2586 struct yypstate to just yypstate.
2587 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2588
16ca01f9
JD
25892006-12-14 Bob Rossi <bob@brasko.net>
2590
2591 * data/push.c (yypush_parse): Declare prototype regardless of
2592 %locations option.
2593
ab8e7e1a
JD
25942006-12-14 Bob Rossi <bob@brasko.net>
2595
2596 * data/push.c (yyparse): Remove the prototype and the #define when in
2597 push-parser mode.
2598
9bf32be3
JD
25992006-12-13 Bob Rossi <bob@brasko.net>
2600
2601 * data/push.c (yypstate_init): Rename to...
2602 (yypstate_new): ... this and use b4_c_function_def.
2603 (yypstate_delete): New.
2604 (yypush_parse): Change parameters yynval and yynlloc to be const.
2605 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2606 yypstate_delete functions.
2607
f02e2948
JD
26082006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2609
2610 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2611 strange test case titles. Reported by Bob Rossi.
2612
38eb7751
PE
26132006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2614
2615 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2616 of potential ambiguities in GLR grammers.
2617
bd9d212b
JD
26182006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2619
2620 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2621 `bison ', use m4_index instead of m4_substr since chopping up a string
2622 containing M4-special characters causes problems here.
2623
2624 Fix a couple of bugs related to special characters in user-specified
2625 file names, and make it easier for skeletons to compute output file
2626 names with the same file name prefix as Bison-computed output file
2627 names.
2628 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2629 b4_parser_file_name and b4_spec_defines_file instead of
2630 @output_parser_name@ and @output_header_name@, which are now redundant.
2631 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2632 b4_parser_file_name, b4_spec_defines_file, and the new
2633 @basename(FILENAME@) instead of @output_parser_name@ and
2634 @output_header_name@, which inappropriately escaped the file names as
2635 C string literals.
2636 * src/files.c (all_but_ext): Remove static qualifier.
2637 (compute_output_file_names): Move `free (all_but_ext)' to...
2638 (output_file_names_free): ... here since all_but_ext is needed later.
2639 * src/files.h (all_but_ext): Extern.
2640 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2641 exactly what MUSCLE_INSERT_STRING used to do.
2642 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2643 characters are escaped properly.
2644 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2645 all_but_ext.
2646 For pkgdatadir muscle, maintain previous functionality by using
2647 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2648 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2649 digraphs would never be expanded. Hopefully no one has M4-special
2650 characters in his Bison installation path.
2651 * src/scan-skel.l: Don't parse @output_header_name@ and
2652 @output_parser_name@ anymore since they're now redundant.
2653 In @output, use decode_at_digraphs.
2654 Parse a new @basename command that invokes last_component.
2655 (decode_at_digraphs): New.
2656 (BASE_QPUTS): Remove unused.
2657 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2658 (Output file name): New tests.
2659
3f7ca628
JD
26602006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2661
2662 Warn about output files that are generated by the skeletons and that
2663 conflict with other output files.
2664 * data/glr.c: Don't generate the header file here when glr.cc does.
2665 * src/files.c (file_names, file_names_count): New static globals.
2666 (compute_output_file_names): Invoke output_file_name_check for files
2667 not generated by the skeletons and remove existing checks.
2668 (output_file_name_check): New function that warns about conflicting
2669 output file names.
2670 (output_file_names_free): Free file_names.
2671 * src/files.h (output_file_name_check): Declare.
2672 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2673 the skeletons.
2674 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2675 (Conflicting output files): New tests.
2676
178e123e
PE
26772006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2678
2679 * doc/bison.texinfo: Fix a couple of typos.
2680
26812006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
2682
2683 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2684 Rename to...
2685 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2686 update all uses.
2687 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2688 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2689 local pv.
2690 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2691 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2692
ea17f233
JD
26932006-12-07 Bob Rossi <bob@brasko.net>
2694 and Joel Denny <jdenny@ces.clemson.edu>
2695
2696 * data/push.c (yypvarsinit): Change return type from void* to struct
2697 yypvars*. No longer cast to void* on return.
2698 (struct yypvars): Remove yylen since it need not be remembered between
2699 yypushparse invocations.
2700 (yypushparse): Don't copy between yylen and pv->yylen.
2701
55a30bda
JD
27022006-12-05 Bob Rossi <bob@brasko.net>
2703
2704 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2705 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2706 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2707 (struct yypvars): Remove b4_declare_parser_variables.
2708 (yypvarsinit): Remove init code for removed variables.
2709 (global scope): Do not declare b4_declare_parser_variables if
2710 push or pure mode.
2711 (yypushparse): Add b4_declare_parser_variables.
2712 Init new local variables, and remove init code for removed
2713 yypvars variables.
2714 (yyparse): Delete.
2715 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2716 and yyparse for other modes.
2717 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2718 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2719 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2720 (AT_PURE_LEX_IF): True if pure or push parser.
2721
85894313
JD
27222006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2723
2724 Document Yacc prologue alternatives and default %destructor's and
2725 %printer's as experimental. Don't mention Java yet. Discussed at
2726 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2727 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2728 (2.3a): Annotate this entry to say the old forms of these features were
2729 also experimental.
2730 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 2731 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
2732 of Java (we'll want this back eventually).
2733
02975b9a
JD
27342006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2735
2736 Support a file name argument to %defines. Deprecate `=' in
2737 %file-prefix, %name-prefix, and %output. Discussed at
2738 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2739 * NEWS (2.3a+): Mention.
148d66d8 2740 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
2741 form of %defines, and remove `=' from entries for %file-prefix,
2742 %name-prefix, and %output.
2743 * src/parse-gram.y (prologue_declaration): Implement.
2744 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2745 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2746 all but one occurrence of %name-prefix.
2747 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2748 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2749 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2750 occurrence of each of %file-prefix and %output. Add check for %defines
2751 with argument.
2752 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2753 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2754 Remove the `=' from %output.
2755
287b314e
JD
27562006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2757
2758 Don't escape $ in test case titles since Autoconf 2.61 now does that
2759 correctly.
2760 * tests/actions.at (Default %printer and %destructor are not for error
2761 or $undefined): Here.
2762 (Default %printer and %destructor are not for $accept): Here.
2763 * tests/input.at (Invalid $n and @n): Here.
2764
3ebecc24
JD
27652006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2766
2767 Rename <!> to <>. Discussed starting at
2768 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2769 * NEWS (2.3a+): Update.
148d66d8 2770 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
2771 Update.
2772 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2773 * src/scan-gram.l (INITIAL): Implement.
2774 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2775 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2776 comment.
2777 * tests/actions.at (Default tagless %printer and %destructor,
2778 Default tagged and per-type %printer and %destructor,
2779 Default %printer and %destructor are not for error or $undefined,
2780 Default %printer and %destructor are not for $accept,
2781 Default %printer and %destructor for mid-rule values): Update.
2782 * tests/input.at (Default %printer and %destructor redeclared,
2783 Unused values with default %destructor): Update.
2784
26b8a438
JD
27852006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2786
2787 Don't let %prec take a nonterminal.
2788 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2789 token.
2790 * tests/input.at (%prec takes a token): New test checking that %prec
2791 won't take a nonterminal.
2792
07c39ae9
JD
27932006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2794
405d53b7
JD
2795 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2796 it was double-quoted.
07c39ae9
JD
2797 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2798 grammar is maintained with Bison's highest standards.
2799 * src/getargs.c: Fix some typos in Doxygen comments.
2800
580b8926
JD
28012006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2802
2803 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2804 later. Reported by Paul Eggert in
2805 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2806 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2807 * src/scan-code.l (translate_action): Don't bother invoking
2808 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2809 (code_scanner_free): Instead of invoking
2810 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2811 which frees more.
2812 * src/scan-gram.l (gram_scanner_free): Likewise.
2813 * src/scan-skel.l (scan_skel): Likewise.
2814
4502eadc
JD
28152006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2816
2817 * src/files.c (tr): Change return type to void.
2818 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2819 has been called previously for the same key.
2820 (muscle_find): Return storage instead of value so that
2821 --enable-gcc-warnings doesn't produce warnings that the return discards
2822 const. aver that the value and storage are the same since storage
2823 could potentially be NULL when value is not.
2824 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2825 same as 0.
2826
7746c8f6
PE
28272006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2828
2829 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2830 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2831 us a slightly cleaner distribution, and also works.
2832 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2833 gnulib changes.
2834
eb095650
PE
28352006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2836 and Paul Eggert <eggert@cs.ucla.edu>
2837
2838 Don't let Bison leak memory except when it complains.
2839 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2840 (spec_defines_file, dir_prefix): Now char *, not const char *,
2841 since they are freed.
2842 * src/files.c: Likewise.
2843 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2844 Likewise.
2845 (tr): Now operates in-place. All uses changed.
2846 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2847 values.
2848 (compute_file_name_parts, compute_output_file_names): Don't store
2849 read-only data in variables that will be freed.
2850 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2851 src_extension, and header_extension.
2852 (output_file_names_free): New public function to free
2853 spec_verbose_file, spec_graph_file, spec_defines_file,
2854 parser_file_name, and dir_prefix.
2855 * src/getargs.c (getargs): Don't store read-only data in variables that
2856 will be freed.
2857 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2858 (which previously existed but was unused), and quotearg_free.
2859 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2860 * src/muscle_tab.c: Likewise.
2861 (muscle_entry): Make the value char const *,
2862 and add a new storage member that is char * and can be freed.
2863 (muscle_entry_free): New private function.
2864 (muscle_init): Use it instead of free.
2865 (muscle_insert, muscle_grow): Update and use new storage member.
2866 (muscle_code_grow): Free the string passed to muscle_grow
2867 since it's not needed anymore.
2868 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2869 add a new `char *code' member.
2870 ("{...}"): Declare semantic type as code.
2871 * src/scan-code.h (translate_rule_action):
2872 (translate_symbol_action, translate_code, translate_action): Return
2873 `char const *' rather than `char *' since external code should not free
2874 these strings.
2875 * src/scan-code.l: Likewise.
2876 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2877 which is "{...}" in the parser.
2878 * tests/Makefile.am (maintainer-check-valgrind): Set
2879 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2880 Valgrind.
2881 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2882 complain.
2883 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2884 expecting a non-zero exit status sets --leak-check=summary and
2885 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2886 this case, and we don't want to hear about it.
2887
ac564be4
PE
28882006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2889
2890 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2891 instead of from the template, to simplify configuration a bit.
2892 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2893 and m4/wint_t.m4, as they are needed with the latest gnulib.
2894
17bd8a73
JD
28952006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2896
2897 Disable unset/unused mid-rule value warnings by default, and recognize
2898 --warnings=midrule-values to enable them. Discussed starting at
2899 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2900 * NEWS (2.3a+): Mention.
2901 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2902 warnings): Add entry for midrule-values subargument.
2903 * src/reader.c (symbol_should_be_used): Don't return true just because
2904 the value is a set/used mid-rule value unless
2905 --warnings=midrule-values was specified.
2906 * tests/input.at (Unused values, Unused values before symbol
2907 declarations): Run tests with and without --warnings=midrule-values.
2908
2909 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2910 than LIST_FREE directly.
2911
89eb3c76
JD
29122006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2913
2914 Finish implementing --warnings=error, which should not be implied by
2915 --warnings=all (or by its synonyms -W and --warnings without
2916 subarguments).
2917 * src/complain.c (set_warning_issued): New function to report that
2918 warnings are being treated as errors and to record an error if so.
2919 Invoke...
2920 (warn_at, warn): ... here.
2921 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2922 "error - warnings are errors" does not appear above "all - all of the
2923 above".
2924 (getargs): For -W and --warnings without subarguments, don't let
2925 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2926 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2927
ba7560e2
JD
29282006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2929
2930 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2931 empty subargument list. For example: `bison --warnings= parser.y'.
2932
31283fc3
JD
29332006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2934
2935 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2936 the parser header file so that gcc doesn't warn.
2937
12e35840
JD
29382006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2939
2940 Split the default %destructor/%printer into two kinds: <*> and <!>.
2941 Discussed starting at
2942 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2943 * NEWS (2.3a+): Mention.
2944 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2945 previous change today related to mid-rules.
148d66d8 2946 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 2947 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
2948 (TYPE_TAG_ANY): Add as <*>.
2949 (TYPE_TAG_NONE): Add as <!>.
2950 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2951 for <*> and <!>.
2952 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2953 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2954 * src/symlist.c (symbol_list_default_new): Split into tagged and
2955 tagless versions.
2956 (symbol_list_destructor_set, symbol_list_printer_set): Split
2957 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2958 SYMLIST_DEFAULT_TAGLESS.
2959 * src/symlist.h: Update symbol_list_default*_new prototypes.
2960 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2961 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2962 * src/symtab.c (default_destructor, default_destructor_location,
2963 default_printer, default_printer_location): Split each into tagged and
2964 tagless versions.
2965 (symbol_destructor_get, symbol_destructor_location_get,
2966 symbol_printer_get, symbol_printer_location_get): Implement tagged
2967 default and tagless default cases.
2968 (default_destructor_set, default_printer_set): Split each into tagged
2969 and tagless versions.
2970 * src/symtab.h: Update prototypes.
2971 * tests/actions.at (Default %printer and %destructor): Rename to...
2972 (Default tagless %printer and %destructor): ... this, and extend.
2973 (Per-type %printer and %destructor): Rename to...
2974 (Default tagged and per-type %printer and %destructor): ... this, and
2975 extend.
2976 (Default %printer and %destructor for user-defined end token): Extend.
2977 (Default %printer and %destructor are not for error or $undefined):
2978 Update.
2979 (Default %printer and %destructor are not for $accept): Update.
2980 (Default %printer and %destructor for mid-rule values): Extend.
2981 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2982 (Unused values with default %destructor): Extend.
2983
f91b1629
JD
29842006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2985
2986 Don't apply the default %destructor/%printer to an unreferenced midrule
2987 value. Mentioned at
2988 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2989 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2990 like $@n instead of just @n so that the default %destructor/%printer
2991 logic doesn't see them as user-defined symbols.
2992 (symbol_is_dummy): Check for both forms of the name.
2993 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2994 name for which the midrule value is referenced in any action.
2995 * tests/actions.at (Default %printer and %destructor for mid-rule
2996 values): New test.
2997 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2998 for change to dummy symbol names.
2999
519d0004
JD
30002006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3001
3002 Warn about unset midrule $$ if the corresponding $n is used.
3003 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3004 $n usage.
3005 (packgram): Before invoking grammar_rule_check on any rule, make sure
3006 all actions have already been scanned in order to set `used' flags.
3007 Otherwise, checking that a midrule's $$ is set will not always work
3008 properly because the midrule check must forward-reference the midrule's
3009 parent rule.
3010 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3011 warning.
3012
a501eca9
JD
30132006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3014
3015 More improvements to the documentation of the prologue alternatives:
3016 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3017 Bison manual.
3018 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3019 some text to clarify the relative importance of the new directives and
3020 to show how these directives may be viewed as code labels.
3021
2cbe6b7f
JD
30222006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3023
3024 Similar to the recently removed %before-header, add %code-top as the
3025 alternative to the pre-prologue. Mentioned at
3026 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3027 Also, let the prologue alternatives appear in the grammar section.
3028 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3029 (prologue_declaration): Move the existing prologue alternatives to...
3030 (grammar_declaration): ... here and add %code-top.
3031 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3032
3033 Clean up and extend documentation for the prologue alternatives.
3034 * NEWS (2.3a+): Describe prologue alternatives.
3035 * doc/bison.texinfo (Prologue): Move discussion of prologue
3036 alternatives to...
3037 (Prologue Alternatives): ... this new section, and extend it to discuss
3038 all 4 directives in detail.
148d66d8
JD
3039 (Table of Symbols): Clean up discussion of prologue alternatives and
3040 add %code-top.
2cbe6b7f 3041
e557d3ea
JMG
30422006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3043
3044 DJGPP specific issues.
3045
3046 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3047 config.bat accordingly.
3048 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3049 * djgpp/config.site: Likewise.
3050
136a0f76
PB
30512006-10-16 Paolo Bonzini <bonzini@gnu.org>
3052
27bd5d67
PB
3053 Replace %*-header with %provides, %requires, %code. See discussion at
3054 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3055
136a0f76
PB
3056 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3057 (b4_user_start_header): Remove.
3058 * data/glr.c: Use new macros instead of b4_*start_header
3059 and b4_*end_header.
3060 * data/glr.cc: Likewise.
3061 * data/lalr1.cc: Likewise.
3062 * data/push.c: Likewise.
3063 * data/yacc.c: Likewise.
3064
3065 * doc/bison.texinfo: Remove %before-header, rename
3066 %{start,end,after}-header to %requires, %provides, %code.
3067
3068 * src/parse-gram.y: Likewise (also rename token names accordingly).
3069 * src/scan-gram.l: Likewise.
3070 * tests/actions.at: Likewise.
3071
10f429ef
PE
30722006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3073
3074 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3075 Problem reported by Joel E. Denny.
3076
30772006-10-14 Jim Meyering <jim@meyering.net>
3078
3079 (Sync from coreutils.)
3080 Work also when the working directory (with e.g. coreutils sources)
3081 is version controlled with git, rather than CVS.
3082 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3083 rather than CVS.
3084 In messages and comments, say e.g., "checked-out sources",
3085 rather than "CVS sources".
3086 (version_controlled_file): New function. Work for git as well as
3087 for CVS. Don't use grep's -q option.
3088 (slurp): Call it here, in place of CVS-specific code.
3089
c4bd5bf7
JD
30902006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3091
3092 Fix testsuite for ./configure --enable-gcc-warnings:
3093 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3094 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3095 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3096 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3097 * test/regression.at (Diagnostic that expects two alternatives):
3098 Likewise.
3099
46356ea4
PE
31002006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3101
231ed89a
PE
3102 * bootstrap.conf (gnulib_modules): Add config-h.
3103 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3104 worry about HAVE_CONFIG_H.
3105 * lib/abitset.c: Likewise.
3106 * lib/bitset.c: Likewise.
3107 * lib/bitset_stats.c: Likewise.
3108 * lib/bitsetv-print.c: Likewise.
3109 * lib/bitsetv.c: Likewise.
3110 * lib/ebitset.c: Likewise.
3111 * lib/get-errno.c: Likewise.
3112 * lib/lbitset.c: Likewise.
3113 * lib/subpipe.c: Likewise.
3114 * lib/timevar.c: Likewise.
3115 * lib/vbitset.c: Likewise.
3116 * lib/bitset.c: Include "bitset.h" first, to test interface.
3117 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3118 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3119 * lib/bitsetv.c: Include "bitsetv.h" first.
3120 * lib/get-errno.c: Include "get-errno.h" first.
3121 * m4/.cvsignore: Add config-h.m4.
3122 * tests/actions.at (Default %printer and %destructor for ...):
3123 Adjust expected line numbers in output to reflect removal of #if
3124 HAVE_CONFIG_H lines.
3125 * tests/glr-regression.at (Missed %merge type warnings when ...):
3126 Likewise.
3127 * tests/regression.at (Braced code in declaration in rules section):
3128 Likewise.
3129 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3130 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3131 Include <config.h> unconditionally.
3132
46356ea4
PE
3133 * bootstrap: Sync from coreutils, as follows:
3134
3135 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3136
3137 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3138 variable was sometimes used without being initialized. This
3139 messed up the installation of the INSTALL file in some cases.
3140
3141 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3142
3143 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3144 --copy. Inspired by a suggestion from Bruno Haible.
3145
3146 2006-10-03 Jim Meyering <jim@meyering.net>
3147
3148 * bootstrap: Undo last change to this file, since now gnulib-tool
3149 sticks with the automake default in generating dependencies.
3150
dd4bf078
PE
31512006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3152
cf2a5f7c
PE
3153 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3154 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3155
3156 * doc/bison.1: Add copyright notice.
3157
3158 * data/glr.c: Don't include <stdarg.h>; not used.
3159
35fe0834
PE
3160 * NEWS: The -g and --graph options now output graphs in Graphviz
3161 DOT format, not VCG format.
3162 * doc/bison.1: Likewise.
3163 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
3164 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3165 of this change in
3166 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
3167 * TODO: Remove Graphviz entry.
3168 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3169 remove vcg.c, vcg.h, vcg_defaults.h.
3170 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3171 * src/graphviz.c, src/graphviz.h: New files.
3172 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3173 * src/files.h: Make comment more generic.
3174 * src/main.c (main): Likewise.
3175 * src/print_graph.h: Likewise.
3176 * src/getargs.c (usage): Make usage description more generic.
3177 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3178 (static_graph, fgraph): Remove. All uses changed to pass
3179 arguments instead of sharing a static var.
3180 (print_core, print_actions, print_state, print_graph):
3181 Output graphviz format rather than VCG format.
3182 * tests/.cvsignore: Remove *.vcg; add *.dot.
3183 * tests/output.at: Expect *.dot files, not *.vcg files.
3184
dd4bf078
PE
3185 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3186 accommodates the 2006-10-08 change.
3187
efdd7421
PE
31882006-10-11 Bob Rossi <bob@brasko.net>
3189
3190 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3191 (b4_yyssa, b4_yyerror_range): New macros.
3192 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3193 (yypvarsinit): Remove init of removed fields.
3194 (yypushparse): Remove use of removed fields; use new macros instead.
3195
96a1981a
PE
31962006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3197
3198 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3199 in a push parser. Reindent slightly to match yacc.c better.
3200
32012006-10-11 Bob Rossi <bob@brasko.net>
3202
46356ea4
PE
3203 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3204 yymsg_alloc fields.
3205 (yypvarsinit, yypushparse): Remove init of removed fields.
3206 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 3207
c1630a8b
PE
32082006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3209
3210 * THANKS: Add Paolo Bonzini and Bob Rossi.
3211
90b9908d
PB
32122006-10-08 Paolo Bonzini <bonzini@gnu.org>
3213
3214 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3215 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3216 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3217 b4_define_user_cde and uses): Remove.
3218 (b4_comment, b4_prefix, b4_sync_start): New.
3219 * data/bison.m4: New file, with most of the content removed from c.m4.
3220 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3221 * src/output.c (output_skeleton): Pass bison.m4.
3222 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3223 only if specified.
3224
cf806753
PE
32252006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3226
3227 Fix test failure reported by Tom Lane in
3228 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3229 and try to make such failures easier to catch in the future.
3230 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3231 that's now the caller's responsibility.
3232 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3233 Set yychar = YYEOF if it's negative.
3234 * tests/actions.at (yylex): Abort if asked to read past EOF.
3235 * tests/conflicts.at (yylex): Likewise.
3236 * tests/cxx-type.at (yylex): Likewise.
3237 * tests/glr-regression.at (yylex): Likewise.
3238 * tests/input.at (yylex): Likewise.
3239 * tests/regression.at (yylex): Likewise.
3240 * tests/torture.at (yylex): Likewise.
3241
0e2f006a
PE
32422006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3243
3244 Fix problems with translating English-language diagnostics.
3245 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3246 respect to bison-runtime pot generation. The YY_ stuff
3247 wasn't being captured.
3248 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3249 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3250 * runtime-po/POTFILES.in: Add data/push.c.
3251
e3ddc1e3
PE
32522006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3253
3254 Merge bootstrap changes from coreutils.
3255
3256 2006-09-28 Jim Meyering <jim@meyering.net>
3257
3258 Automatically generated dependencies are important even
3259 when all of the sources in a directory come from gnulib.
3260 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3261 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3262
3263 2006-09-23 Jim Meyering <jim@meyering.net>
3264
3265 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3266
3267 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3268
3269 * bootstrap: Add support for --force.
3270 (usage): New function. Describe usage less tersely.
3271 (CVS_only_file): New var.
3272
01e972b3
PE
32732006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3274
3275 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3276 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3277 Adjust white space and comments to match GNU style better.
3278
c63d3e90
PE
32792006-09-20 Bob Rossi <bob@brasko.net>
3280
3281 * data/push.c (yyresult_get): Remove function.
3282 (YYPUSH_MORE): Add #define.
3283 (yypushparse): Modify return value.
3284
e70f46d1
PE
32852006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3286
3287 * stamp-h.in: Remove; no longer needed.
3288 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3289 Remove config.h, config.hin, intl (no longer created).
3290 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3291 stamp-h1.
3292
3293 Sync bootstrap from coreutils, as follows:
3294
3295 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3296
3297 * bootstrap (symlink_to_gnulib): New function.
3298 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3299 to copies-of-gnulib.
3300 (cp_mark_as_generated, slurp, gnulib_files):
3301 Avoid making a copy if it's the same as the old version.
3302 (gnulib_files): Add support for this variable (used by Bison).
3303
a92be413
PE
33042006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3305
3306 * src/getargs.c (usage): Rework to use conventions similar to
3307 coreutils, to make translation a bit easier and the code a bit
3308 smaller. Problem reported by Tim Van Holder.
3309
4f82b42a
PE
33102006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3311
3b2942e6
PE
3312 Use some of gnulib's new modules, taken from coreutils.
3313
3314 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3315 * bootstrap.conf: New file.
3316 (gnulib_modules): Add configmake, inttypes, unistd.
3317 (XGETTEXT_OPTIONS): Add complain, complain_at,
3318 fatal, fatal_at, warn, warn_at, unexpected_end.
3319 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3320 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3321 (gl_EARLY): Add.
3322 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3323 (gl_INIT): Add
3324 (GNULIB_AUTOCONF_SNIPPET): Remove.
3325 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3326 the pickiest.
3327 * lib/.cvsignore: Add inttypes_.h.
3328 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3329 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3330 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3331 no-longer-necessary initializations.
3332 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3333 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3334 use the unistd module.
3335 * src/system.h: Likewise.
3336 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3337 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3338 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3339 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3340 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3341 * src/system.h: Include inttypes.h unconditionally, now that we
3342 use the inttypes module. Don't bother to include stdint.h, since
3343 inttypes.h now does that for us.
3344 (LOCALEDIR): Remove, now that we use the configmake module.
3345 * src/getargs.c: Include configmake.h.
3346 * src/main.c: Likewise.
3347 * src/output.c: Likewise.
3348 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3349 not from $abs_top_builddir, since config.h moved.
3350
3351
4f82b42a
PE
3352 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3353 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3354
3355 * src/parse-gram.y (symbol_declaration): Don't put statements
3356 before declarations; it's not portable to C89.
3357 * src/scan-code.l (handle_action_at): Likewise.
3358
3359 * src/scan-code.l: Always initialize braces_level; the old code
3360 left it uninitialized and therefore had undefined behavior.
3361
3362 Don't attempt to redefine 'assert', since it runs afoul of
3363 systems where standard headers (mistakenly) include <assert.h>.
3364 Instead, define and use our own alternative, called 'aver'.
3365 * src/reader.c: Don't include assert.h, since we no longer
3366 use assert.
3367 * src/scan-code.l: Likewise.
3368 * src/system.h (assert): Remove, replacing with....
3369 (aver): New function, taking a bool arg. All uses changed.
3370 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3371 not merely an integer.
3372
31c10e38
PE
33732006-09-15 Bob Rossi <bob@brasko.net>
3374
3375 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3376 * data/c.m4 (YYPUSH): New.
3377 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3378 * src/getargs.c (push_parser): New var.
3379 * src/getargs.h (push_parser): New declaration.
3380 * src/output.c (prepare): Add macro insertion of `push_flag'.
3381 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3382 (prologue_declaration): Parse %push-parser.
3383 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3384 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3385 list of removed lines from the traces observed.
3386 (AT_CHECK_CALC_LALR): Added push parser tests.
3387
fa7b79c0
PE
33882006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3389
21fe08ca
PE
3390 * NEWS: Version 2.3a.
3391 * configure.ac (AC_INIT): Likewise.
3392
e8ec4d9b
PE
3393 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3394 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3395 due to header ordering dependencies. I don't know why the #define
3396 was there.
3397
fa7b79c0
PE
3398 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3399 runtime cost when YYDEBUG is not defined, and so that some tests
3400 that used to fail now work. Problem and initial suggestion by
3401 Paolo Bonzini.
3402 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3403 * data/glr.cc (b4_parser_class_name):
3404 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3405 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3406 (yydebug_) [YYDEBUG]: New member.
3407 (yycdebug_): Now defined only if YYDEBUG.
3408 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3409 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3410 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3411 if YYYDEBUG.
3412 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3413 Define only if YYDEBUG.
3414 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3415 set_debug_level.
3416 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3417 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3418 AT_CHECK_CALC_GLR_CC that are working now.
3419
4ec13d60
PE
34202006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3421
3422 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3423 We don't need them in glr.cc, and glr.c defines them.
3424 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3425 assumes that defining it to anything is the same as defining
3426 it to 1. Problem reported by Paolo Bonzini.
3427
8e1687ae
PE
34282006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3429
3430 * data/c.m4 (b4_null, b4_case): Define.
3431 * src/output.c (prepare_symbols): Use b4_null.
3432 (user_actions_output): Use b4_case.
3433
3dc5e96b
PE
34342006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3435
aef3da86
PE
3436 * data/glr.c (b4_shared_declarations): Put start-header first,
3437 before any #includes that we generate, so that feature-test
3438 macros work. Problem reported by Michael Deutschmann in
3439 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3440 * data/lalr1.cc: Likewise.
3441 * doc/bison.texinfo (Prologue): Document that feature-test macros
3442 should be defined before any Bison declarations.
3443 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3444 that depend on location.hh after, not before, Bison decls, since
3445 we now include location.hh after the first user prologue.
3446
3dc5e96b
PE
3447 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3448 Sander Brandenburg in
3449 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3450 Also, fix minor white space and comment issues.
aef3da86
PE
3451 (Prologue): Mention that it's better to define feature-test macros
3452 before Bison declarations. Problem reported by Michael Deutschmann.
3453
3454 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3455 by Jim Meyering.
3456 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3457 This adjusts to recent gnulib changes.
3dc5e96b 3458
b2a0b7ca
JD
34592006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3460
3461 Finish implementation of per-type %destructor/%printer. Discussed
3462 starting at
3463 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3464 and
3465 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3466 * NEWS (2.3+): Add a description of this feature to the default
3467 %destructor/%printer description.
3468 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3469 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3470 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3471 list node contains a semantic type.
3472 * src/symtab.c, src/symtab.h: Extend with a table that associates
3473 semantic types with their %destructor's and %printer's.
3474 (semantic_type_from_uniqstr, semantic_type_get,
3475 semantic_type_destructor_set, semantic_type_printer_set): New functions
3476 composing the public interface of that table.
3477 (symbol_destructor_get, symbol_destructor_location_get,
3478 symbol_printer_get, symbol_printer_location_get): If there's no
3479 per-symbol %destructor/%printer, look up the per-type before trying
3480 the default.
3481 * tests/actions.at (Per-type %printer and %destructor): New test case.
3482 * tests/input.at (Default %printer and %destructor redeclared):
3483 Extend to check that multiple occurrences of %symbol-default in a
3484 single %destructor/%printer declaration is an error.
3485 (Per-type %printer and %destructor redeclared, Unused values with
3486 per-type %destructor): New test cases.
3487
3be03b13
JD
34882006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3489
3490 Require default %destructor/%printer to be declared using
3491 %symbol-default instead of an empty symbol list, and start working on
3492 new per-type %destructor/%printer. Discussed at
3493 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3494 * NEWS (2.3+): Add %symbol-default to example.
3495 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 3496 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
3497 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3498 (generic_symlist, generic_symlist_item): New nonterminals for creating
3499 a list in which each item is a symbol, semantic type, or
3500 %symbol-default.
3501 (grammar_declaration): Use generic_symlist in %destructor and %printer
3502 declarations instead of symbols.1 or an empty list.
3503 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3504 for changes to symbol_list.
3505 * src/reader.c: Update for changes to symbol_list.
3506 * src/scan-code.l: Likewise.
3507 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3508 * src/symlist.c, src/symlist.h: Extend such that a list node may
3509 represent a semantic type or a %symbol-default in addition to just an
3510 ordinary symbol. Add switched functions for setting %destructor's and
3511 %printer's.
3512 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3513 %destructor/%printer declarations.
3514
3508ce36
JD
35152006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3516
3517 Whether the default %destructor/%printer applies to a particular symbol
3518 isn't a question of whether the user *declares* that symbol (in %token,
3519 for example). It's a question of whether the user by any means
3520 *defines* the symbol at all (by simply using a char token, for
3521 example). $end is defined by Bison whereas any other token with token
3522 number 0 is defined by the user. The error token is always defined by
3523 Bison regardless of whether the user declares it with %token, but we
3524 may one day let the user define error as a nonterminal instead.
3525 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3526 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3527 the meaning of "user-defined".
3528 * tests/actions.at (Default %printer and %destructor for user-declared
3529 end token): Rename to...
3530 (Default %printer and %destructor for user-defined end token): ...
3531 this.
3532
3533 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3534 computation of whether to apply the default, don't maintain a list of
3535 every Bison-defined symbol. Instead, just check for a first character
3536 of '$', which a user symbol cannot have, and check for the error token.
3537
9350499c
JD
35382006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3539
3540 Don't apply the default %destructor or %printer to the error token,
3541 $undefined, or $accept. This change fits the general rule that the
3542 default %destructor and %printer are only for user-declared symbols,
3543 and it solves several difficulties that are described in the new test
3544 cases listed below.
3545 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3546 * tests/actions.at (Default %printer and %destructor are not for error
3547 or $undefined, Default %printer and %destructor are not for $accept):
3548 New test cases.
3549
4d7370cb
JD
35502006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3551
3552 Allow %start after the first rule.
3553 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3554 when parsing the first rule.
3555 (check_and_convert_grammar): Search for it here after all grammar
3556 declarations have been parsed. Skip midrules, which have dummy LHS
3557 nonterminals.
3558 * src/symtab.c (symbol_is_dummy): New function.
3559 * src/symtab.h (symbol_is_dummy): Declare it.
3560 * tests/input.at (%start after first rule): New test.
3561
6d0ef4ec
JD
35622006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3563
3564 Redo some of the previous commit: add back the ability to use
3565 non-aliased/undeclared string literals since it might be useful to
3566 those declaring %token-table.
3567 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3568 commit: don't worry about complaints from symbols_pack.
3569 * src/symtab.c (symbol_new, symbol_class_set,
3570 symbol_check_alias_consistency): Undo changes in previous commit: count
3571 each string literal as a new symbol and token, assign it a symbol
3572 number, and don't complain about non-aliased string literals.
3573 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3574 and token counts but does still set aliased tokens to the same number,
3575 symbol_pack_processor now leaves empty slots in the symbols array.
3576 Remove those slots.
3577 * tests/regression.at (Undeclared string literal): Remove test case
3578 added in previous commit since non-aliased string literals are allowed
3579 again.
3580 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3581 remove unnecessary string literal declarations.
3582 * tests/sets.at (Firsts): Likewise.
3583
965537bc
JD
35842006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3585
3586 Don't allow an undeclared string literal, but allow a string literal to
3587 be used before its declaration.
3588 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3589 symbols_pack complained.
3590 * src/symtab.c (symbol_new): Don't count a string literal as a new
3591 symbol.
3592 (symbol_class_set): Don't count a string literal as a new token, and
3593 don't assign it a symbol number since symbol_make_alias does that.
3594 (symbol_make_alias): It's not necessary to decrement the symbol and
3595 token counts anymore. Don't assume that an alias declaration occurs
3596 before any uses of the identifier or string, and thus don't assert that
3597 one of them has the highest symbol number so far.
3598 (symbol_check_alias_consistency): Complain if there's a string literal
3599 that wasn't declared as an alias.
3600 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3601 symbol_pack asserts that every token has been assigned a symbol number
3602 although undeclared string literals have not.
3603 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 3604 string literal): New test cases.
965537bc
JD
3605 (Characters Escapes, Web2c Actions): Declare string literals as
3606 aliases.
3607 * tests/sets.at (Firsts): Likewise.
3608
47aee066
JD
36092006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3610
3611 In the grammar scanner, STRING_FINISH unclosed constructs and return
3612 them to the parser in order to improve error messages.
3613 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3614 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3615 * tests/input.at (Unclosed constructs): New test case.
3616 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3617 seen.
3618
3619 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3620 unused global.
3621
1f6b3679
JD
36222006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3623
3624 Handle string aliases for character tokens correctly.
3625 * src/symtab.c (symbol_user_token_number_set): If the token has an
3626 alias, check and set its alias's user token number instead of its own,
3627 which is set to indicate the alias. Previously, every occurrence of
3628 the character token in the grammar overwrote that alias indicator with
3629 the character code.
3630 * tests/input.at (String aliases for character tokens): New test.
3631
219741d8
JD
36322006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3633
3634 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3635
11daa4e7
PE
36362006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3637
3638 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3639 to prevent failures when building on older platforms.
3640 Check for autopoint failure.
3641 Set XGETTEXT_OPTIONS to values that check for C format strings,
3642 so that translators are warned about them (this also helps
3643 prevent core dumps).
3644
3645 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3646 function, since it simplifies our code a bit.
3647
3648 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3649 rather than -W, so we don't get bogus warnings about sign comparisons.
3650 Add -Wpointer-arith, since that warning is useful (it reports code
3651 that does not conform to C89 and that some compilers reject).
3652 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3653 since it's no longer needed.
3654
f9bfc42a
JD
36552006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3656
3657 Clean up scanners a bit.
3658 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3659 definitions so gcc won't warn when obstack_for_string is unused.
3660 * src/scan-code.l: config.h and system.h are already #include'd by
3661 scan-code-c.c, so get rid of them here.
3662 * src/scan-gram.l: Likewise.
3663 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3664 definitions rather than duplicating the rest of it.
3665 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3666
06e8700a
JD
36672006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3668
3669 Suppress signed/unsigned comparison warnings for yycheck.
3670 * data/c.m4 (b4_safest_int_type): New macro.
3671 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3672 a signed int type, cast it to b4_safest_int_type first.
3673 * data/yacc.c: Likewise.
3674 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3675 also overwritten.
3676
9c437126
PE
36772006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3678
3679 * doc/bison.texinfo: Fix some typos.
3680
284d8a13
PE
36812006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3682
3683 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3684 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3685
3686 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3687 the latest gnulib does this a different way.
3688 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3689 translation was patched, so stop omitting it.
3690
ec5479ce
JD
36912006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3692
3693 Enable declaration of default %printer/%destructor. Make the parser
3694 use these for all user-declared grammar symbols for which the user does
3695 not declare a specific %printer/%destructor. Thus, the parser uses it
3696 for token 0 if the user declares it but not if Bison generates it as
3697 $end. Discussed starting at
3698 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3699 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3700 and
3701 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3702 * NEWS (2.3+): Mention.
3703 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3704 declare a %destructor for a mid-rule's semantic value. It's just
3705 impossible to declare one specific to it.
3706 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3707 code. Describe default %destructor form.
3708 * src/parse-gram.y (grammar_declaration): Parse default
3709 %printer/%destructor declarations.
3710 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3711 and symbol_destructor_location_get rather than accessing the destructor
3712 and destructor_location members of struct symbol.
3713 (symbol_printers_output): Likewise but for %printer's.
3714 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3715 again.
3716 * src/symtab.c (default_destructor, default_destructor_location,
3717 default_printer, default_printer_location): New static global
3718 variables to record the default %destructor and %printer.
3719 (symbol_destructor_get, symbol_destructor_location_get,
3720 symbol_printer_get, symbol_printer_location_get): New functions to
3721 compute the appropriate %destructor and %printer for a symbol.
3722 (default_destructor_set, default_printer_set): New functions to set the
3723 default %destructor and %printer.
3724 * src/symtab.h: Prototype all those new functions.
3725 * tests/actions.at (Default %printer and %destructor): New test to
3726 check that the right %printer and %destructor are called, that they're
3727 not called for $end, and that $$ and @$ work correctly.
3728 (Default %printer and %destructor for user-declared end token): New
3729 test to check that the default %printer and %destructor are called for
3730 a user-declared end token.
3731 * tests/input.at (Default %printer and %destructor redeclared, Unused
3732 values with default %destructor): New tests to check related grammar
3733 warnings and errors.
3734
868d2d96
JD
37352006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3736
3737 Clean up handling of %destructor for the end token (token 0).
3738 Discussed starting at
3739 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3740 and
3741 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3742
3743 Make the skeletons consistent in how they pop the end token and invoke
3744 its %destructor.
3745 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3746 state, which has token number 0, since this would invoke the
3747 %destructor for the end token.
3748 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3749 until after shifting the end token, or else it won't be popped.
3750 * data/yacc.c (yyparse): Likewise.
3751
3752 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3753 it's the end token. Upon termination, destroy an unshifted lookahead
3754 even when it's the end token.
3755 * data/lalr1.cc (yy::parser::parse): Likewise.
3756 * data/yacc.c (yyparse): Likewise.
3757
3758 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3759 value warnings for the end token when the user gives the end token a
3760 %destructor.
3761
3762 * tests/actions.at (Printers and Destructors): Test all the above.
3763
62a9592d
PE
37642006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3765
3766 Update to latest gnulib and gettext versions.
3767 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3768 Add fopen-safer.
3769 (gnulib_files): Add m4/warning.m4. Don't worry about files
3770 overwritten by autopoint.
3771 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3772 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3773 rejects them.
3774 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3775 so that we can remove the intl files at a better time.
3776 (intl_files_to_remove): Remove aclocal.m4, since it gets
3777 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3778 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3779 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3780 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3781 Remove datarootdir hack; no longer needed.
3782 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3783 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3784 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3785 strdup.h.
3786 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3787 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3788
10d6970f
PE
37892006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3790
3791 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3792 it with --assume-autoconf='latest-stable'.
3793
50a33993
JD
37942006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3795
3796 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3797 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3798 YYSTYPE' and `{'.
3799 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3800 those from muscle_tab.c since the old ones are misleading.
3801
2ce4ed68
AD
38022006-07-13 Akim Demaille <akim@epita.fr>
3803
3804 Support %define "KEY" {VALUE}.
3805 * src/scan-code.h, src/scan-code.l (translate_action)
3806 (translate_rule_action, translate_symbol_action, translate_code):
3807 Return char *, not const char *.
3808 * src/parse-gram.y (declaration): Rename as...
3809 (prologue_declaration): this.
3810 (string_content): Remove this nonterminal, use STRING.
3811 (braceless, content, content.opt): New nonterminal.
3812 Use them.
3813 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3814 as value.
3815 * src/scan-gram.l (getargs.h): Don't include it.
3816
db7e5eb5
PE
38172006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3818
3819 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3820 rather than a for-loop that declares a local bool variable. This
3821 should work around a compatibility problem with a Cray x1e C++
3822 compiler reported by Hung Nguyen in
3823 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3824 The for-loop was introduced in the 2004-11-17 change but I don't
3825 know why it was needed.
3826
a5d80ba5
AD
38272006-07-12 Akim Demaille <akim@epita.fr>
3828
3829 * data/c.m4: Comment changes.
3830
23eb2a69
AD
38312006-07-10 Akim Demaille <akim@lrde.epita.fr>
3832
3833 * src/complain.c (error_message, ERROR_MESSAGE): New.
3834 To factor...
3835 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3836 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3837
ddc8ede1
PE
38382006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3839
3840 * NEWS: Instead of %union, you can define and use your own union type
3841 YYSTYPE if your grammar contains at least one <type> tag.
3842 Your YYSTYPE need not be a macro; it can be a typedef.
3843 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3844 (Union Decl, Decl Summary): Document this.
3845 * data/glr.c (YYSTYPE): Implement this.
3846 * data/glr.cc (YYSTYPE): Likewise.
3847 * data/lalr1.cc (YYSTYPE): Likewise.
3848 * data/yacc.c (YYSTYPE): Likewise.
3849 * src/output.c (prepare): Output tag_seen_flag.
3850 * src/parse-gram.y (declaration, grammar_declaration):
3851 Use 'union_seen' rather than 'typed' to determine whether
3852 %union has been seen, since grammars can now be typed without
3853 %union.
3854 (symbol_declaration, type.opt, symbol_def):
3855 Keep track of whether a tag has been seen.
3856 * src/reader.c (union_seen, tag_seen): New vars.
3857 (typed): remove.
3858 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3859 * src/scan-code.l (untyped_var_seen): New variable.
3860 (handle_action_dollar): Adjust to above changes.
3861 (handle_action_dollar, handle_action_at):
3862 Improve overflow checking for outlandish numbers.
3863 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3864 avoid new diagnostics generated by above changes.
3865 * tests/regression.at (YYSTYPE typedef): Add test to check
3866 for type tags without %union.
3867
3868 * src/symlist.c (symbol_list_length): Return int, not unsigned
3869 int, since callers expect int. This may need to get revisited
3870 once we have proper integer overflow checking.
3871
3872 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3873 object is now static.
3874
3875 * src/getargs.c (flags_argmatch): Return void, not int,
3876 to pacify ./configure --enable-gcc-warnings.
3877
3878 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3879 since last_string is already defined to FLEX_PREFIX (last_string).
3880
7b42569e
AD
38812006-07-09 Akim Demaille <akim@lrde.epita.fr>
3882
3883 Implement --warnings/-W.
3884 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3885 replaced by...
3886 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3887 Adjust callers.
3888 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3889 (warnings_args, warnings_types): New.
3890 (getargs, short_options, long_options): Accept -W/--warnings.
3891 Sort the options by alphabetical order, upper case letter right
3892 before its lower case.
3893
3b452f4e
JD
38942006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3895
3896 Change %merge result type clash warnings to errors. Discussed at
3897 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3898 * src/reader.c (record_merge_function_type): Use complain_at.
3899 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3900 declared later): Update test case results.
3901
b8a41559
AD
39022006-07-09 Akim Demaille <akim@lrde.epita.fr>
3903
3904 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3905 to be in alphabetical order.
3906 (trace_args): Spelling fixes.
3907
cd9e1ba2
PE
39082006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3909
3910 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3911 so they don't collide with user-defined macros.
3912 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3913 this was never guaranteed, and now that we're using gnulib stdint,
3914 which defines int_fast16_t to long int, the problem is exposed.
3915
cb48f191
PE
39162006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3917
b8445a15
PE
3918 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3919 need the full POSIX semantics (and weren't implementing them
3920 anyway).
3921
cb48f191
PE
3922 Adjust to Autoconf 2.60 and today's gnulib.
3923 * bootstrap (gnulib_modules): Add stdint.
3924 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3925 no longer copies it.
3926 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3927 since stdint needs the former and wcwidth (which is now required
3928 by mbswidth) needs the latter.
3929 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3930 work around a compatibility glitch between gettext 0.14.6 and
3931 Autoconf 2.60.
3932 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3933 Do not check for uintptr_t, since new stdint module does the right
3934 thing.
3935 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3936 Add stdint.h, stdint_.h, wcwidth.h.
3937 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3938 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3939 stdint.m4, wchar_t.m4, wcwidth.m4.
3940 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3941 usual order for ../lib/*.h files.
3942 (file_name_split): Use last_component, not base_name, to adjust
3943 to gnulib changes.
3944 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3945 for ../lib/*.h files.
3946 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3947 Define unconditionally, since we now assume the stdint module.
3948 * src/scan-skel.l: Include <dirname.h>.
3949 (BASE_QPUTS): Use last_component, not base_name.
3950 * src/system.h: Include <unlocked-io.h> in the usual order
3951 for ../lib/*.h files. Include <stdint.h> unconditionally,
3952 since we now use the stdint module.
3953 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3954 HAVE_UINTPTR_T, since we now use the stdint module.
3955 (base_name): Remove decl, since files now include <dirname.h>
3956 to get the decl.
3957
cd48d21d
AD
39582006-07-08 Akim Demaille <akim@lrde.epita.fr>
3959
3960 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3961 New, default to 1.
3962 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3963 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3964 default.
3965 * tests/calc.at: Adjust.
3966
8ec0a172
AD
39672006-07-08 Akim Demaille <akim@lrde.epita.fr>
3968
b8445a15 3969 * data/c.m4 (b4_basename): New.
8ec0a172
AD
3970 (b4_syncline): Also output the location of its invocation (from
3971 the skeleton).
3972 (b4_user_action, b4_define_user_action, b4_user_actions)
3973 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3974 (b4_user_stype): New.
3975 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3976
4a678af8
JD
39772006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3978
3979 In the grammar file, the first column is 1 not 0 on the first line as
3980 on every other line.
3981 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3982 * tests/input.at (Torturing the Scanner): Update output.
3983
3984 * src/scan-gram.l (scanner_cursor): Declare it static.
3985
dd60572a
JD
39862006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3987
3988 In warnings, say "previous declaration" rather than "first
3989 declaration".
3990 * src/symtab.c (redeclaration): Do that here.
3991 * src/reader.c (record_merge_function_type): In the case of a result
3992 type clash, report the previous declaration rather than the very first
3993 one in the grammar file.
3994 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3995 declared later): Add a third declaration to check this behavior.
3996 * tests/input.at (Incompatible Aliases): Update output.
3997
2073e1b6
AD
39982006-06-27 Akim Demaille <akim@epita.fr>
3999
4000 * doc/Doxyfile.in: New.
4001 * doc/Makefile.am: Use it.
4002 * src/lalr.h, src/symtab.h: Initial doxygenation.
4003
8ee5b538
JD
40042006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4005
4006 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
4007 declared after the %merge. This continues the effort of the previous
4008 patch.
8ee5b538
JD
4009 * src/reader.c (get_merge_function): Don't set the merger type yet.
4010 (record_merge_function_type): New function for setting the merger type
4011 and checking for clashes.
4012 (grammar_current_rule_merge_set): Set the location of the %merge for
4013 the current rule.
4014 (packgram): Invoke record_merge_function_type for each rule now that
4015 all symbol type declarations have been parsed.
4016 * src/reader.h (merger_list.type_declaration_location): New member
4017 storing the location of the first %merge from which the type for this
4018 merging function was derived.
4019 * src/symlist.h (symbol_list.merger_declaration_location): New member
4020 storing the location of a rule's %merge, if any.
4021 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4022 declared later): New test to catch the error fixed by the above patch.
4023
ffa4ba3a
JD
40242006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4025
4026 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
4027 declarations appear after the rules. Discussed at
4028 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4029 and
4030 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4031 Don't mistake the type of $$ in a midrule to be that of its parent
4032 rule's $$.
ffa4ba3a
JD
4033 * src/reader.c (grammar_current_rule_end): Don't invoke
4034 grammar_rule_check yet since not all symbol declarations may have been
4035 parsed yet.
4036 (grammar_midrule_action): Likewise.
4037 Don't record whether the midrule's $$ has been used yet since actions
4038 haven't been translated yet.
4039 Record the midrule's parent rule and its RHS index within the parent
4040 rule.
4041 (grammar_current_rule_action_append): Don't translate the action yet
4042 since not all symbol declarations may have been parsed yet and, thus,
4043 warnings about types for $$, $n, @$, and @n can't be reported yet.
4044 (packgram): Translate the action and invoke grammar_rule_check now that
4045 all symbol declarations have been parsed.
4046 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4047 after parsing the entire grammar file, the symbol list here in the case
4048 of a midrule is actually the midrule's empty RHS, so reference its
4049 parent rule's RHS where necessary.
4050 On the other hand, now that you can already know it's a midrule, you
4051 aren't forced to think $$ has the same type as its parent rule's $$.
4052 (handle_action_at): In the case of a midrule, reference the parent rule
4053 where necessary.
4054 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4055 members.
4056 (symbol_list_length): Now that this is invoked after all rules have
4057 been parsed, a NULL symbol (rather than a NULL symbol list node)
4058 terminates a rule. symbol_list_print already does this correctly.
4059 * src/symlist.h (symbol_list.midrule_parent_rule,
4060 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4061 remember their relationships with their parents.
4062 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4063 fixed by the above patch.
4064 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4065 implementing...
4066 (Unused values): ... this old test case and...
4067 (Unused values before symbol declarations): ... this new test case.
4068 This one is the same as `Unused values' except that all symbol
4069 declarations appear after the rules in order to catch the rest of the
4070 errors fixed by the above patch.
4071
e256e17f
JD
40722006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4073
300a1930
JD
4074 More cleanup.
4075 * src/reader.c (current_rule): Declare it static since it's no longer
4076 used outside this file.
4077 (grammar_current_rule_action_append): Remove redundant arguments from
4078 translate_rule_action invocation.
4079 * src/reader.h (current_rule): Remove this unused extern.
4080 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4081 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 4082
381ecb06
JD
40832006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4084
4085 Clean up yesterday's patch.
4086 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4087 to...
4088 * src/reader.c (grammar_current_rule_action_append): ... here for
4089 consistency with grammar_current_rule_symbol_append.
4090 * tests/regression.at (Braced code in declaration in rules section):
4091 Make yyerror and yylex static as usual.
4092
4210cd0b
JD
40932006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4094
4095 Fix bug that mistakes braced code in a declaration in the rules section
4096 to be a rule action. Mentioned at
4097 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4098 * src/scan-gram.l: Move midrule action detection from the start of the
4099 scanning of any braced code to...
4100 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4101 action. For readability, use $2 and @2 rather than the equivalent
4102 global variables.
4103 * tests/regression.at (Braced code in declaration in rules section):
4104 New test to catch the error fixed by the above patch.
4105
4106 Work on code readability some.
4107 * src/scan-code.l (current_rule): Get rid of this misleading and
4108 redundant declaration: it's actually extern'ed in reader.h.
4109 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4110 translate_action): Add a rule argument and use it instead of the global
4111 current_rule.
4112 (translate_rule_action): This already receives current_rule through an
4113 argument, so pass it on to translate_action instead of assigning
4114 current_rule to current_rule.
4115 (translate_symbol_action, translate_code): Pass rule = NULL to
4116 translate_action.
4117
34f98f46
JD
41182006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4119
4120 Rename %before-definitions to %start-header and %after-definitions to
4121 %end-header. Don't use these declarations to separate pre-prologue
4122 blocks from post-prologue blocks. Add new order-independent
4123 declarations %before-header and %after-header as alternatives to the
4124 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4125 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4126 * NEWS (2.3+): Update for these changes.
4127 * data/glr.c (b4_before_definitions): Update to...
4128 (b4_start_header): ... this.
4129 (b4_after_definitions): Update to...
4130 (b4_end_header): ... this.
4131 * data/glr.cc: Likewise.
4132 * data/lalr1.cc: Likewise.
4133 * data/yacc.c: Likewise.
4134 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4135 prologue blocks with %*-header declarations.
4136 (Calc++ Parser): Likewise.
91661ebb 4137 (Decl Summary): Update names.
148d66d8 4138 (Table of Symbols): Update description.
34f98f46
JD
4139 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4140 (PERCENT_END_HEADER): ... this.
4141 (PERCENT_BEFORE_DEFINITIONS): Update to...
4142 (PERCENT_START_HEADER): ... this.
4143 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4144 (declaration): Update token names and m4 macro names.
4145 When parsing %end-header and %start-header, invoke translate_code
4146 before muscle_code_grow, and no longer set global booleans to remember
4147 whether these declarations have been seen.
4148 Parse new %after-header and %before-header.
4149 * src/reader.c (before_definitions, after_definitions): Remove.
4150 (prologue_augment): Accept a new bool argument to specify whether to
4151 augment the pre-prologue or post-prologue.
4152 * src/reader.h (before_definitions, after_definitions): Remove these
4153 extern's.
4154 (prologue_augment): Add new bool argument.
4155 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4156 (PERCENT_END_HEADER): ... this.
4157 (PERCENT_BEFORE_DEFINITIONS): Update to...
4158 (PERCENT_START_HEADER): ... this.
4159 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4160 * tests/actions.at (Printers and Destructors): Update names.
4161
31b2b07e
JD
41622006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4163
4164 Add comparison operators for C++ location classes. Discussed at
4165 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4166 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4167 declaration indicating whether filename_type has an operator==. If
4168 filename_type is `std::string', it defaults to `1', `0' otherwise.
4169 * data/location.cc: Iff b4_define_location_comparison is `1', add
4170 operator== and operator!= for class position and for class location.
4171
4172 Some minor fixes.
4173 * src/scan-action.l: Remove unused file.
4174 * src/symtab.c (symbol_printer_set): Use printer_location not
4175 destructor_location.
4176 * src/symtab.h (struct symbol): Replace incorrect source comment for
4177 printer members.
4178 * tests/input.at (Incompatible Aliases): Update output with correct
4179 printer location.
4180
9bc0dd67
JD
41812006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4182
4183 Don't put the pre-prologue in the header file. For the yacc.c code
4184 file and the glr.c header and code files, move the pre-prologue before
4185 the token definitions. Add new %before-definitions and
4186 %after-definitions to declare code that will go in both the header file
4187 and code file. Discussed at
4188 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4189 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4190 and
4191 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4192 * NEWS (2.3+): Describe these changes.
4193 * data/glr.c (b4_pre_prologue): Move from within to before...
4194 (b4_shared_declarations): ... this.
4195 Add new b4_before_definitions before b4_token_enums.
4196 Add new b4_after_definitions at the end.
4197 * data/glr.cc (b4_pre_prologue): Replace with...
4198 (b4_before_definitions): ... this in the header file.
4199 (b4_after_definitions): New near the end of the header file.
4200 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4201 code file right before including the header file.
4202 (b4_before_definitions): New in the previous position of
4203 b4_pre_prologue in the header file.
4204 (b4_after_definitions): New near the end of the header file.
4205 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4206 (b4_token_enums_defines): In the code file, move to right before
4207 YYSTYPE for consistency with the header file.
4208 (b4_before_definitions): New right before b4_token_enums_defines in
4209 both the header and code file.
4210 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4211 header and code file.
4212 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4213 of prologues for %union dependencies.
91661ebb
JD
4214 (Decl Summary): In %defines description, mention the effect of
4215 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
4216 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4217 than in the pre-prologue so that make check succeeds.
148d66d8 4218 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
4219 %after-definitions.
4220 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4221 %before-definitions.
4222 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4223 (declaration): Parse those declarations and append to
4224 b4_before_definitions and b4_after_definitions, respectively.
4225 * src/reader.c (before_definitions, after_definitions): New bools to
4226 track whether those declarations have been seen.
4227 (prologue_augment): Add to the post-prologue if %union,
4228 %before-definitions, or %after-definitions has been seen.
4229 * src/reader.h (before_definitions, after_definitions): New extern's.
4230 * src/scan-gram.l: Scan the new declarations.
4231 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4232 prologue block in a %before-definitions or a %after-definitions based
4233 on whether the %union is declared.
4234 * tests/regression.at (Early token definitions with --yacc, Early token
4235 definitions without --yacc): Move tests for token definitions into the
4236 post-prologue since token names are no longer defined in the
4237 pre-prologue.
4238
203b9274
AD
42392006-06-20 Akim Demaille <akim@epita.fr>
4240
4241 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4242 (symbol_get): Use it.
4243 * src/parse-gram.y: Use it.
4244
a7ee59cf
JD
42452006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4246
4247 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4248 build succeeds when configured with --enable-gcc-warnings.
4249
5a2baae7
PE
42502006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4251
33ad1a9c
PE
4252 * src/parse-gram.y (char_name): New function.
4253 (CHAR, STRING, string_content): For %printer, properly escape.
4254 (ID): Prefer fputs to fprintf.
4255 (id): Reindent to be consistent with other rules.
4256 Properly quote char.
4257
5a2baae7
PE
4258 The Translation Project changed its way of publishing translations
4259 to maintainers. I haven't received any responses to my request
4260 for supporting the old way, or for documenting the new way. I
4261 have modified 'bootstrap' to use screen scraping
4262 (in this case, HTML scraping). This is unreliable and inelegant,
4263 but I don't see any better way. Yuck.
4264 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4265 (get_translations): New function, which uses HTML scraping to
4266 deduce locations of latest translations.
4267 Use this function to grab both bison and bison-runtime .po files.
4268 Don't bother priming the pump for the runtime-po domain any more,
4269 as it's now translated better than bison is.
4270
58d7a1a1
AD
42712006-06-19 Akim Demaille <akim@epita.fr>
4272
4273 * src/scan-gram.l: No longer "parse" things after `%union' until
4274 `{'. Rather, return a single "%union" token.
4275 No longer make symbols: return strings, and leave the conversion
4276 to symbols to the parser.
4277 (SC_PRE_CODE, token_type): Remove.
4278 * src/parse-gram.y (%union): New field `character'.
4279 Sort tokens.
4280 (CHAR): New token.
4281 (ID, ID_COLON): Now that the scanner no longer makes them
4282 identifiers, adjust all uses to invoke symbol_get.
4283 (id_colon): New, wraps the conversion from string to symbol.
4284 (%union): Accept a possible union_name.
4285 (symbol): Now can be a char.
4286 * data/c.m4 (b4_union_name): Leave a default value.
4287 * data/glr.c, data/yacc.c: Use it.
4288
b931235e
JD
42892006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4290
4291 For associating token numbers with token names for "yacc.c", don't use
4292 #define statements unless `--yacc' is specified; always use enum
4293 yytokentype. Most important discussions start at:
4294 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4295 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4296 and
4297 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4298 * NEWS (2.3+): Mention.
4299 * data/c.m4 (b4_yacc_if): New.
4300 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4301 token #define's.
4302 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4303 on token name definitions.
4304 * src/getargs.c (usage): Capitalize `Yacc' in English.
4305 * src/output.c (prepare): Define b4_yacc_flag.
4306 * tests/regression.at (Early token definitions): Test that tokens names
4307 are defined before the pre-prologue not just before the post-prologue.
4308 Remove this test case and copy to...
4309 (Early token definitions with --yacc): ... this to test #define's.
4310 (Early token definitions without --yacc): ... and this to test enums.
4311
9e6e7ed2
PE
43122006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4313
4314 * NEWS: Reword the post-2.3 change to not be so optimistic about
4315 removing the old "look-ahead" spelling.
4316 Update previous look-ahead/lookahead change reports.
4317 * REFERENCES: look-ahead -> lookahead (since that's
4318 what he actually wrote).
4319 * doc/refcard.tex: look ahead -> lookahead,
4320 look-ahead -> lookahead
4321
742e4900
JD
43222006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4323
4324 For consistency, use `lookahead' instead of `look-ahead' or
4325 `look_ahead'. Discussed starting at
4326 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4327 and then at
4328 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4329 * NEWS: For the next release, note the change to `--report'.
4330 * TODO, doc/bison.1: Update English.
4331 * doc/bison.texinfo: Update English.
4332 (Understanding Your Parser, Bison Options): Document as
4333 `--report=lookahead' rather than `--report=look-ahead'.
4334 * src/conflicts.c: Update English in comments.
4335 (lookahead_set): Rename from look_ahead_set.
4336 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4337 (resolve_sr_conflict): Rename local look_ahead_tokens to
4338 lookahead_tokens, and update other uses.
4339 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4340 count_rr_conflicts, conflicts_free): Update uses.
4341 * src/getargs.c (report_args): Move "lookahead" before alternate
4342 spellings.
4343 (report_types): Update uses.
4344 (usage): For `--report' usage description, state `lookahead' spelling
4345 rather than `look-ahead'.
4346 * src/getargs.h (report.report_lookahead_tokens): Rename from
4347 report_look_ahead_tokens.
4348 * src/lalr.c: Update English in comments.
4349 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4350 (state_lookahead_tokens_count): Rename from
4351 state_look_ahead_tokens_count.
4352 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4353 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4354 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4355 Update other uses.
4356 Update English in output.
4357 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4358 * src/print.c: Update English in comments.
4359 (lookahead_set): Rename from look_ahead_set.
4360 (print_reduction): Rename argument lookahead_token from
4361 look_ahead_token.
4362 (print_core, state_default_rule, print_reductions, print_results):
4363 Update uses.
4364 * src/print_graph.c: Update English in comments.
4365 (print_core): Update uses.
4366 * src/state.c: Update English in comments.
4367 (reductions_new): Update uses.
4368 (state_rule_lookahead_tokens_print): Rename from
4369 state_rule_look_ahead_tokens_print, and update other uses.
4370 * src/state.h: Update English in comments.
4371 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4372 (state_rule_lookahead_tokens_print): Rename from
4373 state_rule_look_ahead_tokens_print.
4374 * src/tables.c: Update English in comments.
4375 (conflict_row, action_row): Update uses.
4376 * tests/glr-regression.at
4377 (Incorrect lookahead during deterministic GLR,
4378 Incorrect lookahead during nondeterministic GLR): Rename
4379 print_look_ahead to print_lookahead.
4380 * tests/torture.at: Update English in comments.
4381 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4382 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4383 (Many lookahead tokens): Update uses.
4384 * data/glr.c: Update English in comments.
4385 * lalr1.cc: Likewise.
4386 * yacc.c: Likewise.
4387 * src/conflicts.h: Likewise.
4388 * src/lalr.h: Likewise.
4389 * src/main.c: Likewise.
4390 * src/output.c: Likewise.
4391 * src/parse-gram.c: Likewise.
4392 * src/tables.h: Likewise.
4393 * tests/calc.at: Likewise.
4394
3c40d0b5
JD
43952006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4396
4397 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4398
5d278082
PE
43992006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4400
4401 * TODO: Add request from Nelson H. F. Beebe to be able to install
4402 Bison without installing the yacc script.
4403
9e668899
JD
44042006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4405
4406 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4407 and yytext if they're already #define'd.
4408 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4409 * src/scan-code-c.c: ... here.
4410 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4411 <config.h>.
4412
0c8e079f
JD
44132006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4414
4415 Get Bison to build again when configured with --enable-gcc-warnings.
4416 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4417 missing #include's.
4418 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4419 loc argument as it shadows a global.
4420 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4421 invocation.
4422
4423 * src/.cvsignore: Add scan-code.c.
4424
2346344a
AD
44252006-06-07 Akim Demaille <akim@epita.fr>
4426
4427 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4428 to...
4429 * src/scan-code.l: here.
4430 * tests/input.at (Torturing the Scanner): Fix another location
4431 error.
4432
4862bdfd
AD
44332006-06-07 Akim Demaille <akim@epita.fr>
4434
4435 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4436
e9071366
AD
44372006-06-06 Akim Demaille <akim@epita.fr>
4438
4439 Extract the parsing of user actions from the grammar scanner.
4440 As a consequence, the relation between the grammar scanner and
4441 parser is much simpler. We can also split "composite tokens" back
4442 into simple tokens.
4443 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4444 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4445 rename as...
4446 * src/location.h, src/location.c (add_column_width)
4447 (location_compute): these.
4448 Fix the column count: the initial column is 0.
4449 (location_print): Be robust to ending column being 0.
4450 * src/location.h (boundary_set): New.
4451 * src/main.c: Adjust to scanner_free being renamed as
4452 gram_scanner_free.
4453 * src/output.c: Include scan-code.h.
4454 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4455 Use boundary_set.
4456 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4457 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4458 which is now, again, a separate token.
4459 Adjust all dependencies.
4460 Whereever actions with $ and @ are used, use translate_code.
4461 (action): Remove this nonterminal which is now useless.
4462 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4463 (grammar_current_rule_action_append): Use translate_code.
4464 (packgram): Bound check ruleno, itemno, and rule_length.
4465 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4466 (last_string, last_braced_code_loc, max_left_semantic_context)
4467 (scanner_initialize, scanner_free, scanner_last_string_free)
4468 (gram_out, gram_lineno, YY_DECL_): Move to...
4469 * src/scan-gram.h: this new file.
4470 (YY_DECL): Rename as...
4471 (GRAM_DECL): this.
4472 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4473 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4474 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4475 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4476 Move these declarations, and...
4477 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4478 these to...
4479 * src/flex-scanner.h: this new file.
4480 * src/scan-gram.l (rule_length, rule_length_overflow)
4481 (increment_rule_length): Remove.
4482 (last_braced_code_loc): Rename as...
4483 (gram_last_braced_code_loc): this.
4484 Adjust to the changes of the parser.
4485 Move all the handling of $ and @ into...
4486 * src/scan-code.l: here.
4487 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4488 (handle_action_dollar, handle_action_at): Move to...
4489 * src/scan-code.l: here.
4490 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4491 scan-code.h, scan-code-c.c, scan-gram.h.
4492 (EXTRA_bison_SOURCES): Add scan-code.l.
4493 (BUILT_SOURCES): Add scan-code.c.
4494 (yacc): Be robust to white spaces.
4495
4496 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4497 * tests/regression.at: Adjust the column numbers.
4498 * tests/regression.at: Adjust the error message.
7891a7c4 4499
184e42f0
JD
45002006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4501
4502 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4503 Use Akim's wording from
4504 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4505
7891a7c4
JD
45062006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4507
4508 Between Bison releases, manually append `+' to the previous Bison
4509 release number, and use that as a signal to automatically print the
4510 ChangeLog's CVS Id keyword from --version. Discussed starting at
4511 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4512 * ChangeLog: Add Id header.
4513 * configure.ac (AC_INIT): Append `+' to `2.3'.
4514 * src/.cvsignore: Add revision.c.
4515 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4516 (BUILT_SOURCES): Add revision.c.
4517 (revision.c): New target rule. This file defines a new global variable
4518 named revision. It initializes it with either the Id from ChangeLog
4519 or, if VERSION doesn't contain `+', with the empty string.
4520 * src/getargs.c (version): Print the value of revision.
4521 * src/revision.h: Extern revision.
4522
4ad3ed84
PE
45232006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4524
4525 * NEWS: Version 2.3.
4526 * configure.ac (AC_INIT): Likewise.
4527
02103984
PE
45282006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4529
4530 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4531 with no arguments, not as an object-like macro. This is for
4532 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4533 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4534 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4535 Document this.
4536
2c08afa5
JD
45372006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4538
4539 * src/getargs.c (usage): Back out yesterday's modification of the
4540 --help output so that we don't have to wait for translation before
4541 releasing 2.3.
4542
6077da58
PE
45432006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4544
4545 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4546 Problem reported by Akim Demaille.
4547
2a26b6c2
JD
45482006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4549
4550 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4551
aefef0d6
PE
45522006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4553
4554 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4555 generated source code. Problem reported by Frans Englich in
4556 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4557
fcd8e201
PE
45582006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4559
4560 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4561 shell, not within 'make', so that 'make' by an ordinary builder
4562 (using GNU make) does not worry about configuring gzip. This also
4563 works around a bug reported independently by Keith Thompson and by
4564 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4565 stderr rather than stdout, messing up the build logs.
4566
7b5cdcbd
JD
45672006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4568
4569 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4570 to make sure that YYID will never be unused. This fixes a 'make
4571 maintainer-check' failure caused by the recent changes to the 'Trivial
4572 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4573 not used.
4574 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4575
5ad0a449
JD
45762006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4577
4578 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4579 state before an empty RHS is always resolved here. Only the location
4580 of that state is guaranteed to be resolved, and that's enough. This
4581 fixes the remaining bug reported by Derek M. Jones in
4582 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4583 * tests/glr-regression.at (Uninitialized location when reporting
4584 ambiguity): Test the above case.
4585 Also, the embedded comments in this test case claim it checks the case
4586 of an empty RHS that has inherited the initial location. However, the
4587 corresponding LHS was already resolved, so yyresolveLocations didn't
4588 actually have reason to modify it. Fix this by forcing
4589 nondeterministic operation at the beginning of the parse.
4590
50cce58e
PE
45912006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4592
4593 * data/c.m4 (b4_yy_symbol_print_generate):
4594 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4595 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4596 of the bugs reported today by Derek M Jones in
4597 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4598 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4599 defined to be a type name without parens or brackets.
4600 (Location Type): Similarly for YYLTYPE.
4601 * tests/regression.at (Trivial grammars): Put in a test for this
4602 bug that will be caught by 'make maintainer-check' (though not,
4603 alas, by 'make check' unless your compiler is picky).
4604
ab8d9dc5
PE
46052006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4606
0d2c8934 4607 * NEWS: Version 2.2.
ab8d9dc5
PE
4608 * configure.ac (AC_INIT): Likewise.
4609
9138c575
JD
46102006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4611
4612 * data/glr.c (yyreportTree): Make room in yystates for the state
4613 preceding the RHS. This fixes the segmentation fault reported by Derek
4614 M. Jones in
4615 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4616 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4617 to the user. Reported for yyreportTree by Derek M. Jones later in the
4618 same thread.
4619 * THANKS: Add Derek M. Jones.
4620 Update my email address.
4621 Fix typo in Steve Murphy's name.
4622
276f48df
PE
46232006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4624
d6645148
PE
4625 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4626 checking against YYLAST that caused the parser to miss a potential
4627 alternative in its diagnostic.
4628 Problem reported by Maria Jose Moron Fernandez in
4629 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4630 * data/lalr1.cc (yysyntax_error_): Likewise.
4631 * data/yacc.c (yysyntax_error): Likewise.
4632 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4633 tokens, in case we run into an older C compiler.
4634 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4635 Use them to check for the off-by-one error fixed above.
4636
276f48df
PE
4637 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4638 YYSIZE_T, not size_t.
4639 * tests/regression.at (Trivial grammars): New test, to catch
4640 the error fixed by the above patch.
4641
cd8b5791
AD
46422006-05-14 Akim Demaille <akim@lrde.epita.fr>
4643
4644 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4645 scheme.
4646 Reported by Steve Murphy.
4647
34376418
AD
46482006-05-14 Akim Demaille <akim@lrde.epita.fr>
4649
4650 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4651 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4652
327afc7c
AD
46532006-05-14 Akim Demaille <akim@lrde.epita.fr>
4654
4655 Implement --trace=m4.
4656 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4657 * src/output.c (output_skeleton): When set, pass -dV to m4.
4658
4659 Factor the handling of flags in m4.
4660 * src/output.c (prepare): Rename the muscle names debug, defines,
4661 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4662 * data/c.m4: Adjust.
4663 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4664 Use b4_define_flag_if to define other b4_FLAG_if macros.
4665 (b4_location_if): As a consequence, rename as...
4666 (b4_locations_if): this, for consistency.
4667 Adjust all the skeletons.
4668
ba9ecd19
AD
46692006-05-14 Akim Demaille <akim@lrde.epita.fr>
4670
4671 * etc/bench.pm: Shorten bench names.
4672
4e83ea15
AD
46732006-05-14 Akim Demaille <akim@lrde.epita.fr>
4674
4675 * src/output.h, src/output.c (error_verbose): Move to...
4676 * src/getargs.h, src/getargs.c: here.
4677 Sort the flags.
4678 Adjust dependencies.
4679
6e93d810
PE
46802006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4681
4682 * data/c.m4 (b4_copyright): Put the special exception for Bison
4683 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
4684 uses changed. Suggested by Akim Demaille. Also, wrap the
4685 copyright notice, in case it is longer than 80 columns. Replace
4686 comma by newline after title.
6e93d810 4687
eaea13f5
PE
46882006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4689
4690 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4691 incompatibility, not a bug. Mention that it wasn't fixed as of
4692 flex 2.5.33.
4693
3cf084ec
AD
46942006-05-11 Akim Demaille <akim@lrde.epita.fr>
4695
4696 * examples/extexi: Enforce the precedence of concatenation over
4697 >>.
0a9f1c7d 4698 Reported by Tommy Nordgren.
3cf084ec 4699
32c96bd7
AD
47002006-05-11 Akim Demaille <akim@lrde.epita.fr>
4701
4702 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4703 with the member "token".
f94705b2 4704 Reported by Martin Nylin.
32c96bd7 4705
eaea13f5
PE
47062006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4707
4708 * data/glr.c: Switch to Bison 2.2 special-exception language in
4709 the copyright notice. Use more-regular format for titles and
4710 copyright notices.
4711 * data/glr.cc: Likewise.
4712 * data/location.cc: Likewise.
4713 * data/yacc.cc: Likewise.
4714 * doc/bison.texinfo (Conditions): Document this.
4715 * NEWS: likewise. Upgrade version to 2.2.
4716
6e2d1146
AD
47172006-04-27 Akim Demaille <akim@lrde.epita.fr>
4718
4719 * data/glr.cc: Remove dead code.
4720
47671055
PE
47212006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4722
4723 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4724 that variable and the line breaks the bootstrap. Problem reported
4725 by Juan M. Guerrero.
4726
ed2e6384
AD
47272006-04-24 Akim Demaille <akim@lrde.epita.fr>
4728
4729 * doc/bison.texinfo (Multiple start-symbols): New.
4730
3cedc2dc
AD
47312006-04-24 Akim Demaille <akim@lrde.epita.fr>
4732
4733 * etc/README, etc/bench.pl: New.
4734
b2ddc3f3
AD
47352006-04-03 Akim Demaille <akim@lrde.epita.fr>
4736
4737 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4738 rule.
4739 Reported by Mickael Labau.
4740 * tests/input.at (Torturing the Scanner): Test it.
4741
91e3ac9a
PE
47422006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4743
4744 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4745 Problem reported by Bob Rossi.
4746
47472006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4748
4749 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4750 and didn't really work.
4751 For the index, use @ifnotinfo, not @iftex.
4752 Minor cleanups of spacing and terminology.
4753
5cf61e93
AD
47542006-03-12 Akim Demaille <akim@lrde.epita.fr>
4755
4756 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4757 of AT_NAME_PREFIX when %name-prefix is not used.
4758
aa08666d
AD
47592006-03-12 Akim Demaille <akim@lrde.epita.fr>
4760
4761 Apply --prefix to C++ skeletons too: they change the namespace.
4762 The test suite already exercize these cases.
4763 * data/c++.m4 (b4_namespace): New.
4764 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4765 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4766 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4767 * doc/bison.texinfo: Document it.
4768 (Option Cross Key): Use @multitable in all formats. It looks
4769 nicer, even in TeX outputs.
4770 (Rules): Use the same code whatever the output type is.
4771 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4772 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4773 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 4774
45567173
AD
47752006-03-10 Akim Demaille <akim@lrde.epita.fr>
4776
4777 * TODO: Remove dead items.
4778
e9d8f881 47792006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
4780
4781 * doc/FAQ: Remove, merged into...
4782 * doc/bison.texinfo (FAQ): this.
4783 * doc/Makefile.am (EXTRA_DIST): Adjust.
4784
c095d689
AD
47852006-03-10 Akim Demaille <akim@lrde.epita.fr>
4786
4787 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4788 even if empty.
4789 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4790 * doc/bison.texinfo (Calc++ Scanner): Use it.
4791
6e0f8287
PE
47922006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4793
4794 Fix two nits reported by twlevo, plus one more that I discovered.
4795
4796 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4797 this is the usual Bison style.
4798 * src/location.h (location_print): Likewise.
4799
4800 * src/reader.h (token_name): Likewise.
4801
d6b771c3
PE
48022006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4803
4804 Fix some nits reported by twlevo.
4805 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4806 and "POSIX". Use more-modern syntax for URLs. Mention C++
4807 and ask for Java. Don't hardwire OS version numbers. Add
4808 copyright notice.
4809 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4810 * src/conflicts.c (solved_conflicts_obstack): Now static.
4811
1e137b71
JD
48122006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4813
4814 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4815 page. Say "you can use it" not "you may use it" as on the web page;
4816 we're describing capabilities not granting permission.
4817
73f2e47e
PE
48182006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4819
6d05403d
PE
4820 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4821 shadowing warnings. Use usual patter for iterating through RHS.
4822 * tests/glr-regression.at
4823 (Uninitialized location when reporting ambiguity):
4824 Modify yylex so that it uses its argument, rather than trying
4825 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4826 const char -> char const.
4827
73f2e47e
PE
4828 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4829 Don't use tabs inside commands; it messes up 'ps'.
4830 Problem reported by twlevo.
4831
8710fc41
JD
48322006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4833
4834 * tests/glr-regression.at (Uninitialized location when reporting
4835 ambiguity): New test case.
4836 * data/glr.c (yyresolveLocations): New function, which uses
4837 YYLLOC_DEFAULT.
4838 (yyresolveValue): Invoke yyresolveLocations before reporting an
4839 ambiguity.
4840 * doc/bison.texinfo (Default Action for Locations): Note
4841 YYLLOC_DEFAULT's usage for ambiguity locations.
4842 (GLR Semantic Actions): Cross-reference those notes.
4843
ae952af2
JD
48442006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4845
4846 * tests/glr-regression.at (Leaked semantic values when reporting
4847 ambiguity): Remove unnecessary union and type declarations.
4848 (Leaked lookahead after nondeterministic parse syntax error): New test
4849 case.
4850 * data/glr.c (yyparse): Check for zero stacks remaining before
4851 attempting to shift the lookahead so that you don't lose it.
4852
35ee866a
JD
48532006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4854
4855 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4856 * tests/glr-regression.at (Leaked semantic values when reporting
4857 ambiguity): New test case.
4858 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4859 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4860 now unnecessary yystackp parameter.
4861 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4862 destructors can be called.
4863
4864 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4865 in existing testcases.
4866
520181ab
JD
48672006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4868
4869 Don't leak semantic values for parent RHS when a user action cuts the
4870 parser, and clean up related code a bit.
4871 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
4872 cuts parse): Rename to...
4873 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
4874 for leaked parent RHS values.
4875 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4876 between an unresolved state (non-empty chain of semantic options) and
4877 an incomplete one (signaled by an empty chain).
ae952af2 4878 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
4879 successfully or unsuccessfully resolved yyGLRState to...
4880 (yyresolveValue): ... here so that yyresolveValue always leaves a
4881 yyGLRState with consistent data and thus is easier to understand.
4882 Remove the yyvalp and yylocp parameters since they are always just
4883 taken from the yys parameter. When reporting a discarded merged value
4884 in debugging output, note that it is incompletely merged. Document the
4885 interface.
4886 (yyresolveAction): If resolving any of the RHS states fails, destroy
4887 them all rather than leaking them. Thus, as long as user actions are
4888 written to clean up the RHS correctly, yyresolveAction always cleans up
4889 the RHS of a semantic option. Document the interface.
4890
18d9185c
PE
48912006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4892
4893 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4894 led to a segmentation fault in GNU Pascal. Problem reported
4895 by Waldek Hebisch.
4896
841a7737
JD
48972006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4898
4899 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4900 mid-rule action inside a nonterminal symbol in order to declare a
4901 destructor for its semantic value.
4902
fc3f467f
PE
49032006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4904
4905 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4906 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4907 __cplusplus && ! defined _STDLIB_H && !
4908 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4909 defined free))]: Include <stdlib.h> rather than rolling our own
4910 declarations of malloc and free, to avoid problems with
4911 incompatible declarations (using 'throw') C++'s stdlib.h. This
4912 should fix Debian bug 340012
4913 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4914 reported by Guillaume Melquiond.
4915
a3af26dd
PE
49162006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4917
4d7bc38c
PE
4918 * NEWS: Clarify symbols versus types in unused-value warnings.
4919
a3af26dd
PE
4920 * configure.ac (AC_INIT): Bump version number.
4921
4e26c69e
PE
49222006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4923
4924 * NEWS: Version 2.1a.
4925 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4926 since C99 requires this.
4927
498e897c
PE
49282006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4929
4930 * m4/c-working.m4: New file.
4931 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4932
57bb17ca
PE
49332006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4934
4935 * Makefile.maint: Merge from coreutils.
4936
0be105dc
PE
49372006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4938
4939 More portability fixes for problems summarized by Nelson H. F. Beebe.
4940
4941 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4942 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4943 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4944 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4945 messes up because C++ code is compiled in 32-bit mode but linked
4946 in 64-bit mode.
4947
6fc0c024
PE
49482006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4949
4950 More portability fixes for problems summarized by Nelson H. F. Beebe.
4951
7870f699
PE
4952 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4953 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4954
6fc0c024
PE
4955 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4956 nodist_PROGRAMS, since we don't need to actually compile the
4957 example if we're just doing a plain 'make'. This avoids bothering
4958 the installer unnecessarily about problems due to weird C++
4959 compilers.
4960
fe6c2fde
PE
49612006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4962
4963 More portability fixes for problems summarized by Nelson H. F. Beebe.
4964
4965 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4966 than #include "...", and compile with -I'.'. The old method was
4967 not portable, according to Posix and the C standard, and it does
4968 not work with Sun C 5.7, where previous #line directives affect
4969 the working directory used in later #include "..." directives.
4970
927b425b
JMG
49712006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4972
4973 Various DJGGP specific issues in /djgpp
4974
d9735e9e
PE
49752006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4976
4977 More portability fixes for problems summarized by Nelson H. F. Beebe.
4978
4979 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4980 '#include <map>' works and that you can apply ++ to iterators.
4981
5a6755af
PE
49822006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4983
67a0dc4f
PE
4984 Work around portability problems summarized by Nelson H. F. Beebe in
4985 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4986
8c86f0ef
PE
4987 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4988 that '#include <string>' works.
4989
de35dd59
PE
4990 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4991 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4992 "warning: sorry: semantics of inline function static data `const
4993 unsigned char translate_table[262]' are wrong (you'll wind up with
4994 multiple copies)".
4995
67a0dc4f
PE
4996 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4997 or, xor to not_, and_, or_, and xor_, respectively. This works
4998 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4999 random system header somewhere that includes the equivalent of
5000 <iso646.h>.
5001
5a6755af
PE
5002 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5003 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 5004 Suite Version 2.0.
5a6755af 5005
3f001415
JD
50062006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5007
5008 During deterministic GLR operation, user actions should be able to
5009 influence the parse by changing yychar. To make this easier to fix and
5010 to make glr.c easier to evolve in general, don't maintain yytoken in
5011 parallel with yychar; just compute yytoken when needed.
5012 * tests/glr-regression.at (Incorrect lookahead during deterministic
5013 GLR): Check that setting yychar in a user action has the intended
5014 effect.
5015 * data/glr.c (yyGLRStack): Remove yytokenp member.
5016 (yyclearin): Don't set *yytokenp.
5017 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5018 yychar rather than *yytokenp to determine the current lookahead.
5019 Compute yytoken locally when needed.
5020 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5021 point to.
5022
5023 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5024 after `--report' documentation.
5025
e2a8c0f5
PE
50262006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5027
5028 * src/parse-gram.y (grammar_declaration): Location of printer
5029 symbol is @1, not list->location. Bug reported by twlevo.
5030 * tests/input.at (Incompatible Aliases): Adjust to above change.
5031
6b702268
PE
50322006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5033
27622431
PE
5034 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5035 all the test at once. This makes the output easier to read in the
5036 normal case.
5037
6b702268
PE
5038 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5039 got from <http://bro-ids.org/download.html>. The bug is that
5040 when two actions appeared in succession, the second one was
5041 scanned before the first one was added to the grammar rule
5042 as a midrule action. Bison then output the incorrect warning
5043 "parse.y:905.17-906.36: warning: unused value: $3".
5044 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5045 associated with a value.
5046 (rhs): Don't invoke grammar_current_rule_action_append.
5047 (action): Invoke it here instead.
5048 * src/reader.c (grammar_midrule_action): Now extern.
5049 (grammar_current_rule_action_append): Don't invoke
5050 grammar_midrule_action; that is now the scanner's job.
5051 * src/reader.h (last_string, last_braced_code_loc):
5052 (grammar_midrule_action): New decls.
5053 * src/scan-gram.l (last_string): Now extern, sigh.
5054 (last_braced_code_loc): New extern variable.
5055 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5056 rule already has an action.
5057 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5058 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5059 Add some tests to check that the above changes fixed the bug.
5060
d40ba6c2
PE
50612006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5062
5063 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5064 All used changed. Check whether the symbol has a destructor,
5065 not whether it is typed.
5066 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5067 that the values are still reported as unused. All line numbers
5068 adjusted.
5069
401aace6
PE
50702006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5071
5072 Work around a bug in bro 0.8, which underparenthesizes its
5073 definition of YYLLOC_DEFAULT.
5074 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5075 their arguments.
5076 * data/lalr1.cc: Likewise.
5077 * data/yacc.cc: Likewise.
5078
06f01bc4
PE
50792006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5080
401aace6
PE
5081 Work around a bug in Pike 7.0, and give the Pike folks a
5082 better way to override the usual int widths.
5083 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5084 user can override the types.
5085 (short): #undef, to work around a bug in Pike 7.0.
5086 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5087 (union yyalloc.yyss): Use yytype_int16 rather than short.
5088 All uses changed.
5089 (yysigned_char): Remove.
5090 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5091 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5092 * tests/regression.at (Web2c Actions): Adjust to above changes.
5093
5094 * src/reader.c (check_and_convert_grammar): New function.
5095 (reader): Close the input file even if something went wrong during
5096 parsing. Minor file descriptor leak reported by twlevo.
5097
06f01bc4
PE
5098 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5099 to pacify gcc -Wswitch-default.
5100 * src/scan-gram.l (adjust_location): Use a default: break; case
5101 to pacify gcc -Wswitch-default.
5102 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5103 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5104 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5105 Move these decls to scan-skel.l, since they don't need to be
5106 visible elsewhere.
5107 * src/scan-skel.l: Accept the above decls.
5108 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5109 is used.
5110
02650b7f
PE
51112006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5112
5113 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5114 since we don't want to insist on a version number at the start
5115 of the changelog every time.
5116 * Makefile.maint: Sync from coreutils a bit better.
5117 (sc_trailing_blank): Renamed from sc_trailing_space.
5118 All uses changed.
5119 (sc_no_if_have_config_h, sc_require_config_h):
5120 (sc_prohibit_assert_without_use): New rules.
5121 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5122 (sc_dd_max_sym_length): Fix leading spaces in rule.
5123 (sc_system_h_headers): Prefix with @.
5124 (sc_useless_cpp_parens, m4-check): Output line numbers.
5125 (changelog-check): Allow version only in head.
5126 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5127 satisfy new Makefile.maint rule.
5128 * data/glr.c: Likewise.
5129 * data/glr.cc: Likewise.
5130 * data/lalr1.cc: Likewise.
5131 * data/yacc.c: Likewise.
5132 * lib/ebitsetv.c: Likewise.
5133 * lib/lbitset.c: Likewise.
5134 * lib/subpipe.c: Likewise.
5135 * lib/timevar.c: Likewise.
5136 * src/system.h: Likewise.
5137 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5138 * djgpp/Makefile.maint: Add copyright notice.
5139 * djgpp/README.in: Likewise.
5140 * djgpp/config.bat: Likewise.
5141 * djgpp/config.site: Likewise.
5142 * djgpp/config_h.sed: Likewise.
5143 * djgpp/djunpack.bat: Likewise.
5144 * djgpp/config.sed: Fix copyright notice to match standard format.
5145 * djgpp/subpipe.h: Likewise.
5146 * lib/bitsetv-print.c: Likewise.
5147 * lib/bitsetv.c: Likewise.
5148 * lib/subpipe.h: Likewise.
5149 * lib/timevar.c: Likewise.
5150 * lib/timevar.h: Likewise.
5151 * djgpp/subpipe.c: Use standard recipe for config.h.
5152 * lib/abitset.c: Likewise.
5153 * lib/bitset.c: Likewise.
5154 * lib/bitset_stats.c: Likewise.
5155 * lib/bitsetv-print.c: Likewise.
5156 * lib/bitsetv.c: Likewise.
5157 * lib/ebitsetv.c: Likewise.
5158 * lib/get-errno.c: Likewise.
5159 * lib/lbitset.c: Likewise.
5160 * lib/subpipe.c: Likewise.
5161 * lib/timevar.c: Likewise.
5162 * lib/vbitset.c: Likewise.
5163 * tests/local.at: Likewise.
5164 * src/scan-gram.l: Don't include verify.h, since system.h does
5165 that for us.
5166 * .x-sc_require_config_h: New file.
5167 * .x-sc_unmarked_diagnostics: New file.
5168
287c78f6
PE
51692006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5170
287c78f6
PE
5171 Be a bit more systematic about using 'abort'.
5172 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5173 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5174 Put 'default: abort ();' before some other case, to satisfy older
5175 pedantic compilers.
5176 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5177 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5178 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5179 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
5180 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5181 (get_decision_str, get_orientation_str, get_node_alignment_str):
5182 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5183 (get_linestyle_str, get_arrowstyle_str): Likewise.
5184 * src/conflicts.c (resolve_sr_conflict):
5185 Use a default case rather than one for the one remaining enum
5186 value, to catch invalid enum values as well.
5187 * src/lalr.c (set_goto_map, map_goto):
5188 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5189 * src/nullable.c (nullable_compute, token_definitions_output):
5190 Likewise.
5191 * src/reader.c (packgram, reader): Likewise.
5192 * src/state.c (transitions_to, state_new, state_reduction_find):
5193 Likewise.
5194 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5195 (symbol_pack): Likewise.
5196 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
5197 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5198 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
5199 * src/system.h: Don't include <assert.h>.
5200 (assert): New macro.
5201
5202 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5203 (Destructor Decl, Parser Function, Pure Calling):
5204 Describe rules for braces inside C code more carefully.
287c78f6 5205
c66dfadd
PE
52062006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5207
c21493b8
PE
5208 Fix some porting glitches found by Nelson H. F. Beebe.
5209 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5210 compilers that don't understand that abort () does not return.
5211 * src/state.c (transitions_to): Likewise.
5212 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5213 that '#include <cstdlib>' works.
5214 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5215 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5216 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5217 for the benefit of some pre-C99 compilers.
5218
b6e3facf
PE
5219 * bootstrap: Undo changes to gnulib files that autoreconf made.
5220
c66dfadd
PE
5221 Minor fixups to get 'make maintainer-check' to work.
5222 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5223 with the new verify.h implementation.
5224 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5225 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5226 * data/yacc.c (YYUSE): Likewise.
5227 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5228 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5229 * src/parse-gram.y (declaration): Don't pass a string constant
5230 to a function that expects char *, since GCC might complain
5231 about the constant value.
5232 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5233 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5234 before #defining them.
5235 * tests/glr-regression.at
5236 (Incorrectly initialized location for empty right-hand side in GLR):
5237 In yyerror, use the msg arg.
5238 (Corrupted semantic options if user action cuts parse):
5239 (Incorrect lookahead during deterministic GLR):
5240 (Incorrect lookahead during nondeterministic GLR):
5241 Don't name a local var 'index'; it shadows string.h's 'index'.
5242
ed94ef2a
AD
52432006-01-19 Akim Demaille <akim@epita.fr>
5244
5245 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5246 location, not just parts of it.
5247
e9ad4aec
PE
52482006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5249
d6ca7905
PE
5250 * NEWS: Document the fact that multiple %unions are now allowed.
5251 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
5252 * TODO: This feature is now implemented, so remove it from
5253 the wishlist.
d6ca7905 5254
ef1b70e0
PE
5255 * Makefile.maint: Merge with coreutils Makefile.maint.
5256 (CVS_LIST): Use build-aux version if available.
5257 (VERSION_REGEXP): New macro.
5258 (syntax-check-rules): Add sc_no_if_have_config_h,
5259 sc_prohibit_assert_without_use, sc_require_config_h,
5260 sc_useless_cpp_parens.
5261 (sc_obsolete_symbols): Check for O_NDELAY.
5262 (sc_dd_max_sym_length): Track coreutils.
5263 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5264 (sc_useless_cpp_parens): New rule.
5265 (news-date-check): Look for version or today's date.
5266 (changelog-check): Don't require version number near head.
5267 (copyright-check): Use current year instead of hardwiring 2005.
5268 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5269 (announcement): Add --gpg-key-ID.
5270
5271 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5272 with "file system".
5273
2073ce56 5274 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
5275 array. Problem reported by twlevo.
5276 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5277 * src/lalr.c (build_relations): Rely on new sentinel.
5278 * src/gram.c (gram_free): Adjust to new sentinel.
5279
b7691f15
JD
52802006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5281
5282 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5283 yylookaheadNeeds. All uses updated.
5284 (yysplitStack): Rename local yynewLookaheadStatuses to
5285 yynewLookaheadNeeds.
5286 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5287 GLR): In comments, change `lookahead status' to `lookahead need'.
5288
ddee1b06
PH
52892006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5290
5291 * data/glr.c (yysplitStack): A little stylistic rewrite.
5292
12f4614d
PH
52932006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5294
5295 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5296
32c29292
JD
52972006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5298
5299 * doc/bison.texinfo: Fix some typos.
5300 (GLR Semantic Actions): New subsection discussing special
5301 considerations because GLR semantic actions might be deferred.
5302 (Actions): Mention look-ahead usage of yylval.
5303 (Actions and Locations): Mention look-ahead usage of yylloc.
5304 (Special Features for Use in Actions): Add YYEOF entry and mention it
5305 in the yychar entry.
5306 In the yychar entry, remove mention of the local yychar case (pure
5307 parser) since this is irrelevant information when writing semantic
148d66d8 5308 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
5309 yychar is otherwise described as an external variable.
5310 In the yychar entry, don't call it the `current' look-ahead since it
5311 isn't when semantic actions are deferred.
5312 In the yychar and yyclearin entries, add note about deferred semantic
5313 actions.
5314 Add yylloc and yylval entries discussing look-ahead usage.
5315 (Look-Ahead Tokens): When discussing yychar, don't call it the
5316 `current' look-ahead, and do mention yylval and yylloc.
5317 (Error Recovery): Cross-reference `Action Features' when mentioning
5318 yyclearin.
148d66d8 5319 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
5320 look-ahead.
5321 In the yylloc and yylval entries, mention look-ahead usage.
5322
de366a2f 53232006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
5324
5325 * tests/glr-regression.at: Update copyright year to 2006.
5326
bf70fa87
JD
53272006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5328
5329 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5330 use during nondeterministic operation to track which stacks have
5331 actually needed the current lookahead.
5332 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5333 Allocate, deallocate, resize, and otherwise shuffle space for
5334 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5335 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5336 appropriately during nondeterministic operation.
5337 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5338 members to store the current lookahead to be used by the deferred
5339 user action.
5340 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5341 from which the RHS is taken. Set the lookahead members of the new
5342 yySemanticOption according to the lookahead status for stack yyk.
5343 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5344 yyaddDeferredAction.
5345 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5346 members of yySemanticOption before invoking yyuserAction, and then set
5347 them back to their current values afterward.
5348 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5349 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5350 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5351 titles for consistency.
5352 (Leaked merged semantic value if user action cuts parse): In order to
5353 suppress lint warnings, use arguments in merge function, and assign
5354 char value < 128 in main.
5355 (Incorrect lookahead during deterministic GLR): New test case.
5356 (Incorrect lookahead during nondeterministic GLR): New test case.
5357
05449a2c
JD
53582006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5359
de366a2f 5360 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
5361 !yyvaluep as signal that no semantic value is available to print.
5362 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5363 to print a semantic value.
5364
4158e0a1 53652006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 5366
4158e0a1
JD
5367 * tests/glr-regression.at: For consistency with my newer test cases,
5368 don't thank myself.
5369
d659304d
JD
53702006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5371
5372 * data/glr.c (yyresolveValue): When merging semantic options, if at
5373 least one user action succeeds but a later one cuts the parse, then
5374 destroy the semantic value before returning rather than leaking it.
5375 (yyresolveStates): If a user action cuts the parse and thus
5376 yyresolveValue fails, ignore the (unset) semantic value rather than
5377 corrupting the yyGLRState, and empty the semantic options list since
5378 the user actions should have called all necessary destructors.
5379 Simplify code with YYCHK.
5380 * tests/glr-regression.at (Corrupted semantic options if user action
5381 cuts parse): New test case.
5382 (Undesirable destructors if user action cuts parse): New test case.
5383 Before applying any of this patch, this test case never actually failed
5384 for me... but only because the corrupted semantic options usually
5385 masked this bug.
5386 (Leaked merged semantic value if user action cuts parse): New test
5387 case.
5388
6ec2c0f2
AD
53892006-01-05 Akim Demaille <akim@epita.fr>
5390
5391 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5392
1b9c21fb
PE
53932006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5394
5395 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5396 _MSC_VER. Problem reported by Cenzato Marco.
5397 (b4_c_function_def): Use it.
5398 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5399 b4_c_modern.
5400 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5401 than rolling our own.
5402
84866159
AD
54032006-01-04 Akim Demaille <akim@epita.fr>
5404
5405 Also warn about non-used mid-rule values.
5406 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5407 member.
5408 (symbol_list_new): Adjust.
5409 * src/reader.c (symbol_typed_p): New.
5410 (grammar_rule_check): Use it.
5411 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5412 Check its rule.
5413 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5414 Use it.
5415 * tests/actions.at (Exotic Dollars): Adjust.
5416
378f4bd8
AD
54172006-01-04 Akim Demaille <akim@epita.fr>
5418
5419 * src/reader.c (grammar_midrule_action): If $$ is set in a
5420 mid-rule, move the `used' bit to its lhs.
5421 * tests/input.at (Unused values): New.
5422 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5423
e2a21b6f
PE
54242006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5425
54662697
PE
5426 * doc/bison.texinfo (Bison Options): Say more accurately what
5427 --yacc does.
5428 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5429 about declarations in the grammar when in Yacc mode, as POSIX does
5430 not require a diagnostic when the grammar uses extensions.
5431
5432 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5433
073f9288
PE
5434 Warn about dubious constructions like "%token T T".
5435 Reported by twlevo.
5436 * src/symtab.h (struct symbol.declared): New member.
5437 * src/symtab.c (symbol_new): Initialize it to false.
5438 (symbol_class_set): New arg DECLARING, specifying whether
5439 this is a declaration that we want to warn about, if there
5440 is more than one of them. All uses changed.
5441
1221b78a
PE
5442 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5443 Allow multiple %union directives, whose contents concatenate.
5444 * src/parse-gram.y (grammar_declaration): Likewise.
5445 Use muscle_code_grow, so that we don't need stype_line any more.
5446 All uses changed.
5447
5448 * src/muscle_tab.c (muscle_grow): Fix comment.
5449
e2a21b6f
PE
5450 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5451 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5452 Update copyright year to 2006.
5453
8f7e3cf9
AD
54542006-01-03 Akim Demaille <akim@epita.fr>
5455
5456 Have glr.cc pass (some of) the calc.at tests.
5457 * data/glr.cc (b4_parse_param_orig): New.
5458 (b4_parse_param): Improve its definition, and bound it more
5459 clearly in the skeleton.
5460 (b4_epilogue): Append, instead of prepending, in order to keep
5461 #line consistency.
5462 Simplify the generation of auxiliary functions: locations and
5463 purity are mandated.
5464 (b4_global_tokens_and_yystype): Honor it.
5465 * data/location.cc (c++.m4): Don't include it.
5466 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5467 and AT_SKEL_CC_IF.
5468 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5469 AT_LALR1_CC_IF.
5470 Be sure to initialize the first position's filename.
5471 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5472 mandated anyway.
5473 (AT_CHECK_CALC_GLR_CC): New.
5474 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5475
3953ed88
AD
54762006-01-02 Akim Demaille <akim@epita.fr>
5477
5478 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5479 c.m4.
0a96ba81 5480 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
5481 * data/glr.cc: Do not include stack.hh.
5482
9ecafbbf
AD
54832006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5484
5485 * data/glr.c: Reformat whitespace with tabs.
5486 (b4_lpure_formals): Remove this unused m4 macro.
5487 * tests/cxx-type.at: Reformat whitespace with tabs.
5488 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5489 since it's a member. Rename type to isNterm for clarity.
5490
c4d497a0
AD
54912005-12-29 Akim <akim@sulaco.local>
5492
5493 Let glr.cc catch up with symbol_value_print.
5494 * data/glr.cc (b4_yysymprint_generate): Replace by...
5495 (b4_yy_symbol_print_generate): this.
5496 (yy_symbol_print, yy_symbol_value_print): Declare them.
5497
4517da37
PE
54982005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5499
5500 * src/location.h (boundary): Note that a line or column equal
5501 to INT_MAX indicates an overflow.
5502 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5503 (rule_length_overflow, increment_rule_length, add_column_width):
5504 New functions.
5505 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5506 (<SC_BRACED_CODE>"}"):
5507 Use increment_rule_length rather than incrementing it by hand.
5508 (adjust_location, handle_syncline): Diagnose overflow.
5509 (handle_action_dollar, handle_action_at):
5510 Fix bug with monstrosities like $-2147483648.
5511 Remove now-unnecessary checks.
5512 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5513 (convert_ucn_to_byte): Verify assumptions.
5514 (handle_syncline): New arg LOC. All callers changed.
5515 Don't store through a value derived from char const * pointer.
5516
5517 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5518 GCC warnings.
5519
e3233bf6
PE
55202005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5521
5522 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5523 Remove unnecessary forward static decls.
5524
8f3596a6
AD
55252005-12-27 Akim Demaille <akim@epita.fr>
5526
5527 * src/reader.c (grammar_current_rule_check): Also check that $$
5528 is used.
5529 Take the rule to check as argument, hence rename as...
5530 (grammar_rule_check): this.
5531 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5532 Rename as...
5533 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5534 (grammar_midrule_action, grammar_symbol_append): Now static.
5535 * tests/torture.at (input): Don't rely on the default action
5536 being always performed.
5537 * tests/calc.at: "Set" $$ even when the action is "cut" with
5538 YYERROR or other.
5539 * tests/actions.at (Exotic Dollars): Instead of using unused
5540 values, check that the warning is issued.
5541
721be13c
PE
55422005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5543
5544 * NEWS: Improve wording for unused-value warnings.
5545
a0af42fc
AD
55462005-12-22 Akim Demaille <akim@epita.fr>
5547
5548 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5549 (b4_yysymprint_generate): Rename as...
5550 (b4_yy_symbol_print_generate): this.
5551 Generate yy_symbol_print instead of yysymprint.
5552 Generate also yy_symbol_value_print, and use it.
5553
affac613
AD
55542005-12-22 Akim Demaille <akim@epita.fr>
5555
721be13c 5556 * NEWS: Warn about unused values.
affac613
AD
5557 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5558 a `used' member.
5559 (symbol_list_n_get, symbol_list_n_used_set): New.
5560 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5561 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5562 * src/reader.c (grammar_current_rule_check): Check that values are
5563 used.
5564 * src/symtab.c (symbol_print): Accept 0.
5565 * tests/existing.at: Remove the type information.
5566 Empty the actions.
5567 Remove useless actions (beware of mid-rule actions: perl -000
5568 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5569 * tests/actions.at (Exotic Dollars): Use unused values.
5570 * tests/calc.at: Likewise.
5571 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5572 Likewise.
5573
5574 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5575 rule_useful_p.
5576
9d9b8b70
PE
55772005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5578
8bb4c753
PE
5579 Undo 2005-12-01 tentative license wording change. The wording is
5580 still being reviewed by the lawyers, and we don't want to wait for
5581 them before publishing a test release. For now, revert to the
5582 previous wording.
5583 * NEWS: Undo 2005-12-01 change.
5584 * data/glr.c: Revert to previous license wording.
5585 * data/glr.cc: Likewise.
5586 * data/lalr1.cc: Likewise.
5587 * data/location.cc: Likewise.
5588 * data/yacc.c: Likewise.
5589
9d9b8b70
PE
5590 * NEWS: Reword %destructor vs YYABORT etc.
5591 * data/glr.c: Use American spacing, for consistency.
5592 * data/glr.cc: Likewise.
5593 * data/lalr1.cc: Likewise.
5594 * data/yacc.c: Likewise.
5595 * data/yacc.c: Reformat comments slightly.
5596 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5597 for consistency. Fix some spelling errors and reword recently-included
5598 text slightly.
5599 * tests/cxx-type.at: Cast results of malloc, for C++.
5600
2c3b392a
AD
56012005-12-21 Joel E. Denny <address@hidden>
5602
5603 * tests/cxx-type.at: Construct a tree, count the parents of shared
5604 nodes, and free each node once and only once. Previously, the memory
5605 for semantic values was leaked instead.
5606
d6cff4dc
AD
56072005-12-21 Joel E. Denny <address@hidden>
5608
5609 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5610 (yylval, yylloc): If pure, #define to yystackp->yyval and
5611 yystackp->yyloc similar to yychar and yynerrs.
5612 (yyparse): If pure, remove local yylval and yylloc. Add local
5613 yystackp to accommodate pure definitions of yylval and yylloc.
5614 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5615 yylvalp and yyllocp to &yylval and &yylloc.
5616 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5617 namespace. Previously, nerrs and char were missing, but lval and lloc
5618 weren't necessary.
5619 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5620 yylvalp and yyllocp parameters since, if pure, these are now always
5621 accessible through yystackp. If not pure, they are still accessible
5622 globally.
5623 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5624 `if (YYID (N))' to pacify lint.
5625
a85284cf
AD
56262005-12-21 Akim Demaille <akim@epita.fr>
5627
5628 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5629 destroy the RHS symbols of a rule.
5630 * data/yacc.c (yylen): Initialize to 0.
5631 Keep its value to the number of items to possibly shift.
5632 In particular, a regular successful parse that ends on YYFINAL by
5633 a (internal) YYACCEPT must not have yylen != 0.
5634 (yyerrorlab, yyreturn): Pop the RHS.
5635 Reorder a bit to emphasize the `shifting' bits of code.
5636 (YYPOPSTACK): Now accept a number of items to pop.
5637 * data/lalr1.cc: Likewise.
5638 * data/glr.c: Formatting changes.
5639 Use goto instead of fall through.
5640 * doc/bison.texinfo (Destructor Decl): Complete.
5641
d508c281
JMG
56422005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5643
5644 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5645 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5646 * djgpp/config.bat: Replace every occurence of the file name
5647 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5648 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5649 * djgpp/config.sed: Replace every occurence of the file name
5650 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5651 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5652 * djgpp/djunpack.bat: DJGPP specific file.
5653 * djgpp/fnchange.lst: DJGPP specific file.
5654 * djgpp/README.in: Add new information about how to unpack the bison
5655 source on MSDOS and other systems which have 8.3 file name restrictions
5656 using djunpack.bat and fnchange.lst.
5657
3e7a2cd9
PE
56582005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5659
5660 * bootstrap (build_cvs_prefix): Remove; unused.
5661 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5662 when getting gnulib.
5663
56642005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5665
5666 * data/glr.c: Reorder typedef declarations for structs to match order
5667 of struct declarations.
5668 Rename yystack everywhere to yystackp except in yyparse where it's not
5669 a pointer.
5670 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5671 consistency.
5672 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5673 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5674 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5675 lint.
5676
877519f8
PE
56772005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5678
0eca5a39
PE
5679 * tests/sets.at (Accept): Fix typos in regular expression used to
5680 sed out the final state number.
5681
2cec9080
PE
5682 Work around portability problem on Solaris 10: flex-generated
5683 files include <stdio.h> before <config.h>, which messes up
5684 because the latter defines __EXTENSIONS__. Address the problem
5685 by creating two new little files that include <config.h> first,
5686 then include the flex-generated files. Rewrite everyone else
5687 to include <config.h> first, as well.
5688 * lib/timevar.c: Always include "config.h".
5689 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5690 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5691 (EXTRA_bison_SOURCES): New macro.
5692 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5693 * src/system.h: Don't include config.h.
5694 * src/LR0.c: Include <config.h> first.
5695 * src/assoc.c: Likewise.
5696 * src/closure.c: Likewise.
5697 * src/complain.c: Likewise.
5698 * src/conflicts.c: Likewise.
5699 * src/derives.c: Likewise.
5700 * src/files.c: Likewise.
5701 * src/getargs.c: Likewise.
5702 * src/gram.c: Likewise.
5703 * src/lalr.c: Likewise.
5704 * src/location.c: Likewise.
5705 * src/main.c: Likewise.
5706 * src/muscle_tab.c: Likewise.
5707 * src/nullable.c: Likewise.
5708 * src/output.c: Likewise.
5709 * src/parse-gram.y: Likewise.
5710 * src/print.c: Likewise.
5711 * src/print_graph.c: Likewise.
5712 * src/reader.c: Likewise.
5713 * src/reduce.c: Likewise.
5714 * src/relation.c: Likewise.
5715 * src/state.c: Likewise.
5716 * src/symlist.c: Likewise.
5717 * src/symtab.c: Likewise.
5718 * src/tables.c: Likewise.
5719 * src/uniqstr.c: Likewise.
5720 * src/vcg.c: Likewise.
5721
877519f8
PE
5722 * src/parse-gram.y: Fix minor problems uncovered by lint.
5723 (current_lhs, current_lhs_location): Now static.
5724 (current_assoc): Remove unused variable.
5725
5726 Cleanups so that Bison-generated parsers have less lint.
5727 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5728 Prepend /*ARGSUSED*/, for lint's sake.
5729 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5730 definition if 'lint' is defined.
5731 (YYID): New macro (or function, if lint).
5732 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5733 * data/yacc.c: Likewise.
5734 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5735 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5736 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5737 is C++ only.
5738 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5739 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5740 Use YYID(0) rather than 0, for lint.
5741 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5742 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5743
f5228370
PE
57442005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5745
5746 * tests/glr-regression.at
5747 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5748 Close memory leak reported by twlevo.
5749
69ce078b
PE
57502005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5751
6ff99711
PE
5752 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5753 all stacks.
5754 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
5755 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5756 New test case.
5757 (Duplicated user destructor for lookahead): This test now is expected
5758 to succeed.
5759
af3412cd
PE
57602005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5761
32b5b719 5762 * NEWS: Document the following change.
af3412cd
PE
5763 * data/yacc.c: Say "parser skeleton" rather than "file", since
5764 it's no longer just a file.
5765 * data/glr.c: Grant a special exception for C GLR parsers, that
5766 reads like the already-existing exception for C LALR(1) parsers.
5767 * data/glr.cc: Likewise.
5768 * data/lalr1.cc: Likewise.
5769 * data/location.cc: Likewise.
5770 * data/yacc.c: Reword the "written by" statement to clarify that
5771 it was the parser skeleton, not the entire output file.
5772 * data/glr.c: Written by Paul Hilfinger.
5773 * data/glr.cc: Written by Akim Demaille.
5774 * data/lalr1.cc: Likewise.
5775
035aa4a0
PE
57762005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5777
d9963c85
PE
5778 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5779 Fix typos in previous change that broke 'make check'.
5780 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5781 supported in C.
5782 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5783 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5784 We can revert this once things settle down.
5785
035aa4a0
PE
5786 * src/conflicts.c (conflicts_print): Don't print file name twice
5787 when %expect fails because there were no conflicts.
5788 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5789 change.
5790 * tests/conflicts.at (%expect not enough, %expect too much):
5791 (%expect with reduce conflicts): Adjust to new behavior.
5792
57932005-11-18 Akim Demaille <akim@epita.fr>
5794
5795 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5796 errors.
5797 * NEWS: Document this.
5798 * doc/bison.texinfo (Expect Decl): Likewise.
5799
d1ff7a7c
AD
58002005-11-16 Akim Demaille <akim@epita.fr>
5801
5802 Generalize the display of semantic values and locations in traces.
5803 * data/glr.c (yy_reduce_print): Fix indices (again).
5804 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5805 literal integers.
5806 * data/lalr1.cc (yyreduce_print): Rename as...
5807 (yy_reduce_print): this.
5808 Display values and locations.
5809 * data/yacc.c (yy_reduce_print): Likewise.
5810 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5811 (yysymprint): Move higher to be visible from yy_reduce_print).
5812 (yyparse): Adjust.
5813 * tests/calc.at: Adjust the expected length of the traces.
5814
6de5398d
AD
58152005-11-14 Akim Demaille <akim@epita.fr>
5816
5817 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5818 from 1 to N, while values and location start at 0.
5819 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5820
a1373f55
AD
58212005-11-14 Akim Demaille <akim@epita.fr>
5822
5823 * data/glr.c (yy_reduce_print): Fix the $ number.
5824
613d8952
AD
58252005-11-14 Akim Demaille <akim@epita.fr>
5826
5827 "Use" parse parameters.
5828 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5829 * data/glr.c, data/glr.cc: Use them.
5830 * data/glr.c (YYUSE): Have a C++ definition that supports
5831 non-pointer types.
5832
b2741627
AD
58332005-11-14 Akim Demaille <akim@epita.fr>
5834
5835 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5836
5059b5c8
AD
58372005-11-14 Akim Demaille <akim@epita.fr>
5838
42249483
AD
5839 * data/glr.cc: New.
5840 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 5841
4626a15d
AD
58422005-11-12 Akim Demaille <akim@epita.fr>
5843
5844 Let position and location be PODs.
5845 * data/location.cc (position::initialize, location::initialize): New.
5846 (position::position, location::location): Define only if
5847 b4_location_constructors is defined.
5848 * data/lalr1.cc (b4_location_constructors): Define it for backward
5849 compatibility.
5850 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5851
58522005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
5853
5854 * data/lalr1.cc: Move the body of the ctor and dtor into the
5855 parser file (instead of the header).
5856 Wrap the implementations in a "namespace yy".
5857
58582005-11-12 Akim Demaille <akim@epita.fr>
5859
5860 Have glr.c include its header file when created.
5861 * data/glr.c (b4_shared_declarations): New.
5862 Output them verbatim in the parser if !%defines, otherwise
5863 output then in the header file, and include it instead.
5864
1989d947
AD
58652005-11-11 Akim Demaille <akim@epita.fr>
5866
5867 * data/glr.c: Comment changes.
5868
58692005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
5870
5871 When yydebug, report semantic and location values for reductions.
5872 * data/glr.c (yy_reduce_print): Report the semantic values and the
5873 locations.
5874 (YY_REDUCE_PRINT): Adjust.
5875 (yyglrReduce): Use them.
5876 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5877 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5878 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5879 traces.
5880
02998094
AD
58812005-11-10 Akim Demaille <akim@epita.fr>
5882
5883 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5884 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5885 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5886
5210672f
PE
58872005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5888
5889 * m4/cxx.m4, examples/Makefile.am: Don't build
5890 examples/calc++ if no C++ compiler is available. (trivial change)
5891
a8991a1d
AD
58922005-11-09 Akim Demaille <akim@epita.fr>
5893
5894 * src/scan-skel.l: Use a couple of asserts.
5895
36b5e963
AD
58962005-11-03 Akim Demaille <akim@epita.fr>
5897
5898 In some (weird) cases, the final state number is incorrect.
5899 Reported by Alexandre Duret-Lutz.
5900 * src/LR0.c (state_list_append): Remove the computation of
5901 final_state.
5902 (save_reductions): Do it here.
5903 (get_state): Alpha conversion.
5904 (generate_states): Use a for loop.
5905 * src/gram.h (item_number_is_rule_number)
5906 (item_number_is_symbol_number): New.
5907 * src/state.c: Use assert.
5908 * src/system.h: Include assert.h.
5909 * tests/sets.at (Accept): New.
5910
44e7ead1
PH
59112005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5912
5913 * data/glr.c (yyfill): Adjust comment.
36b5e963 5914 (yyresolveAction): Initialize default location properly
44e7ead1
PH
5915 for empty right-hand sides.
5916 (yydoAction): Ditto.
5917 Add comment explaining apparently dead code.
36b5e963
AD
5918 * tests/glr-regression.at
5919 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 5920 New test.
36b5e963 5921
e10a80ee
PE
59222005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5923
5924 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5925 gnulib when interrupted. This fixes some race conditions and
5926 works around some portability problems (one noted by Paul
5927 Hilfinger).
5928
067b32ee
AD
59292005-10-22 Akim <akim@epita.fr>
5930
5931 * Makefile.cfg: Adjust to config -> build-aux.
5932 Reported by twledo.
5933
4b367315
AD
59342005-10-21 Akim Demaille <akim@epita.fr>
5935
5936 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5937 the %parse-params.
5938 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5939 * data/yacc.c (b4_Pure_if): Rename as...
5940 (b4_yacc_pure_if): this.
5941 (YY_SYMBOL_PRINT, yyparse): Adjust.
5942 * doc/bison.texinfo: Formatting changes.
5943
24cc23d9
AD
59442005-10-21 Akim Demaille <akim@epita.fr>
5945
5946 Finish the transition config -> build-aux.
5947 * configure.ac, Makefile.am: Use build-aux.
5948 * config/prev-version, config/announce-gen, config/Makefile.am:
5949 Move to...
5950 * build-aux/prev-version, build-aux/announce-gen,
5951 * build-aux/Makefile.am: here.
5952
d4476375
AD
59532005-10-14 Akim Demaille <akim@epita.fr>
5954
5955 * examples/calc++/test: Use set -x only when VERBOSE.
5956
302c0aee
PE
59572005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5958
5959 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5960 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5961
7625ec2c
AD
59622005-10-13 Akim Demaille <akim@epita.fr>
5963
5964 * src/scan-skel.l: Output the base name parts of the parser and
5965 header file names.
302c0aee 5966 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
5967 additional checks.
5968 Use this to exercise C++ outputs in subdirs.
5969 Reported by Oleg Smolsky.
5970
ba0fe3c7
PE
59712005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5972
5973 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5974 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5975 Problem reported by John P. Hartmann.
5976 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5977 already defined it.
5978
9b8a5ce0
AD
59792005-10-12 Akim Demaille <akim@epita.fr>
5980
5981 * src/parse-gram.y (version_check): Exit 63 to please missing
5982 (stands for "version mismatch).
5983 * tests/input.at, doc/bison.texinfo: Adjust.
5984
4f6e011e
PE
59852005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5986
5987 Work around portability problems with Visual Age C compiler
5988 (xlc and xlC_r) reported by John P. Hartmann.
5989 * data/location.cc (initial_column, initial_line): Remove.
5990 All uses replaced by 0 and 1.
5991 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5992 that xlc complains about.
5993 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 5994 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 5995 as __STDC__.
4d7aa45e
PE
5996 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5997 __STDC_VERSION__. Use it everywhere instead of looking at
5998 __STDC__ and __cplusplus.
4f6e011e 5999
a1b3bf8c
AD
60002005-10-10 Akim Demaille <akim@epita.fr>
6001
6002 * examples/calc++/test: Be quiet unless VERBOSE.
6003
412e44aa
PE
60042005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6005
2a4647a3
PE
6006 * data/c.m4 (yydestruct, yysymprint):
6007 Use YYUSE instead of casting to void.
6008 * data/glr.c (YYUSE): New macro.
6009 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6010 Use it instead of rolling our own.
6011 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6012 (YYCHK1):
6013 Use /*CONSTCOND*/ to suppress lint warnings.
6014 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6015 (YY_STACK_PRINT): Use 'false' not '0'.
6016 (YYUSE): New macro.
6017 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6018 * data/yacc.c (YYUSE): New macro.
6019 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6020 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6021 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6022
6023
412e44aa
PE
6024 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6025 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6026
88c6637f
PE
60272005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6028
2f4f028d
PE
6029 Undo the parts of the unlocked-I/O change that substituted
6030 putc or puts for printf. This might hurt performance a bit,
6031 but some people prefer the printf style.
6032 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6033 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6034 All uses replaced by YYFPRINTF and YYDPRINTF.
6035 * data/yacc.c: Likewise.
6036 * lib/bitset.c (bitset_print): Likewise.
6037 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6038 putc and puts.
6039 * lib/lbitset.c (debug_lbitset): Likewise.
6040 * src/closure.c (print_firsts, print_fderives): Likewise.
6041 * src/gram.c (grammar_dump): Likewise.
6042 * src/lalr.c (look_ahead_tokens_print): Likewise.
6043 * src/output.c (escaped_output): Likewise.
6044 (user_actions_output): Break apart two printfs.
6045 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6046 * src/reduce.c (reduce_print): Likewise.
6047 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6048 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6049
88c6637f
PE
6050 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6051 Use assignments rather than casts-to-void to suppress
6052 unused-variable warnings. This pacifies 'lint'.
6053 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6054 unused-variable warnings.
6055
fb32e373
JMG
60562005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6057
6058 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6059
edb8f44f
PE
60602005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6061
fb9c0b33
PE
6062 Use unlocked I/O for a minor performance improvement on hosts like
6063 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6064 is to use the gnlib unlocked-io module, and to prefer putc and
6065 puts to printf when either will work (since the latter doesn't
6066 come in an unlocked flavor).
6067 * bootstrap (gnulib_modules): Add unlocked-io.
6068 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6069 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6070 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6071 and similarly for puts and putc and printf.
6072 * data/yacc.c: Likewise.
6073 * lib/bitset.c (bitset_print): Likewise.
6074 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6075 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6076 to printf.
6077 * lib/lbitset.c (debug_lbitset): Likewise.
6078 * src/closure.c (print_firsts, print_fderives): Likewise.
6079 * src/gram.c (grammar_dump): Likewise.
6080 * src/lalr.c (look_ahead_tokens_print): Likewise.
6081 * src/output.c (escaped_output): Likewise.
6082 (user_actions_output): Coalesce two printfs.
2f4f028d 6083 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
6084 * src/reduce.c (reduce_print): Likewise.
6085 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 6086 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 6087
edb8f44f
PE
6088 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6089 this confuses xgettext.
6090
b50d2359
AD
60912005-10-02 Akim Demaille <akim@epita.fr>
6092
6093 * bootstrap (gnulib_modules): Add strverscmp.
6094 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6095 * m4/.cvsignore: Add strverscmp.m4.
6096 * src/parse-gram.y (%require): New token, new rule.
6097 (version_check): New.
6098 * src/scan-gram.l (%require): Adjust.
6099 * tests/input.at (AT_REQUIRE): New.
6100 Use it.
6101 * doc/bison.texinfo (Require Decl): New.
6102 (Calc++ Parser): Use %require.
6103
21667f64
AD
61042005-10-02 Akim Demaille <akim@epita.fr>
6105
6106 * data/location.cc: New.
6107
2b81e969
AD
61082005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6109 Akim Demaille <akim@epita.fr>
6110
6111 Make sure -odir/foo.cc creates dir/location.hh etc.
6112 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6113 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6114 (spec_defines_file): Now const.
6115 (dir_prefix): New.
6116 (short_base_name): Remove.
6117 * src/files.c: Adjust.
6118 (dirname.h): Include.
6119 (base_name): Don't prototype it.
6120 (finput): Remove, duplicates gram_in.
6121 (full_base_name, short_base_name): Replace by...
6122 (all_but_ext, all_but_tab_ext): these.
6123 (compute_base_names): Rename as...
6124 (compute_file_name_parts): this.
6125 Update to compute the new variables, including dir_prefix.
6126 Adjust dependencies.
6127 * src/output.c (prepare): Output them.
6128 * src/reader.c: Adjust to use gram_in, not finput.
6129 * src/scan-skel.l (@dir_prefix@): New.
6130
ad6a9b97
JMG
61312005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6132
6133 * lib/subpipe.c: New function end_of_output_subpipe() added
6134 to allow support for non-posix systems. This is a no-op function
6135 for posix systems.
6136
6137 * lib/subpipe.h: New function end_of_output_subpipe() added
6138 to allow support for non-posix systems. This is a no-op function
6139 for posix systems.
6140
6141 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6142 handle the lack of pipe/fork functionality on non-posix systems.
6143
6144 * djgpp/Makefile.maint: DJGPP specific file.
6145
6146 * djgpp/README.in: DJGPP specific file.
6147
6148 * djgpp/config.bat: DJGPP specific configuration file.
6149
6150 * djgpp/config.sed: DJGPP specific configuration file.
6151
6152 * djgpp/config.site: DJGPP specific configuration file.
6153
6154 * djgpp/config_h.sed: DJGPP specific configuration file.
6155
6156 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6157
6158 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6159
fc695704
AD
61602005-10-02 Akim Demaille <akim@epita.fr>
6161
6162 * data/location.cc: New, extract from...
6163 * data/lalr1.cc: here.
6164 (location.hh): Include it after the user prologue, in case the
6165 filename type is defined by the user.
6166 Forward declation location and position before the pre-prologue.
6167 (yyresult_): Rename as...
6168 (yyresult): this, it's a local variable, not an attribute.
6169 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6170
61712005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
6172
6173 * examples/extexi: Restore the #line generation.
6174
fb9712a9
AD
61752005-09-30 Akim Demaille <akim@epita.fr>,
6176 Alexandre Duret-Lutz <adl@gnu.org>
6177
6178 Move the token type and YYSTYPE in the parser class.
6179 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6180 (parser::token): New, from the moved free definition of tokens.
6181 (parser::semantic_value): Now a full definition instead of an
6182 indirection to YYSTYPE.
6183 (b4_post_prologue): No longer included in the header file, but
6184 in the implementation file.
6185 * doc/bison.texi (C+ Language Interface): Update.
6186 * src/parse-gram.y: Support unary %define.
6187 * tests/actions.at: Define global_tokens_and_yystype for backward
6188 compatibility until we update the tests.
6189 * tests/calc.at: Idem.
6190 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6191 to simplify the code.
6192
55f0c7b1
PE
61932005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6194
6195 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6196 Ah, the good old days! Problem reported by Peter Klein.
6197 * bootstrap (gnulib_modules): Add strerror, strtoul.
6198 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6199 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6200
fb9712a9 62012005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
6202
6203 * data/c.m4 (b4_error_verbose_if): New.
6204 * data/lalr1.cc: Use it.
6205 (YYERROR_VERBOSE_IF): Remove.
6206 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6207 parser members, replaced by...
6208 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6209 local variables.
6210 (yysyntax_error_): Takes the state number as argument.
6211 (yyreduce_print_): Use the argument yyrule, not the former
6212 attribute yyn_.
6213
8a6f72f3
PE
62142005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6215
6216 * bootstrap (gnulib_modules): Add verify.
6217 * lib/.cvsignore: Add verify.h.
6218 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6219 * src/system.h (verify): Remove.
6220 Include verify.h instead.
6221 * src/tables.c (tables_generate): Use new API for 'verify'.
6222
0d50976f
PE
62232005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6224
ebc3737e
PE
6225 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6226 local variables whose names begin with 'yy'.
6227 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6228 Trivial changes from Joel E. Denny.
6229
0d50976f
PE
6230 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6231 it itself.
6232 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6233 don't use alloca any more.
6234
6235 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6236 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 6237 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
6238 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6239 to match yacc.c, to test more hosts.
6240
a05b79df
PE
62412005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6242
55289366
PE
6243 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6244 doesn't affect behavior.
6245 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6246 Solaris, AIX, MSC.
6247 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6248 This works a bit better with glibc, if user code has already included
6249 stdlib.h.
6250 * doc/bison.texinfo (Bison Parser): Document that users can't
6251 arbitrarily use malloc and free for other purposes. Document
6252 that <alloca.h> and <malloc.h> might be included.
6253 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6254 user must declare alloca.
6255
a05b79df
PE
6256 * HACKING (release): Forwarn the Translation Project about
6257 stable releses.
6258
3ab2ca22
AD
62592005-09-20 Akim Demaille <akim@epita.fr>
6260
6261 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6262
a9739e7c
PE
62632005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6264
a702593e
PE
6265 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6266 (YYSTACK_ALLOC_MAXIMUM): Use it.
6267 (yysyntax_error): New function.
6268 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6269 multiple syntax errors are reported, and alloca is being used.
6270 Instead, reallocate buffers twice as big each time, so that
6271 we waste at most half the allocated memory. Start with a small
6272 (128-byte) buffer that will suffice in most cases anyway.
6273 Use yysyntax_error to do most of the work.
6274
6275 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6276 yynerrs is the number of errors reported, not the number of
6277 errors encountered.
6278
a9739e7c
PE
6279 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6280 Mark it as expected to fail.
6281 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6282 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6283 Don't start user-code symbols with "yy", to avoid name space problems.
6284
f479c6c6
AD
62852005-09-19 Akim Demaille <akim@epita.fr>
6286
6287 Remove the traits, failed experiment.
6288 It never proved useful, and anyway because of the current
6289 definition, it was not possible to have several specialization of
6290 this traits, making it useless.
6291 * data/lalr1.cc (yy:traits): Remove.
6292 Inline its definitions in the parser class.
6293
e2586f82
AD
62942005-09-19 Akim Demaille <akim@epita.fr>
6295
6296 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6297 least Mac OSX with a /usr/local install of gettext.
6298
2e8cf949
AD
62992005-09-19 Akim Demaille <akim@epita.fr>
6300
6301 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6302 and yytoken for similarity with the other skeletons.
6303
c7fb0b90
AD
63042005-09-19 Akim Demaille <akim@epita.fr>
6305
4e26c69e 6306 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 6307
1bd0deda
PE
63082005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6309
6310 * NEWS: Version 2.1.
6311
6312 * NEWS: Remove notice of yytname change, since it was never in an
6313 official release.
6314 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6315 diagnostic.
6316 * src/output.c (prepare): Likewise.
6317 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6318 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6319 is not defined. This is an awful hack, but it's enough for now.
6320 All callers changed.
6321 * tests/glr-regression-at (make_value): Args are const pointers now,
6322 to avoid GCC warning.
6323 (Duplicated user destructor for lookahead): New test. Currently
6324 skipped. It fails on my host but I'm not sure it'll always fail.
6325
63262005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
6327
6328 * src/symtab.h (struct symbol): Declare the printer and destructor
6329 as const, to avoid accidental calls to free.
6330 (symbol_destructor_set, symbol_printer_set): Adjust.
6331 * src/symtab.c: Adjust.
6332
1bd0deda 63332005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
6334
6335 * data/c.m4 (b4_token_enums): New.
6336 (b4_token_defines): Rename as...
6337 (b4_token_enums_defines): this.
6338 (b4_token_defines): New, output only the #defines.
6339 * data/yacc.c, data/glr.c: Adjust.
6340 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6341 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6342 as default values.
6343
dbcdae2d
AD
63442005-09-16 Akim Demaille <akim@epita.fr>
6345
6346 * data/lalr1.cc (yylex_): Remove, inline its code.
6347 (yyreport_syntax_error_): Remove, replaced by...
6348 (yysyntax_error_): this which returns a string and leaves to the
6349 caller the call to the users' error function.
6350 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6351 Move from members of the parser object...
6352 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6353 to local variables of the parse function.
6354
70d8f291
AD
63552005-09-16 Akim Demaille <akim@epita.fr>
6356
6357 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6358 since it's in Bison's name space.
6359
b47dbebe
PE
63602005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6361
ae199bf1
PE
6362 * data/glr.c (yyresolveValue): Add default case to pacify
6363 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6364
b47dbebe
PE
6365 * NEWS: Document when yyparse started to return 2.
6366 * doc/bison.texinfo (Parser Function): Document when yyparse
6367 returns 2.
6368
6369 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6370 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6371 changed.
6372 (class position): file_name -> filename (reverting). All uses changed.
6373
63742005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6375
6376 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6377 do anything if $@ exists. This reverts part of the 2005-07-07
6378 patch.
6379
00292f66
PE
63802005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6381
6382 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6383 contains obsolete information and isn't worth distributing as a
6384 separate file anyway.
6385 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6386 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6387 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6388 (yyparse): Abort if user code uses longjmp to throw an unexpected
6389 value.
6390
a420f962
PE
63912005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6392
00292f66
PE
6393 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6394 Suggested by twlevo@xs4all.nl.
6395
127287e9
PE
6396 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6397 This avoids a diagnostic from gcc -Wswitch-enum.
6398 Problem reported by twlevo@xs4all.nl.
6399
a420f962
PE
6400 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6401 standards. Use "file name" or "file" or "name", depending on
6402 the context.
6403 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6404 not to hack/foo.tab.c.
6405 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
6406 * data/glr.c: b4_filename -> b4_file_name.
6407 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6408 All uses changed.
6409 (class position): filename -> file_name. All uses changed.
6410 * data/yacc.c: b4_filename -> b4_file_name.
6411 * lib/bitset.h: filename -> file_name in local vars.
6412 * lib/bitset_stats.c: Likewise.
6413 * src/files.c: Likewise.
6414 * src/scan-skel.l ("@output ".*\n): Likewise.
6415 * src/files.c (file_name_split): Renamed from filename_split.
6416 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
6417
64182005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6419
6420 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6421 to accommodate latest gnulib.
6422
6423 * tests/glr-regression.at (Duplicate representation of merged trees):
6424 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6425
6426 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6427 needed.
6428
42a6501d
PE
64292005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6430
6431 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6432 All uses changed. Invoke user destructor after an error during a
6433 split parse (trivial change from Joel E. Denny).
6434
6435 * tests/glr-regression.at
6436 (User destructor after an error during a split parse): New test case.
6437 Problem reported by Joel E. Denny in:
6438 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6439
ef9a1faf
PE
64402005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6441
5b4aaf78
PE
6442 * README-cvs: Give URLs for recommended tools.
6443 Mention Gzip version problem, and bootstrapping issues.
6444 Remove troubleshooting section, as it's somewhat obsolete.
6445
b5240ba5
PE
6446 * bootstrap (no_cache): New var, to accommodate different wget
6447 variants. Use it instead of '-C off'. Problem reported by
6448 twlevo@xs4all.nl.
6449
ef9a1faf
PE
6450 * data/glr.c (yydestroyStackItem): New function.
6451 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6452 debugging information. Problem reported by Joel E. Denny.
6453
e6efa9da
AD
64542005-08-25 Akim Demaille <akim@epita.fr>
6455
6456 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6457
adc90f13
PE
64582005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6459
6460 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6461 Don't invoke destructor on unresolved entries.
6462 * tests/glr-regression.at
6463 (User destructor for unresolved GLR semantic value): New test case.
6464 Problem reported by Joel E. Denny in:
6465 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6466
f9315de5
PE
64672005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6468
15d29c1f
PE
6469 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6470 Add strnlen.c.
6471 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6472 lib-prefix.m4, po.m4.
6473
dd5f2af2
PE
6474 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6475 in yydestruct diagnostic, since it might not be an error.
6476 Problem reported by Joel Denny near end of
6477 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 6478 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
6479 * data/yacc.c (yyreturn): Likewise.
6480 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6481
6482 * src/files.c: Remove obsolete FIXME comment.
6483
6484 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6485 with the other templates, and to fix bogus run-on messages such
6486 as the one reported at the end of
6487 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6488 All callers changed to avoid the newline.
6489 (yyprocessOneStack): Output two lines rather than one, to accommodate
6490 the above change. This changes the debug output format slightly.
6491
f9315de5
PE
6492 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6493 reported by Joel E. Denny in
6494 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6495 (trivial change).
6496 * tests/glr-regression.at (Duplicate representation of merged trees):
6497 New test, from Joel E. Denny in:
6498 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6499 * THANKS: Add Joel E. Denny.
6500
6501 * configure.ac (AC_INIT): Bump to 2.0c.
6502
04098407
PE
65032005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6504
6505 * NEWS: Version 2.0b.
6506
ca5d2013
PE
6507 * Makefile.am (SUBDIRS): Put examples before tests, so that
6508 "make check" doesn't finish with "All 1 tests passed".
6509
3d54b576
PE
6510 * tests/regression.at (Token definitions): Don't rely on
6511 AT_PARSER_CHECK for data that contains backslashes. It currently
6512 uses 'echo', and 'echo' isn't portable if its argument contains
6513 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6514 that the byte '\0xff' is not printable in the C locale; it is,
6515 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6516 not printable, so use '\0x81' to test.
6517
d53ae497
PE
6518 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6519 version of GCC, since the macro is used with non-GCC compilers.
6520
fc01665e
PE
6521 Fix core dump reported by Pablo De Napoli in
6522 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6523 * tests/regression.at (Invalid inputs with {}): New test.
6524 * src/parse-gram.y (token_name): Translate type before using
6525 it as an index.
6526
04098407
PE
6527 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6528 the user's name space. All uses changed to __attribute__
6529 ((__unused__)).
6530 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6531 Add __attribute__ ((__noreturn__)).
6532
6533 * etc/clcommit: Remove. We weren't using it, and it failed
6534 "make maintainer-distcheck".
6535 * Makefile.maint: Merge from coreutils.
6536 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6537 (syntax-check-rules): Change list of rules as described below.
6538 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6539 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6540 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6541 (sc_trailing_space): New rules.
6542 (sc_xalloc_h_in_src): Remove.
6543 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6544 (sc_space_tab, sc_error_exit_success, sc_changelog):
6545 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6546 (makefile-check, po-check, author_mark_check):
6547 (makefile_path_separator_check, copyright-check):
6548 Use grep -n, to make it easier to find violations.
6549 Use CVS_LIST and CVS_LIST_EXCEPT.
6550 (header_regexp, h_re): Remove.
6551 (dd_c): New macro.
6552 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6553 (my-distcheck): Use more-modern GCC flags.
6554 (signatures, %.asc): Remove.
6555 (rel-files, announcement): Remove signatures.
6556 Restore old updating code, even though we don't use it, so
6557 that we're the same as coreutils.
6558 (alpha, beta, major): Depend on news-date-check.
6559 Make the upload commands.
6560
6561 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6562 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6563 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6564 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6565 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6566 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6567 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6568 * tests/sets.at: Likewise.
6569
6570 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6571 we comment out the Autoconf version number.
6572 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6573 it's error-prone and "make maintainer-distcheck" rejects it.
6574
6575 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6576 Indent calls to "error" to pacify "make maintainer-distcheck",
6577 when the calls are not intended to be translated.
6578 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6579
6580 * src/Makefile.am (DEFS): Use +=, to pacify
6581 "make maintainer-distcheck".
6582 (bison_SOURCES): Add scan-skel.h.
6583 (sc_tight_scope): New rule, from coreutils.
6584
6585 * src/files.c (src_extension, header_extension):
6586 Now static, not extern.
6587 * src/getargs.c (short_options): Likewise.
6588 * src/muscle_tab.c (muscle_table): Likewise.
6589 * src/parse-gram.y (current_class, current_type, current_prec):
6590 Likewise.
6591 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6592 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6593 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6594 void, to avoid warning when NLS is disabled.
6595 * src/output.c: Include scan-skel.h.
6596 (scan_skel): Remove decl, since scan-skel.h does this.
6597 (output_skeleton):
6598 Indent calls to "error" to pacify "make maintainer-distcheck".
6599 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6600 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6601 "make maintainer-distcheck".
6602 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6603 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6604 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6605 (skel_lex_destroy, scan_skel): Move these decls to...
6606 * src/scan-skel.h: New file.
6607 * src/uniqstr.c (uniqstr_assert):
6608 Indent calls to "error" to pacify "make maintainer-distcheck".
6609
6610 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6611 not @VAR@.
6612
6613 * tests/torture.at: Revamp to avoid misuse of atoi that
6614 "make maintainer-distcheck" complained about.
6615
6616 * examples/extexi (message): Don't print a message more than once,
6617 and omit line-number decoration that makes Emacs compile think
6618 that informative messages are worth worrying about.
6619
66202005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6621
6622 * configure.ac: Update version number.
6623
6624 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6625 accidentally.
6626 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6627 autogenerated by the maintainer.
6628 * examples/calc++/.cvsignore: Add *.yy.
6629
6630 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6631 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6632 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6633
6634 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6635
6636 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6637 from maintainer-distcheck about casting the argument of 'free'.
6638
6639 * NEWS: Mention recent yytname changes.
6640 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6641
6642 * bootstrap: For translations that have not yet been upgraded to
6643 the new runtime-po domain, prime the pump by extracting the
6644 relevant strings from the obsolete translations. This code can be
6645 removed once the bison-runtime domain has been translated by each
6646 team.
6647
6648 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6649 now that token names are already quoted.
6650
6651 Fix problem reported by Anthony Heading.
6652 * data/glr.c (YYTOKEN_TABLE): New macro.
6653 (yytname): Define if YYTOKEN_TABLE.
6654 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6655 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6656 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6657 * src/output.c (prepare_symbols): Output token_table_flag.
6658
0ffda363
PE
66592005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6660
6661 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6662 again if the first call fails.
6663
6664 * data/glr.c (yytnamerr): New function.
6665 (yyreportSyntaxError): Use it to dequote most string literals.
6666 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6667 with other skeletons. All uses changed.
6668 (yytnameerr_): New function.
6669 (yyreport_syntax_error): Use it to dequote most string literals.
6670 * data/yacc.c (yytnamerr): New function.
6671 (yyerrlab): Use it to decode most string literals.
6672 * doc/bison.texinfo (Decl Summary, Calling Convention):
6673 Clarify quoting convention of yytname.
6674 * src/output.c (prepare_symbols): Quote all names. This undoes
6675 the 2005-04-17 change, which is now accomplished (mostly) via
6676 changes in the parsers as described above.
6677 * tests/regression.at (Token definitions, Web2c Actions):
6678 Undo most 2005-04-17 change here, too.
6679
66802005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6681
6682 Fix more problems reported by twlevo@xs4all.nl.
6683 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6684 remove trailing spaces. This loses the exit status of ./types,
6685 and isn't needed since ./types shouldn't be emitting trailing
6686 spaces.
6687 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6688 as the stack isn't valid in that case.
6689
6690 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6691 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6692 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6693 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6694 is used.
6695 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6696 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6697 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6698 Likewise.
6699
6700 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6701 overly-picky compilers that reject 'char *foo = "bar";'.
6702
6703 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6704 to FILE * parameter, not to stderr. This fixes a typo introduced
6705 in the 2005-07-12 change.
6706
6707 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6708 warnings from GCC 4.
6709
6710 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6711 (yyglrShiftDefer, yysplitStack):
6712 Remove unused parameters b4_pure_formals. All uses changed.
6713 (yyglrShift): Remove unused parameters b4_user_formals.
6714 All uses changed.
6715 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6716
6100a9aa
PE
67172005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6718
258b75ca
PE
6719 Destructor cleanups and regularization among the three skeletons.
6720 * NEWS: Document the behavior changes.
6721 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6722 stack before failing, as the cleanup code will do it for us now.
6723 * data/lalr1.cc (yyerrlab): Likewise.
6724 * data/glr.c (yyparse): Pop everything off the stack before
6725 freeing it, so that destructors get called properly.
6726 * data/lalr1.cc (yyreturn): Likewise.
6727 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6728 This is more consistent.
6729 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6730 why destructors might be called. 1.875 -> 2.1.
6731 (Destructor Decl, Decl Summary, Table of Symbols):
6732 Some English-language cleanups for %destructor.
6733 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6734 Add output line for destructor of start symbol.
6735 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6736 because of that same extra output line.
6737
1a059451
PE
6738 * NEWS: Document minor wording changes in diagnostics of
6739 Bison-generated parsers.
6740 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6741 Remove unused formals. All uses changed.
6742 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6743 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6744 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6745 Rename yyoverflowab to yyexhaustedlab.
6746 When memory exhaustion occurs during syntax-error reporting,
6747 report it separately rather than in a single diagnostic; this
6748 eases translation.
6749 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6750 (Memory Exhausted): Renamed from Parser Stack Overflow.
6751 Revamp wording slightly to prefer "memory exhaustion".
6752 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6753
97460c78
PE
6754 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6755
30757c8c
PE
6756 Add i18n support to the GLR skeleton. Partially fix the C++
6757 skeleton; a C++ expert needs to finish this. Remove debugging
6758 msgids; there's little point to having them translated, since they
6759 can be understood only by someone who can read the
6760 (English-language) source code.
6761
6762 Generate runtime-po/bison-runtime.pot automatically, so that we
6763 don't have to worry about garbage getting in that file. We'll
6764 make sure after the next official release that old msgids don't
6765 get lost. See
6766 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6767
6768 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6769 Now auto-generated.
6770 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6771 Fix typos in explanations of the runtime file.
6772 * bootstrap: Change gettext keyword from YYI18N to YY_.
6773 Use standard Makefile.in.in in runtime-po, since we'll arrange
6774 for backward-compatible bison-runtime.po files in a different way.
6775 * data/glr.c (YY_): New macro, from yacc.c.
6776 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6777 Translate messages intended for users.
6778 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6779 the wording in the other skeletons. We don't know that the memory
6780 is virtual.
6781 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6782 Use same method that yacc.c uses.
6783 Don't translate debugging messages.
6784 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6785 it doesn't work (yet), and requires C++ expertise to fix.
6786 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6787 Move defn to a more logical place, to be consistent with other
6788 skeletons.
6789 Don't translate debugging messages.
6790 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6791 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6792 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6793 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6794
ac8c5689
PE
6795 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6796 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6797 void, not int.
6798 * tests/glr-regression.at (Badly Collapsed GLR States):
6799 Likewise.
6800 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6801 yylex should return 0 at EOF rather than aborting.
6802
6100a9aa
PE
6803 Improve tests for stack overflow in GLR parser.
6804 Problem reported by twlevo@xs4all.nl.
6805 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6806 All uses removed.
6807 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6808 can handle the problem.
6809 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6810 (yyparse): New local variable yyresult to record the result.
6811 Use result of setjmp to set it, rather than storing itinto
6812 struct.
6813 (yyDone): Remove label.
6814 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6815 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6816 if YYABORT is used).
6817 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6818 yyparse status; put status > 1 into diagnostic.
6819 Check that status==2 works.
6820 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6821 Use exit status 3 for failure to open (which shouldn't happen).
6822
15f40952
PE
68232005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6824
67fd79c4
PE
6825 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6826 1 on syntax error; just let yyparse do its thing.
6827 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6828 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6829 (Exploding the Stack Size with Alloca):
6830 (Exploding the Stack Size with Malloc):
6831 Expect exit status 2, not 1, since the parser is supposed to blow
6832 its stack. Problem reported by twlevo@xs4all.nl.
6833
15f40952
PE
6834 * data/glr.c (yyparse): Don't assume that the initial calls
6835 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6836 Print a stack-overflow message and fail instead.
6837 Initialize the line-number information before creating the stack,
6838 so that the stack-overflow message can report line zero safely.
6839
f32c66b5
PE
68402005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6841
a22ff96f 6842 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
6843 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6844 (yyuserMerge): Provide a default case if b4_mergers is empty.
6845 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6846 * tests/glr-regression.at
6847 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 6848 Add casts to pacify C++ compilers.
1beb0b24
PE
6849 * tests/glr-regression.at (Improper merging of GLR delayed action
6850 sets): Declare yylex before using it.
f32c66b5 6851 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
6852 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6853 test for valgrind; valgrind is independent of g++.
6854 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6855 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6856 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6857 Use a destructor, so that we can expand the stack. Change
6858 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 6859
d741bd1b
PE
68602005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6861
6862 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6863 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6864
0410a6e0
PE
68652005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6866
6867 * PACKAGING: New file, suggested by Bruno Haible and taken from
6868 similar wording in gettext's PACKAGING file.
6869 * NEWS: Mention PACKAGING.
6870 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6871
f7ab6a50
PE
68722005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6873
baf785db 6874 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
6875 * bootstrap: Get runtime translations into runtime-po.
6876 Create runtime-po files automatically, if possible.
6877 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6878 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6879 does not infringe on the user's name space.
6880 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6881 * doc/bison.texinfo (Internationalization): Revamp the English
6882 and Texinfo syntax a bit, to try to make it clearer.
6883 (Bison Options, Option Cross Key): Mention --print-localedir.
6884 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6885 YYENABLE_NLS. Quote a bit more.
6886 * runtime-po/.cvsignore: New file.
6887 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6888 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6889 * runtime-po/quot.sed: Likewise.
6890 * runtime-po/boldquot.sed: Likewise.
6891 * runtime-po/en@quot.header: Likewise.
6892 * runtime-po/en@boldquot.header: Likewise.
6893 * runtime-po/insert-header.sin: Likewise.
6894 * runtime-po/remove-potcdate.sin: Likewise.
6895 * runtime-po/Makevars: Likewise.
6896 * runtime-po/LINGUAS: Likewise.
6897 * runtime-po/de.po: Likewise; we will rely on the translation project
6898 to maintain this, so "bootstrap" should get it.
0410a6e0 6899 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
6900 its value.
6901 * src/main.c (main): Bind the bison-runtime domain, too.
6902
69032005-07-12 Bruno Haible <bruno@clisp.org>
6904
6905 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6906 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6907 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6908 * runtime-po: New directory.
6909 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6910 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6911 * runtime-po/Rules-quot: New file, copied from po/.
6912 * runtime-po/quot.sed: Likewise.
6913 * runtime-po/boldquot.sed: Likewise.
6914 * runtime-po/en@quot.header: Likewise.
6915 * runtime-po/en@boldquot.header: Likewise.
6916 * runtime-po/insert-header.sin: Likewise.
6917 * runtime-po/remove-potcdate.sin: Likewise.
6918 * runtime-po/Makevars: New file.
6919 * runtime-po/POTFILES.in: New file.
6920 * runtime-po/LINGUAS: New file.
6921 * runtime-po/bison-runtime.pot: New file.
6922 * runtime-po/de.po: New file.
6923 * m4/bison.m4: New file.
6924 * Makefile.am (SUBDIRS): Add runtime-po.
6925 (aclocaldir, aclocal_DATA): New variables.
6926 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6927 Define aclocaldir.
6928 * src/getargs.c (usage): Document --print-localedir option.
6929 (PRINT_LOCALEDIR_OPTION): New enum item.
6930 (long_options): Add --print-localedir option.
6931 (getargs): Handle --print-localedir option.
6932 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6933 (Internationalization): New section.
6934
22dda0f0
AD
69352005-07-12 Akim Demaille <akim@epita.fr>
6936
6937 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6938 for consistency with the rest of the code.
6939 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6940 Add separators.
6941
82b248ad
AD
69422005-07-12 Akim Demaille <akim@epita.fr>
6943
6944 * src/parse-gram.y: Use %printer instead of YYPRINT.
6945
fa0e9314
AD
69462005-07-12 Akim Demaille <akim@epita.fr>
6947
867a3e00
AD
6948 * src/symtab.h, src/symtab.c (symbol_print): New.
6949 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6950 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6951
69522005-07-12 Akim Demaille <akim@epita.fr>
6953
6954 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
6955 b4_at_dollar and b4_dollar_dollar.
6956
e054b190
PE
69572005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6958
6959 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6960 and Pennello's paper.
6961
34160ec4
PE
69622005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6963
407d4a75
PE
6964 * data/yacc.c (yyparse): Undo previous patch. Instead,
6965 set yylsp[0] and yyvsp[0] only if the initial action
6966 sets yylloc and yylval, respectively.
6967
34160ec4
PE
6968 * data/yacc.c (yyparse): In the initial action, set
6969 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6970 This avoids the use of undefined variables if the initial
6971 action does not set yylloc and/or yylval.
6972
c3d5a4a7
PE
69732005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6974
b34d96c1
PE
6975 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6976 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6977 Remove from CVS. These files are automatically generated.
6978 * examples/extexi: Clarify that this file is now part of Bison,
6979 not GNU M4, and that it works with any POSIX-compatible Awk.
6980 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6981 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6982 so that we also get calc++-parser.yy. Geneate it.
6983 Use $(AWK), not gawk, since any conforming Awk will do.
6984 Put comment before action, since older 'make' can't handle comment
6985 in action.
6986 $(BUILT_SOURCES): List all built sources, not just some of them.
6987 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6988 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6989 $($(calc_sources_generated)): Remove unnecessary test for existence
6990 of target. (This had a shell syntax error anyway; a stray "x".)
6991 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6992 calc++-parser.yy.
6993 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6994
c3d5a4a7
PE
6995 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6996 implied by the other modules.
6997
828c373b
AD
69982005-07-06 Akim Demaille <akim@epita.fr>
6999
7000 Bind examples/calc++ to the package.
7001 * examples/calc++/Makefile: Remove, replaced by...
7002 * examples/calc++/Makefile.am: ... this new file.
7003 * examples/calc++/test: Remove input.
7004 * examples/calc++/compile: Remove.
7005 * examples/Makefile.am: New.
7006 * configure.ac, Makefile.am: Adjust.
7007 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7008
63cb01d6
PE
70092005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7010
fd2df2ed
PE
7011 * data/glr.c (yyFail): Drastically simplify; since the format argument
7012 never had any % directives, we can simply pass it to yyerror.
7013 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7014 be modified later, as that is the usual style in glr.c.
7015 Problems reported by Paul Hilfinger.
7016
63cb01d6
PE
7017 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7018 and size overflow errors.
7019 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7020 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7021 (YYSIZEMAX): New macro.
7022 (yystpcpy): New function, taken from yacc.c.
7023 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7024 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7025 so that we don't have to maintain their signatures.
7026 (yyFail): Check for buffer overflow, by using vsnprintf rather
7027 than vsprintf. Allocate a bigger buffer if possible.
7028 Report an error if buffer allocation fails.
7029 (yyStackOverflow): New function.
7030 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7031 the initialization was successful. It might fail if storage was
7032 exhausted.
7033 (yyexpandGLRStack): Add more checks for storage allocation failure.
7034 Use yyStackOverflow to report failures.
7035 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7036 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7037 Don't assume stack number fits in int.
7038 (yysplitStack): Check for storage allocation failure.
7039 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7040 can print diagnostics on storage allocation failure. All callers
7041 changed.
7042 (yyresolveValue): Use yybool for boolean.
7043 (yyreportSyntaxError): Check for size-calculation overflow.
7044 This code is taken from yacc.c.
7045 (yyparse): Check for storage allocation errors when allocating
7046 the initial stack.
7047
1c59e0a1
AD
70482005-07-05 Akim Demaille <akim@epita.fr>
7049
7050 Extract calc++ from the documentation.
7051 * doc/bison.texinfo (Calc++): Add the extraction marks.
7052 * examples/extexi: New, from the aborted GNU Programming 2E.
7053 Separate the different paragraph of a file with empty lines.
7054 * examples/Makefile: Use it to extract the whole calc++ example.
7055
8a0adb01
AD
70562005-06-24 Akim Demaille <akim@epita.fr>
7057
7058 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7059 class typedefs.
7060
12545799
AD
70612005-06-22 Akim Demaille <akim@epita.fr>
7062
7063 * doc/bison.texinfo (C++ Language Interface): First stab.
7064 (C++ Parsers): Remove.
7065
99be0235
AD
70662005-06-22 Akim Demaille <akim@epita.fr>
7067
7068 * data/lalr1.cc (yylex_): Honor %lex-param.
7069
0ffd4fd1
AD
70702005-06-22 Akim Demaille <akim@epita.fr>
7071
7072 Start a set of simple examples.
7073 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7074 * examples/calc++/calc++-driver.hh,
7075 * examples/calc++/calc++-parser.yy,
7076 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7077 * examples/calc++/compile, examples/calc++/test: New.
7078
0925ebb4
PE
70792005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7080
7081 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7082 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7083 which stems from the 2005-05-27 patch.
7084
43d3b664
PH
70852005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7086
7087 * data/glr.c: Modify treatment of unused parameters to permit use
7088 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7089
3062864d
PE
70902005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7091
7092 Fix infringement on user name space reported by Janos Zoltan Szabo.
7093 * data/yacc.c (yyparse): strlen -> yystrlen.
7094
989b5b8e
AD
70952005-05-30 Akim Demaille <akim@epita.fr>
7096
7097 * data/lalr1.cc (_): New.
7098 Translate the various messages.
7099
bedf57f5
PE
71002005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7101
7102 Fix infringement on user name space reported by Bruno Haible.
7103 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7104 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7105 the user's name space.
7106 (alloca): Include <stdlib.h> to get it, if it's not built in.
7107 (YYMALLOC, YYFREE): Define only if needed.
7108 (malloc, free): Declare, but only if needed, as this infringes on
7109 the user name space.
7110
4d1801f1
PE
71112005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7112
7113 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7114 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7115 with %d format.
7116 * lib/ebitset.c (min, max): Undef before defining.
7117 * lib/vbitset.c (min, max): Likewise.
7118 * lib/subpipe.c (create_subpipe): Save local variables in case
7119 vfork clobbers them.
7120
71212005-05-24 Bruno Haible <bruno@clisp.org>
7122
7123 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7124 error message syntax used by gcc-4.0.
7125
b94a9e1e
PE
71262005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7127
85ac3861
PE
7128 * README: Mention m4 1.4.3. Remove obsolete advice about
7129 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7130
b94a9e1e
PE
7131 * bootstrap: Remove workaround for problem I encountered with
7132 gettext 0.14.1; it seems to be fixed now.
7133
51c30d21
PE
71342005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7135
009ce67d
PE
7136 * NEWS: Version 2.0a.
7137
f2a97c62
PE
7138 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7139 the previous change.
7140
c8775f93
PE
7141 Various maintainer cleanups.
7142 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7143 conftest*, for benefit of CVS commands run at the same time as
7144 "configure". Add build-aux, since "bootstrap" now creates it and
7145 its subfiles.
7146 * Makefile.cfg (move_if_change): Remove.
7147 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7148 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7149 (po_repo, do-po-update, po-update, wget_files, get-targets):
7150 (config.guess-url_prefix, config.sub-url_prefix):
7151 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7152 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7153 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7154 Remove.
7155 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7156 this is now the recommended name.
7157 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7158 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7159 ylwrap. These files now go into build-aux.
7160 * config/move-if-change: Remove.
7161 * config/prev-version.txt: Bump from 1.75 to 2.0.
7162
3ea5f0ec
PE
7163 * bootstrap: Add stdio-safer, unistd-safer modules.
7164 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7165 we don't need it).
7166 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7167 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7168 * lib/subpipe.c: Include "unistd-safer.h".
7169 (create_subpipe): Make sure all the newly-created
7170 file descriptors are > 2, so that diagnostics don't
7171 get sent down them (which might cause Bison to hang, in theory).
7172 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7173 * src/files.c (xfopen): Use fopen_safer, not fopen.
7174
51c30d21
PE
7175 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7176 yesterday's yacc.c fix.
7177
cea1469d
PE
71782005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7179
3ea5f0ec
PE
7180 * data/glr.c, data/lalr1.cc: Update copyright date.
7181
cea1469d
PE
7182 Fix a destructor bug reported by Wolfgang Spraul in
7183 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7184 * data/yacc.c (yyabortlab): Don't call destructor, and
7185 don't set yychar to EMPTY.
7186 (yyoverflowlab): Don't call destructor.
7187 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7188 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7189 since we no longer output the message "discarding lookahead token
7190 end of input ()".
7191
5e6f62f2
PH
71922005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7193
7194 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7195 fix a small glitch in debugging output.
7196 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7197 after YY_SYMBOL_PRINT where needed.
7198
7199 (struct yyGLRState): Add some comments.
7200 (struct yySemanticOption): Add some comments.
7201 (union yyGLRStackItem): Add comment.
7202
7203 (yymergeOptionSets): Correct this to properly perform the union,
7204 avoiding infinite reported by Michael Rosien.
7205 Update comment.
7206
7207 * tests/glr-regression.at: Add test for GLR merging error reported
7208 by M. Rosien.
cea1469d 7209
0fb669f9
PE
72102005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7211
7212 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7213 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7214 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7215 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7216 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7217 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7218 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7219 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7220 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7221 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7222 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7223 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7224 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7225 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7226 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7227 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7228 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7229 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7230 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7231 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7232 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7233 src/output.h, src/parse-gram.c, src/parse-gram.h,
7234 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7235 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7236 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7237 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7238 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7239 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7240 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7241 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7242 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7243 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7244 tests/reduce.at, tests/regression.at, tests/sets.at,
7245 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7246 Update FSF postal mail address.
7247
51f4735e
PE
72482005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7249
7250 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7251 Problem reported by Ralf Menzel.
7252
80ce3401
PE
72532005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7254
7255 * tests/actions.at: Test that stack overflow invokes destructors.
7256 From Marcus Holland-Moritz.
7257 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7258 from here....
7259 (yyreturn): to here. That way, destructors are called properly
7260 even if the stack overflows, or the user calls YYACCEPT or
7261 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7262 (yyoverflowlab): Destroy the lookahead.
7263
72642005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7265
7266 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7267
72f000b0
PE
72682005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7269
7270 * NEWS: Bison-generated C parsers no longer quote literal strings
7271 associated with tokens.
7272 * src/output.c (prepare_symbols): Don't escape strings,
7273 since users don't want to see C escapes.
7274 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7275 in diagnostics.
c19683bb 7276 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
7277 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7278
1094323f
PE
72792005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7280
7281 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7282 the data size is known to be too small and we can't increase it.
7283 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7284
ca407bdf
PE
72852005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 * src/parse-gram.y: Include quotearg.h.
7288 (string_as_id): Quote $1 before using it as a key, since the
7289 lexer no longer quotes it for us.
7290 (string_content): Don't strip quotes, since lexer no longer
7291 quotes it for us.
7292 * src/scan-gram.l: Include quotearg.h.
7293 ("\""): Omit quote.
7294 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7295 a key, since the rest of the lexer doesn't quote it.
7296 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7297 * tests/regression.at (Token definitions): Check for backslashes
7298 in token strings.
7299
7300 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7301 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7302 (yyparse): Revamp code to generate long syntax error message, to
7303 make it easier to translate, and to avoid problems with arithmetic
7304 overflow. Change "virtual memory" to "memory" in diagnostic, since
7305 we don't know whether the memory is virtual.
7306
1ce59070
PE
73072005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7308
7309 * NEWS: Bison-generated C parsers now use the _ macro to
7310 translate strings.
7311 * data/yacc.c (_) [!defined _]: New macro.
7312 All English strings wrapped inside this macro.
7313 * doc/bison.texinfo (Bison Parser): Document _.
7314 * po/POTFILES.in: Include src/parse-gram.c, since it now
7315 includes translateable strings that parse-gram.y doesn't.
7316
a749a695
PE
73172005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7318
7319 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7320 reverting the 2004-10-11 change to this function.
7321 (symbol_check_alias_consistency): Don't call symbol_type_set
7322 if the type name is already correct.
7323 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7324
8fb1053b
PE
73252005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7326
7327 * tests/regression.at (Token definitions): Don't use a token named
7328 c, as that generates a "#define c ..." that runs afoul of buggy
7329 stdlib.h that uses the identifier c as a member of struct
7330 drand48_data. Problem reported by Horst Wente.
7331
ff498c4a
PE
73322005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7333
7334 * bootstrap: Change translation URL from
7335 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7336 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7337 redirection glitches. Problem reported by twlevo@xs4all.nl.
7338
65211d70
PE
73392005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7340
7341 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7342 after operands; POSIX says this isn't portable for the c99 command.
7343
9577fb1f
PE
73442005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7345
7346 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7347 immediately if a data overrun has occurred; this may help us track
7348 down what may be a spurious failure on MacOS.
7349
78b178f7
PE
73502005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7351
a2599d0f
PE
7352 Respond to problems reported by twlevo@xs4all.nl.
7353
7354 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7355
78b178f7
PE
7356 * src/vcg.h: Comment fix.
7357 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7358 (G_CMAX): Change to -1 instead of INT_MAX.
7359
7360 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 7361
7296e729
PE
73622005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7363
7364 * src/tables.c (state_number_to_vector_number): Put it inside an
7365 "#if 0", since it's not currently used. Problem reported by
7366 Roland McGrath.
7367
05ac60f3
PE
73682005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7369
7370 * src/output.c (escaped_output): Renamed from
7371 escaped_file_name_output, since we now use it for symbol tags as
7372 well. All uses changed.
7373 (symbol_destructors_output, symbol_printers_output):
7374 Escape symbol tags too.
7375 Problem reported by Matyas Forstner in
7376 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7377
7378 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7379 not needed.
7380 * src/output.c (user_actions_output, token_definitions_output,
7381 symbol_destructors_output, symbol_printers_output): Likewise.
7382 * src/reader.c (prologue_augment): Likewise.
7383 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7384
7385 * src/vcg.c (output_edge): Don't quote linestyle arg.
7386 Problem reported by twlevo@xs4all.nl.
7387
7eb453ac
PE
73882005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7389
7390 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7391 example, reported by Derek M Jones. Also, make the example even
7392 more outrageous, to better illustrate how bad the problem is.
7393
4c04c52a
PE
73942005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7395
7396 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7397 putsym. Typo reported by Sebastian Piping.
7398
a61e1620
PE
73992005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7400
7401 * doc/bison.texinfo (Language and Grammar): some -> same
7402 (Epilogue): int he -> in the
7403 Typos reported by Sebastian Piping via Justin Pence.
7404
9ec93868
PE
74052005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7406
7407 * tests/glr-regression.at (Improper handling of embedded actions
7408 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7409 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7410 with dollar signs in test names.
7411 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7412 for a similar reason.
7413
73ce7e7e
PE
74142005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7415
7416 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7417 wants to redefine G_VIEW.
7418
2e72b98e
PE
74192005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7420
7421 * src/vcg.c (get_view_str): Remove case for normal_view.
7422 Problem reported by twlevo@xs4all.nl.
7423
e0d634e5
PE
74242005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7425
ccf830a4
PE
7426 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7427 Problem reported by twlevo@xs4all.nl.
7428
e0d634e5
PE
7429 * doc/bison.texinfo: Change @dircategory from "GNU programming
7430 tools" to "Software development". Requested by Richard Stallman
7431 via Karl Berry.
7432
7bbc8cb0
PE
74332005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7434
7435 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7436 Problem reported by twlevo@xs4all.nl.
7437
08b770bc
PE
74382005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7439
7440 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7441 keyword; it's not needed with modern compilers, and it doesn't
7442 affect correctness with older compilers. Suggested by
7443 twlevo@xs4all.nl.
7444
95f22ad2
PE
74452005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7446
7447 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7448 gcc -Wswitch-default.
7449 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7450 * data/yacc.c (yyparse): Likewise.
7451
d229d15c
PE
74522005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7453
7454 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7455 already. Let config.h define any nonstandard values.
7456
ecadd90f
PE
74572005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7458
7459 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7460 for the benefit of slower hosts. Problem reported by
7461 Nelson H. F. Beebe.
7462
213744b5
PE
74632005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7464
7465 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7466 being defined and not used.
7467 * data/lalr1.cc (yyparse): Likewise.
7468 Use "if (false)" rather than "if (0)".
7469
249d3236
PE
74702005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7471
7472 * TODO: Mention that we should allow NUL bytes in tokens.
7473
987cc1fb
PE
74742005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7475
7476 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7477 Problem reported by Hans Aberg.
7478
08fe02d9
PE
74792005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7480
7481 * src/getargs.c (version): Happy new year; update overall
7482 program copyright date from 2004 to 2005.
7483
7484 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7485 Problem reported by Hans Aberg.
7486 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7487 (Output file names.): Add a test for the case when standard output
7488 is closed.
7489
010c0266
PE
74902004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7491
7492 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7493 to fix an oversight in the Bison 2.0 manual.
7494
da12206a
PE
74952004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7496
7497 * NEWS: Version 2.0. Reformat the existing news items since
7498 1.875, so that related items are grouped together.
3a4734aa 7499 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
7500 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7501
c935d934
PE
7502 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7503 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7504 otherwise, we're not testing alloca. Unfortunately there's no
7505 simple way to consult HAVE_ALLOCA here.
7506
da12206a
PE
7507 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7508 for yymsg, too.
7509
7510 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7511 hand. This avoids a warning about comparing int to size_t when
7512 GCC warnings are enabled.
7513
0a2c5137
PE
75142004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7515
d7e14fc0
PE
7516 * NEWS: Bison-generated parsers no longer default to using the
7517 alloca function (when available) to extend the parser stack, due
7518 to widespread problems in unchecked stack-overflow detection.
7519 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7520 responsibility to set it to a positive value. This lets the user
7521 specify a value that is not a preprocessor constant.
7522 * data/yacc.c (YYMAXDEPTH): Likewise.
7523 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7524 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7525 to be a compile-time constant. However, explain the constraints on it.
7526 Also, explain the constraints on YYINITDEPTH.
7527 (Table of Symbols): Explain that alloca is no longer the default.
7528 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7529 to 1.
7530
0a2c5137
PE
7531 * doc/bison.texinfo (Location Default Action): Mention that n must
7532 be zero when k is zero. Suggested by Frank Heckenbach.
7533
e019c247
AD
75342004-12-22 Akim Demaille <akim@epita.fr>
7535
7536 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7537 (parser::state_type, parser::semantic_type, parser::location_type):
7538 Private, not public.
7539 (parser::parse): Return ints, not bool.
7540 Returning a bool introduces a problem: 0 corresponds to false, and
7541 it seems weird to return false on success. Returning true changes
7542 the conventions for yyparse.
7543 Alternatively we could return void and send an exception.
7544 There is no clear consensus (yet?).
7545 (state_stack, semantic_stack, location_stack): Rename as...
7546 (state_stack_type, semantic_stack_type, location_stack_type): these.
7547 Private, not public.
7548 * tests/c++.at: New.
7549 * tests/testsuite.at, tests/Makefile.am: Adjust.
7550
72731bb7
AD
75512004-12-21 Akim Demaille <akim@epita.fr>
7552
7553 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7554
9a0d8bec
AD
75552004-12-21 Akim Demaille <akim@epita.fr>
7556
7557 Don't impose std::string for filenames.
7558
7559 * data/lalr1.cc (b4_filename_type): New.
7560 (position::filename): Use it.
7561 (parser.hh): Move the inclusion of stack.hh and location.hh below
7562 the user code, so that needed headers for the filename type can be
7563 included first.
72731bb7
AD
7564 Forward declare them before the user code.
7565 * tests/Makefile.am (check-local, installcheck-local): Pass
7566 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 7567
99880de5
AD
75682004-12-20 Akim Demaille <akim@epita.fr>
7569
7570 Use more STL like names: my_class instead of MyClass.
7571
7572 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7573 (SemanticStack, SemanticType, StateStack, StateType)
7574 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7575 (Parser::value): Rename as...
7576 (location_stack, location_type, rhs_number_type, semantic_stack)
7577 (semantic_type, state_stack, state_type, token_number_type, stack)
7578 (slice, traits, parser::yylloc, parser::yylval): these.
7579
7580 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7581
9bec482e
PE
75822004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7583
7584 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7585 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7586
f6fbd3da
PE
75872004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7588
7589 Remove uses of 'short int' and 'unsigned short int'. This raises
7590 some arbitrary limits. It uses more memory but nowadays that's
7591 not much of an issue.
7592
7593 This change does not affect the generated parsers; that's a different
7594 task, as some users will want to conserve memory there.
7595
7596 Ideally we should use size_t to represent all object counts, and
7597 something like ptrdiff_t to represent signed differences of object
7598 counts; but that will require more code-cleanup than I have the
7599 time to do right now.
7600
7601 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7602 Use size_t, not int or short int, to count objects.
7603 * src/closure.c (nritemset, closure): Likewise.
7604 * src/closure.h (nritemset, closure): Likewise.
7605 * src/nullable.c (nullable_compute): Likewise.
7606 * src/print.c (print_core): Likewise.
7607 * src/print_graph.c (print_core): Likewise.
7608 * src/state.c (state_compare, state_hash): Likewise.
7609 * src/state.h (struct state): Likewise.
7610 * src/tables.c (default_goto, goto_actions): Likewise.
7611
7612 * src/gram.h (rule_number, rule): Use int, not short int.
7613 * src/output.c (prepare_rules): Likewise.
7614 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7615 errs, reductions): Likewise.
7616 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7617 Likewise.
7618 * src/tables.c (vector_number, tally, action_number,
7619 ACTION_NUMBER_MINIMUM): Likewise.
7620 * src/output.c (muscle_insert_short_int_table): Remove.
7621
efeed023
AD
76222004-12-17 Akim Demaille <akim@epita.fr>
7623
7624 * data/lalr1.cc: Extensive Doxygenation.
7625 (error_): Rename as...
7626 (error): this, since it is visible to the user.
7627 Adjust callers.
7628 (Parser::message): Now an automatic variable from...
7629 (Parser::yyreport_syntax_error_): here.
7630 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7631 Parser::error.
7632 * tests/input.at: Escape $.
7633
bc82c5a5
PE
76342004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7635
7636 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7637 Parenthesize rhs to avoid obscure problems with mistakes like
7638 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7639 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7640 b4_rhs_location): Likewise.
7641 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7642 b4_rhs_location): Likewise.
7643
fd19f271
AD
76442004-12-16 Akim Demaille <akim@epita.fr>
7645
7646 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7647 yacc.c: be sure to stay within yycheck_.
7648 * tests/actions.at: Re-enable C++ tests.
7649
10454ea4
AD
76502004-12-16 Akim Demaille <akim@epita.fr>
7651
7652 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7653 real.
7654
c5b95ccf
AD
76552004-12-16 Akim Demaille <akim@epita.fr>
7656
7657 Use #define to handle the %name-prefix.
7658
7659 * data/glr.c, data/yacc.c: Comment changes.
7660 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7661 so that one can refer to yylex in the parser file, and have it
7662 renamed, as is the case with other skeletons.
7663
617a8f12
AD
76642004-12-16 Akim Demaille <akim@epita.fr>
7665
7666 Move lalr1.cc internals into yy*.
7667
7668 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7669 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7670 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7671 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7672 (empty_, final_, terror_, errcode_, ntokens_)
7673 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7674 (looka_, ilooka_, error_range_, nerrs_):
7675 Rename as...
7676 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7677 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7678 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7679 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7680 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7681 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7682 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7683 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7684 these.
7685
1e547e6e
PE
76862004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7687
7688 Fix some problems reported by twlevo at xs4all.
7689 * src/symtab.c (symbol_new): Report an error if the input grammar
7690 contains too many symbols. This is better than calling abort() later.
7691 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7692 (struct node, struct graph):
7693 Rename member expand to stretch. All uses changed.
7694 (struct graph): Remove member layoutalgorithm. All uses removed.
7695 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7696 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7697 All uses changed.
7698 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7699
735d6bd4
AD
77002004-12-15 Akim Demaille <akim@epita.fr>
7701
7702 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7703 Add more Doxygen comments.
7704 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7705 (report_syntax_error_, translate_): Rename as...
7706 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7707 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7708
2e1f5829
AD
77092004-12-15 Akim Demaille <akim@epita.fr>
7710
7711 * data/lalr1.cc (lex_): Rename as...
7712 (yylex_): this.
7713 Move the trace here.
7714 Take the %name-prefix into account.
7715 Reported by Alexandre Duret-Lutz.
7716
a3cb6248
AD
77172004-12-15 Akim Demaille <akim@epita.fr>
7718
7719 Simplify the C++ parser constructor.
7720
7721 * data/lalr1.cc (debug_): Rename as...
7722 (yydebug_): so that the parser's internals are always in the yy*
7723 pseudo namespace.
7724 Adjust uses.
7725 (b4_parse_param_decl): Remove the leading comma as it is now only
7726 called as unique argument list.
7727 (Parser::Parser): Remove the constructor accepting a location and
7728 an initial debugging level.
7729 Remove from the other ctor the argument for the debugging level.
7730 (debug_level_type, debug_level, set_debug_level): New.
7731
7732 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7733 constructor calls.
7734
07fed891
AD
77352004-12-15 Akim Demaille <akim@epita.fr>
7736
7737 Remove b4_root related material: failure experiment
a3cb6248 7738 (which goal was to allow to derive from a class).
07fed891
AD
7739
7740 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7741 definitions and uses.
7742
e603eaa5
PE
77432004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7744
7745 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7746 not 2, since it's not portable to subtract 1 from the start of an
7747 array. The new item 0 is never set or used. All uses changed.
7748
7749 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7750 the default definition of YYLLOC_DEFAULT. Problem reported
7751 by Frank Heckenbach.
7752
fafb007d
PE
77532004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7754
7755 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7756 the normal case and one for the error case. Just use the
7757 first one uniformly. Problem reported by Frank Heckenbach.
7758 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7759 use exactly the same macro in both places.
7760 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7761 so that the normal-case YYRHSLOC works for the error case too.
7762 All uses changed.
7763 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7764 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7765 * doc/bison.texinfo (Location Default Action): Don't claim that
7766 we have an array of locations. Use the same macro for both glr
7767 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7768 the index is 0.
7769
48814dcd
PE
77702004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7771
a4e1a53b
PE
7772 * HACKING: Update email addresses to send announcements to.
7773
48814dcd
PE
7774 * configure.ac (AC_INIT): Bump version to 1.875f.
7775
337116ba
PE
77762004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7777
7778 * NEWS: Version 1.875e.
7779 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7780
7781 * src/scan-skel.l: Include "complain.h", for "fatal".
7782
7783 * src/relation.h (relation_print, relation_digraph):
7784 Relation sizes are of type relation_node, not size_t (this is
7785 merely a doc fix, since the two types are equivalent).
7786 (relation_transpose): Relation sizes are of type relation_node,
7787 not int.
7788 * src/relation.c: Likewise.
7789 (top, infinity): Now of type relation_node, not int.
7790 (traverse, relation_transpose): Use relation_node, not int.
7791
7792 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7793 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7794 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7795
7796 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 7797 specifying whether the test should be skipped. Use it tp
337116ba 7798 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 7799 fail on some hosts, and should be skipped.
337116ba 7800
da2a7671
PE
78012004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7802
7803 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7804 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7805 unless otherwise specified below.
7806
7807 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7808 to allocate kernel_base, kernel_items, kernel_size, since
7809 they needn't be initialized to 0.
7810 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7811 * src/closure.c (new_closure): Likewise, for itemset.
7812 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7813 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7814 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7815 (build_relations): Likewise for edge, states1, includes.
7816 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7817 * src/reader.c (packgram): Likewise, for ritem, rules.
7818 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7819 * src/relation.c (relation_digraph): Likewise for VERTICES.
7820 (relation_transpose): Likewise for new_R, end_R.
7821 * src/symtab.c (symbols_token_translations_init): Likewise for
7822 token_translations.
7823 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7824 (token_actions): Likewise for yydefact, actrow, conflrow,
7825 conflict_list.
7826 (save_column): Likewise for froms[symno], tos[symno].
7827 (goto_actions): Likewise for state_count.
7828 (pack_table): Likewise for base, pos, check.
7829 (tables_generate): Likewise for width.
7830
7831 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7832 for initial core. Just have a separate core, so we needn't worry
7833 about whether kernel_size and kernel_base are initialized.
7834
7835 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7836 kernel_size, kernel_items): Remove unnecessary initialization.
7837 * src/conflicts.c (conflicts): Likewise.
7838 * src/derives.c (derives): Likewise.
7839 * src/muscle_tablc (muscle_insert): Likewise.
7840 * src/relation.c (relation_digraph): Likewise.
7841 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7842 conflrow, conflict_table, conflict_list, table, check):
7843 Likewise.
7844
7845 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7846 This is because all callers pass unsigned int.
7847 * src/closure.h (new_closure): Likewise.
7848
7849 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7850 (build_relations): Initialize includes[i] in all cases.
7851 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7852 and rules[ruleno].precsym. Initialize members in order.
7853 * src/relation.c (relation_transpose): Always initialize new_R[i]
7854 and end_R[i].
7855 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7856
7857 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7858 conflict_list[0] was always 0, but now it isn't initialized.
7859
7860 * src/table.c (table_grow): When conflict_table grew, the grown
7861 area wasn't cleared. Fix this.
7862
7863 * lib/.cvsignore: Add strdup.c, strdup.h.
7864 * m4/.cvsignore: Add strdup.m4.
7865
00baeeac
PE
78662004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7867
7868 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7869 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7870 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7871 ngotos + 1 without checking for overflow.
7872 (build_relations): Use END_NODE, not -1, to denote end of edges.
7873 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7874 build_relations): Use goto_number, not int, for goto numbers.
7875 * src/tables.c (save_column, default_goto): Likewise.
7876
be3d9d42
AD
78772004-11-23 Akim Demaille <akim@epita.fr>
7878
7879 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7880 of #defining from yystype.
7881 Don't typedef yystype, C++ does not need it.
7882 This lets it possible to forward declare it as union.
7883
78e526d5
PE
78842004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7885
7886 * bootstrap (gnulib_modules): Add extensions.
7887 Problem reported by Jim Meyering.
7888
afbb696d
PE
78892004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7890
7891 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7892 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7893 src/system.h, src/tables.c: XFREE -> free, to accommodate
7894 recent change to gnulib xalloc.h.
78e526d5 7895 Problem reported by Jim Meyering.
afbb696d 7896
c1f8f16a
AD
78972004-11-17 Akim Demaille <akim@epita.fr>
7898
7899 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7900
db7e5eb5 79012004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
7902 Alexandre Duret-Lutz <adl@gnu.org>
7903
7904 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7905 changes.
7906 (YYCDEBUG): Adjust.
7907 Use it instead of cdebug_.
7908 (Parser::debug_stream, Parser::set_debug_stream): New.
7909 (Parser::symprint_): Define cdebug_ for temporary backward
7910 compatibility.
7911 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7912 debug_stream ().
7913
68e11668
AD
79142004-11-17 Akim Demaille <akim@epita.fr>
7915
7916 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7917 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7918 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7919 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7920
97cbc73e
PE
79212004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7922
7923 * data/glr.c (yyloc_default): Remove; not used.
7924 Problem reported by Frank Heckenbach.
7925
e342c3be
AD
79262004-10-25 Akim Demaille <akim@epita.fr>
7927
7928 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7929 Introduce another definition to address simple location arrays.
7930 (yyGLRStack): New member: yyerror_range.
7931 (yyrecoverSyntaxError, yyparse): Update it.
7932 (yyrecoverSyntaxError): Use it when shifting the error token to
7933 have an accurate range, equivalent to the one computed by both
7934 yacc.c and lalr1.cc.
7935 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7936 that column numbers start at column 0, as per GNU Coding
7937 Standards, the others tests, and the doc.
7938 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7939 Adjust to the above change (first column is 0).
7940 And adjust the location of the "<error>", now covering the whole
7941 line.
7942
93602feb 79432004-10-22 Akim Demaille <akim@epita.fr>
04098407 7944 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
7945
7946 Remove some arbitrary limits on goto numbers and relations.
7947 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7948 initial values, since they're never used.
7949 (set_goto_map): ngotos is now unsigned, so test for overflow
7950 by seeing whether it wraps around to zero.
7951 * src/lalr.h (goto_number): Now size_t, not short int.
7952 (GOTO_NUMBER_MAXIMUM): Remove.
7953 * src/relation.c (relation_print, traverse, relation_transpose):
7954 Check for END_NODE rather than looking at sign.
7955 * src/relation.h (END_NODE): New macro.
7956 (relation_node): Now size_t, not short int.
7957
dba08b04
PE
79582004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7959
7960 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7961 keyword, not an identifier. Problem reported by Baron Schwartz in
7962 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7963
df09ef2e
AD
79642004-10-11 Akim Demaille <akim@epita.fr>
7965
7966 * src/symtab.c (symbol_check_alias_consistency): Also check
7967 type names, destructors, and printers.
7968 Reported by Alexandre Duret-Lutz.
7969 Recode the handling of associativity and precedence in terms
7970 of symbol_precedence_set.
7971 Accept no redeclaration at all, not even equal to the previous
7972 value.
7973 (redeclaration): New.
7974 Use it to factor redeclaration complaints.
7975 (symbol_make_alias): Don't set the type of the alias, let
7976 symbol_check_alias_consistency do it as for other features.
7977 * src/symtab.h (symbol): Add new member prec_location, and
7978 type_location.
7979 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7980 * tests/input.at (Incompatible Aliases): New.
7981
146bc99d
PE
79822004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7983
7984 .cvsignore fixes to accommodate gnulib changes,
7985 and the practice of naming build directories "_build".
7986 * .cvsignore: Add "_*". Sort.
7987 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7988 * m4/.cvsignore: Add "*_gl.m4".
7989
e503aa60
AD
79902004-10-06 Akim Demaille <akim@epita.fr>
7991
7992 * src/parse-gram.y (add_param): Fix the truncation of trailing
7993 spaces.
7994
b4a20338
AD
79952004-10-05 Akim Demaille <akim@epita.fr>
7996
7997 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7998 whether the reducion was empty or not. This leaves room to
7999 improve the use of YYLLOC_DEFAULT in such a case.
8000 lalr1.cc is still experimental, so changing this is acceptable.
8001 And finally, there are probably not many users who changed the
8002 handling of locations in GLR, so changing is admissible too.
8003
8004 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8005 empty reduction, set @$ to an empty location ending the previously
8006 stacked symbol.
8007 Adjust uses to make sure the code is triggered on empty
8008 reductions.
8009 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8010 expected output: empty reductions have empty locations.
8011
f85a5e6f
AD
80122004-09-29 Akim Demaille <akim@epita.fr>
8013
8014 * data/lalr1.cc: Move towards a more standard C++ coding style
8015 for templates: Class < T > -> Class<T>.
8016
b203fc2c
AD
80172004-09-29 Akim Demaille <akim@epita.fr>
8018
8019 * data/lalr1.cc: Reinstall the former ctor, for sake of
8020 compatibility, but warn it will be removed.
8021 Move towards a more standard C++ coding style (i.e., type *var ->
8022 type* var).
8023
5b7e1e73
PE
80242004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8025
3fee967f
PE
8026 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8027 since it's less likely to work if NULs are involved in the future.
5b7e1e73 8028
0dcca5c2
AD
80292004-09-27 Akim Demaille <akim@epita.fr>
8030
8031 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8032
6dde1c82
AD
80332004-09-27 Akim Demaille <akim@epita.fr>
8034
8035 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 8036 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
8037 and argument names.
8038 (b4_cc_constructor_call): Likewise.
8039
b233d555
AD
80402004-09-24 Akim Demaille <akim@epita.fr>
8041
8042 * src/parse-gram.y (add_param): Strip the leading and trailing
8043 blanks from a formal argument declaration.
8044 (YY_LOCATION_PRINT): New.
8045
619404e3
AD
80462004-09-24 Akim Demaille <akim@epita.fr>
8047
8048 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8049 after the location.
8050
dd8d9022
AD
80512004-09-24 Akim Demaille <akim@epita.fr>
8052
8053 * doc/bison.texinfo (Table of Symbols): Sort.
8054
0092f063
AD
80552004-09-21 Akim Demaille <akim@epita.fr>
8056
8057 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8058 the useless parentheses.
8059 Suggested by Paul Eggert.
8060
451364ed
AD
80612004-09-20 Akim Demaille <akim@epita.fr>
8062
8063 Let the initial-action act on the look-ahead, and use it for the
8064 "initial push" (corresponding to an hypothetical beginning-of-file).
8065 And let lalr1.cc honor %initial-action.
8066
8067 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8068 example.
8069 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8070 (Parser::Parser): Remove the ctor that used to initialize it.
8071 (Parser::parse): Like in the other skeletons, issue the "starting
8072 parse" message before any action.
8073 Honor %initial-action.
8074 Initialize the stacks with the lookahead.
8075 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8076 look-ahead.
8077 Push them in the stacks.
8078 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8079
18d192f0
AD
80802004-09-20 Akim Demaille <akim@epita.fr>
8081
8082 * doc/bison.texinfo (Initial Action Decl): New.
8083
b8458aa5
AD
80842004-09-20 Akim Demaille <akim@epita.fr>
8085
8086 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8087 clearer criterion to define it.
8088 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8089 When reducing on an empty RHS, use the latest stacked location as
8090 location.
8091 yylloc is not always available.
8092 * data/glr.c: Likewise.
8093 Also, honor initial-actions.
8094
3fc16193
AD
80952004-09-20 Akim Demaille <akim@epita.fr>
8096
8097 * data/yacc.c (YY_LOCATION_PRINT): New.
8098 Define when we know YYLTYPE's structure, i.e., when the default
8099 YYLLOC_DEFAULT is used.
8100 * data/c.m4 (b4_yysymprint_generate): Use it.
8101 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8102 value of the result.
8103 (error_start_): Replace with...
8104 (error_range_): this location array.
8105 This allows to replace code relying on the implementation of
8106 locations by portable code.
8107 * data/yacc.c (yylerrsp): Replace with...
8108 (yyerror_range): this.
8109 Every time a token is popped, update yyerror_range[0], to have an
8110 accurate location for the error token.
8111 * data/glr.c (YY_LOCATION_PRINT): New.
8112 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8113 deference a pointer.
8114 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8115 report the location in %printers.
8116
8117 * src/scan-skel.l: Instead of abort, report error messages to ease
8118 understanding skeleton scanning failures.
8119
ecfe33e7
AD
81202004-09-16 Akim Demaille <akim@epita.fr>
8121
8122 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8123 (iterator, const_iterator): these, to be more in the C++ spirit.
8124 Also, return reverse iterators so that when displaying the stack
8125 we display its bottom first.
8126 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8127 from yacc.c.
8128 We should probably use vector here though.
8129
1576d44d
AD
81302004-09-16 Akim Demaille <akim@epita.fr>
8131
8132 Have more complete shift traces.
8133
8134 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8135 to report Shifts instead of ad hoc YYDPRINTF invocations,
8136 including for the error token.
8137 * data/lalr1.cc (symprint_): Output the location.
8138 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8139 output the location within the %printer.
8140 Activate GLR tests, at least to make sure they compile properly.
8141 They still don't pass though.
8142 * tests/calc.at: Adjust expect verbose output, since now "Entering
8143 state..." is on a different line than the "Shifting" message.
8144
9c66f418
AD
81452004-09-08 Akim Demaille <akim@epita.fr>
8146
8147 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8148 Bison directive from the Bison file to the invocation of this
8149 macro, so that these directives are passed to
8150 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8151 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8152 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8153 the extra Bison directives instead of the whole series.
8154 Change the grammar so that there are recoverable errors, and
8155 unrecoverable errors. Now we can have the parser give up before
8156 consuming the whole input. As a result we now can observe that
8157 the lookahead is freed when needed.
8158 Change the parser source to parse argv[1] instead of a hard coded
8159 string.
8160 Simplify yylex, and give a value and location to EOF.
8161 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8162 passed directives already coded in the file.
8163 Add some tests to check the location of "error".
8164 For some tests, the C++ parser is correct, and not yacc.c.
8165 For other tests, they provide different, but unsatisfying, values,
8166 so keep the C++ value so that at least one parser is "correct"
8167 according to the test suite.
8168 (Actions after errors): Remove, this is subsumed by the
8169 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8170
52d5733f
AD
81712004-09-06 Akim Demaille <akim@epita.fr>
8172
8173 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 8174 (Parser::pop): New.
52d5733f
AD
8175 Use it.
8176
a0e68930
AD
81772004-09-06 Akim Demaille <akim@epita.fr>
8178
8179 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8180 argument, an informative message.
8181 Call YY_SYMBOL_PRINT.
8182 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8183 * data/lalr1.cc (destruct_): Likewise.
8184 In addition, no longer depend on b4_yysymprint_generate and
8185 b4_yydestruct_generate to generate these functions, do it "by
8186 hand".
8187
e757bb10
AD
81882004-09-03 Akim Demaille <akim@epita.fr>
8189
8190 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8191 invoked, yydestruct the lookahead.
8192 * tests/calc.at (Calculator $1): Update the expected lengths of
8193 traces: there is an added line for the discarded lookahead.
8194 * doc/bison.texinfo (Destructor Decl): Some rewording.
8195 Define "discarded" symbols.
8196
0fe1f06d
AD
81972004-09-02 Akim Demaille <akim@epita.fr>
8198
8199 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8200
284acc8b
AD
82012004-09-02 Akim Demaille <akim@epita.fr>
8202
8203 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8204 (YYDSYMPRINTF): Rename as...
8205 (YY_SYMBOL_PRINT): this.
8206 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8207 two.
8208 Use it instead of direct symprint_ calls.
8209 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8210 one.
8211
a5eb1ed2
AD
82122004-09-02 Akim Demaille <akim@epita.fr>
8213
b7c72fe1
AD
8214 * data/lalr1.cc (b4_yysymprint_generate): New.
8215 (symprint_): New member function, defined when YYDEBUG.
8216 Use it consistently instead of token/nterm debugging output by
8217 hand.
a5eb1ed2
AD
8218 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8219 %printer calls to use cdebug_ when using lalr1.cc.
8220
417141dd
AD
82212004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8222
8223 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8224 with #ifdef YYDEBUG.
8225
2fa09258
AD
82262004-08-26 Akim Demaille <akim@epita.fr>
8227
8228 * doc/bison.texinfo (Implementing Loops): Rename as...
8229 (Implementing Gotos/Loops): this.
8230
9378b508
PE
82312004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8232
8233 Adjust to latest gnulib.
8234 * bootstrap (gnulib_modules): Add xalloc-die.
8235 Set LC_ALL=C so that file names sort consistently.
8236 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8237 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8238 uintmax_t.m4, ulonglong.m4.
8239 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8240 po.m4 since we are now using _gl.m4 instead.
8241
87a8ad5c
PE
82422004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8243
8244 * src/scan-action.l: Remove. Scanning of semantic actions is
8245 handled in scan-gram.l.
8246
dca81a78
PE
82472004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8248
8249 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8250
8251 * src/location.h (struct): The file member is a uniqstr.
8252 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8253
c9cbf7c5
PE
82542004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8255
8256 Fix bug with non-%union parsers that have printers or destructors,
8257 which led to a Bison core dump. Reported by Peter Fales in
8258 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 8259
c9cbf7c5
PE
8260 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8261 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8262 not to our own type.
8263 * src/output.c (symbol_destructors_output, symbol_printers_output):
8264 Don't assume %union.
8265 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8266 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8267 UNION-FLAG. All callers changed.
8268 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8269 Use type char, not unsigned int, when declaring an array of char;
8270 this lets us remove a cast.
8271 (Printers and Destructors): Add non-%union test cases.
8272
fa7e68c3
PE
82732004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8274
8275 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8276 GLR writeups. E.g., avoid frenchspacing and the future tense,
8277 change "lookahead" to "look-ahead", and change "wrt" to "with
8278 respect to".
2fa09258 8279
fa7e68c3
PE
82802004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8281
8282 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8283 New sections, split off from the GLR Parsers section. Put the new
8284 Simple GLR Parser near the start of the GLR section, for clarity.
8285 Rewrite connective text.
8286
99a9344e
PE
82872004-06-21 Frank Heckenbach <frank@g-n-u.de>
8288
8289 * doc/bison.texinfo (Simple GLR Parsers): New section.
8290
8dd162d3
PE
82912004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8292
8293 * NEWS, TODO, doc/bison.texinfo:
8294 Use "look-ahead" instead of "lookahead", to be consistent.
8295 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8296 while we're fixing "look-ahead".
8297 * src/conflicts.c (shift_set): Renamed from shiftset.
8298 (look_ahead_set): Renamed from lookaheadset.
8299 * src/print.c: Likewise.
8300 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8301 name for "lookahead".
8302 (report_types, usage): Likewise.
8303 * src/getargs.h (report_look_ahead_tokens): Renamed from
8304 report_lookaheads.
8305 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8306 compute_lookaheads.
8307 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8308 (look_ahead_tokens_print): Renamed from lookaheads_print.
8309 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8310 state_rule_lookaheads_print.
8311 * src/state.h: Likewise.
8312 (reductions.look_ahead_tokens): Renamed from lookaheads.
8313 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8314 AT_DATA_LOOKAHEADS_GRAMMAR.
8315
57a90331
PE
83162004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8317
8318 * README: Update location of patched M4 distribution.
8319
8ed3234a
PE
83202004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8321
8322 Don't assume the C++ compiler takes the same arguments as the C compiler
8323 (trivial change).
8324 * configure.ac (O0CXXFLAGS): New var.
8325 * tests/atlocal.in (CXXFLAGS): Use it.
8326
07971983
PE
83272004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8328
8329 Fix some "make check" problems with C++ reported by
8330 Albert Chin-A-Young for Tru64 C++ in this thread:
8331 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8332
8333 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8334 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8335 Output to a .cc file for C++, not to a .c file.
8336 * tests/calc.at (AT_CHECK_CALC): Likewise.
8337 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8338 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8339
29058652
PE
83402004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8341
8342 * tests/calc.at, tests/actions.at: Workaround for SGI
8343 C++ compiler. (trivial change)
8344
62cb8a99
PE
83452004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8346
fd418816
PE
8347 Spent a few hours checking out which prerequisite versions the
8348 current sources actually require. I went all the way back to
8349 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8350 a seemingly endless set of combinations of versions more recent
8351 than that. The bottom line is that the current sources require
8352 fairly recent versions of the build tools, and it'll be some work
8353 to change this.
8354 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8355 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8356 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8357 Add comments explaining why those particular versions are
8358 currently needed.
2fa09258 8359
62cb8a99
PE
8360 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8361 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 8362 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
8363
8364 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8365 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8366
caa52c10
PE
83672004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8368
8369 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8370 0.11.5. Suggested by Bruno Haible.
8371 * bootstrap: Remove gettext version checking.
8372
8373 * doc/bison.texinfo (Decl Summary): Also mention that %union
8374 can depend on prerequisite types. Problem reported by Tim
8375 Van Holder.
8376
4bfd5e4e
PE
83772004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8378
2cef3017
PE
8379 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8380 * README-alpha: Don't tell people not to package this.
8381
b9c85d5c
PE
8382 * bootstrap: Don't assume $(...) works; use `...` instead.
8383 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8384 gettext better.
8385
4bfd5e4e
PE
8386 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8387 put into the -d output file, and mention what to do if YYSTYPE is
8388 defined as a macro.
8389
6a36ff94
PE
83902004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8391
6712933e
PE
8392 Undo change made earlier today: it caused autopoint to not bring
8393 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8394 autopoint's.
8395
8396 * bootstrap: Check that gettext version matches what's in
8397 configure.ac. Warn users to ignore robots.txt ERROR 404.
8398 * bootstrap: Undo today's earlier change (logged below).
8399 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 8400
6a36ff94
PE
8401 The gettext version checking is causing more trouble than it's
8402 curing; remove it. Problem reported by Paul Hilfinger.
8403
8404 * bootstrap: Issue a warning that one can expect a message
8405 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8406 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8407
209ea708
PE
84082004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8409
8410 Ensure that the C++ compiler used for testing actually works on a
8411 simple test program; if not, skip the C++-related tests. Problem
8412 reported by Vin Shelton in:
161a71f3 8413 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
8414
8415 * m4/cxx.m4: New file.
8416 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8417 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8418 * tests/local.at (AT_COMPILE_CXX): Use it.
8419
41ca2549
PE
84202004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8421
383e69dc
PE
8422 * data/glr.c (yylloc): Output this macro even if locations are not
8423 being generated, as the GLR parser needs it even in that case.
8424 Problem reported by Troy A. Johnson
8425 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8426
41ca2549
PE
8427 * configure.ac (AC_INIT): Update to 1.875e.
8428
e476c87d
PE
84292004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8430
8431 * NEWS: Version 1.875d.
8432 * configure.ac (AC_INIT): Likewise.
8433 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8434
8435 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8436 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8437 lalr1.cc runs afoul of the first, and the last two are no longer
8438 supported by GCC 3.4.0.
8439 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8440 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8441
233a88ad
PE
84422004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8443
8444 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8445 unsigned int, for compatibility with latest gnulib hash module.
8446 * src/state.c (state_hash, state_hasher): Likewise.
8447 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8448 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 8449
12ffdd28
PE
84502004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8451
8452 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8453
8454 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8455 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8456 character and string literals.
8457 (unexpected_end): New function.
8458 (unexpected_eof): Use it.
8459 (unexpected_newline): New function.
8460 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8461 actions.
e476c87d 8462
12ffdd28
PE
8463 * NEWS: Document %expect-rr.
8464
8465 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8466 Fix typo by replacing $1 with $option.
8467 Remove more 'intl'-related files.
9668e2be 8468 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
8469
8470 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8471 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8472 strtoul.c.
8473 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8474 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8475 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8476 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8477 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8478 * src/.cvsignore: Add *.output.
8479
8480 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8481 gets copied to the output file.
e476c87d 8482
1f65350a
PE
84832004-04-28 Paul Eggert <eggert@twinsun.com>
8484
8485 Get files from the gnulib and po repositories, instead of relying
8486 on them being in our CVS. Upgrade to latest versions of gnulib
8487 and Automake.
8488
8489 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8490 * bootstrap: Bootstrap from gnulib and po repositories.
8491 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8492 * README-cvs: Document these changes. Remove version numbers from
8493 mentions of build tools, since they change so often. Mention Flex.
8494
8495 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8496 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
8497 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8498 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 8499 does this for us.
12ffdd28
PE
8500 (AC_ISC_POSIX): Remove; we no longer support this
8501 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
8502 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8503 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8504 Do not check for C89 headers, except for locale.h which is used
8505 by the Yacc library and must port to K&R hosts.
8506 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8507 Do not check for C89 functions, except for setlocale which is
8508 used by the Yacc library.
8509 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8510 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8511 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8512 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8513 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8514 AM_GNU_GETTEXT): Remove; now done by:
8515 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8516 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8517 for us.
8518
8519 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8520 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8521 Define to empty, as gnulib.mk will do the rest for us.
8522 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8523 for us.
8524 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8525 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8526
8527 * src/files.c: Include gnulib's xstrndup.h.
8528
8529 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8530 (REALLOC): Use xnrealloc, for likewise.
8531 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8532 (strnlen, memrchr): Remove decls; functions no longer used.
8533 Include <stpcpy.h>.
8534
8535 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8536 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8537 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8538 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8539 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8540 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8541 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8542 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8543 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8544 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8545 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8546 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8547 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8548 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8549 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8550 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8551 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8552 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8553 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8554 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8555 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8556 Remove, as these files are now generated automatically
8557 by bootstrap or automake.
8558
8559 * po/ChangeLog: Remove: all but one entry was a duplicate
8560 of this file, and I moved that 2000-11-02 entry here.
8561
8562 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8563 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8564 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8565 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8566 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8567 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8568 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8569 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8570 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8571 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8572 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8573 xstrndup.h.
8574 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8575 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8576 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8577 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8578 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8579 * src/.cvsignore: Remove *_.c.
8580
8581
8582 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8583 support it. (The latest stable gzip doesn't.)
8584
85852004-04-27 Paul Eggert <eggert@twinsun.com>
8586
8587 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8588 case, as stos_ is now used by destructors due to the 2004-02-09
8589 change.
8590
8591 Remove more K&R C support.
8592 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8593 * lib/subpipe.c (errno): Remove decl.
8594 Include <stdlib.h> unconditionally.
8595 (EXIT_FAILURE): Remove macro.
8596 * src/complain.c (vfprintf, strerror): Remove.
8597 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8598 unconditionally.
8599 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8600 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8601 (strchr, strspn, memchr): Remove decls.
8602 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8603 unconditionally. Do not declare perror.
8604 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8605 unconditionally.
8606
8607 * src/complain.c (_): Remove useless defn, as system.h defines this.
8608
8609 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8610 with latest obstack.h.
8611 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8612 to procedure types, as obstack.h now does that for us.
8613 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8614
8615 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8616 so that this include file can stand alone.
8617 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8618 does this now. Include subpipe.h first after config.h, to
8619 test whether it can stand alone.
8620
8621 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8622 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8623 unused declaration.
8624
8625 * tests/synclines.at (%union synch line): Put a dummy member in
8626 the union, because empty unions aren't allowed in C. Caught
8627 by GCC 3.4.0.
8628
4f16766c
PE
86292004-04-13 Jim Meyering <jim@meyering.net>
8630
8631 * src/conflicts.c (conflicts_print): Correct format string typo:
8632 use `%%' to produce literal `%'. (trivial change)
8633
779e7ceb
PE
86342004-03-30 Paul Eggert <eggert@twinsun.com>
8635
8636 * src/getargs.c (version): Update copyright year to 2004.
8637
8638 * data/c.m4 (b4_int_type): Use 'short int' rather than
8639 'short', and similarly for 'long', 'unsigned', etc.
8640 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8641 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8642 yy_yypstack, yydumpstack): Likewise.
8643 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8644 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8645 Likewise.
8646 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8647 yy_stack_print, yyparse): Likewise.
8648 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8649 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8650 * lib/bitset.c (bitset_print): Likewise.
8651 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8652 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8653 * lib/bitsetv.c (bitsetv_dump): Likewise.
8654 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8655 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8656 Likewise.
8657 * src/LR0.c (allocate_itemsets): Likewise.
8658 * src/gram.h (rule_number, rule): Likewise.
8659 * src/lalr.h (goto_number): Likewise.
8660 * src/nullable.c (nullable_compute): Likewise.
8661 * src/output.c (prepare_rules): Likewise.
8662 * src/relation.c (relation_print, relation_digraph): Likewise.
8663 * src/relation.h (relation_node): Likewise.
8664 * src/state.h (state_number, transitions, errs, reductions,
8665 struct state): Likewise.
8666 * src/symtab.h (symbol_number, struct symbol): Likewise.
8667 * src/tables.c (vector_number, tally, action_number,
8668 default_goto, goto_actions): Likewise.
8669 * tests/existing.at (GNU Cim Grammar): Likewise.
8670 * tests/regression.at (Web2c Actions): Likewise.
8671
8672 * src/output.c (muscle_insert_short_int_table): Renamed from
8673 muscle_insert_short_table. All uses changed.
8674
d6328241
PH
86752004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8676
8677 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8678 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8679 Add %expect-rr rule.
4f16766c 8680
d6328241
PH
8681 * src/scan-gram.l: Recognize %expect-rr.
8682
4f16766c 8683 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 8684 expected_conflicts.
4f16766c 8685 (expected_rr_conflicts): Declare.
d6328241
PH
8686
8687 * src/conflicts.c (expected_sr_conflicts): Rename from
8688 expected_conflicts.
8689 (expected_rr_conflicts): Define.
8690 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8691 for GLR parsers.
8692 Use expected_sr_conflicts in place of expected_conflicts.
8693 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 8694
d6328241 8695 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 8696
1452af69
PE
86972004-03-08 Paul Eggert <eggert@gnu.org>
8698
8699 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 8700 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
8701
8702 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8703 in lalr1.cc.
8704 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8705 * src/scan-gram.l (scan_integer): New function.
8706 ({int}): Use it.
8707 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8708 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8709 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8710 Say "long int", not "long", for uniformity with GNU style.
8711
006d217d
PE
87122004-02-25 Paul Eggert <eggert@twinsun.com>
8713
8714 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8715 compilers. This fixes a problem with Intel's C++ compiler being
8716 chatty, reported by Guido Trentalancia in
161a71f3 8717 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 8718
c2729758
ADL
87192004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8720
8721 Support %destructor and merge error locations in lalr1.cc.
8722
8723 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8724 (Parser::stos_): Define unconditionally.
8725 (Parser::destruct_): New method. Generate its body with
8726 b4_yydestruct_generate.
8727 (Parser::error_start_): New attribute.
8728 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8729 token which are discarded.
8730 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8731 error_start_ when erroneous token are discarded.
8732 (Parser::parse) <yyerrlab1>: Compute the location of the error
8733 token so that it covers all the discarded tokens.
8734 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8735 it can be called with `%skeleton "lalr1.cc"', and do that.
8736
dd0e0635
PE
87372004-02-02 Paul Eggert <eggert@twinsun.com>
8738
8739 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8740 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8741 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8742 There's no need to mention top_builddir since Automake does that
8743 for us.
8744 (INCLUDES): Remove, as Automake says it's obsolescent.
8745 Contents migrated into AM_CPPFLAGS as described above.
8746 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8747
87482004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8749
8750 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8751 (yyreportSyntaxError): Handle case where lookahead token is
8752 YYEMPTY.
8753
be16239b
PH
87542004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8755
8756 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8757 resulting parsers are compilable with C++.
8758
5fa90832
PE
87592003-12-23 Paul Eggert <eggert@twinsun.com>
8760
8761 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8762 * src/output.c (output_skeleton): Rename local var.
8763 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8764 Bison tokens, as this runs afoul of the 2003-10-07 change that
8765 disallowed NUL bytes in character constants or string literals.
8766
8767 * tests/local.at: Require Autoconf 2.59's Autotest.
8768 * tests/testsuite.at: Don't include local.at, since we now assume
8769 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8770 including it.
8771 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8772 multiple inclusion warnings.
dd0e0635 8773
b165c324
AD
87742003-12-02 Akim Demaille <akim@epita.fr>
8775
8776 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8777 conditions.
8778 From Bruno Haible.
8779
26e06a21
ADL
87802003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8781
8782 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8783
92ac3705
PE
87842003-10-07 Paul Eggert <eggert@twinsun.com>
8785
6a5ecb38
PE
8786 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8787 if testsuite doesn't exist.
8788
92ac3705
PE
8789 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8790 literals, unfortunately.
8791 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8792 Complain about NUL bytes in character constants or string literals.
8793
91d2c560
PE
87942003-10-05 Paul Eggert <eggert@twinsun.com>
8795
8796 * NEWS: Don't document %no-default-prec, as it's still
8797 too experimental.
8798 * doc/bison.texinfo: Document %no-default-prec only if
8799 the defaultprec flag is set. Normally it's not.
8800
0cc3da3a
PE
88012003-10-04 Paul Eggert <eggert@twinsun.com>
8802
8803 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8804 non-modifiable lvalue, instead of a modifiable one.
8805 * doc/bison.texinfo (Actions): Document that $$ can
8806 be assigned to. Do not claim that $$ and $N are
8807 array element references: user code should not rely on this.
8808
22fccf95
PE
88092003-10-01 Paul Eggert <eggert@twinsun.com>
8810
8811 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8812 (grammar_declaration): Use it.
8813 * src/scan-gram.l: New token %no-default-prec.
8814 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8815 * NEWS, doc/bison.texinfo: Document the above.
8816
fc8f2965
AD
88172003-10-01 Akim Demaille <akim@epita.fr>
8818
8819 VCG no longer supports long_straight_phase.
8820
8821 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8822 * src/print_graph.c (print_graph): Adjust.
8823
39a06c25
PE
88242003-09-30 Frank Heckenbach <frank@g-n-u.de>
8825 and Paul Eggert <eggert@twinsun.com>
8826
8827 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8828 Table of Symbols): Document %default-prec.
8829 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8830 (grammar_declaration): Set default_prec on %default-prec.
8831 * src/scan-gram.l (%default-prec): New token.
8832 * src/reader.h (default_prec): New flag.
8833 * src/reader.c: Likewise.
8834 (packgram): Handle it.
8835 * tests/conflicts.at (%default-prec without %prec,
8836 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 8837
39a06c25
PE
88382003-09-30 Paul Eggert <eggert@twinsun.com>
8839
8840 * tests/testsuite.at: Include local.at, not input.at, fixing
8841 a typo in the 2003-08-25 patch.
8842
62b6aef9
AD
88432003-08-27 Akim Demaille <akim@epita.fr>
8844
8845 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8846 GCC warnings.
8847
89e1cc61
AD
88482003-08-26 Akim Demaille <akim@epita.fr>
8849
8850 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8851 "<\#" to avoid magic from Gnus when posting parts of this script.
8852
a08460b0
AD
88532003-08-26 Akim Demaille <akim@epita.fr>
8854
8855 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8856 (Parser::parse): here.
8857 Adjust: nerrs and errstatus is now replaced by...
8858 (Parser::nerrs_, Parser::errstatus_): New.
8859
603f1cfd
AD
88602003-08-25 Akim Demaille <akim@epita.fr>
8861
8862 * config/announce-gen, Makefile.cfg: New.
8863 * Makefile.am: Adjust.
8864 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8865 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8866
cd3684cf
AD
88672003-08-25 Akim Demaille <akim@epita.fr>
8868
8869 When reducing initial empty rules, Bison parser read an initial
8870 location that is not defined. This results in garbage, and that
8871 affects Bison's own parser. Therefore we need (i) to extend Bison
8872 to support a means to initialize this location, and (ii) to use
8873 this CVS Bison to fix CVS Bison's parser.
8874
8875 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8876 with...
8877 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8878 * src/parse-gram.y: Adjust.
8879 (%initial-action): New.
8880 (%error-verbose): Since we require CVS Bison, there is no reason
8881 not to use it.
8882 * src/scan-gram.l: Adjust.
8883 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8884 * data/yacc.c (yyparse): Use b4_initial_action.
8885
4e03e201
AD
88862003-08-25 Akim Demaille <akim@epita.fr>
8887
8888 * doc/bison.texinfo: Don't promote stdout for error messages.
8889
8c182d05
AD
88902003-08-25 Akim Demaille <akim@epita.fr>
8891
8892 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8893 From Alexandre Duret-Lutz.
8894
6a60c4cf
PE
88952003-08-25 Akim Demaille <akim@epita.fr>
8896
8897 Version 1.875c.
8898
25f66e1a
AD
88992003-08-25 Akim Demaille <akim@epita.fr>
8900
8901 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8902 Use them.
8903
5348bfbe
AD
89042003-08-25 Akim Demaille <akim@epita.fr>
8905
8906 * data/lalr1.cc (Parser::reduce_print_): New.
8907 Use it.
8908
47301314
AD
89092003-08-25 Akim Demaille <akim@epita.fr>
8910
8911 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8912 error recovery loops. This patch is based on
161a71f3 8913 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
8914 Also, augment the similarity between lalr1.cc and yacc.c.
8915 Note: the locations of error recovery rules are not correct yet.
8916
8917 * data/lalr1.cc: Comment changes to augment the similarity between
8918 lalr1.cc and yacc.c.
8919 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8920 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8921 yyerrlab), when hitting EOF, pop the whole stack here instead of
8922 merely falling thru the default error handling mechanism.
8923 (yyerrorlab): New label, with the old contents of YYERROR,
8924 plus the following change: pop the stack of rhs corresponding
8925 to the production that invoked YYERROR. That is how Yacc
8926 behaves (required by POSIX).
8927 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8928 fail.
8929
1f7a61ff
AD
89302003-08-25 Akim Demaille <akim@epita.fr>
8931
8932 Tune local.at so that people can "autom4te -l autotest calc.at -o
8933 calc" for instance, to extract a sub test suite.
8934
8935 * tests/testsuite.at: Move the initialization, Autotest version
8936 requirement, and AT_TESTED invocation into...
8937 * tests/local.at: here.
8938 * tests/testsuite.at: Include it for compatibility with Autoconf
8939 2.57.
8940 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8941 be ignore.
8942
327b5b56
PE
89432003-08-04 Paul Eggert <eggert@twinsun.com>
8944
8945 Rework code slightly to avoid gcc -Wtraditional warnings.
8946 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8947 The returned value is now stored in *YY0. All callers changed.
8948 * src/output.c (merge_output): Adjust to the above change.
8949
0051e3ed
PE
89502003-07-26 Paul Eggert <eggert@twinsun.com>
8951
8952 * data/glr.c (YYASSERT): New macro.
8953 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8954 yyresolveStates, yyprocessOneStack):
8955 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8956 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 8957
137437c6
PE
89582003-07-25 Paul Eggert <eggert@twinsun.com>
8959
5b620e06
PE
8960 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8961 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 8962 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
8963 by Frank Heckenbach, though I have omitted the structure-initialization
8964 part of his glr-knr.diff patch since I recall that the Portable
8965 C Compiler didn't require that change.
8966
137437c6
PE
8967 Let the user specify how to allocate and free memory.
8968 Derived from a suggestion by Frank Heckenbach in
161a71f3 8969 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
8970 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8971 All uses of free, malloc, realloc changed to use these macros,
8972 and unnecessary casts removed.
8973 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8974
ddb85ca5
PE
89752003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8976
8977 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8978 use s.empty() rather than s == "" to test for empty string; see
161a71f3 8979 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
8980 (trivial change)
8981
39910e09
AD
89822003-06-25 Akim Demaille <akim@epita.fr>
8983
8984 * config/depcomp, config/install-sh: Update from masters.
8985
0ae99356
PE
89862003-06-20 Paul Eggert <eggert@twinsun.com>
8987
8988 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8989 and return properly parenthesized result.
8990 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8991 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8992 Remove unnecessary parentheses from uses.
8993 * doc/bison.texinfo (Location Default Action): Describe the
8994 conventions for parentheses.
8995
cd05d13c
PE
89962003-06-19 Paul Eggert <eggert@twinsun.com>
8997
81fd08ca
PE
8998 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8999 yyreportTree): Do not assume that size_t is the same width as int,
9000 when printing sizes. Print sizes using an unsigned format.
9001 Problem reported by Frank Heckenbach in
161a71f3 9002 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 9003
cd05d13c
PE
9004 Port to Forte Developer 7 C compiler.
9005 * data/glr.c (struct YYLTYPE): If locations are not being used,
9006 declare a single dummy member, as empty structs do not conform
9007 to the C standard.
9008 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9009 the Forte Developer 7 C compiler complains that end-of-loop
9010 code is not reached.
9011
4dcf140b
PE
90122003-06-17 Paul Eggert <eggert@twinsun.com>
9013
9014 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9015 avoid warnings from picky compilers about redefinition of PARAMS.
9016
8dd76bee
PE
90172003-06-17 Paul Eggert <eggert@twinsun.com>
9018
9019 Version 1.875b.
9020
9021 * NEWS: Document 1.875b.
9022
9023 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9024 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9025 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9026 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9027 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9028 per recent gettext manual's suggestion.
9029 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9030 Use prototypes, not old-style definitions.
9031 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9032 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9033 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9034 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9035 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9036 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9037 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9038 vbitset_or_and_cmp, vbitset_copy): Likewise.
9039
9040 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9041 Do not include <stdlib.h>.
9042 (PARAMS): Define unconditionally for C89.
9043 (ATTRIBUTE_NORETURN): Remove.
9044 (ATTRIBUTE_UNUSED): Define unconditionally.
9045
9046 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 9047 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
9048 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9049 * lib/vbitset.c, lib/vbitset.h: New files.
9050 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9051 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9052 from libbitset.
9053
9054 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9055 `How Can I Reset @code{yyparse}', since texinfo does not allow
9056 arbitrary @ in node names.
9057
9058 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9059 shouldn't be needed according to the gettext 0.12.1 documentation
9060 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 9061 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 9062 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 9063 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 9064
8dd76bee
PE
9065 * lib/.cvsignore: Add stdbool.h.
9066 * m4/.cvsignore: Add nls.m4, po.m4.
9067
9068 Upgrade to CVS gnulib.
9069 * stdbool_.h: File renamed from stdbool.h.in.
9070 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9071 AC_HEADER_STDBOOL.
9072 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9073 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9074 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9075 (MOSTLYCLEANFILES): New var.
9076 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9077 (stdbool.h): New rule.
9078 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9079 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9080 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9081 m4/quote.m4: Upgrade to today's gnulib.
9082
9083 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9084 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9085 the tests right now.
9086 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9087 yyerror are declared before use; C99 requires this.
9088
25005f6a
PH
90892003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9090
9091 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9092 first.
9093 (yyrecoverSyntaxError): Correct the logic for setting and testing
9094 yyerrState.
9095 Correct comment on handling EOF.
9096 Allow states with only a default reduction, rather than failing
8dd76bee 9097 (I can't quite reconstruct why these were not allowed before).
25005f6a 9098
137437c6 9099 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 9100 buffer overruns, corrupting state.
8dd76bee
PE
9101
9102 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
9103 definition.
9104 * src/reader.h (max_left_semantic_context): New variable declaration.
9105 * src/scan-gram.l (max_left_semantic_context): Define.
9106 (handle_action_dollar): Update max_left_semantic_context.
9107 * data/glr.c (YYMAXLEFT): New definition.
9108 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9109 (yyresolveAction): Ditto.
9110
9111 Fixes to problems with location handling in GLR parsers reported by
9112 Frank Heckenbach (2003/06/05).
9113
9114 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9115 (YYRHSLOC): Add parentheses, and define only if locations used.
9116 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9117 locations not used.
9118 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9119 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 9120
25005f6a
PH
9121 * tests/cxx-type.at: Exercise location information; update tests
9122 to differentiate output with and without locations.
8dd76bee 9123 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
9124 because default YYLTYPE not yet defined.
9125 Change semantic actions to compute strings, rather than printing
9126 them directly (to test proper passing of semantics values). Change
9127 output to prefix notation and update test data and expected results.
9128 (yylex): Track locations.
9129 (stmtMerge): Return value rather than printing, and include arguments
9130 in value.
8dd76bee 9131
711f40b7
PE
91322003-06-03 Paul Eggert <eggert@twinsun.com>
9133
9134 Avoid warnings generated by GCC 2.95.4 when Bison is
9135 configured with --enable-gcc-warnings.
9136 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9137 yy::]b4_parser_class_name[::translate_,
9138 yy::Stack::operator[] (unsigned),
9139 yy::Stack::operator[] (unsigned) const,
9140 yy::Slice::operator[] (unsigned),
9141 yy::Slice::operator[] (unsigned) const):
9142 Rename local vars to avoid warnings.
9143 * tests/glr-regression.at (Improper handling of embedded actions
9144 and $-N in GLR parsers): Remove unused local variable from yylex.
9145 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9146 (void) as arg when not pure, since we now assume C89 when building
9147 Bison. Pacify GCC by using parameter.
9148
ac695f7d
PE
91492003-06-02 Paul Eggert <eggert@twinsun.com>
9150
9151 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9152 yy::Location::lines, yy::Location::columns): Rename arguments
9153 to avoid shadowing; this removes a warning generated by GCC 3.3.
9154
26ec81e0
PE
91552003-06-01 Paul Eggert <eggert@twinsun.com>
9156
9157 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9158 to g++, as GCC 3.3 complains if you do it.
9159 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9160 everything that WARNING_CFLAGS has, except omit warnings
9161 not suitable for C++.
9162 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9163 * tests/atlocal.in (CXXFLAGS): New var.
9164 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9165
9166 Fix a GLR parser bug I reported in February; see
161a71f3 9167 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
9168 The problem was that GLR parsers did not conform to the C standard,
9169 because actions like { $1 = $2 + $3; } expanded to expressions
9170 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9171 to a local variable. The C standard says that expressions
9172 like (var = f ()) + (var = f ()) have undefined behavior.
9173 Another problem was that GCC sometimes issues warnings that
9174 yyfill and its parameters are unused.
9175
9176 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9177 as possibly unused.
9178 (yyfill): New function.
9179 (YYFILL): Use it.
9180 (yyuserAction): Change type of yynormal to bool, so that it matches
9181 the new yyfill signature. Mark it as possibly unused.
9182
9183
9184 Follow up on a bug I reported in February, where a Bison-generated
9185 parser can loop. Provide a test case and a fix for yacc.c. I
9186 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9187 The original bug report is in:
161a71f3 9188 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
9189
9190 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9191 macro's size was becoming unwieldy.
9192 (yyerrlab): Do not discard an empty lookahead symbol, as this
9193 might destroy garbage.
9194 (yyerrorlab): New label, with the old contents of YYERROR,
9195 plus the following change: pop the stack of rhs corresponding
9196 to the production that invoked YYERROR. That is how Yacc
9197 behaves, and POSIX requires this behavior.
9198 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9199 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9200 Define 'alarm' to do nothing if unistd.h is not available.
9201 Add a new rule "exp: '-' error;" to test the above change to
9202 data/yacc.c. Use 'alarm' to abort any test taking longer than
9203 10 seconds, as it's probably looping.
9204 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9205 Also, the new yacc.c generates two fewer diagnostics for an
9206 existing test.
9207
d0829076
PE
92082003-05-24 Paul Eggert <eggert@twinsun.com>
9209
c6ae27df
PE
9210 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9211 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9212 This fixes a problem reported by John Bowman when the Compaq/HP
9213 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9214 -ansi -Wall -gall).
9215 * data/yacc.c (union yyalloc): Likewise.
9216 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 9217
d0829076
PE
9218 Switch from 'int' to 'bool' where that makes sense.
9219
9220 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9221 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9222 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9223 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9224 Return or accept bool, not int. All callers changed.
9225 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9226 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9227 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9228 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9229 bitset_or_and_cmp_): Likewise.
9230 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9231 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9232 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9233 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9234 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9235 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9236 bitset_stats_or_and_cmp): Likewise.
9237 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9238 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9239 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9240 ebitset_xor_cmp): Likewise.
9241 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9242 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9243 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9244 lbitset_xor_cmp): Likewise.
9245 * lib/bbitset.h: Include <stdbool.h>.
9246 (struct bitset_vtable): The following members now return bool, not
9247 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9248 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9249 or_and_cmp).
9250 * src/conflicts.c (count_rr_conflicts): Likewise.
9251 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9252 All uses changed.
9253 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9254 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9255 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9256 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9257 graph_flag): Likewise.
9258 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9259 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9260 graph_flag): Likewise.
9261 * src/output.c (error_verbose): Likewise.
9262 * src/output.h (error_verbose): Likewise.
9263 * src/reader.c (start_flag, typed): Likewise.
9264 * src/reader.h (typed): Likewise.
9265 * src/getargs.c (LOCATIONS_OPTION): New constant.
9266 (long_options, getargs): Use it.
9267 * src/lalr.c (build_relations): Use bool, not int.
9268 * src/nullable.c (nullable_compute): Likewise.
9269 * src/print.c (print_reductions): Likewise.
9270 * src/tables.c (action_row, pack_vector): Likewise.
9271 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9272 * src/output.c (prepare): Use it.
9273 * src/output.c (token_definitions_output,
9274 symbol_destructors_output, symbol_destructors_output): Use string,
9275 not boolean integer, to keep track of whether to output separator.
9276 * src/print_graph.c (print_core): Likewise.
9277 * src/state.c (state_rule_lookaheads_print): Likewise.
9278
9279 * config/install-sh: Sync from automake 1.7.5.
9280
6b2584b7
PE
92812003-05-14 Paul Eggert <eggert@twinsun.com>
9282
9283 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9284 semicolon after a grammar declaration, in the interest of possible
9285 future changes to the Bison input language.
9286 Do not allow a stray semicolon at the start of the grammar.
9287 (rhses.1): Allow one or more semicolons after any rule, including
9288 just before "|" as required by POSIX.
9289 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9290 grammar.
9291
caf37a36
ADL
92922003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9293
9294 %parse-param support for lalr1.cc.
9295
9296 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9297 b4_cc_constructor_calls, b4_cc_constructor_call,
9298 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9299 definitions.
9300 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9301 parse-param arguments.
9302 (yy::b4_parser_class_name): Declare instance variables to
9303 hold parse-param arguments.
9304 * tests/calc.at: s/value/semantic_value/ because value clashes
9305 with a member of yy::b4_parser_class_name. Adjust C++ code
9306 to handle %parse-param. Enable %parse-param test in C++.
9307
3ab37077
PE
93082003-05-12 Paul Eggert <eggert@twinsun.com>
9309
9310 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9311 English a bit. Fix fclose typo. Change "const char" to "char
9312 const", and use ANSI C rather than K&R for "main". Suggest
9313 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9314 and suggest yy_switch_to_buffer.
9315
93162003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
9317
9318 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9319 C89. This avoids a diagnostic on compilers that define __STDC__
9320 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 9321 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 9322
e743727f
PE
93232003-05-03 Paul Eggert <eggert@twinsun.com>
9324
9325 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9326 Do not overrun array bounds.
9327 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 9328 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 9329
916708d5
AD
93302003-04-29 Akim Demaille <akim@epita.fr>
9331
9332 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9333 * src/getargs.c, src/getargs.h: here, as bool, not int.
9334 (nondeterministic_parser): New.
9335 * src/parse-gram.y, src/scan-gram.l: Support
9336 %nondeterministic-parser.
9337 * src/output.c (prepare): Use nondeterministic_parser instead
9338 of glr_parser where appropriate.
9339 * src/tables.c (conflict_row, action_row, save_row)
9340 (token_actions, token_actions, pack_vector): Ditto.
9341
a06ea4aa
AD
93422003-04-29 Akim Demaille <akim@epita.fr>
9343
9344 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9345
211074ca
AD
93462003-04-29 Akim Demaille <akim@epita.fr>
9347
9348 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9349 with %pure-parser and %locations to exercise the patch from Yakov
9350 Markovitch below.
9351
6175ffe3
PE
93522003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9353
9354 * data/yacc.c: (b4_lex_param): Corrected for the case where
9355 %lex-param is provided and %pure-parser isn't.
9356
b1e95857
PE
93572003-04-27 Paul Eggert <eggert@twinsun.com>
9358
9359 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 9360 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
9361 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9362 if it is not defined.
9363 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9364
acda9df6
PE
93652003-04-26 Paul Eggert <eggert@twinsun.com>
9366
3470c57b
PE
9367 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9368 Declare to be of type suitable for the ninf value itself, not of
9369 type suitable for the corresponding table, since the latter might
9370 be unsigned but the ninf value might be negative. This fixes a
9371 bug reported by Alexandre Duret-Lutz in
161a71f3 9372 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 9373
acda9df6
PE
9374 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9375 invokes it. We shouldn't invoke it twice because it will attempt
9376 to put error.o in the archive twice. This fixes a glitch reported
9377 by Martin Mokrejs in
161a71f3 9378 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 9379
b5250f26
PE
93802003-04-21 Paul Eggert <eggert@twinsun.com>
9381
9382 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9383 to gnulib.
9384
089ac0f1
PE
93852003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9386
9387 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9388 Fix obvious typo that results in uncompilable GLR parsers
9389 when both %pure-parser and %locations are used. (trivial change)
9390
5ededac6
PE
93912003-04-17 Paul Eggert <eggert@twinsun.com>
9392
1b8f2fff
PE
9393 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9394 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9395 Do not insert the expected token via unput, as this runs afoul
9396 of a POSIX-compatibility bug in flex 2.5.31.
9397 All uses changed to BEGIN the parent state,
9398 since we no longer insert the expected token via unput.
9399 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9400 that is no longer emitted after the above change.
9401
5ededac6
PE
9402 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9403 the first one. This change is from Paul Hilfinger, and it fixes
9404 regression reported by Werner Lemberg in
161a71f3 9405 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
9406
9407 (resolve_sr_conflict): Don't invoke state_errs_set
9408 unless one or more tokens have been explicitly made errors.
9409 Otherwise, the above change causes Bison to abort.
9410
9411 * tests/existing.at (GNU pic Grammar): New test case, taken from
9412 Lemberg's email.
9413
b8be9132
AD
94142003-03-31 Akim Demaille <akim@epita.fr>
9415
9416 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9417
d423d460
AD
94182003-03-31 Akim Demaille <akim@epita.fr>
9419
9420 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9421 output.
9422
c7e441b4
AD
94232003-03-31 Akim Demaille <akim@epita.fr>
9424
9425 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9426 From Paul Hilfinger.
9427
231897ad
AD
94282003-03-29 Akim Demaille <akim@epita.fr>
9429
9430 * m4/error.m4: Do not put under dynamic conditions some code which
9431 expansion is under static control.
9432
5b066063
AD
94332003-03-29 Akim Demaille <akim@epita.fr>
9434
9435 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9436
22a74fec
AD
94372003-03-29 Akim Demaille <akim@epita.fr>
9438
9439 * doc/bison.texinfo (Strings are Destroyed): New.
9440
0eee27e7
PE
94412003-03-13 Paul Eggert <eggert@twinsun.com>
9442
9443 * .cvsignore: Add configure.lineno.
9444 * src/.cvsignore: Add yacc.
9445 * tests/.cvsignore: Add testsuite.log.
9446 * doc/fdl.texi: Sync with latest FSF version.
9447
f61aad93
PE
94482003-03-12 Paul Eggert <eggert@twinsun.com>
9449
537636c7
PE
9450 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9451 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9452 cursor, instead of leaving it undefined. This fixes a bug
9453 reported by Tim Van Holder in
161a71f3 9454 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
9455 * tests/input.at (Torturing the Scanner): Test the scanner on
9456 an empty input file, which was Tim Van Holder's test case.
9457
9458 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9459 <sys/resource.h> can be included, include sys/time.h and
9460 sys/times.h first, if available. This works around the SunOS
9461 4.1.4 porting bug reported by Bruce Becker in
161a71f3 9462 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
9463
9464 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9465 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9466 AC_HEADER_SYS_WAIT.
9467
f61aad93
PE
9468 Merge changes from gnulib. This was prompted because the CVS
9469 snapshot didn't build on Solaris 7 due to strnlen problems.
9470
9471 These changes need to be merged back into gnulib:
9472 * lib/hash.c: Include <stdbool.h> unconditionally.
9473 * m4/onceonly.m4 (m4_quote): New macro.
9474 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9475 Quote AC_FOREACH variable-expansions properly.
9476 The 2003-01-03 obstack.h change also needs merging.
9477 {end of changes requiring merging}
5b066063 9478
f61aad93
PE
9479 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9480 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9481 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9482 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9483 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9484 New files, imported from gnulib.
9485 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9486 above.
9487
9488 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9489 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9490 gnulib sources.
9491
9492 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9493 Add.
9494 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9495 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9496 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9497 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9498 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9499 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9500 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9501 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9502 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9503 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9504 (jm_PREREQ_ARGMATCH): Remove.
9505 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9506 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9507
9508 * src/system.h: Include <stdbool.h> unconditionally.
9509
9510 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9511 assuming at least C89 in the bitset code for some time now.
9512
d2ffe116
AD
95132003-03-03 Akim Demaille <akim@epita.fr>
9514
9515 * ro.po: New.
9516
052826fd
AD
95172003-03-02 Akim Demaille <akim@epita.fr>
9518
9519 * doc/bison.texinfo (Table of Symbols): Reactivate the
9520 documentation for %lex-param, and %parse-param.
9521
c4749565
AD
95222003-03-02 Akim Demaille <akim@epita.fr>
9523
9524 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9525 generate verbose error messages.
9526 Use the number of tokens as an upper bound in yytname, as it
9527 cannot be a non terminal.
9528
d5286af1
AD
95292003-03-02 Akim Demaille <akim@epita.fr>
9530
9531 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9532 message.
9533
22e304a6
AD
95342003-03-02 Akim Demaille <akim@epita.fr>
9535
22e304a6
AD
9536 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9537 Use them to exercise yycheck overrun.
9538 Based on Andrew Suffield's grammar.
9539
67a25fed
AD
95402003-03-02 Akim Demaille <akim@epita.fr>
9541
9542 Create tests/local.at for Bison generic testing macros.
9543
9544 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9545 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9546 This new file.
9547 * tests/calc.at (AT_CHECK_CALC): Adjust.
9548 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9549 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9550 * tests/local.at: here.
9551 (AT_COMPILE_CXX): Tags the tests using it as c++.
9552 Ignore the test if CXX is not functional.
9553
9c2b381f
PE
95542003-03-01 Paul Eggert <eggert@twinsun.com>
9555
9556 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9557 not loc->end, since loc->end might contain garbage and this leads
9558 to undefined behavior on some platforms.
9559 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9560 depend on *loc, so that the reader doesn't give the the false
9561 impression that *loc is initialized.
9562 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9563 does not survive the return.
9564
0433ba88
AD
95652003-03-01 Akim Demaille <akim@epita.fr>
9566
9567 * src/scan-gram.l (code_start): Always initialize it when entering
9568 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9569 yylex invocation. An alternative would be making it static, but
9570 then it starts with the second %%'s beginning, instead of its end.
9571
b305ea69
PE
95722003-02-28 Paul Eggert <eggert@twinsun.com>
9573
9574 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9575 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 9576 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 9577
c3d25e01
PE
95782003-02-26 Paul Eggert <eggert@twinsun.com>
9579
9580 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9581 Remove Sequent/Pyramid discussion (nobody uses them any more).
9582 Merge VMS and MS-DOS discussion; these ports may well be dead
9583 but let's keep mentioning them for now. Put <> around email
9584 addresses. Add copyright notice.
9585
c267ffbc
PE
95862003-02-24 Paul Eggert <eggert@twinsun.com>
9587
9588 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9589 to avoid collision with flex use of yylineno.
9590 Problem reported by Bruce Lilly in
161a71f3 9591 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
9592 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9593 * data/yacc.c (yy_reduce_print): Likewise.
9594
9595 * config/depcomp: Sync with Automake 1.7.3.
9596
f939fc12
AD
95972003-02-21 Akim Demaille <akim@epita.fr>
9598
9599 * data/lalr1.cc: Use temporary variables instead of casts to
9600 change integer types.
9601 Suggested by Paul Eggert.
9602
95923bd6
AD
96032003-02-21 Akim Demaille <akim@epita.fr>
9604
9605 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9606 to avoid confusions with lalr1.cc's notion of Position.
9607 Suggested by Paul Eggert.
9608
2cdc240e
AD
96092003-02-20 Akim Demaille <akim@epita.fr>
9610
9611 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9612 before initial_columns.
9613 (location.hh): Use consistent variable names when defining the
9614 operator<<.
9615 Use "last" so that we subtract from Positions, not from unsigned.
9616
5d003116
AD
96172003-02-20 Akim Demaille <akim@epita.fr>
9618
9619 * data/lalr1.cc (position.hh): New subfile, including the extended
9620 and Doxygen'ed documentation of class Position.
9621 (location.hh): Use it.
9622 Document a` la Doxygen.
ba1ecc07 9623 With the help of Benoit Perrot.
5d003116 9624
d02b25f9
AD
96252003-02-20 Akim Demaille <akim@epita.fr>
9626
9627 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9628 AT_YACC_IF.
9629 Redefine AT_YYERROR_SEES_LOC_IF using it.
9630 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9631 not defined.
9632 Don't use the location in yy::Parser::error_ and
9633 yy::Parser::print_ when not %locations.
9634 Activate more lalr1.cc tests.
9635
0d1c3a04
AD
96362003-02-19 Akim Demaille <akim@epita.fr>
9637
9638 * data/lalr1.cc: When displaying a line number, be sure to make it
9639 an int.
9640
60a777aa
AD
96412003-02-19 Akim Demaille <akim@epita.fr>
9642
9643 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9644 Remove, useless.
9645 (YYABORT, YYACCEPT, YYERROR): New.
9646 * tests/calc.at: Renable the lalr1.cc test.
9647
0b86fc41
AD
96482003-02-19 Akim Demaille <akim@epita.fr>
9649
9650 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9651 error recovery, mixing with/without pops and discarding of the
9652 lookahead.
9653 Exercise YYERROR.
9654 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9655
da99a5dc
PE
96562003-02-17 Paul Eggert <eggert@twinsun.com>
9657
9658 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9659 * tests/testsuite.at (AT_COMPILE): Use them.
9660 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 9661 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 9662
93b8c255
PE
96632003-02-12 Paul Eggert <eggert@twinsun.com>
9664
9665 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9666 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 9667 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
9668 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9669 Check for malloc failure, for consistency with yacc.c.
9670 (yytname_size): Remove, for consistency with yacc.c.
9671
9672 The bug still remains in data/lalr1.cc, as I didn't have time
9673 to fix it there.
9674
7548fed2
AD
96752003-02-06 Akim Demaille <akim@epita.fr>
9676
9677 * configure.ac (GXX): Rename as...
9678 (CXX): this, to keep the original Autoconf semantics.
9679 Require 2.57.
9680 * data/lalr1.cc: Fix b4_copyright invocations.
9681 If YYDEBUG is not defined, don't depend upon name_ being defined.
9682 (location.hh): Include string and iostream.
9683 (Position::filename): New member.
9684 (Position::Position ()): New.
9685 (operator<< (Position)): New.
9686 (operator- (Position, int)): New.
9687 (Location::first, Location::last): Rename as...
9688 (Location::begin, Location::end): these, to mock the conventional
9689 iterator names.
9690 (operator<< (Location)): New.
9691 * tests/atlocal.in (CXX): New.
9692 * tests/testsuite.at (AT_COMPILE_CXX): New.
9693 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9694 locations in a more synthetic way.
9695 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9696 lalr1.cc is used.
9697 Adjust the C locations to match those from Emacs: first column is
9698 column 0.
9699 Change all the expected results.
9700 Conform to the GCS: simplify the locations when applicable.
9701 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9702 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9703 these CPP macros with the m4 macros new defined by...
9704 (AT_CHECK_PUSHDEFS): this, i.e.:
9705 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 9706 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
9707 New macros.
9708 (AT_CHECK_POPDEFS): Undefine them.
9709 (AT_CHECK_CALC_LALR1_CC): New.
9710 Use it for the first lalr1.cc test.
9711
43a176ef
AD
97122003-02-04 Akim Demaille <akim@epita.fr>
9713
9714 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9715 Location as is defined.
9716
fc049e9c
AD
97172003-02-04 Akim Demaille <akim@epita.fr>
9718
9719 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9720 name_ being defined.
9721
a737b216
PE
97222003-02-03 Paul Eggert <eggert@twinsun.com>
9723
9724 * src/gram.h (start_symbol): Remove unused decl.
9725
9726 Use more-consistent naming conventions for local vars.
9727
9728 * src/derives.c (derives_compute): Change type of local var from
9729 int to rule_number.
9730 * src/gram.c (grammar_rules_partial_print): Likewise.
9731 * src/print.c (print_core): Likewise.
9732 * src/reduce.c (reduce_grammar_tables): Likewise.
9733
9734 * src/gram.c (grammar_dump): Change name of item_number *
9735 local var from r to rp.
9736 * src/nullable.c (nullable_compute): Likewise.
9737
9738 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9739
9740 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9741 for symbol or symbol_number var.
9742 * src/reader.c (grammar_start_symbol_set): Likewise.
9743 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9744 Likewise.
9745 * src/state.c (transitions_to): Likewise.
9746 * src/state.h: Likewise.
9747 * src/tables.c (symbol_number_to_vector_number): Likewise.
9748
9749 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9750 char * var.
9751
9752 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9753 var.
9754
9755 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9756 var.
9757
9758 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9759 Use str, not s, for char * var. Use ch, not c, for character var.
9760 Use size for size var.
9761
9762 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9763 char * var.
9764 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9765 uniqstr var.
9766 * src/uniqstr.h: Likewise.
9767
9768 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9769 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9770 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9771 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9772 param to have same name as that of enum, so that we don't use
9773 "s" to stand for a non-state.
9774
68e93ad5
AD
97752003-02-02 Akim Demaille <akim@epita.fr>
9776
9777 * src/scan-skel.l: Scan more than one inert character per yylex
9778 invocation.
9779
92898986
PE
97802003-02-01 Paul Eggert <eggert@twinsun.com>
9781
9782 Version 1.875a.
9783
1d9d5d71
PE
9784 * po/LINGUAS: Add ms.
9785
0435d061
AD
97862003-01-30 Akim Demaille <akim@epita.fr>
9787
9788 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9789
6029a57f
PH
97902003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9791
9792 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9793 of $1.
0435d061
AD
9794
9795 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 9796 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 9797 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 9798
6029a57f
PH
9799 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9800 (b4_rhs_location): Ditto.
0435d061 9801 (yyfill): New function to copy from stack tree into array
6029a57f 9802 incrementally.
0435d061
AD
9803 (yyuserAction): Modify to allow incremental move of semantic values
9804 to rhs array when in GLR mode.
9805 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
9806 as needed.
9807 Remove dummy use of yystack, as there is now a guaranteed use.
9808 (yydoAction): Modify to allow incremental move of semantic values
9809 to rhs array when in GLR mode.
9810 (yyresolveAction): Ditto.
9811 (yyglrShiftDefer): Update comment.
0435d061 9812 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
9813 (yyglrReduce): Ditto.
9814 (yydoAction): Ditto
0435d061 9815
6029a57f
PH
9816 * tests/glr-regr1.at: Rename to ...
9817 * tests/glr-regression.at: Add new regression test for the problems
9818 described above (adapted from S. Eken).
9819 Update copyright notice.
9820 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9821 * tests/Makefile.am: Ditto.
9822
6cee6297
PE
98232003-01-28 Paul Eggert <eggert@twinsun.com>
9824
9825 * data/lalr1.cc: Do not use @output_header_name@ unless
9826 b4_defines_flag is set. This fixes two bugs reported by
9827 Tim Van Holder in
161a71f3
PE
9828 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9829 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 9830
b2a836b5
PE
98312003-01-21 Paul Eggert <eggert@twinsun.com>
9832
9833 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9834 we don't need to worry about yyerrlab1 being reported as an
9835 "unused label" by non-GCC C compilers. The downside is that if
9836 locations are used then a couple of statements are duplicated each
9837 time YYERROR is invoked, but the upside is that the warnings
9838 should vanish.
9839 (yyerrlab1): Move code to YERROR.
9840 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9841 This reverts some of the 2002-12-27 change.
9842
4196b931
PE
98432003-01-17 Paul Eggert <eggert@twinsun.com>
9844
9845 * src/output.c (symbol_printers_output): Fix typo that led
9846 to core dump. Problem reported by Antonio Rus in
161a71f3 9847 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 9848
3ae831b4
AD
98492003-01-13 Akim Demaille <akim@epita.fr>,
9850 Quoc Peyrot <chojin@lrde.epita.fr>,
9851 Robert Anisko <anisko_r@lrde.epita.fr>
9852
9853 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9854 when the stacks contain one element, as the loop would otherwise
9855 free the last state, and then use the top state (the one we just
9856 popped). This means that the initial elements will not be freed
9857 explicitly, as is the case in yacc.c; it is not a problem, as
9858 these elements have fake values.
9859
e3aa65c5
PE
98602003-01-11 Paul Eggert <eggert@twinsun.com>
9861
9862 * NEWS: %expect-violations are now just warnings, reverting
9863 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9864 bootstrapping problem reported by Matthias Klose; see
161a71f3 9865 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
9866 * src/conflicts.c (conflicts_print): Likewise.
9867 * tests/conflicts.at (%expect not enough, %expect too much,
9868 %expect with reduce conflicts): Likewise.
9869 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9870 that the warning is enabled if the number of conflicts changes
9871 (not necessarily increases).
9872
9873 * src/getargs.c (version): Update copyright year.
9874
f0057011
AD
98752003-01-09 Akim Demaille <akim@epita.fr>
9876
9877 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9878
1ee6d2a0
PE
98792003-01-08 Paul Eggert <eggert@twinsun.com>
9880
9881 * Makefile.maint (WGETFLAGS):
9882 New macro, containing "-C off" to disable proxy caches.
9883 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9884 (rel-check): Use $(WGET) instead of wget.
9885
d4fd77c4
PE
98862003-01-06 Paul Eggert <eggert@twinsun.com>
9887
9888 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9889 the GLR paper of Scott, Johnstone and Hussain.
9890
464c6927
PE
98912003-01-04 Paul Eggert <eggert@twinsun.com>
9892
d600ee67
PE
9893 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9894 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9895 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9896 (EXTRA_LIBRARIES): New var, for liby.a.
9897 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9898 (EXTRA_SCRIPTS): New var, for yacc.
9899
464c6927
PE
9900 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9901 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9902 Problem reported by Nelson H. F. Beebe.
9903
99042003-01-03 Paul Eggert <eggert@twinsun.com>
9905
9906 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9907 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9908 when compiling Bison 1.875's `bitset bset = obstack_alloc
9909 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9910
9911 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9912 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9913 grow to a huge size with typical invocation.
d600ee67 9914
464c6927
PE
9915 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9916 Use the pattern recommended by Autoconf 2.57, except also protect
9917 against double-definition.
9918 * src/system.h: Likewise.
9919 Portability issues reported by Nelson H. F. Beebe.
d600ee67 9920
464c6927
PE
9921 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9922 All uses changed. Provide a definition in both C and C++.
9923 (yytrue, yyfalse): Define even if defined (__cplusplus).
9924
9925 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9926 Reported by Nelson H. F. Beebe.
d600ee67 9927
464c6927
PE
9928 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9929
0f42c7d5
PE
99302003-01-02 Paul Eggert <eggert@twinsun.com>
9931
9932 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9933 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9934 Bug reported by Nelson H. F. Beebe.
9935
dc546b0f
PE
99362003-01-01 Paul Eggert <eggert@twinsun.com>
9937
9938 * Version 1.875.
9939
2c09b6a7
PE
99402002-12-30 Paul Eggert <eggert@twinsun.com>
9941
9942 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9943 Moved here from...
9944 (<INITIAL>","): Here. This causes stray "," to be treated
9945 more uniformly.
9946
dc546b0f 9947 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
9948 last brace in braced code when not in Yacc mode, for compatibility
9949 with Bison 1.35. This resurrects the 2001-12-15 patch to
9950 src/reader.c.
9951
9952 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9953 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9954
535c0f63
PE
99552002-12-28 Paul Eggert <eggert@twinsun.com>
9956
9957 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9958 that of SYM's type. This fixes Debian bug 168069, reported by
9959 Thomas Olsson.
d600ee67 9960
963fcc17
PE
99612002-12-28 Paul Eggert <eggert@twinsun.com>
9962
9963 Version 1.75f.
9964
9965 Switch back to the Yacc style of conflict reports, undoing some
9966 of the 2002-07-30 change.
9967 * doc/bison.texinfo (Understanding): Use Yacc style for
9968 conflict reports. Also, use new way of locating rules.
9969 * src/conflicts.c (conflict_report):
9970 Renamed from conflict_report_yacc, removing the old
9971 'conflict_report'. Translate the entire conflict report at once,
9972 so that we don't assume that "," has the same interpretation in
9973 all languages.
9974 (conflicts_output): Use Yacc-style conflict report for each state,
9975 instead of our more-complicated style.
9976 (conflicts_print): Use Yacc-style conflict report, except print
9977 the input file name when not emulating Yacc.
9978 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9979 Conflicted Reduction, %expect not enough, %expect too much,
9980 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9981 * tests/existing.at (GNU Cim Grammar): Likewise.
9982 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9983
9984 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9985 fatal): Don't invoke fflush; it's not needed and it might even be
9986 harmful for stdout, as stdout might not be open.
9987 * src/reduce.c (reduce_print): Likewise.
9988
b1efe548
PE
99892002-12-27 Paul Eggert <eggert@twinsun.com>
9990
9991 Fix a bug where error locations were not being recorded correctly.
9992 This problem was originally reported by Paul Hilfinger in
161a71f3 9993 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
9994
9995 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9996 top of the location stack's error locations.
9997 (yyerrlab): Set it. When discarding a token, push its location
9998 onto yylerrsp so that we don't lose track of the error's end.
9999 (yyerrlab1): Now is only the target of YYERROR, so that we can
10000 properly record the location of the action that failed. For GCC
10001 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10002 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10003 (yyerrlab2): New label, which yyerrlab now falls through to.
10004 Compute the error's location by applying YYLLOC_DEFAULT to
10005 the locations of all the symbols that went into the error.
10006 * doc/bison.texinfo (Location Default Action): Mention that
10007 YYLLOC_DEFAULT is also invoked for syntax errors.
10008 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10009 Error locations include the locations of all the tokens that were
10010 discarded, not just the last token.
d600ee67 10011
983c5c2c
PE
100122002-12-26 Paul Eggert <eggert@twinsun.com>
10013
b1efe548
PE
10014 * src/files.c: Include quote.h.
10015 (compute_output_file_names): Warn if we detect conflicting
10016 outputs to the same file. This should catch the misunderstanding
10017 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10018
10019 * src/conflicts.c (conflicts_print): If the user specifies
10020 "%expect N", report an error if there are any reduce/reduce
10021 conflicts. This is what the manual says should happen.
10022 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10023 * tests/conflicts.at (%expect with reduce conflicts): New test.
10024
983c5c2c
PE
10025 Don't use m4_include on relative file names, as it doesn't work as
10026 desired if there happens to be a file with that name under ".".
d600ee67 10027
983c5c2c
PE
10028 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10029 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10030 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10031 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10032 * src/output.c (output_skeleton): Use full path names when
10033 specifying a file to include; don't rely on include path, as
10034 it's unreliable when the working file contains a file with
10035 that name.
d600ee67 10036
983c5c2c
PE
100372002-12-25 Paul Eggert <eggert@twinsun.com>
10038
10039 Remove obsolete references to bison.simple and bison.hairy.
10040 Problem mentioned by Aubin Mahe in
161a71f3 10041 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
10042 * data/glr.c: Comment fix.
10043 * doc/bison.1: Remove references. Also, mention "yacc".
10044
10045 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10046 with -g option.
10047
10048 * src/parse-gram.y (declaration): Use enum "report_states" rather
10049 than its numeric value 1.
10050
10051 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10052 opening a new one. This fixes Debian bug 165349, reported by
10053 Bruce Stephens.
10054
23f2d9dc
PE
100552002-12-24 Paul Eggert <eggert@twinsun.com>
10056
10057 Version 1.75e.
10058
10059 * Makefile.maint (cvs-update): Don't assume that the shell
10060 supports $(...), as Solaris sh doesn't.
10061
10062 * src/parse-gram.y (lloc_default): Remove test for empty
10063 nonterminals at the end, since it didn't change the result.
10064
100652002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
10066
10067 If the user does not define YYSTYPE as a macro, Bison now declares it
10068 using typedef instead of defining it as a macro. POSIX requires this.
10069 For consistency, YYLTYPE is also declared instead of defined.
10070
10071 %union directives can now have a tag before the `{', e.g., the
10072 directive `%union foo {...}' now generates the C code
10073 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10074 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10075 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10076 instead of `yyltype'.
10077
10078 `yystype' and `yyltype' are now obsolescent macros instead of being
10079 typedefs or tags; they are no longer documented and will be
10080 withdrawn in a future release.
10081
10082 * data/glr.c (b4_location_type): Remove.
10083 (YYSTYPE): Renamed from yystype.
10084 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10085 (struct YYLTYPE): Renamed from struct yyltype.
10086 (YYLTYPE): Renamed from yyltype.
10087 (yyltype, yystype): New (and obsolescent) macros,
10088 for backward compatibility.
10089 * data/yacc.c: Likewise.
10090
10091 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10092 does not specify a union tag. This is for compatibility with
10093 Solaris 9 yacc.
10094
10095 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10096 const *, since it is now modified by stripping surrounding { }.
10097 (current_braced_code): Remove.
10098 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10099 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10100 trailing " {...}". Now of type <chars>.
10101 (grammar_declaration): Adjust to bundled tokens.
10102 (code_content): Remove; stripping is now done by add_param.
10103 (print_token_value): Print contents of bundled tokens.
10104 (token_name): New function.
10105
10106 * src/reader.h (braced_code, current_braced_code): Remove.
10107 (token_name): New decl.
10108
10109 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10110 token_type, not braced_code code_kind. All uses changed.
10111 (SC_PRE_CODE): New state, for scanning after a keyword that
10112 has (or usually has) an immediately-following braced code.
10113 (token_type): New local var, to keep track of which token type
10114 to return when scanning braced code.
10115 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 10116 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
10117 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10118 instead of returning a token type immediately.
10119 (<INITIAL>"{"): Set token type.
10120 (<SC_BRACED_CODE>"}"): Use it.
10121 (handle_action_dollar, handle_action_at): Now returns bool
10122 indicating success. Fail if ! current_rule; this prevents a core dump.
10123 (handle_symbol_code_dollar, handle_symbol_code_at):
10124 Remove; merge body into caller.
10125 (handle_dollar, handle_at): Complain in invalid contexts.
10126
10127 * NEWS, doc/bison.texinfo: Document the above.
10128 * NEWS: Fix years and program names in copyright notice.
10129
879ca4f8
PE
101302002-12-17 Paul Eggert <eggert@twinsun.com>
10131
10132 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10133 Reporting, Table of Symbols): Omit mentions of %lex-param and
10134 %parse-param from the documentation for now.
10135
1c5fe69d
PE
101362002-12-15 Paul Eggert <eggert@twinsun.com>
10137
10138 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10139 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10140 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
10141 disagreed with the Bison documentation. Bug
10142 reported by Andrew Walrond.
d600ee67 10143
1c5fe69d
PE
10144 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10145 as the caller now does that.
10146 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10147 (YYEMPTY): Parenthesize right hand side, since others use it.
10148 (yyparse): Don't assume that our generated code is the only code
10149 that sets yychar.
10150
d1de5372
PE
101512002-12-13 Paul Eggert <eggert@twinsun.com>
10152
10153 Version 1.75d.
10154
10155 POSIX requires a "yacc" command.
10156 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10157 (MOSTLYCLEANFILES): Add yacc.
10158 (yacc): New rule.
1c5fe69d 10159 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
10160 as an alias for bison y.
10161
10162 * po/LINGUAS: Add da.
d600ee67 10163
d1de5372
PE
10164 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10165 problem with latest <getopt.h>.
10166 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10167
10168 * doc/fdl.texi: Upgrade to 1.2.
10169 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10170 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10171 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10172 gnulib.
10173 * config/install-sh: Sync with autotools.
10174
10175 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 10176 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
10177 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10178 locations are requested.
10179 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10180 locations are requested.
10181
d0f3fe23
PE
101822002-12-12 Paul Eggert <eggert@twinsun.com>
10183
10184 Remove unportable casts and storage allocation tricks.
10185 While we're at it, remove almost all casts, since they
10186 usually aren't needed and are a sign of trouble.
10187
10188 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10189
10190 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10191 the pointer DSET returned by malloc; this isn't portable.
10192 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10193 Similarly for DERIVES.
10194 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10195 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10196 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10197
10198 * src/derives.c (derives_compute): Do not bother invoking
10199 int_of_rule_number, since rule numbers are integers.
10200
10201 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10202 rather than XMALLOC (char, N).
10203
10204 * src/files.c (filename_split): Rewrite to avoid cast.
10205
10206 * src/gram.h (symbol_number_as_item_number,
10207 item_number_as_symbol_number, rule_number_as_item_number,
10208 item_number_as_rule_number):
10209 Now inline functions rather than macros, to avoid casts.
10210 * src/state.h (state_number_as_int): Likewise.
10211 * src/tables.c (state_number_to_vector_number,
10212 symbol_number_to_vector_number): Likewise.
10213
10214 * src/gram.h (int_of_rule_number): Remove; no longer used.
10215
10216 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10217 since the resulting storage is always stored into.
10218
10219 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10220 where it's needed.
10221
10222 * src/muscle_tab.c (muscle_m4_output):
10223 Now inline. Return bool, not int.
10224 * src/state.c (state_compare): Likewise.
10225 * src/symtab.c (symbol_check_defined,
10226 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10227 hash_compare_symbol, hash_symbol):
10228 Likewise.
10229 * src/uniqstr.c (uniqstr_print): Likewise.
10230 * src/muscle_tab.c (muscle_m4_output_processor):
10231 New function, to avoid casts.
10232 * src/state.c (state_comparator, stage_hasher): Likewise.
10233 * src/symtab.c (symbol_check_defined_processor,
10234 symbol_check_alias_consistency_processor, symbol_pack_processor,
10235 symbol_translation_processor, hash_symbol_comparator,
10236 hash_symbol_hasher): Likewise.
10237 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10238 * src/muscle_tab.c (muscles_m4_output):
10239 Use new functions instead of casting old functions unportably.
10240 * src/state.c (state_hash_new): Likewise.
10241 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10242 symbols_token_translations_init):
10243 Likewise.
10244 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10245
10246 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10247 var instead of casting to long, to avoid casts.
10248 (prepare_states): Use MALLOC rather than alloca, so that we don't
10249 have to worry about alloca.
10250 * src/state.c (state_hash_lookup): Likewise.
10251
10252 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10253 local var instead of casting to unsigned char, to avoid casts.
10254
10255 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10256 STATE_ALLOC): Remove.
10257 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10258 rather than calloc, and use offsetof to avoid allocating slightly
10259 too much storage.
10260 (state_new): Initialize all members.
10261
10262 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10263
10264 * src/symtab.c (symbol_free): Remove; unused.
10265 (symbol_get): Remove cast in lhs of assignment.
10266 (symbols_do): Now static. Accept generic arguments, not
10267 hashing-related ones.
10268
10269 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10270 (symbol_processor): Remove.
10271 (symbols_do): Remove decl; now static.
10272
10273 * src/system.h (alloca): Remove; decl no longer needed.
10274 (<stddef.h>): Include, for offsetof.
10275 (<inttypes.>, <stdint.h>): Include if available.
10276 (uintptr_t): New type, if system lacks it.
10277 (CALLOC, MALLOC, REALLOC): New macros.
10278 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10279 new macros.
10280
10281 * src/tables.c (table_size): Now int, to pacify GCC.
10282 (table_grow, table_ninf_remap): Use signed table size.
10283 (save_row): Don't bother initializing locals when not needed.
10284 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10285 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10286
10287 * src/vcg.h: Correct misspellings.
10288
10289 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10290
10291
10292 * src/getargs.c (getargs): Don't assume EOF == -1.
10293
26b4a969
PE
102942002-12-09 Paul Eggert <eggert@twinsun.com>
10295
10296 Change identifier spellings to avoid collisions with names
10297 that are reserved by POSIX.
10298
10299 Don't use names ending in _t, since POSIX reserves them.
10300 For consistency, remove _e and _s endings -- they're weren't
10301 needed to remove ambiguity. All uses changed.
10302 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10303 turn was just renamed from struniq_t.
10304 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10305 which in turn was just renamed from struniq_processor_t.
10306 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10307 in turn was renamed from hash_compare_struniq_t.
10308 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10309 (state_list): Renamed from state_list_t.
10310 * src/assoc.h (assoc): Renamed from assoc_t.
10311 * src/conflicts.c (enum conflict_resolution): Renamed from
10312 enum conflict_resolution_e.
10313 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10314 (rule_list): Renamed from rule_list_t.
10315 * src/getargs.h (enum trace): Renamed from enum trace_e.
10316 (enum report): Renamed from enum report_e.
10317 * src/gram.h (item_number): Renamed from item_number_t.
10318 (rule_number): Renamed from rule_number_t.
10319 (struct rule_s): Remove the "rule_s" part; not used.
10320 (rule): Renamed from rule_t.
10321 (rule_filter): Renamed from rule_filter_t.
10322 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10323 (goto_list): Renamed from goto_list_t.
10324 * src/lalr.h (goto_number): Renamed from goto_number_t.
10325 * src/location.h (location): Renamed from location_t.
10326 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10327 and moved here from:
10328 * src/muscle_tab.h (muscle_entry_t): here.
10329 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10330 (rule_list): Renamed from rule_list_t.
10331 * src/print_graph.c (static_graph): Renamed from graph.
10332 * src/reader.h (braced_code): Renamed from braced_code_t.
10333 Remove brace_code_e tag.
10334 * src/relation.h (relation_node): Renamed from relation_node_t.
10335 (relation_nodes): Renamed from relation_nodes_t.
10336 (relation): Renamed from relation_t.
10337 * src/state.h (state_number): Renamed from state_number_t.
10338 (struct state): Renamed from struct state_s.
10339 (state): Renamed from state_t.
10340 (transitions): Renamed from transitions_t. Unused (and
10341 misspelled) transtion_s tag removed.
10342 (errs): Renamed from errs_t. Unused errs_s tag removed.
10343 (reductions): Renamed from reductions_t. Unused tag
10344 reductions_s removed.
10345 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10346 (struct symbol_list): Renamed from struct symbol_list_s.
10347 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10348 (struct symbol): Renamed from struct symbol_s.
10349 (symbol): Renamed from symbol_t.
10350 * src/tables.c (vector_number): Renamed from vector_number_t.
10351 (action_number): Renamed from action_t.
10352 * src/tables.h (base_number): Renamed from base_t.
10353 * src/vcg.h (enum color): Renamed from enum color_e.
10354 (enum textmode): Renamed from enum textmode_e.
10355 (enum shape): Renamed from enum shape_e.
10356 (struct colorentry): Renamed from struct colorentry_s.
10357 (struct classname): Renamed from struct classname_s.
10358 (struct infoname): Renamed from struct infoname_s.
10359 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10360 (enum decision): Renamed from enum decision_e.
10361 (enum orientation): Renamed from enum orientation_e.
10362 (enum alignment): Renamed from enum alignment_e.
10363 (enum arrow_mode): Renamed from enum arrow_mode_e.
10364 (enum crossing_type): Renamed from enum crossing_type_e.
10365 (enum view): Renamed from enum view_e.
10366 (struct node): Renamed from struct node_s.
10367 (node): Renamed from node_t.
10368 (enum linestyle): Renamed from enum linestyle_e.
10369 (enum arrowstyle): Renamed from enum arrowstyle_e.
10370 (struct edge): Renamed from struct edge.
10371 (edge): Renamed from edge_t.
10372 (struct graph): Renamed from struct graph_s.
10373 (graph): Renamed from graph_t.
10374 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10375 Rename value_t -> value.
10376 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10377 value_t_as_yystype -> value_as_yystype.
10378
10379 Don't include <errno.h> in the mainstream code, since it
10380 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10381 * lib/get-errno.c, lib/get-errno.h: New files.
10382 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10383 get-errno.c.
10384 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10385 * src/output.c (output_skeleton): Likewise.
10386 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10387 instead of errno.
10388 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10389 Likewise.
10390 (handle_action_dollar, handle_action_at): Likewise.
10391 * src/system.h: Do not include <errno.h>.
10392 (TAB_EXT): Renamed from EXT_TAB.
10393 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10394
10395 Avoid str[a-z]*, since <string.h> reserves that name space.
10396 Change all instances of "struniq" in names to "uniqstr", and
10397 likewise for "STRUNIQ" and "UNIQSTR".
10398 * src/uniqstr.c: Renamed from src/struniq.c.
10399 * src/uniqstr.h: Renamed from src/struniq.h.
10400 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10401 * src/files.c (strsuffix): Remove; unused.
10402 (concat2): Renamed from stringappend. Now static.
10403 * src/files.h (strsuffix, stringappend): Remove; unused.
10404 * src/parse-gram.y (<chars>): Renamed from <string>.
10405 (<uniqstr>): Renamed from <struniq>.
10406 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10407 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10408 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10409 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10410 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10411 (N_EXPAND): Renamed from N_STRETCH.
10412
10413 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10414 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10415 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10416 Remove; unused.
10417 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10418 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10419 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10420 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10421 (BASE_MAXIMUM): Renamed from BASE_MAX.
10422 (BASE_MINIMUM): Renamed from BASE_MIN.
10423 (ACTION_MAX): Remove; unused.
10424 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10425 Unnecessary casts removed from above defines.
10426
10427
10428 Fix misspelling in names.
10429 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10430 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10431 G_NODE_ALIGNEMENT.
10432
10433
10434 * lib/timevar.c (timevar_report): Renamed from time_report,
10435 for consistency with other names.
10436 * lib/timevar.h (timevar_report): New decl.
10437 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10438
10439
10440 Sort include-file uses.
10441
10442 Reorder all include files under src to be in the order "system.h".
10443 then the ../lib include files in angle brackets (alphabetized),
10444 then the . include files in double-quotes (alphabetized). Fix
10445 dependency breakages encountered in this process, as follows:
10446 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10447 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10448 * src/state.h: Include "symtab.h".
10449
996b1c7e
PE
104502002-12-08 Paul Eggert <eggert@twinsun.com>
10451
10452 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10453 since this causes problems when __file__ contains character
10454 sequences like "@" that are treated specially by src/scan-skel.l.
10455 Instead, just use the file's basename. This fixes the bug
10456 reported by Martin Mokrejs in
161a71f3 10457 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 10458
e19c4e5d
PE
104592002-12-06 Paul Eggert <eggert@twinsun.com>
10460
10461 Add support for rules that do not have trailing semicolons, as
10462 POSIX requires. Improve the quality of locations in Bison
10463 diagnostics.
26b4a969 10464
e19c4e5d
PE
10465 * src/location.c: Include <quotearg.h>.
10466 (empty_location): Now const.
10467 (location_print): New function. Follow the recommendation of the
10468 GNU Coding Standards for locations that span file boundaries.
10469 * src/location.h: Do not include <quotearg.h>; no longer needed.
10470 (boundary): New type.
10471 (location_t): Use it. This allows locations to span file boundaries.
10472 All member uses changed: file -> start.file or end.file (as needed),
10473 first_line -> start.line, first_column -> start.column,
10474 last_line -> end.line, last_column -> end.column.
10475 (equal_boundaries): New function.
10476 (LOCATION_RESET, LOCATION_STEP): Remove.
10477 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10478 (empty_location): Now const.
10479 (location_print): New decl.
10480 * src/parse-gram.y (lloc_default): New function, which handles
10481 empty locations more accurately.
10482 (YYLLOC_DEFAULT): Use it.
10483 (%token COLON): Remove.
10484 (%token ID_COLON): New token.
26b4a969 10485 (rules): Use it.
e19c4e5d
PE
10486 (declarations, rules): Remove trailing semicolon.
10487 (declaration, rules_or_grammar_declaration):
10488 Allow empty (";") declaration.
10489 (symbol_def): Remove empty actions; no longer needed.
10490 (rules_or_grammar_declaration): Remove trailing semicolon.
10491 (semi_colon.opt): Remove.
10492 * src/reader.h: Include location.h.
10493 (scanner_cursor): New decl.
10494 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10495 rolling our own.
10496 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10497 of *loc.
10498 (STEP): Remove. No longer needed, now that adjust_location does
10499 the work. All uses removed.
10500 (scanner_cursor): New var.
10501 (adjust_location): Renamed from extend_location. It now sets
10502 *loc and adjusts the scanner cursor. All uses changed.
10503 Don't bother testing for CR.
10504 (handle_syncline): Remove location arg; now updates scanner cursor.
10505 All callers changed.
10506 (unexpected_end_of_file): Now accepts start boundary of token or
10507 comment, not location. All callers changed. Update scanner cursor,
10508 not the location.
10509 (SC_AFTER_IDENTIFIER): New state.
10510 (context_state): Renamed from c_context. All uses changed.
10511 (id_loc, code_start, token_start): New local vars.
10512 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10513 processing of Yacc white space and equivalents here.
10514 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10515 instead of returning ID immediately, since we need to search for
10516 a subsequent colon.
10517 (<INITIAL>"'", "\""): Save token_start.
10518 (<INITIAL>"%{", "{", "%%"): Save code_start.
10519 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10520 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10521 BEGIN context_state at end, not INITIAL.
10522 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10523 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10524 Return correct token start.
10525 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10526 the start of a character, string or multiline comment is found.
10527 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10528 Reduction): Adjust reported locations to match the more-precise
10529 results now expected.
10530 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10531 * tests/reduce.at (Useless Rules, Reduced Automaton,
10532 Underivable Rules): Likewise.
10533 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10534 or "|"' now that so many other tokens are allowed by the new grammar.
10535
10536 * src/complain.h (current_file): Remove duplicate decl;
10537 current_file is now owned by files.h.
10538 * src/complain.c, src/scan-gram.l: Include files.h.
10539
105402002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 10541
e19c4e5d
PE
10542 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10543 promotes to int; it might be unsigned int.
10544 * data/yacc.c (yy_reduce_print): Likewise.
10545
10546 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10547 be #defined in the prologue, not in the Bison declarations.
10548 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 10549
b64755e3
PE
105502002-12-02 Paul Eggert <eggert@twinsun.com>
10551
10552 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10553 * lib/strtoul.c: New file, from gnulib.
10554 This fixes a porting bug reported by Peter Klein in
161a71f3 10555 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 10556
6e746484
PE
105572002-11-30 Paul Eggert <eggert@twinsun.com>
10558
b64755e3
PE
10559 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10560 and put only a forward declaration in the prologue. This is for
10561 consistency with the other scanner helper functions.
10562
6ba55592
PE
10563 Type clashes now generate warnings, not errors, since it
10564 appears that POSIX may allow some grammars with type clashes.
10565 * src/reader.c (grammar_current_rule_check): Warn about
10566 type clashes instead of complaining.
10567 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10568
6e746484
PE
10569 Add Yacc library, since POSIX requires it.
10570 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10571 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10572 * lib/main.c, lib/yyerror.c: New files.
10573
10574 gram_error can be static; it need not be extern.
10575 * src/reader.h (gram_error): Remove decl.
10576 * src/parse-gram.y (gram_error): Now static. Add static decl.
10577 (print_token_value): Omit parameter names from forward decl,
10578 for consistency.
10579
88510f9c
PE
105802002-11-29 Paul Eggert <eggert@twinsun.com>
10581
6e746484
PE
10582 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10583 be declared before being used. E.g., one should typically
10584 declare them in the prologue. Use GNU coding style in examples.
10585 Put "const" consistently after the type it modifies. Mention
10586 that C99 supports "inline". Mention that yyerror traditionally
10587 returns "int".
10588
88510f9c
PE
10589 %parse-param and %lex-param now take just one argument, the
10590 declaration; the argument name is deduced from the declaration.
10591
10592 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10593 Reporting, Table of Symbols): Document this.
10594 * src/parse-gram.y (add_param): New function.
10595 (COMMA): Remove.
10596 (declaration): Implement new rule for %parse-param and %lex-param.
10597 * src/scan-gram.l: "," now elicits a warning, rather than being
10598 a token; this is more compatible with byacc.
10599 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10600
bb92250c
PE
106012002-11-27 Paul Eggert <eggert@twinsun.com>
10602
10603 Rename identifiers to avoid real and potential collisions.
10604
10605 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10606 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 10607 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
10608 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10609 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10610 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10611 All uses changed.
10612 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10613 The name "yycontrol" violates the name space rules, and this stuff
10614 wasn't being used anyway.
10615 (input): Remove action; this stuff wasn't being used.
10616 (gram_error): Rename local variable yylloc -> loc.
10617 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10618 (YY_DECL): Don't use "yy" at start of local variables.
10619 All uses changed, e.g., yylloc -> loc.
10620 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10621 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10622 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10623 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10624
10625 * src/parse-gram.y (gram_error): loc is now const *.
10626 * src/reader.h (gram_error): Likewise.
10627
3af4feb2
PE
106282002-11-24 Paul Eggert <eggert@twinsun.com>
10629
10630 Version 1.75c.
10631
10632 * tests/actions.at (Actions after errors): Use an output format
10633 more similar to that of the Printers and Destructors test.
10634 Test the position of the ';' token too.
10635 (Printers and Destructors): Likewise.
10636 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10637 unnecessarily alarming people when the test fails.
10638
10639 * data/yacc.c (yyerrlab1): Move this label down, so that the
10640 parser does not discard the lookahead token if the user code
10641 invokes YYERROR. This change is required for POSIX conformance.
10642
10643 * lib/error.c: Sync with gnulib.
10644
106452002-11-22 Paul Eggert <eggert@twinsun.com>
10646
10647 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10648 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10649 * lib/xmalloc.c: Likewise.
26b4a969 10650
58004308
PE
106512002-11-20 Paul Eggert <eggert@twinsun.com>
10652
10653 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10654
106552002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 10656
58004308
PE
10657 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10658 should use `if (! x) abort ();' rather than `assert (x);', and
10659 anyway it's one less thing to worry about configuring.
10660
10661 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10662 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10663 and replace all instances of assert with abort.
10664 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10665 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10666
10667 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10668 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10669 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10670 hash_find_entry, hash_rehash, hash_insert): Likewise.
10671 * src/conflicts.c (resolve_sr_conflict): Likewise.
10672 * src/lalr.c (set_goto_map, map_goto): Likewise.
10673 * src/nullable.c (nullable_compute): Likewise.
10674 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10675 * src/reader.c (packgram, reader): Likewise.
10676 * src/state.c (state_new, state_free, state_transitions_set,
10677 state_reduction_find): Likewise.
10678 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10679 symbol_pack): Likewise.
10680 * src/tables.c (conflict_row, pack_vector): Likewise.
10681 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10682 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10683 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10684 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10685
10686 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10687 (ARGMATCH_CONSTRAINT): New macro.
10688 (ARGMATCH_ASSERT): Use it.
10689
10690 * src/system.h (verify): New macro.
10691 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10692 rather than assert.
10693 * src/tables.c (tables_generate): Likewise.
10694
10695 * src/struniq.c (struniq_assert): Now returns void, and aborts
10696 if the assertion is false.
10697 (struniq_assert_p): Remove.
10698 * src/struniq.h: Likewise.
10699
76ae8198
PE
107002002-11-18 Paul Eggert <eggert@twinsun.com>
10701
10702 * data/glr.c (yygetLRActions): Replace `yyindex' with
10703 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10704 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 10705 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 10706
d3c4e709
AD
107072002-11-18 Akim Demaille <akim@epita.fr>
10708
10709 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10710 space.
10711 From Tim Van Holder.
10712
8d8a7238
PE
107132002-11-17 Paul Eggert <eggert@twinsun.com>
10714
10715 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10716 to "SyntaxError" for consistency with my 2002-11-15 change.
10717
10718 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10719 not define to {}, since this breaks the common use of `YYDPRINTF
10720 ((...));' if a single statement is desired (e.g. before `else').
10721 Work around GCC warnings by surrounding corresponding calls with
10722 {} if needed.
10723 (yyhasResolvedValue): Remove unused function.
10724 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10725 loop body.
10726 (yyreportSyntaxError): Renamed from yyreportParseError.
10727 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10728 All uses changed.
10729 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10730 extern when possible. Remove unused initializations.
10731
b0937b22
AD
107322002-11-16 Akim Demaille <akim@epita.fr>
10733
10734 Augment the similarity between GLR and LALR traces.
10735
10736 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10737 (YY_REDUCE_PRINT): New.
10738 (yyparse): Use them.
10739 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10740 YYDPRINT here.
10741 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10742 state reached after the reduction/recovery, since...
10743 (yyparse, yyprocessOneStack): Report the state we are entering in.
10744
c5e3e510
AD
107452002-11-16 Akim Demaille <akim@epita.fr>
10746
10747 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10748 Add support for --trace=skeleton.
10749 * src/scan-skel.l: %option debug.
10750 Scan strings of non-@ or \n instead of character by character.
10751 (scan_skel): Handle trace_skeleton.
10752 (QPUTS): New.
10753 (@output_parser_name@, @output_header_name@): ``Restore'' their
10754 support (used to be M4 macros).
10755 * data/yacc.c: Quote larger chunks, a la glr.c.
10756 * data/lalr1.cc: Likewise.
10757 The header guards are no longer available, so use some other
10758 string than `YYLSP_NEEDED'.
10759
4c6cc1db
AD
107602002-11-16 Akim Demaille <akim@epita.fr>
10761
10762 Make the ``Printers and Destructors'' test more verbose, taking
10763 `yacc.c''s behavior as (possibly wrong) reference.
10764
10765 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10766 instead of fprint on stdout.
10767 Set and report the last_line of the symbols.
10768 Consistently display values and locations.
10769
6d9e8019
PE
107702002-11-16 Paul Eggert <eggert@twinsun.com>
10771
10772 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10773
6e649e65
PE
107742002-11-15 Paul Eggert <eggert@twinsun.com>
10775
b25d88f6
PE
10776 * tests/actions.at (Actions after errors): New test case.
10777
6e649e65
PE
10778 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10779 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10780 tests/action.at, tests/calc.at, tests/conflicts.at,
10781 tests/cxx-type.at, tests/regression.at:
10782 "parse error" -> "syntax error" for POSIX compatibility.
10783 "parsing stack overflow..." -> "parser stack overflow" so
10784 that code matches Bison documentation.
10785
0f39aab9
AD
107862002-11-15 Akim Demaille <akim@epita.fr>
10787
10788 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10789 take two BRACED_CODE, not two string_content.
10790 Free the scanner's obstack when we are done.
10791 (code_content): New.
10792 * tests/calc.at: Adjust.
10793 * doc/bison.texinfo: Adjust.
10794 Also, make sure to include the `,' for these declarations.
10795
761c1926
AD
107962002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10797
10798 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10799 definition; avoids potential autoreconf problems.
10800
b0f98b10
AD
108012002-11-15 Akim Demaille <akim@epita.fr>
10802
10803 Always check the value returned by yyparse.
10804
10805 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10806 returned by yyparse.
10807 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10808 Adjust calls.
10809 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10810 returned by yyparse.
10811
970785f1
PH
108122002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10813
10814 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10815 on input.at test.
10816
8fcc7db1
PE
108172002-11-14 Paul Eggert <eggert@twinsun.com>
10818
7ec1b48e
PE
10819 * src/output.c (output_skeleton): Call xfopen instead of
10820 duplicating xfopen's body.
10821
cfff7583 10822 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 10823 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 10824
8fcc7db1
PE
10825 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10826 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10827 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10828 file twice in the grammar, as an extra check.
10829
10830 * tests/input.at (Torturing the Scanner): Surround the
10831 backslash-newline tests with "#if 0", to make it less likely that
10832 we'll run into compiler bugs. Bring back solitary \ inside
10833 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 10834 test backslash-newline in C character constant.
8fcc7db1 10835
4e8d992c
AD
108362002-11-14 Akim Demaille <akim@epita.fr>
10837
10838 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10839 status of the compiler.
f32b346d 10840 Calling `exit 1' is no longer needed.
4e8d992c
AD
10841 Reported by Nelson H. F. Beebe.
10842
9501dc6e
AD
108432002-11-14 Akim Demaille <akim@epita.fr>
10844
10845 * tests/atlocal.in (CPPFLAGS): We have config.h.
10846 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10847 New.
10848 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10849 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10850 * tests/regression.at, tests/torture.at: Use them for all the
10851 grammars that are to be compiled.
10852 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10853 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10854 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10855
18b519c0
AD
108562002-11-14 Akim Demaille <akim@epita.fr>
10857
10858 * doc/bison.texinfo: Various formatting changes (alignments in
10859 samples, additional @group/@end group, GCS in samples.
10860 Use @deffn instead of simple @table to define the directives,
10861 macros, variables etc.
10862
9a86cdb9
PE
108632002-11-13 Paul Eggert <eggert@twinsun.com>
10864
daa33def 10865 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 10866 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 10867
daa33def 10868 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 10869 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
10870 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10871 * tests/headers.at (export YYLTYPE): Likewise.
10872
10873 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 10874 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 10875
9a86cdb9
PE
10876 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10877 comments, since they're not portable. Use GNU coding style.
10878
9c1e26bd
AD
108792002-11-13 Akim Demaille <akim@epita.fr>
10880
10881 * data/yacc.c: Leave bigger chunks of quoted text.
10882 (YYDSYMPRINTF): New.
10883 Use it to report symbol activities.
10884 * data/glr.c (YYDSYMPRINTF): New.
10885 Use it.
10886
87f721cc
PE
108872002-11-12 Paul Eggert <eggert@twinsun.com>
10888
10889 Version 1.75b.
10890
10891 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10892 (yyglrReduce): Return yyok, not 0.
10893 This should avoid the enumerated-type warnings reported
464c6927 10894 by Nelson H. F. Beebe in
161a71f3 10895 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
10896
10897 * lib/bbitset.h (BITSET_INLINE): Remove.
10898 * lib/bitset.h [! BITSET_INLINE]: Remove.
10899 (bitset_set, bitset_reset, bitset_test): Rename local vars
10900 to avoid shadowing warnings by GCC.
10901
10902 * data/glr.c (inline): Remove #define. It's the user's
10903 responsibility to #define it away, just like 'const'.
464c6927 10904 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 10905 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 10906
87f721cc
PE
10907 * Makefile.maint (po-check): Scan .l and .y files instead of the
10908 .c and the .h files that they generate. This fixes the bug
10909 reported by Tim Van Holder in:
161a71f3 10910 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
10911 Look for N_ as well as for _. Try to avoid matching #define for
10912 N_ and _.
10913 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10914 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10915 * src/scan-gram.l: Revamp regular expressions so that " and '
10916 do not confuse xgettext.
10917
10918 * src/struniq.h (struniq_new): Do not declare the return type
10919 to be 'const'; this violates the C standard.
10920 * src/struniq.c (struniq_new): Likewise.
10921
be14ade5
AD
109222002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10923
10924 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10925 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10926 linker.
10927
05291fbc
AD
109282002-11-12 Akim Demaille <akim@epita.fr>
10929
10930 * Makefile.maint: Sync with Autoconf:
10931 (local_updates): New.
10932
1f5fd52e
AD
109332002-11-12 Akim Demaille <akim@epita.fr>
10934
10935 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10936
283f1e64
AD
109372002-11-12 Akim Demaille <akim@epita.fr>
10938
10939 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10940 locations.
10941
886b69d1
AD
109422002-11-12 Akim Demaille <akim@epita.fr>
10943
10944 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10945 not yyvalue.
10946
3df37415
AD
109472002-11-12 Akim Demaille <akim@epita.fr>
10948
10949 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10950 Use it to test the GLR parser.
10951
7bd6c77e
AD
109522002-11-12 Akim Demaille <akim@epita.fr>
10953
10954 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10955 defines it.
10956 * data/glr.c (yystos): New.
10957 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10958 (YYDSYMPRINT): New.
10959 (yyval): Don't define it, it is handled via M4.
10960 (yyrecoverParseError): Free verbosely the discarded symbols.
10961 * data/yacc.c (yysymprint): Remove, rather...
10962 (b4_yysymprint_generate): invoke.
10963 * data/c.m4 (b4_yysymprint_generate): New.
10964 Accept pointers as arguments, as opposed to the version from
10965 yacc.c.
10966 (b4_yydestruct_generate): Likewise.
10967 * tests/cations.at (Printers and Destructors): Use Bison directives
10968 instead of CPP macros.
10969 Don't rely on internal details.
10970
b0400cc6
AD
109712002-11-12 Akim Demaille <akim@epita.fr>
10972
10973 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10974 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10975 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10976 it against YYEMPTY and so forth), work on yytoken (i.e., set
10977 it to YYEMPTY etc.).
10978 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10979 (b4_symbol_actions): Remove.
10980 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10981 for 0, end-of-input.
10982
72f889cc
AD
109832002-11-12 Akim Demaille <akim@epita.fr>
10984
10985 * doc/bison.texinfo (Destructor Decl): New.
10986
b1ae9233
AD
109872002-11-12 Akim Demaille <akim@epita.fr>
10988
10989 * src/tables.c (tables_generate): Use free for pointers that
10990 cannot be NULL, not XFREE.
10991 (pack_vector): Use assert, not fatal, for bound violations.
10992 * src/state.c (state_new): Likewise.
10993 * src/reader.c (reader): Likewise.
10994 * src/lalr.c (set_goto_map): Likewise.
72f889cc 10995 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
10996 the file name.
10997
7ec2d4cd
AD
109982002-11-12 Akim Demaille <akim@epita.fr>
10999
11000 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11001 Restore.
11002 * src/scan-gram.l (last_string): Is global to the file, not to
11003 yylex.
11004 * src/parse-gram.y (input): Don't append the epilogue here,
11005 (epilogue.opt): do it here, and free the scanner's obstack.
11006 * src/reader.c (epilogue_set): Rename as...
11007 (epilogue_augment): this.
11008 * data/c.m4 (b4_epilogue): Defaults to empty.
11009
573a6cd3
AD
110102002-11-12 Akim Demaille <akim@epita.fr>
11011
11012 * src/getargs.c (long_options): Remove duplicates.
11013 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11014 Remove.
11015 * doc/bison.rnh: Remove.
11016 * doc/bison.texinfo (VMS Invocation): Remove.
11017
95612cfa
AD
110182002-11-12 Akim Demaille <akim@epita.fr>
11019
11020 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11021 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11022
11023 Use struniq for symbols.
11024
11025 * src/symtab.h (symbol_t): The tag member is a struniq.
11026 (symbol_type_set): Adjust.
11027 * src/symtab.c (symbol_new): Takes a struniq.
11028 (symbol_free): Don't free the tag member.
11029 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11030 (hash_compare_symbol, hash_symbol): these.
11031 Use the fact that tags as struniqs.
11032 (symbol_get): Use struniq_new.
11033 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11034 Returns a strniq.
11035 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11036 and type members are struniqs.
11037 * src/reader.c (get_merge_function)
11038 (grammar_current_rule_merge_set): Adjust.
11039 (TYPE, current_type): Are struniq.
11040
11041 Use struniq for file names.
11042
11043 * src/files.h, src/files.c (infile): Split into...
11044 (grammar_file, current_file): these.
11045 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11046 * src/reduce.c (reduce_print): Likewise.
11047 * src/getargs.c (getargs): Likewise.
11048 * src/complain.h, src/complain.c: Likewise.
11049 * src/main.c (main): Call struniqs_new early enough to use it for
11050 file names.
11051 Don't free the input file name.
11052
3e6656f9
AD
110532002-11-12 Akim Demaille <akim@epita.fr>
11054
11055 * src/symtab.c (symbol_free): Remove dead deactivated code:
11056 type_name are properly removed.
11057 Don't use XFREE to free items that cannot be NULL.
11058 * src/struniq.h, src/struniq.c: New.
11059 * src/main.c (main): Initialize/free struniqs.
11060 * src/parse-gram.y (%union): Add astruniq member.
11061 (yyprint): Adjust.
11062 * src/scan-gram.l (<{tag}>): Return a struniq.
11063 Free the obstack bit that used to store it.
11064 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11065
7672019c
PE
110662002-11-11 Paul Eggert <eggert@twinsun.com>
11067
11068 Revamp to fix many (but not all) of the C- and M4-related quoting
11069 problems. Among other things, this fixes the Bison bug reported
11070 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 11071 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
11072
11073 Use new @ escapes consistently. Represent brackets with @{ and @}
11074 rather than @<:@ and @:>@, since this works a bit better with dumb
11075 editors like vi. Represent @ with @@, since @ is now consistently
11076 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11077 __ofile__, to avoid unexpected expansions. Similarly, use @output
11078 rather than #output.
11079
11080 * data/c.m4 (b4_copyright): Omit file name from comment, since
11081 the file name could contain "*/".
11082 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11083 be quoted. All uses changed.
11084
11085 * data/glr.c: Use new @ escapes consistently.
11086 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11087 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11088 Remove, since they couldn't handle arbitrary characters in file
11089 names.
11090 * data/lalr1.cc: Likewise.
11091 * data/yacc.c: Likewise.
11092
11093 * src/files.c (output_infix): Remove; all uses removed.
11094 * src/files.h: Likewise.
11095
11096 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11097 mishandled funny characters in file names, and anyway it isn't
11098 needed any more.
11099 * data/yacc.c: Likewise.
11100 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11101
11102 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11103 * data/yacc.c: Likewise.
11104
11105 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11106 strings now.
11107 (muscle_init): Quote filename as a C string.
11108 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11109 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11110 * src/output.c (escaped_file_name_output): New function.
11111 (prepare_symbols): Quote tokens for M4.
11112 (prepare): Don't insert output_infix, output_prefix,
11113 output_parser_name, output_header_name; this is now down by scan-skel.
11114 Insert skeleton as a C string.
11115
11116 * src/output.c (user_actions_output, symbol_destructors_output,
11117 symbol_printers_output): Quote filenames for C and M4.
11118 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11119
11120 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11121 escapes other than \\ and \'; this simplifies the code.
11122 (<SC_STRING>): Likewise, for \\ and \".
11123 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11124 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11125 Use new escapes @{ and @} for [ and ].
11126
11127 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11128 them with auto vars.
11129 Switch to new escape scheme, where @ is the escape character uniformly.
11130 Abort if a stray escape character is found. Avoid unbounded input
11131 buffer when parsing non-escaped text.
11132
11133 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11134 __oline__, #output, $@, and @{ do not have unintended meanings.
11135
acea4f3b
PE
111362002-11-09 Paul Eggert <eggert@twinsun.com>
11137
11138 Fix the test failure due to GCC warnings described in
161a71f3 11139 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
11140 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11141 evaluate to 0 if it's impossible for NINF to be in the respective
11142 table.
11143 (yygetLRActions, yyrecoverParseError): Use them.
11144
11145 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11146 counted in the token inserted at end of file. Now takes
11147 location_t *, not location_t, so that the location can be
11148 adjusted. All uses changed.
11149
11150 * tests/regression.at (Invalid inputs): Adjust wording in
11151 diagnostic to match the new behavior.
11152
11153 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11154 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11155 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11156 abort ();'. This reduces the runtime of the "Many lookaheads"
11157 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11158 GCC 3.2.
11159
20ef1ad5
PE
111602002-11-07 Paul Eggert <eggert@twinsun.com>
11161
11162 * src/parse-gram.y (CHARACTER): Remove unused token.
11163 All uses removed.
11164
11165 * src/scan-gram.l: Remove stack option. We no longer use the
11166 stack, since the stack was never deeper than 1; instead, use the
11167 new auto var c_context to record the stacked value.
11168
11169 Remove nounput option. At an unexpected end of file, we now unput
11170 the minimal input necessary to end cleanly; this simplifies the
11171 code.
11172
11173 Avoid unbounded token sizes where this is easy.
11174
11175 (unexpected_end_of_file): New function.
11176 Use it to systematize the error message on unexpected EOF.
11177 (last-string): Now auto, not static.
11178 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11179 (scanner_last_string_free): Remove; not used.
11180 (percent_percent_count): Move decl to just before use.
11181 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11182 not the (never otherwised-used) CHARACTER.
11183
93724f13
AD
111842002-11-07 Akim Demaille <akim@epita.fr>
11185
11186 Let yyerror always receive the msg as last argument, so that
11187 yyerror can be variadic.
11188
11189 * data/yacc.c (b4_yyerror_args): New.
11190 Use it when calling yyerror.
11191 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11192 Use it when calling yyerror.
11193 * doc/bison.texinfo (Error Reporting): Adjust.
11194 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11195 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11196
6e40b4eb
AD
111972002-11-06 Akim Demaille <akim@epita.fr>
11198
11199 #line should have quoted strings.
11200 Ideally, this should be done by m4_quotearg.
11201
11202 * src/scan-skel.l: Include quotearg.h.
11203 Quote __ofile__.
11204 * src/output.c (symbol_printers_output)
11205 (symbol_destructors_output): Quote the file name.
11206
2dfbfc12
AD
112072002-11-06 Akim Demaille <akim@epita.fr>
11208
11209 * tests/regression.at (Invalid inputs): Adjust to the recent
11210 messages.
11211
437c2d80
AD
112122002-11-06 Akim Demaille <akim@epita.fr>
11213
11214 Restore --no-lines.
11215 Reported by Jim Kent.
11216
11217 * data/c.m4 (b4_syncline): New.
11218 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11219 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11220 * src/output.c (user_actions_output): Likewise.
11221 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 11222 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 11223
900c5db5
AD
112242002-11-06 Akim Demaille <akim@epita.fr>
11225
11226 * src/main.c (main): Free `infile'.
11227 * src/scan-gram.l (handle_syncline): New.
11228 Recognize `#line'.
11229 * src/output.c (user_actions_output, symbol_destructors_output)
11230 (symbol_printers_output): Use the location's file name, not
11231 infile.
11232 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11233
e183b123 112342002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 11235
e183b123 11236 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 11237 either has GLR conflict entries.
e183b123 11238
193eb6b7
PE
112392002-11-05 Paul Eggert <eggert@twinsun.com>
11240
e183b123
PE
11241 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11242 "integer out of range" rather than "invalid value".
11243 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11244 accordingly.
11245
193eb6b7
PE
11246 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11247 Also, remove one static variable in the scanner.
11248
11249 * src/scan-gram.l (braces_level): Now auto, not static.
11250 Initialize to zero if the compiler is being picky.
11251 (INITIAL): Clear braces_level instead of incrementing it.
11252 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11253 as POSIX 1003.1-2001 requires.
11254 * src/system.h (IF_LINT): New macro, taken from coreutils.
11255 * configure.ac: Define "lint" if --enable-gcc-warnings.
11256
29c01725
AD
112572002-11-05 Akim Demaille <akim@epita.fr>
11258
11259 * src/scan-gram.l: When it starts with `%', complain about the
11260 whole directive, not just that `invalid character: %'.
11261
8aeac3ca
AD
112622002-11-04 Akim Demaille <akim@epita.fr>
11263
11264 * Makefile.maint: Update from Autoconf.
11265 (update, cvs-update, po-update, do-po-update): New.
11266
793a58bb
AD
112672002-11-04 Akim Demaille <akim@epita.fr>
11268
11269 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11270 and yyerror.
11271 Have yyerror `use' its arguments.
11272 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11273 returns true when location & yacc & pure & parse-param.
11274 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11275
c4d720cd
AD
112762002-11-04 Akim Demaille <akim@epita.fr>
11277
11278 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11279 clashes.
11280 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11281 font-lock-mode.
11282 Use complain_at.
11283 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11284 slot 0.
11285
613a0dc5
PE
112862002-11-03 Paul Eggert <eggert@twinsun.com>
11287
11288 * src/reader.c (get_merge_function, grammar_current_rule_check):
11289 Use consistent diagnostics for reporting type name clashes.
11290 Quote the types with <>, for consistency with Yacc.
11291 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11292
2a8d363a
AD
112932002-11-03 Akim Demaille <akim@epita.fr>
11294
11295 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11296 New.
11297 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11298 (b4_parse_param): Remove.
11299 Use b4_identification.
11300 Propagate b4_pure_args where needed to pass them to yyerror.
11301 * data/glr.m4 (b4_parse_param): Remove.
11302 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11303 (b4_lpure_formals): New.
11304 Use b4_identification.
11305 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11306 b4_user_formals and b4_user_args.
11307 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11308 (yyreportAmbiguity): When using a pure parser, also need
11309 the location, and the parse-params.
11310 Adjust callers.
11311 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11312 When using a pure parser, also need the parse-params.
11313 Adjust callers.
11314 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11315 (%pure-parser + %parse-param) LALR and GLR parsers.
11316 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11317 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11318 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11319 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11320 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11321 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11322 * doc/bison.texinfo: Untabify the whole file.
11323 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11324 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11325 (Error Reporting): Adjust to these new directives.
11326 Document %error-verbose, deprecate YYERROR_VERBOSE.
11327
9e32add8
AD
113282002-11-03 Akim Demaille <akim@epita.fr>
11329
11330 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11331 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11332 command line options.
11333 * tests/cxx-type.at: Formatting changes.
11334
b02d90a5
PE
113352002-11-03 Paul Eggert <eggert@twinsun.com>
11336
11337 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11338 to count columns correctly, and to check for invalid inputs.
9e32add8 11339
b02d90a5
PE
11340 Use mbsnwidth to count columns correctly. Account for tabs, too.
11341 Include mbswidth.h.
11342 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11343 (extend_location): New function.
11344 (YY_LINES): Remove.
11345
11346 Handle CRLF in C code rather than in Lex code.
11347 (YY_INPUT): New macro.
11348 (no_cr_read): New function.
11349
11350 Scan UCNs, even though we don't fully handle them yet.
11351 (convert_ucn_to_byte): New function.
11352
11353 Handle backslash-newline correctly in C code.
11354 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11355 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11356 all uses changed.
11357 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11358 Use {splice} wherever C allows backslash-newline.
11359 YY_STEP after space, newline, vertical-tab.
11360 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 11361
b02d90a5
PE
11362 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11363
11364 ({int}, handle_action_dollar, handle_action_at): Check for integer
11365 overflow.
9e32add8 11366
b02d90a5
PE
11367 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11368
11369 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11370 as well as \000. Check for UCHAR_MAX, not 255.
11371 Allow \x with an arbitrary positive number of digits, as in C.
11372 Check for overflow here.
11373 Allow \? and UCNs, for compatibility with C.
11374
11375 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11376 with quote slot used by complain_at.
11377
11378 * tests/input.at: Add tests for backslash-newline, m4 quotes
11379 in symbols, long literals, and funny escapes in strings.
11380
11381 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11382 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11383 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11384 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11385 * m4/mbswidth.m4: New file, from GNU coreutils.
11386
11387 * doc/bison.texinfo (Grammar Outline): Document // comments.
11388 (Symbols): Document that trigraphs have no special meaning in Bison,
11389 nor is backslash-newline allowed.
11390 (Actions): Document that trigraphs have no special meaning.
11391
11392 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11393 no longer used.
11394
113952002-11-02 Paul Eggert <eggert@twinsun.com>
11396
11397 * src/reader.c: Don't include quote.h; not needed.
11398 (get_merge_function): Reword warning to be consistent with
11399 type clash diagnostic in grammar_current_rule_check.
11400
11401 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11402 bug in trigraph handling.
11403
11404 * src/output.c (prepare_symbols): When printing token names,
11405 escape "[" as "@<:@" and likewise for "]".
11406
11407 * src/system.h (errno): Remove declaration, as we are now
11408 assuming C89 or better, and C89 guarantees errno.
11409
762b212b
PE
114102002-10-30 Paul Eggert <eggert@twinsun.com>
11411
11412 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11413 Check for close failures.
11414 * src/files.h (xfclose): Return void, not int, since it always
11415 returned zero.
11416 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11417 indicates one.
11418 * src/output.c (output_skeleton): Use xfclose rather than fclose
11419 and ferror. xfclose now checks ferror.
11420
11421 * data/glr.c (YYLEFTMOST_STATE): Remove.
11422 (yyreportTree): Use a stack-based leftmost state. This avoids
11423 our continuing battles with bogus warnings about initializers.
11424
56100c60
AD
114252002-10-30 Akim Demaille <akim@epita.fr>
11426
11427 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11428 #if.
11429
51b4a04c
PH
114302002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11431
11432 * tests/glr-regr1.at: New test for reported regressions.
11433 * tests/testsuite.at: Add glr-regr1.at test.
11434 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 11435
bf1ebda2
PE
114362002-10-24 Paul Eggert <eggert@twinsun.com>
11437
5c16c6b1
PE
11438 Version 1.75a.
11439
bf1ebda2
PE
11440 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11441 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11442 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11443 Don't assume strdup exists; POSIX says its an XSI extension.
11444 Check for buffer overflow on input.
11445
b526ee61
AD
114462002-10-24 Akim Demaille <akim@epita.fr>
11447
11448 * src/output.c (output_skeleton): Don't disable M4sugar comments
11449 too soon: it results in comments being expanded.
11450 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11451 first output.
11452
f1886bb2
AD
114532002-10-24 Akim Demaille <akim@epita.fr>
11454
11455 * data/yacc.c (m4_int_type): New.
11456 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11457 char' as only yacc.c wants K&R portability.
11458 * data/glr.c (yysigned_char): Remove.
11459 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11460 Reported by Quoc Peyrot.
11461
c5576256
PE
114622002-10-23 Paul Eggert <eggert@twinsun.com>
11463
11464 * src/main.c (main): With --trace=time, report times even if a
11465 non-fatal error occurs. Formerly, the times were reported in some
11466 such cases but not in others.
11467 * src/reader.c (reader): Just return if a complaint has been issued,
11468 instead of exiting, so that 'main' can report times.
11469
27b0ffea
AD
114702002-10-22 Akim Demaille <akim@epita.fr>
11471
11472 * src/system.h: Include sys/types.
11473 Reported by Bert Deknuydt.
11474
223a7883
PE
114752002-10-23 Paul Eggert <eggert@twinsun.com>
11476
11477 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11478 Suggested by Art Haas.
11479
114802002-10-22 Paul Eggert <eggert@twinsun.com>
11481
11482 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11483 decl; not needed any more.
11484 * src/main.c (main): Use return to exit, undoing yesterday's change.
11485 The last OS that we could find where this wouldn't work is
11486 SunOS 3.5, and that's too old to worry about now.
11487
11488 * data/glr.c (struct yyltype): Define members even when not
11489 doing locations. This is more consistent with yacc.c, and it
11490 works around the following bug reports:
161a71f3
PE
11491 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11492 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 11493
223a7883
PE
11494 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11495 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11496 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11497
8b76775a
AD
114982002-10-22 Akim Demaille <akim@epita.fr>
11499
11500 * data/README: New.
11501
6db10d14
PE
115022002-10-21 Paul Eggert <eggert@twinsun.com>
11503
11504 Be consistent about 'bool'; the old code used an enum in one
11505 module and an int in another, and this violates the C standard.
11506 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11507 * configure.ac (AC_HEADER_STDBOOL): Add.
11508 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11509 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11510 * src/symtab.c (hash_compare_symbol_t): Likewise.
11511 * src/system.h (bool, false, true): Use a definition consistent
11512 with ../lib/hash.c. All uses changed.
11513
11514 * src/complain.c (warning_issued): Renamed from warn_message_count,
11515 so that we needn't worry about integer overflow (!).
11516 Now of type bool. All uses changed.
11517 (complaint_issued): Renamed from complain_message_count; likewise.
11518
11519 * src/main.c (main): Use exit to exit with failure.
27b0ffea 11520
6db10d14
PE
11521 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11522 rather than 1 and 0.
11523 * src/main.c (main): Likewise.
11524 * src/getargs.c (getargs): Likewise.
11525 * src/reader.c (reader): Likewise.
11526
11527 * src/getarg.c (getargs): Remove duplicate code for
11528 "Try `bison --help'".
11529
11530 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11531 What was that "2" for?
11532
11533 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11534 * src/getargs.c (usage): Likewise.
11535
11536 * src/getargs.c (getargs): When there are too few operands, report
11537 the last one. When there are too many, report the first extra
11538 one. This is how diffutils does it.
11539
92a060fd
PE
115402002-10-20 Paul Eggert <eggert@twinsun.com>
11541
11542 Remove K&R vestiges.
11543 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11544 * src/complain.c (VA_START): Remove. Assume prototypes.
11545 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11546 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11547 fatal): Assume prototypes.
11548 * src/complain.h: Assume prototypes.
11549 * src/system.h (PARAMS): Remove.
11550 Include <limits.h> unconditionally, since it's guaranteeed even
11551 for a freestanding C89 compiler.
11552 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11553 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 11554
e7cb57c0
AD
115552002-10-20 Akim Demaille <akim@epita.fr>
11556
11557 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11558 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11559 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11560 (yyresolveStates, yyresolveAction, yyresolveStack)
11561 (yyprocessOneStack): Use them.
11562 (yy_reduce_print): New.
11563 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11564
0245f82d
AD
115652002-10-20 Akim Demaille <akim@epita.fr>
11566
11567 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11568 arguments and output `void'.
11569 (b4_c_function): Rename as...
11570 (b4_c_function_def): this.
11571 (b4_c_function_decl, b4_c_ansi_function_def)
11572 (b4_c_ansi_function_decl): New.
11573 Change the interpretation of the arguments: before `int, foo', now
11574 `int foo, foo'.
11575 * data/yacc.c (yyparse): Prototype and define thanks to these.
11576 Adjust b4_c_function_def uses.
11577 * data/glr.c (yyparse): Likewise, but ANSI only.
11578
39912f52
AD
115792002-10-20 Akim Demaille <akim@epita.fr>
11580
11581 * src/output.c (prepare): Move the definition of `tokens_number',
11582 `nterms_number', `undef_token_number', `user_token_number_max'
11583 to...
11584 (prepare_tokens): Here.
11585 (prepare_tokens): Rename as...
11586 (prepare_symbols): this.
11587 (prepare): Move the definition of `rules_number' to...
11588 (prepare_rules): here.
11589 (prepare): Move the definition of `last', `final_state_number',
11590 `states_number' to...
11591 (prepare_states): here.
11592 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11593
20c1e2ad
AD
115942002-10-20 Akim Demaille <akim@epita.fr>
11595
11596 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11597
21964f43
AD
115982002-10-20 Akim Demaille <akim@epita.fr>
11599
11600 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11601 * data/c.m4: here.
11602
66d30cd4
AD
116032002-10-20 Akim Demaille <akim@epita.fr>
11604
11605 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11606 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11607 `pair'.
11608 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11609 `name' to...
11610 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11611 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11612 These.
11613
95f2c9fe
PE
116142002-10-19 Paul Eggert <eggert@twinsun.com>
11615
11616 Do not create a temporary file, as that involves security and
11617 cleanup headaches. Instead, use a pair of pipes.
11618 Derived from a suggestion by Florian Krohm.
11619 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11620 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11621 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11622 (BISON_PREREQ_SUBPIPE): Add.
11623 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11624 Add subpipe.h, subpipe.c.
11625 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11626 * po/POTFILES.in: Add lib/subpipe.c.
11627 * src/output.c: Include "subpipe.h".
11628 (m4_invoke): Remove decl.
11629 (scan_skel): New decl.
11630 (output_skeleton): Use pipe rather than temporary file for m4 input.
11631 Check that m4sugar.m4 is readable, to avoid deadlock.
11632 Check for pipe I/O error.
11633 * src/scan-skel.l (readpipe): Remove decl.
11634 (scan_skel): New function, to be used in place of m4_invoke.
11635 Read from stream rather than file.
66d30cd4 11636
95f2c9fe
PE
11637 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11638 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11639 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11640 this generates a more-accurate value anyway.
11641
11642 * lib/timevar.c (timervar_accumulate): Rename locals to
11643 avoid confusion with similarly-named more-global.
11644 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11645
11646 * src/output.c (prepare): Use xstrdup to convert char const *
11647 to char *, to avoid GCC warning.
11648
c19988b7
AD
116492002-10-19 Akim Demaille <akim@epita.fr>
11650
11651 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11652 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11653 Use them to have `calc.y' ready for %pure-parser.
11654 * data/yacc.c (YYLEX): Pass a yylex return type to
11655 b4_c_function_call.
11656
ae7453f2
AD
116572002-10-19 Akim Demaille <akim@epita.fr>
11658
11659 Prototype support of %lex-param and %parse-param.
11660
11661 * src/parse-gram.y: Add the definition of the %lex-param and
11662 %parse-param tokens, plus their rules.
11663 Drop the `_' version of %glr-parser.
11664 Add the "," token.
11665 * src/scan-gram.l (INITIAL): Scan them.
11666 * src/muscle_tab.c: Comment changes.
11667 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11668 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11669 (muscle_entry_s): The `value' member is no longer const.
11670 Adjust all dependencies.
11671 * src/muscle_tab.c (muscle_init): Adjust: use
11672 MUSCLE_INSERT_STRING.
11673 Initialize the obstack earlier.
11674 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11675 (muscle_pair_list_grow): New.
11676 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11677 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11678 * tests/calc.at: Use %locations, not --locations.
11679 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11680
0e575721
AD
116812002-10-19 Akim Demaille <akim@epita.fr>
11682
11683 * src/getargs.c (usage): Take status as argument and exit
11684 accordingly.
11685 Report the traditional `Try ... --help' message when status != 0.
11686 (usage, version): Don't take a FILE * as arg, it is pointless.
11687 (getargs): When there is an incorrect number of arguments, make it
11688 an error, and report it GNUlically thanks to `usage ()'.
11689
724ce7f5
PE
116902002-10-18 Paul Eggert <eggert@twinsun.com>
11691
3a781eb2
PE
11692 * data/glr.c (yyreportParseError): Don't assume that sprintf
11693 yields the length of the printed string, as this is not true
11694 on SunOS 4.1.4. Reported by Peter Klein.
11695
724ce7f5
PE
11696 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11697 * tests/conflicts.at (%nonassoc and eof): Likewise.
11698 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11699
473d0a75
AD
117002002-10-17 Akim Demaille <akim@epita.fr>
11701
11702 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11703 * src/getargs.c (trace_types, trace_args): Adjust.
11704 * src/reader.c (grammar_current_rule_prec_set)
11705 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11706 Standardize error messages.
11707 And s/@prec/%prec/!
11708 (reader): Use trace_flag to enable scanner/parser debugging,
11709 instead of an adhoc scheme.
11710 * src/scan-gram.l: Remove trailing debugging code.
11711
e76d2469
PE
117122002-10-16 Paul Eggert <eggert@twinsun.com>
11713
93e2236a
PE
11714 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11715 MUSCLE_TAB_H.
11716
e76d2469
PE
11717 * NEWS: Officially drop support for building Bison with K&R C,
11718 since it didn't work anyway and it's not worth worrying about.
11719 * Makefile.maint (wget_files): Remove ansi2knr.c.
11720 (ansi2knr.c-url_prefix): Remove.
11721 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11722 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11723 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11724
5bd1c419
PE
117252002-10-15 Paul Eggert <eggert@twinsun.com>
11726
11727 Stop using the "enum_" trick for K&R-style function definitions;
11728 it confused me, and I was the author! Instead, assume that people
11729 who want to use K&R C compilers (when using these modules in GCC,
11730 perhaps?) will run ansi2knr.
11731
11732 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11733 All uses of "enum_" changed to "enum ".
11734 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11735 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 11736
5bd1c419
PE
11737 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11738 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11739 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11740 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11741 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11742 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11743 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11744 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11745 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11746 Use function prototypes; this removes the need for declaring
11747 static functions simply to provide their prototypes.
11748 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11749 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11750 bitset_count_, bitset_create, bitset_dump, bitset_first,
11751 bitset_free, bitset_init, bitset_last, bitset_next,
11752 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11753 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11754 bitset_print, bitset_release_memory, bitset_toggle_,
11755 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11756 debug_bitset): Likewise.
11757 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11758 * lib/bitset_stats.c (bitset_log_histogram_print,
11759 bitset_percent_histogram_print, bitset_stats_and,
11760 bitset_stats_and_cmp, bitset_stats_and_or,
11761 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11762 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11763 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11764 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11765 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11766 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11767 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11768 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11769 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11770 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11771 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11772 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11773 bitset_stats_zero): Likewise.
11774 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11775 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11776 bitsetv_dump, debug_bitsetv): Likewise.
11777 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11778 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11779 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11780 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11781 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11782 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11783 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11784 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11785 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11786 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11787 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11788 Likewise.
11789 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11790 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11791 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11792 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11793 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11794 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11795 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11796 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11797 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11798 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11799 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 11800
ae26e1f0
AD
118012002-10-14 Akim Demaille <akim@epita.fr>
11802
11803 Version 1.75.
11804
d43baf71
AD
118052002-10-14 Akim Demaille <akim@epita.fr>
11806
11807 * tests/Makefile.am (maintainer-check-posix): New.
11808
7ebc83e3
AD
118092002-10-14 Akim Demaille <akim@epita.fr>
11810
11811 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11812 member.
11813
05846dae
AD
118142002-10-14 Akim Demaille <akim@epita.fr>
11815
11816 * src/tables.c (table_ninf_remap): base -> tab.
11817 Reported by Matt Rosing.
11818
1318e37d
PE
118192002-10-14 Paul Eggert <eggert@twinsun.com>
11820
447fbb17
PE
11821 * tests/action.at, tests/calc.at, tests/conflicts.at,
11822 tests/cxx-type.at, tests/headers.at, tests/input.at,
11823 tests/regression.at, tests/synclines.at, tests/torture.at:
11824 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11825 so that the tests still work even if POSIXLY_CORRECT is set.
11826 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 11827
1318e37d
PE
11828 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11829 for portability to K&R hosts. Fix typo: signed char is guaranteed
11830 only to 127, not to 128.
11831 * data/glr.c (yysigned_char): New type.
11832 * data/yacc.c (yysigned_char): Likewise.
11833 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11834
cc0f0794
PE
118352002-10-13 Paul Eggert <eggert@twinsun.com>
11836
5038f418
PE
11837 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11838 true due to limited range of data type" warning from GCC.
11839
cc0f0794
PE
11840 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11841 by wrapping enum yytokentype's definition inside #ifndef
11842 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11843
6fed0802
AD
118442002-10-13 Akim Demaille <akim@epita.fr>
11845
11846 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11847 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11848
32f0598d
AD
118492002-10-13 Akim Demaille <akim@epita.fr>
11850
11851 * Makefile.maint: Update from Autoconf 2.54.
11852 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11853
7ea9a33f
AD
118542002-10-13 Akim Demaille <akim@epita.fr>
11855
11856 * src/print.c (print_state): Separate the list of solved conflicts
11857 from the other items.
11858 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11859
ea99527d
AD
118602002-10-13 Akim Demaille <akim@epita.fr>
11861
11862 Let nondeterministic skeletons be usable with deterministic
11863 tables.
11864
11865 With the patch, GAWK compiled by GCC without -O2 passes its test
11866 suite using a GLR parser driven by LALR tables. It fails with -O2
11867 because `struct stat' gives two different answers on my machine:
11868 88 (definition of an auto var) and later 96 (memset on this var).
11869 Hence the stack is badly corrumpted. The headers inclusion is to
11870 blame: if I move the awk.h inclusion before GLR's system header
11871 inclusion, the two struct stat have the same size.
11872
11873 * src/tables.c (pack_table): Always create conflict_table.
11874 (token_actions): Always create conflict_list.
11875 * data/glr.c (YYFLAG): Remove, unused.
11876
f377f69f
AD
118772002-10-13 Akim Demaille <akim@epita.fr>
11878
11879 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11880 (O0FLAGS): New.
11881 (VALGRIND, GXX): New.
11882 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11883 * tests/bison.in: Run $PREBISON a pre-command.
11884 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11885 (maintainer-check-g++): New.
11886 * Makefile.am (maintainer-check): New.
11887
2a1fe6ed
AD
118882002-10-13 Akim Demaille <akim@epita.fr>
11889
11890 * data/glr.c: Formatting changes.
11891 Tweak some trace messages to match yacc.c's.
11892
f50adbbd
AD
118932002-10-13 Akim Demaille <akim@epita.fr>
11894
11895 GLR parsers sometimes raise parse errors instead of performing the
11896 default reduction.
11897 Reported by Charles-Henry de Boysson.
11898
11899 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 11900 check the length of the traces when %glr.
f50adbbd
AD
11901 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11902 GLR's traces.
11903 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11904 Test GLR parsers.
11905 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11906 (yyltype): Remove the yy prefix from the member names.
11907 (yytable): Complete its comment.
11908 (yygetLRActions): Map error action number from YYTABLE from
11909 YYTABLE_NINF to 0.
11910 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11911 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11912 not satisfying as we could compare an YYACTION computed from
11913 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11914 only value for error actions.
11915 (yyreportParseError): In verbose parse error messages, don't issue
11916 `error' in the list of expected tokens.
11917 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11918 next action to perform to match glr.c's decoding.
11919 (yytable): Complete its comment.
11920
bcbad5b9
PE
119212002-10-13 Paul Eggert <eggert@twinsun.com>
11922
11923 Fix problem reported by Henrik Grubbstroem in
161a71f3 11924 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
11925 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11926 because the Bison parser reads the second action before reducing
11927 the first one.
11928 * src/scan-gram.l (rule_length): New static var.
11929 Use it to keep track of the rule length in the scanner, since
11930 we can't expect the parser to be in lock-step sync with the scanner.
11931 (handle_action_dollar, handle_action_at): Use this var.
11932 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 11933
14904b89
PE
119342002-10-12 Paul Eggert <eggert@twinsun.com>
11935
1fe611e5
PE
11936 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11937 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11938 Include <sys/time.h> when checking for clock_t and struct tms.
11939 Use same include order as source.
11940 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 11941 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 11942
1fe611e5
PE
11943 * lib/timevar.c: Update copyright date and clarify comments.
11944 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 11945
1fe611e5
PE
11946 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11947 GCC version as of today, then merge Bison's changes.
11948 Change "GCC" to "Bison" in copyright notice. timevar.def's
11949 author is Akim, so change that too.
11950
98194095
PE
11951 * src/reader.c (grammar_current_rule_check):
11952 Don't worry about the default action if $$ is untyped.
11953 Prevents bogus warnings reported by Jim Gifford in
161a71f3 11954 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 11955
14904b89
PE
11956 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11957 * data/glr.c, data/lalr1.cc, data/yacc.c:
11958 Output token definitions before the first part of user declarations.
11959 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 11960 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 11961
ff6dca18
PE
119622002-10-11 Paul Eggert <eggert@twinsun.com>
11963
11964 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11965 (yyparse): here. This undoes some of the 2002-07-25 change.
11966 Compatibility problem reported by Ralf S. Engelschall with
11967 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11968
eb714592
AD
119692002-10-11 Akim Demaille <akim@epita.fr>
11970
11971 * tests/regression.at Characters Escapes): New.
11972 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11973 characters.
11974 Reported by Jan Nieuwenhuizen.
11975
b7195100
AD
119762002-10-11 Akim Demaille <akim@epita.fr>
11977
11978 * po/id.po: New.
11979
f28a0f2d
PE
119802002-10-10 Paul Eggert <eggert@twinsun.com>
11981
11982 Portability fixes for bitsets; this also avoids several GCC
11983 warnings.
11984
11985 * lib/abitset.c: Include <stddef.h>, for offsetof.
11986 * lib/lbitset.c: Likewise.
11987
11988 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11989 properly for vectors of objects. Do not assume that adding a
11990 header size to a multiple of a word size yields a value that is
11991 properly aligned for the whole union.
11992 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11993
11994 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11995 unique names for structures.
11996 * lib/ebitset.c (ebitset_bytes): Likewise.
11997 * lib/lbitset.c (lbitset_bytes): Likewise.
11998
11999 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12000 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12001 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12002 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12003 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12004 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12005 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12006 to improve the type-checking that GCC can do.
12007 * lib/bitset.c (bitset_op4_cmp): Likewise.
12008 * lib/bitset_stats.c (bitset_stats_count,
12009 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12010 bitset_stats_copy, bitset_stats_disjoint_p,
12011 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12012 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12013 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12014 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12015 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12016 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12017 bitset_stats_or_and_cmp): Likewise.
12018 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12019 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12020 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12021 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12022
12023 * lib/abitset.h: Include bitset.h, not bbitset.h.
12024 * lib/ebitset.h: Likewise.
12025 * lib/lbitset.h: Likewise.
12026
12027 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12028 All instances of parameters of type enum bitset_opts are now of
12029 type enum_bitset_opts, to conform to the C Standard, and similarly
12030 for enum_bitset_type.
12031 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12032 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12033
12034 Do not use "struct bitset_struct" to mean different things in
12035 different modules. Not only is this confusing, it violates
12036 the C Standard, which requires that structure types in different
12037 modules must be compatible if one is to be passed to the other.
12038 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12039 All instances of "struct bitset_struct *" replaced with "bitset".
12040 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12041 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12042 struct lbitset_struct, struct bitset_stats_struct): New types.
12043 All uses of struct bitset_struct changed to union bitset_union,
12044 etc.
ba0fe3c7 12045 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
12046 struct bitset_struct): Remove.
12047 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12048 struct bitset_struct): Remove.
12049 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12050 bitset_struct): Remove.
12051 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12052 Likewise.
12053
12054 Do not call a function of type T using a call that assumes the
12055 function is of a different type U. Standard C requires that a
12056 function must be called with a type that is compatible with its
12057 definition.
12058 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12059 New decls.
12060 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12061 New functions.
12062 * lib/ebitset.c (PFV): Remove.
12063 * lib/lbitset.c (PFV): Likewise.
12064 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12065 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12066 decls.
12067 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12068 (ebitset_vtable): Use them.
12069 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12070 lbitset_xor): New functions.
12071 (lbitset_vtable): Use them.
12072
12073 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12074 Declare.
12075
12076 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12077 GCC warning.
12078 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12079 Use offsetof, for simplicity.
12080
6fbe4984
PE
120812002-10-06 Paul Eggert <eggert@twinsun.com>
12082
12083 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12084 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 12085 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
12086 which was inadvertently undone by the 2002-09-30 patch.
12087 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12088 the same width as int.
12089
420f93c8
PE
120902002-10-04 Paul Eggert <eggert@twinsun.com>
12091
12092 Version 1.50.
12093
12094 * configure.ac (AC_INIT), NEWS: Increment version number.
12095
12096 * doc/bison.texinfo: Minor spelling, grammar, and white space
12097 fixes.
12098 (Symbols): Mention that any negative value returned from yylex
12099 signifies end-of-input. Warn about negative chars. Mention
12100 the portable Standard C character set.
12101
12102 The GNU coding standard says CFLAGS and YFLAGS are reserved
12103 for the installer to set.
12104 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12105 * src/Makefile.am (AM_CFLAGS): Likewise.
12106 (AM_YFLAGS): Renamed from YFLAGS.
12107
12108 Fix some MAX and MIN problems.
12109 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12110 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12111 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12112 * src/reader.c (reader): Use it.
12113
12114 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12115 POSIX 1003.1-2001 has removed fgrep.
12116
121172002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12118
12119 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12120 interpreted as signed.
12121 * lib/ebitset.c (ebitset_list): Fix bug.
12122
ff68026d
PE
121232002-10-01 Paul Eggert <eggert@twinsun.com>
12124
12125 More fixes for 64-bit hosts and large bitsets.
12126
12127 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12128 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12129 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12130 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12131 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12132 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12133 bitset_count_): Likewise.
12134 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12135 bitset_first, bitset_last): Likewise.
12136 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12137 bitset_stats_list_reverse, bitset_stats_size,
12138 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12139 Likewise.
12140 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12141 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12142 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12143 bitsetv_reflexive_transitive_closure): Likewise.
12144 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12145 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12146 Likewise.
12147 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12148 Likewise.
420f93c8 12149
ff68026d
PE
12150 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12151 Use size_t, not unsigned int, to count bytes.
12152 * lib/abitset.h (abitset_bytes): Likewise.
12153 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12154 Likewise.
12155 * lib/bitset.h (bitset_bytes): Likewise.
12156 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12157 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12158 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12159 * lib/ebitset.c (ebitset_bytes): Likewise.
12160 * lib/ebitset.h (ebitset_bytes): Likewise.
12161 * lib/lbitset.c (lbitset_bytes): Likewise.
12162 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 12163
ff68026d
PE
12164 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12165 abitset_subset_p, abitset_disjoint_p, abitset_and,
12166 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12167 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12168 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12169 abitset_or_and, abitset_or_and_cmp):
12170 Use bitset_windex instead of unsigned int.
12171 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12172 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12173 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12174 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12175 Likewise.
12176 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 12177
ff68026d
PE
12178 * lib/bitset.c (bitset_print):
12179 Use proper printf formats for widths of integer types.
12180 * lib/bitset_stats.c (bitset_percent_histogram_print,
12181 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12182 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12183 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12184 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 12185
ff68026d
PE
12186 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12187 BITSET_SIZE_MAX): New macros.
12188 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12189 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12190 to BITSET_WINDEX_MAX.
12191
12192 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12193 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12194 since we now return the bitset_bindex type (not int).
12195
12196 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12197 when computing sizes.
12198 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12199
12200 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12201 and avoid cast to unsigned.
12202
6aa452a6
AD
122032002-09-30 Akim Demaille <akim@epita.fr>
12204
12205 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12206 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12207 Updates from Michael Hayes.
12208
927f7817
AD
122092002-09-30 Art Haas <ahaas@neosoft.com>
12210
12211 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12212 invocations.
12213 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12214 defined.
12215
9738f41e
AD
122162002-09-27 Akim Demaille <akim@epita.fr>
12217
12218 Version 1.49c.
12219
a5c75d7f
AD
122202002-09-27 Akim Demaille <akim@epita.fr>
12221
12222 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12223 (Because of AC_LIBSOURCE).
12224
8280e179
AD
122252002-09-27 Akim Demaille <akim@epita.fr>
12226
12227 Playing with Autoscan.
12228
12229 * configure.ac: Remove the old LIBOBJ tweaks.
12230 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12231 * lib/strrchr.c: New.
12232 * lib/strtol.c: New, from the Coreutils 4.5.1.
12233
ae64af35
AD
122342002-09-27 Akim Demaille <akim@epita.fr>
12235
12236 Playing with Autoscan.
12237
12238 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12239 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12240 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12241 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12242 Coreutils 4.5.1.
12243
d1a1114f
AD
122442002-09-24 Akim Demaille <akim@epita.fr>
12245
12246 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12247 (Frequently Asked Questions, Parser Stack Overflow): New.
12248
b906441c
AD
122492002-09-13 Akim Demaille <akim@epita.fr>
12250
12251 Playing with autoscan.
12252
12253 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12254 * src/files.c (skeleton_find): Remove, unused.
12255 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12256 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12257
bd701811
AD
122582002-09-13 Akim Demaille <akim@epita.fr>
12259
12260 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12261 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12262
e0a13e7b
AD
122632002-09-13 Akim Demaille <akim@epita.fr>
12264
12265 * configure.ac: Require 2.54.
12266 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12267 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12268 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12269 Remove, provided by Autoconf macros.
12270
c97011bf
AD
122712002-09-12 Akim Demaille <akim@epita.fr>
12272
12273 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12274
d862b1be
AD
122752002-09-12 Akim Demaille <akim@epita.fr>
12276
12277 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12278 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12279 Reported by Martin Mokrejs.
12280
3d38c03a
AD
122812002-09-10 Akim Demaille <akim@epita.fr>
12282
12283 * src/parse-gram.y: Associate a human readable string to each
12284 token type.
12285 * tests/regression.at (Invalid inputs): Adjust.
12286
b6347355
AD
122872002-09-10 Gary V. Vaughan <gary@gnu.org>
12288
12289 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12290 with an Autoconf-2.5x style configure.ac.
12291
09ba4ab2
PE
122922002-09-06 Paul Eggert <eggert@twinsun.com>
12293
12294 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12295 exception applies only to yacc.c. This is a modification of a
12296 patch originally suggested by Akim Demaille.
12297
21846f69
AD
122982002-09-06 Akim Demaille <akim@epita.fr>
12299
09ba4ab2
PE
12300 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12301 here to...
12302 * data/yacc.c: here.
12303
21846f69
AD
12304 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12305 LocationType.
12306 (b4_ltype): Default to yy::Location from location.hh.
12307
c0ad8bf3
AD
123082002-09-04 Jim Meyering <jim@meyering.net>
12309
12310 * data/yacc.c: Guard the declaration of yytoknum also with
12311 `#ifdef YYPRINT', so it is declared only when used.
12312
3a93251e
AD
123132002-09-04 Akim Demaille <akim@epita.fr>
12314
12315 * configure.in: Rename as...
12316 * configure.ac: this.
12317 Bump to 1.49c.
12318
427c0dda
AD
123192002-09-04 Akim Demaille <akim@epita.fr>
12320
12321 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12322 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12323 translate maintainer only messages.
12324
6a254321
PE
123252002-08-12 Paul Eggert <eggert@twinsun.com>
12326
645e30d1
PE
12327 Version 1.49b.
12328
6a254321
PE
12329 * Makefile.am (SUBDIRS): Remove intl.
12330 (DISTCLEANFILES): Remove.
12331 * NEWS: Mention that GNU M4 is now required. Clarify what is
12332 meant by "larger grammars". Mention the pt_BR translation.
12333 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12334 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12335 Bump version from 0.11.2 to 0.11.5.
12336 (BISON_PREREQ_STAGE): Remove.
12337 (AM_GNU_GETTEXT): Use external gettext.
12338 (AC_OUTPUT): Remove intl/Makefile.
12339
12340 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12341
12342 * data/glr.c: Include string.h, for strlen.
12343 (yyreportParseError): Use size_t for yysize.
12344 (yy_yypstack): No longer nested inside yypstates, as nested
12345 functions are not portable. Do not assume size_t is the
12346 same width as int.
12347 (yypstates): Do not assume that ptrdiff_t is the same width
12348 as int, and similarly for yyposn and YYINDEX.
12349
12350 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12351
12352 * lib/Makefile.am (INCLUDES): Do not include from the intl
12353 directory, which has been removed.
12354 * src/Makefile.am (INCLUDES): Likewise.
12355
12356 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12357 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12358 New vars.
12359
12360 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12361 * tests/Makefile.am (EXTRA_DIST): Likewise.
12362
12363 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12364 Do not assume that bitset_windex is the same width as unsigned.
12365
12366 * lib/abitset.c (abitset_unused_clear): Do not assume that
12367 bitset_word is the same width as int.
12368 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12369 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12370 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12371 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12372 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12373
12374 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12375 portability to one's complement hosts!).
12376 * lib/ebitset.c (ebitset_op1): Likewise.
12377 * lib/lbitset.c (lbitset_op1): Likewise.
12378
12379 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12380 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12381 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12382 Sync with fileutils.
12383 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12384 lib/gettext.h: Sync with diffutils.
12385
12386 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12387 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12388
12389 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12390 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12391 check for void *.
12392
12393 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12394 size_t; the old version tried to do this but casted improperly.
12395 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12396 (bitset_test): Now returns int, not unsigned long.
12397
12398 * lib/bitset_stats.c: Include "gettext.h".
12399 (_): New macro.
12400 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12401 name locals "index", as it generates unnecessary warnings on some
12402 hosts that have an "index" function.
12403
12404 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12405 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12406 they need translation.
12407 * src/LR0.c (state_list_append, new_itemsets, get_state,
12408 append_states, generate_states): Likewise.
12409 * src/assoc.c (assoc_to_string): Likewise.
12410 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12411 * src/gram.c (grammar_dump): Likewise.
12412 * src/injections.c (injections_compute): Likewise.
12413 * src/lalr.c (lookaheads_print): Likewise.
12414 * src/relation.c (relation_transpose): Likewise.
12415 * src/scan-gram.l: Likewise.
12416 * src/tables.c (table_grow, pack_vector): Likewise.
12417
12418 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12419 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12420 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12421 * m4/mbstate_t.m4: Sync with fileutils.
12422 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12423
12424 * po/LINGUAS: Add pt_BR.
12425 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12426 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12427 lib/timevar.c.
12428 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12429 manual recommends.
12430 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12431
12432 * src/complain.c (strerror_r): Remove decl; not needed.
12433 (strerror): Use same pattern as ../lib/error.c.
12434
12435 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12436
12437 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12438
12439 * src/main.c (main): Cast result of bindtextdomain and textdomain
12440 to void, to avoid a GCC warning when --disable-nls is in effect.
12441
12442 * src/scan-gram.l: Use strings rather than escapes when possible,
12443 to minimize the number of warnings from xgettext.
12444 (handle_action_dollar, handle_action_at): Don't use isdigit,
12445 as it mishandles negative chars and it may not work as expected
12446 outside the C locale.
12447
12448 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12449 this is a GCC extension and is not portable to other compilers.
12450
12451 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12452 Do not include <ctype.h>; no longer needed.
12453 Do not include <malloc.h>; no longer needed (and generates
12454 warnings on OpenBSD 3.0).
12455
12456 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12457 it's not portable.
12458
12459 * tests/regression.at: Do not use 'cc -c input.c -o input';
12460 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12461
12462 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12463 exit status as failure, not just exit status 1. Sun C exits
12464 with status 2 sometimes.
12465
12466 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12467 Use it for the two large tests.
12468
c8f002c7
AD
124692002-08-02 Akim Demaille <akim@epita.fr>
12470
12471 * src/conflicts.c (conflicts_output): Don't output rules never
12472 reduced here, since anyway that computation doesn't work.
12473 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12474 (rule_useless_p, rule_never_reduced_p): New.
12475 (grammar_rules_partial_print): Use a filter instead of a range.
12476 Display the title only if needed.
12477 (grammar_rules_print): Adjust.
12478 (grammar_rules_never_reduced_report): New.
12479 * src/tables.c (action_row): Move the computation of rules never
12480 reduced to...
12481 (token_actions): here.
12482 * src/main.c (main): Make the parser before making the report, so
12483 that rules never reduced are computed.
12484 Call grammar_rules_never_reduced_report.
12485 * src/print.c (print_results): Report rules never reduced.
12486 * tests/conflicts.at, tests/reduce.at: Adjust.
12487
cd08e51e
AD
124882002-08-01 Akim Demaille <akim@epita.fr>
12489
12490 Instead of attaching lookaheads and duplicating the rules being
12491 reduced by a state, attach the lookaheads to the reductions.
12492
12493 * src/state.h (state_t): Remove the `lookaheads',
12494 `lookaheads_rule' member.
12495 (reductions_t): Add a `lookaheads' member.
12496 Use a regular array for the `rules'.
12497 * src/state.c (reductions_new): Initialize the lookaheads member
12498 to 0.
12499 (state_rule_lookaheads_print): Adjust.
12500 * src/state.h, src/state.c (state_reductions_find): New.
12501 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12502 (count_rr_conflicts): Adjust.
12503 * src/lalr.c (LArule): Remove.
12504 (add_lookback_edge): Adjust.
12505 (state_lookaheads_count): New.
12506 (states_lookaheads_initialize): Merge into...
12507 (initialize_LA): this.
12508 (lalr_free): Adjust.
12509 * src/main.c (main): Don't free nullable and derives too early: it
12510 is used by --verbose.
12511 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12512
bb0027a9
AD
125132002-08-01 Akim Demaille <akim@epita.fr>
12514
12515 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12516 `rule_number_t**'.
12517 (set_derives, free_derives): Rename as...
12518 (derives_compute, derives_free): this.
12519 Adjust all dependencies.
12520 * src/nullable.c (set_nullable, free_nullable): Rename as...
12521 (nullable_compute, nullable_free): these.
12522 (rule_list_t): Store rule_t *, not rule_number_t.
12523 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12524 pointers, instead of their numbers.
12525 * src/main.c (main): Call nullable_free, and derives_free earlier,
12526 as they were lo longer used.
12527
3325ddc4
AD
125282002-08-01 Akim Demaille <akim@epita.fr>
12529
12530 * lib/timevar.c (get_time): Include children time.
12531 * src/lalr.h (LA, LArule): Don't export them: used with the
12532 state_t.
12533 * src/lalr.c (LA, LArule): Static.
12534 * src/lalr.h, src/lalr.c (lalr_free): New.
12535 * src/main.c (main): Call it.
12536 * src/tables.c (pack_vector): Check whether loc is >= to the
12537 table_size, not >.
12538 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12539 (tables_generate): do it, since that's also it which allocates
12540 them.
12541 Don't free LA and LArule, main does.
12542
c6f1a33c
AD
125432002-07-31 Akim Demaille <akim@epita.fr>
12544
12545 Separate parser tables computation and output.
12546
12547 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12548 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12549 (yydefgoto, yydefact, high): Move to...
12550 * src/tables.h, src/tables.c: here.
12551 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12552 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12553 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12554 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12555 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12556 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12557 (action_row, save_row, token_actions, save_column, default_goto)
12558 (goto_actions, sort_actions, matching_state, pack_vector)
12559 (table_ninf_remap, pack_table, prepare_actions): Move to...
12560 * src/tables.c: here.
12561 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12562 * src/output.c (token_actions, output_base, output_conflicts)
12563 (output_check): Merge into...
12564 (prepare_actions): this.
12565 (actions_output): Rename as...
12566 (user_actions_output): this.
12567 * src/main.c (main): Call tables_generate and tables_free.
12568
1509d42f
AD
125692002-07-31 Akim Demaille <akim@epita.fr>
12570
12571 Steal GCC's --time-report support.
12572
12573 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12574 stolen/adjusted from GCC.
12575 * m4/stage.m4: Remove time related checks.
12576 * m4/timevar.m4: New.
12577 * configure.in: Adjust.
12578 * src/system.h: Adjust to using timevar.h.
12579 * src/getargs.h, src/getargs.c: Support trace_time for
12580 --trace=time.
12581 * src/main.c (stage): Remove.
12582 (main): Replace `stage' invocations with timevar calls.
12583 * src/output.c: Insert pertinent timevar calls.
12584
273a74fa
AD
125852002-07-31 Akim Demaille <akim@epita.fr>
12586
12587 Let --trace have arguments.
12588
12589 * src/getargs.h (enum trace_e): New.
12590 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12591 (long_options, short_options): --trace/-T takes an optional
12592 argument.
12593 Change all the uses of trace_flag to reflect the new flags.
12594 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12595
12596 Strengthen `stage' portability.
12597
12598 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12599 * configure.in: Use it.
12600 Don't check for malloc.h and sys/times.h.
12601 * src/system.h: Include them when appropriate.
12602 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12603 times and struct tms are available.
12604
217598da
AD
126052002-07-30 Akim Demaille <akim@epita.fr>
12606
12607 In verbose parse error message, don't report `error' as an
12608 expected token.
12609 * tests/actions.at (Printers and Destructors): Adjust.
12610 * tests/calc.at (Calculator $1): Adjust.
12611 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12612 error message, do not report the parser accepts the error token in
12613 that state.
12614
52489d44
AD
126152002-07-30 Akim Demaille <akim@epita.fr>
12616
12617 Normalize conflict related messages.
12618
12619 * src/complain.h, src/complain.c (warn, complain): New.
12620 * src/conflicts.c (conflicts_print): Use them.
12621 (conflict_report_yacc): New, extracted from...
12622 (conflicts_print): here.
12623 * tests/conflicts.at, tests/existing.at: Adjust.
12624
e8832397
AD
126252002-07-30 Akim Demaille <akim@epita.fr>
12626
12627 Report rules which are never reduced by the parser: those hidden
12628 by conflicts.
12629
12630 * src/LR0.c (save_reductions): Don't make the final state too
12631 different: save its reduction (accept) instead of having a state
12632 without any action (no shift or goto, no reduce).
12633 Note: the final state is now a ``regular'' state, i.e., the
12634 parsers now contain `reduce 0' as default reduction.
12635 Nevertheless, since they decide to `accept' when yystate =
12636 final_state, they still will not reduce rule 0.
12637 * src/print.c (print_actions, print_reduction): Adjust.
12638 * src/output.c (action_row): Track reduced rules.
12639 (token_actions): Report rules never reduced.
12640 * tests/conflicts.at, tests/regression.at: Adjust.
12641
caf23d24
AD
126422002-07-30 Akim Demaille <akim@epita.fr>
12643
12644 `stage' was accidently included in a previous patch.
12645 Initiate its autoconfiscation.
12646
12647 * configure.in: Look for malloc.h and sys/times.h.
12648 * src/main.c (stage): Adjust.
12649 Report only when trace_flag.
12650
640748ee
AD
126512002-07-29 Akim Demaille <akim@epita.fr>
12652
12653 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12654 state_number_t.
12655 (errs_t): symbol_t*, not symbol_number_t.
12656 (reductions_t): rule_t*, not rule_number_t.
12657 (FOR_EACH_SHIFT): New.
12658 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12659 * src/print.c, src/print_graph.c: Adjust.
12660
88bce5a2
AD
126612002-07-29 Akim Demaille <akim@epita.fr>
12662
12663 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12664
12665 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12666 (endtoken, accept): these.
12667 * src/reader.c (reader): Set endtoken's default tag to "$end".
12668 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12669 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12670 Adjust.
12671
1bfb97db
AD
126722002-07-29 Akim Demaille <akim@epita.fr>
12673
12674 * src/reduce.c (reduce_grammar): When the language is empty,
12675 complain about the start symbol, not the axiom.
12676 Use its location.
12677 * tests/reduce.at (Empty Language): New.
12678
fc5734fe
AD
126792002-07-26 Akim Demaille <akim@epita.fr>
12680
12681 * src/reader.h, src/reader.c (gram_error): ... can't get
12682 yycontrol without making too strong assumptions on the parser
12683 itself.
12684 * src/output.c (prepare_tokens): Use the real 0th value of
12685 token_translations instead of `0'.
12686 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12687 visible here.
12688 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12689 for the time being: %locations ought to provide it to yyerror.
12690
3650b4b8
AD
126912002-07-25 Akim Demaille <akim@epita.fr>
12692
12693 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12694 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12695 * tests/regression.at (Web2c Actions): Adjust.
12696
4b3d3a8e
AD
126972002-07-25 Akim Demaille <akim@epita.fr>
12698
12699 Stop storing rules from 1 to nrules + 1.
12700
12701 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12702 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12703 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12704 Iterate from 0 to nrules.
12705 Use rule_number_as_item_number and item_number_as_rule_number.
12706 Adjust to `derive' now containing possibly 0.
12707 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12708 Handle the `- 1' part in rule numbers from/to item numbers.
12709 * src/conflicts.c (log_resolution): Fix the message which reversed
12710 shift and reduce.
12711 * src/output.c (action_row): Initialize default_rule to -1.
12712 (token_actions): Adjust.
12713 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12714 expected output.
12715 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12716
4a2a22f4
AD
127172002-07-25 Akim Demaille <akim@epita.fr>
12718
12719 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12720 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12721 (b4_c_knr_arg_decl): New.
12722 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12723 yyreport_parse_error.
12724
b8df3223
AD
127252002-07-25 Akim Demaille <akim@epita.fr>
12726
12727 * data/yacc.c (yyreport_parse_error): New, extracted from...
12728 (yyparse): here.
12729 (yydestruct, yysymprint): Move above yyparse.
12730 Be K&R compliant.
12731
a762e609
AD
127322002-07-25 Akim Demaille <akim@epita.fr>
12733
12734 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12735 replace...
12736 (b4_sint_type, b4_uint_type): these.
12737 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12738 * tests/regression.at (Web2c Actions): Adjust.
12739
12b0043a
AD
127402002-07-25 Akim Demaille <akim@epita.fr>
12741
12742 * src/gram.h (TIEM_NUMBER_MAX): New.
12743 (item_number_of_rule_number, rule_number_of_item_number): Rename
12744 as...
12745 (rule_number_as_item_number, item_number_as_rule_number): these.
12746 Adjust dependencies.
12747 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12748 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12749 (symbol_number_to_vector_number): New.
12750 (order): Of vector_number_t* type.
12751 (base_t, BASE_MAX, BASE_MIN): New.
12752 (froms, tos, width, pos, check): Of base_t type.
12753 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12754 (actrow): Of action_number_t type.
12755 (conflrow): Of unsigned int type.
12756 (table_ninf, base_ninf): New.
12757 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12758 (muscle_insert_int_table, muscle_insert_base_table)
12759 (muscle_insert_rule_number_table): New.
12760 (prepare_tokens): Output `toknum' as int_table.
12761 (action_row): Returns a rule_number_t.
12762 Use ACTION_MIN, not SHRT_MIN.
12763 (token_actions): yydefact is rule_number_t*.
12764 (table_ninf_remap): New.
12765 (pack_table): Use it for `base' and `table'.
12766 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12767 replaced with...
12768 (YYPACT_NINF, YYTABLE_NINF): these.
12769 (yypact, yytable): Compute their types instead of hard-coded
12770 `short'.
12771 * tests/regression.at (Web2c Actions): Adjust.
12772
5dde258a
AD
127732002-07-19 Akim Demaille <akim@epita.fr>
12774
12775 * src/scan-gram.l (id): Can start with an underscore.
12776
a945ec39
AD
127772002-07-16 Akim Demaille <akim@epita.fr>
12778
12779 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12780 Adjust all former `associativity' dependencies.
12781 * src/symtab.c (symbol_new): Default associativity is `undef', not
12782 `right'.
12783 (symbol_check_alias_consistence): Adjust.
12784
fae437e8
AD
127852002-07-09 Akim Demaille <akim@epita.fr>
12786
12787 * doc/bison.texinfo: Properly set the ``header'' part.
12788 Use @dircategory ``GNU programming tools'' as per Texinfo's
12789 documentation.
12790 Use @copying.
12791
1a715ef2
AD
127922002-07-09 Akim Demaille <akim@epita.fr>
12793
12794 * lib/quotearg.h: Protect against multiple inclusions.
12795 * src/location.h (location_t): Add a `file' member.
12796 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12797 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12798 `error_one_per_line' support.
12799
a5d50994
AD
128002002-07-09 Akim Demaille <akim@epita.fr>
12801
12802 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12803 * src/reader.c (lineno): Remove.
12804 Adjust all dependencies.
12805 (get_merge_function): Take a location and use complain_at.
12806 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12807 * tests/regression.at (Invalid inputs, Mixing %token styles):
12808 Adjust.
12809
b275314e
AD
128102002-07-09 Akim Demaille <akim@epita.fr>
12811
12812 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12813 recovery rule, and forbid extensions when --yacc.
12814 (gram_error): Use complain_at.
12815 * src/reader.c (reader): Exit if there were parse errors.
12816
865b9df1
AD
128172002-07-09 Akim Demaille <akim@epita.fr>
12818
12819 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12820 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12821 Reported by R Blake <blakers@mac.com>.
12822
c76e14da
AD
128232002-07-09 Akim Demaille <akim@epita.fr>
12824
12825 * data/yacc.c: Output the copyright notive in the header.
12826
7db2ed2d
AD
128272002-07-03 Akim Demaille <akim@epita.fr>
12828
12829 * src/output.c (froms, tos): Are state_number_t.
12830 (save_column): sp, sp1, and sp2 are state_number_t.
12831 (prepare): Rename `final' as `final_state_number', `nnts' as
12832 `nterms_number', `nrules' as `rules_number', `nstates' as
12833 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12834 unused.
12835 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12836 * data/lalr1.cc (nsym_): Remove, unused.
12837
e68e0410
AD
128382002-07-03 Akim Demaille <akim@epita.fr>
12839
12840 * src/lalr.h, src/lalr.c (goto_number_t): New.
12841 * src/lalr.c (goto_list_t): New.
12842 Propagate them.
12843 * src/nullable.c (rule_list_t): New.
12844 Propagate.
12845 * src/types.h: Remove.
12846
e1a4f3a4
AD
128472002-07-03 Akim Demaille <akim@epita.fr>
12848
12849 * src/closure.c (print_fderives): Use rule_rhs_print.
12850 * src/derives.c (print_derives): Use rule_rhs_print.
12851 (rule_list_t): New, replaces `shorts'.
12852 (set_derives): Add comments.
12853 * tests/sets.at (Nullable, Firsts): Adjust.
12854
536545f3
AD
128552002-07-03 Akim Demaille <akim@epita.fr>
12856
12857 * src/output.c (prepare_actions): Free `tally' and `width'.
12858 (prepare_actions): Allocate and free `order'.
12859 * src/symtab.c (symbols_free): Free `symbols'.
12860 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12861 * src/output.c (m4_invoke): Move to...
12862 * src/scan-skel.l: here.
12863 (<<EOF>>): Close yyout, and free its name.
12864
8b752b00
AD
128652002-07-03 Akim Demaille <akim@epita.fr>
12866
12867 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12868
12869 * src/LR0.c (new_state): Merge into...
12870 (state_list_append): this.
12871 (new_states): Merge into...
12872 (generate_states): here.
12873 (set_states): Don't ensure a proper `errs' state member here, do it...
12874 * src/conflicts.c (conflicts_solve): here.
12875 * src/state.h, src/state.c: Comment changes.
12876 (state_t): Rename member `shifts' as `transitions'.
12877 Adjust all dependencies.
12878 (errs_new): For consistency, also take the values as argument.
12879 (errs_dup): Remove.
12880 (state_errs_set): New.
12881 (state_reductions_set, state_transitions_set): Assert that no
12882 previous value was assigned.
12883 (state_free): New.
12884 (states_free): Use it.
12885 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12886 temporary storage: use `errs' and `nerrs' as elsewhere.
12887 (set_conflicts): Allocate and free this `errs'.
12888
613f5e1a
AD
128892002-07-02 Akim Demaille <akim@epita.fr>
12890
12891 * lib/libiberty.h: New.
12892 * lib: Update the bitset implementation from upstream.
12893 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12894 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12895 * src/main.c: Adjust bitset stats calls.
12896
26e0cadc
PE
128972002-07-01 Paul Eggert <eggert@twinsun.com>
12898
12899 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12900 char, so that negative chars don't collide with $.
12901
1154cced
AD
129022002-06-30 Akim Demaille <akim@epita.fr>
12903
12904 Have the GLR tests be `warning' checked, and fix the warnings.
12905
12906 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12907 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12908 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12909 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12910 (yyaddDeferredAction): static.
12911 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12912 (yyreportParseError): yyprefix is const.
12913 yytokenp is used only when verbose.
12914 (yy__GNUC__): Replace with __GNUC__.
12915 (yypdumpstack): yyi is size_t.
12916 (yypreference): Un-yy local variables and arguments, to avoid
12917 clashes with `yyr1'. Anyway, we are not in the user name space.
12918 (yytname_size): be an int, as is compared with ints.
12919 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12920 Use them.
12921 * tests/cxx-gram.at: Use quotation to protect $1.
12922 Use AT_COMPILE to enable warnings hunts.
12923 Prototype yylex and yyerror.
12924 `Use' argc.
12925 Include `string.h', not `strings.h'.
12926 Produce and prototype stmtMerge only when used.
12927 yylex takes a location.
12928
97650f4e
AD
129292002-06-30 Akim Demaille <akim@epita.fr>
12930
12931 We spend a lot of time in quotearg, in particular when --verbose.
12932
12933 * src/symtab.c (symbol_get): Store a quoted version of the key.
12934 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12935 Adjust all callers.
12936
d2576365
AD
129372002-06-30 Akim Demaille <akim@epita.fr>
12938
12939 * src/state.h (reductions_t): Rename member `nreds' as num.
12940 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12941 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12942
ccaf65bc
AD
129432002-06-30 Akim Demaille <akim@epita.fr>
12944
12945 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12946 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12947 (shifts_to): Rename as...
12948 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12949 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12950 (TRANSITION_IS_DISABLED, transitions_to): these.
12951
87675353
AD
129522002-06-30 Akim Demaille <akim@epita.fr>
12953
12954 * src/print.c (print_shifts, print_gotos): Merge into...
12955 (print_transitions): this.
12956 (print_transitions, print_errs, print_reductions): Align the
12957 lookaheads columns.
12958 (print_core, print_transitions, print_errs, print_state,
12959 print_grammar): Output empty lines separator before, not after.
12960 (state_default_rule_compute): Rename as...
12961 (state_default_rule): this.
12962 * tests/conflicts.at (Defaulted Conflicted Reduction),
12963 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12964 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12965
ce4ccb4b
AD
129662002-06-30 Akim Demaille <akim@epita.fr>
12967
12968 Display items as we display rules.
12969
12970 * src/gram.h, src/gram.c (rule_lhs_print): New.
12971 * src/gram.c (grammar_rules_partial_print): Use it.
12972 * src/print.c (print_core): Likewise.
12973 * tests/conflicts.at (Defaulted Conflicted Reduction),
12974 (Unresolved SR Conflicts): Adjust.
12975 (Unresolved SR Conflicts): Adjust and rename as...
12976 (Resolved SR Conflicts): this, as was meant.
12977 * tests/regression.at (Web2c Report): Adjust.
12978
bc933ef1
AD
129792002-06-30 Akim Demaille <akim@epita.fr>
12980
12981 * src/print.c (state_default_rule_compute): New, extracted from...
12982 (print_reductions): here.
12983 Pessimize, but clarify the code.
12984 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12985
53d4308d
AD
129862002-06-30 Akim Demaille <akim@epita.fr>
12987
12988 * src/output.c (action_row): Let default_rule be always a rule
12989 number.
12990
574fb2d5
AD
129912002-06-30 Akim Demaille <akim@epita.fr>
12992
12993 * src/closure.c (print_firsts, print_fderives, closure):
12994 Use BITSET_EXECUTE.
12995 * src/lalr.c (lookaheads_print): Likewise.
12996 * src/state.c (state_rule_lookaheads_print): Likewise.
12997 * src/print_graph.c (print_core): Likewise.
12998 * src/print.c (print_reductions): Likewise.
12999 * src/output.c (action_row): Likewise.
13000 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13001
05811fd7
AD
130022002-06-30 Akim Demaille <akim@epita.fr>
13003
13004 * src/print_graph.c: Use report_flag.
13005
0e4d5753
AD
130062002-06-30 Akim Demaille <akim@epita.fr>
13007
13008 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13009 to...
13010 * src/relation.h, src/relation.c (traverse, relation_digraph)
13011 (relation_print, relation_transpose): New.
13012
24c7d800
AD
130132002-06-30 Akim Demaille <akim@epita.fr>
13014
13015 * src/state.h, src/state.c (shifts_to): New.
13016 * src/lalr.c (build_relations): Use it.
13017
9222837b
AD
130182002-06-30 Akim Demaille <akim@epita.fr>
13019
13020 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13021 (item_number_of_rule_number, rule_number_of_item_number): New.
13022 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13023 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13024 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13025 Propagate their use.
13026 Much remains to be done, in particular wrt `shorts' from types.h.
13027
260008e5
AD
130282002-06-30 Akim Demaille <akim@epita.fr>
13029
13030 * src/symtab.c (symbol_new): Initialize the `printer' member.
13031
8a731ca8
AD
130322002-06-30 Akim Demaille <akim@epita.fr>
13033
13034 * src/LR0.c (save_reductions): Remove, replaced by...
13035 * src/state.h, src/state.c (state_reductions_set): New.
13036 (reductions, errs): Rename as...
13037 (reductions_t, errs_t): these.
13038 Adjust all dependencies.
13039
32e1e0a4
AD
130402002-06-30 Akim Demaille <akim@epita.fr>
13041
13042 * src/LR0.c (state_list_t, state_list_append): New.
13043 (first_state, last_state): Now symbol_list_t.
13044 (this_state): Remove.
13045 (new_itemsets, append_states, save_reductions): Take a state_t as
13046 argument.
13047 (set_states, generate_states): Adjust.
13048 (save_shifts): Remove, replaced by...
13049 * src/state.h, src/state.c (state_shifts_set): New.
13050 (shifts): Rename as...
13051 (shifts_t): this.
13052 Adjust all dependencies.
13053 * src/state.h (state_t): Remove the `next' member.
13054
e5fb6710
AD
130552002-06-30 Akim Demaille <akim@epita.fr>
13056
13057 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13058 escaped in slot 0.
13059
c7ca99d4
AD
130602002-06-30 Akim Demaille <akim@epita.fr>
13061
13062 Use hash.h for the state hash table.
13063
13064 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13065 (allocate_storage): Use state_hash_new.
13066 (free_storage): Use state_hash_free.
13067 (new_state, get_state): Adjust.
13068 * src/lalr.h, src/lalr.c (states): Move to...
13069 * src/states.h (state_t): Remove the `link' member, no longer
13070 used.
13071 * src/states.h, src/states.c: here.
13072 (state_hash_new, state_hash_free, state_hash_lookup)
13073 (state_hash_insert, states_free): New.
13074 * src/states.c (state_table, state_compare, state_hash): New.
13075 * src/output.c (output_actions): Do not free states now, since we
13076 still need to know the final_state number in `prepare', called
13077 afterwards. Do it...
13078 * src/main.c (main): here: call states_free after `output'.
13079
df0e7316
AD
130802002-06-30 Akim Demaille <akim@epita.fr>
13081
13082 * src/state.h, src/state.c (state_new): New, extracted from...
13083 * src/LR0.c (new_state): here.
13084 * src/state.h (STATE_ALLOC): Move to...
13085 * src/state.c: here.
13086 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13087 * src/state.h, src/state.c: here.
13088
39f41916
AD
130892002-06-30 Akim Demaille <akim@epita.fr>
13090
13091 * src/reader.c (gensym): Rename as...
13092 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13093 (getsym): Rename as...
13094 (symbol_get): this.
13095
d57650a5
AD
130962002-06-30 Akim Demaille <akim@epita.fr>
13097
13098 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13099 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13100 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13101 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13102
5a08f1ce
AD
131032002-06-30 Akim Demaille <akim@epita.fr>
13104
13105 Make the test suite pass with warnings checked.
13106
13107 * tests/actions.at (Printers and Destructors): Improve.
13108 Avoid unsigned vs. signed issues.
13109 * tests/calc.at: Don't exercise the scanner here, do it...
13110 * tests/input.at (Torturing the Scanner): here.
13111
720623af
PH
131122002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13113
88e7e941 13114 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
13115 reorganize first lines parallel to yacc.c.
13116
fb8135fa
AD
131172002-06-28 Akim Demaille <akim@epita.fr>
13118
13119 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13120 (b4_token_enum, b4_token_defines): New, factored from...
13121 * data/lalr1.cc, data/yacc.c, glr.c: here.
13122
41442480
AD
131232002-06-28 Akim Demaille <akim@epita.fr>
13124
13125 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13126 unused variables.
13127 * src/output.c (merger_output): static.
13128
e0e5bf84
AD
131292002-06-28 Akim Demaille <akim@epita.fr>
13130
ba0fe3c7 13131 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
13132 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13133 pacify GCC.
13134 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 13135
676385e2
PH
131362002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13137
13138 Accumulated changelog for new GLR parsing features.
13139
6a254321 13140 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
13141 conflicts_total_count.
13142 * src/conflicts.h: Ditto.
13143 * src/output.c (token_actions): Use the new name.
13144 (output_conflicts): Change conflp => conflict_list_heads, and
13145 confl => conflict_list for better readability.
13146 * data/glr.c: Use the new names.
13147 * NEWS: Add self to GLR announcement.
e0e5bf84 13148
676385e2
PH
13149 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13150
13151 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13152 Akim Demaille.
13153
13154 * data/bison.glr: Change name to glr.c
13155 * data/glr.c: Renamed from bison.glr.
13156 * data/Makefile.am: Add glr.c
e0e5bf84
AD
13157
13158 * src/getargs.c:
13159
676385e2 13160 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 13161 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 13162
676385e2
PH
13163 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13164
13165 * data/bison.glr: Be sure to restore the
13166 current #line when returning to the skeleton contents after having
13167 exposed the input file's #line.
13168
13169 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13170
13171 * data/bison.glr: Bring up to date with changes to bison.simple.
13172
13173 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13174
13175 * data/bison.glr: Correct definitions that use b4_prefix.
13176 Various reformatting.
13177 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13178 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13179 yytokenp argument; now part of stack.
13180 (yychar): Define to behave as documented.
13181 (yyclearin): Ditto.
e0e5bf84 13182
676385e2
PH
13183 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13184
13185 * src/reader.h: Add declaration for free_merger_functions.
13186
13187 * src/reader.c (merge_functions): New variable.
13188 (get_merge_function): New function.
13189 (free_merger_functions): New function.
13190 (readgram): Check for %prec that is not followed by a symbol.
13191 Handle %dprec and %merge declarations.
13192 (packgram): Initialize dprec and merger fields in rules array.
13193
13194 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13195 conflict_list_cnt, conflict_list_free): New variables.
13196 (table_grow): Also grow conflict_table.
e0e5bf84 13197 (prepare_rules): Output dprec and merger tables.
676385e2 13198 (conflict_row): New function.
e0e5bf84 13199 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
13200 default reduction in conflicted states for GLR parser so that there
13201 are spaces for the conflict lists.
13202 (save_row): Also save conflict information.
13203 (token_actions): Allocate conflict list.
13204 (merger_output): New function.
13205 (pack_vector): Pack conflict table, too.
13206 (output_conflicts): New function to output yyconflp and yyconfl.
13207 (output_check): Allocate conflict_tos.
13208 (output_actions): Output conflict tables, also.
13209 (output_skeleton): Output b4_mergers definition.
13210 (prepare): Output b4_max_rhs_length definition.
13211 Use 'bison.glr' as default skeleton for GLR parsers.
13212
13213 * src/gram.c (glr_parser): New flag.
13214 (grammar_free): Call free_merger_functions.
13215
13216 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13217 all pairs of conflicting reductions, rather than just all tokens
13218 causing conflicts. Needed to size conflict tables.
e0e5bf84 13219 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
13220 interface.
13221 (conflicts_print): Ditto.
13222 (count_total_conflicts): New function.
13223
13224 * src/reader.h (merger_list): New type.
13225 (merge_functions): New variable.
13226
13227 * src/lex.h (tok_dprec, tok_merge): New token types.
13228
13229 * src/gram.h (rule_s): Add dprec and merger fields.
13230 (glr_parser): New flag.
13231
13232 * src/conflicts.h (count_total_conflicts): New function.
13233
13234 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13235
13236 * doc/bison.texinfo (Generalized LR Parsing): New section.
13237 (GLR Parsers): New section.
13238 (Language and Grammar): Mention GLR parsing.
13239 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13240 Correct typo ("tge" -> "the").
13241
13242 * data/bison.glr: New skeleton for GLR parsing.
13243
13244 * tests/cxx-gram.at: New tests for GLR parsing.
13245
13246 * tests/testsuite.at: Include cxx-gram.at.
13247
13248 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 13249
676385e2
PH
13250 * src/parse-gram.y:
13251
13252 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13253
13254 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 13255
b5480d74 132562002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
13257
13258 * src/options.h, src/options.c: Remove.
13259 * src/getargs.c (short_options, long_options): New.
13260
60491a94
AD
132612002-06-27 Akim Demaille <akim@epita.fr>
13262
13263 * data/bison.simple, data/bison.c++: Rename as...
13264 * data/yacc.c, data/lalr1.cc: these.
13265 * doc/bison.texinfo (Environment Variables): Remove.
13266
9be0c25b
AD
132672002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13268
13269 * src/getargs.c (report_argmatch): Initialize strtok().
13270
1ae72863
AD
132712002-06-20 Akim Demaille <akim@epita.fr>
13272
13273 * data/bison.simple (b4_symbol_actions): New, replaces...
13274 (b4_symbol_destructor, b4_symbol_printer): these.
13275 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13276 user token numbers.
13277
87542d29
AD
132782002-06-20 Akim Demaille <akim@epita.fr>
13279
13280 * data/bison.simple (yydestructor): Rename as...
13281 (yydestruct): this.
13282
1a31ed21
AD
132832002-06-20 Akim Demaille <akim@epita.fr>
13284
13285 * src/symtab.h, src/symtab.c (symbol_type_set)
13286 (symbol_destructor_set, symbol_precedence_set): The location is
13287 the last argument.
13288 Adjust all callers.
13289
e776192e
AD
132902002-06-20 Akim Demaille <akim@epita.fr>
13291
13292 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13293 internals.
13294 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13295 Takes a location.
13296 * src/symtab.h, src/symtab.c (symbol_class_set)
13297 (symbol_user_token_number_set): Likewise.
13298 Adjust all callers.
13299 Promote complain_at.
13300 * tests/input.at (Type Clashes): Adjust.
13301
5c1180b3
AD
133022002-06-20 Akim Demaille <akim@epita.fr>
13303
13304 * data/bison.simple (YYLEX): Fix the declaration when
13305 %pure-parser.
13306
e3170060
AD
133072002-06-20 Akim Demaille <akim@epita.fr>
13308
13309 * data/bison.simple (yysymprint): Don't print the token number,
13310 just its name.
13311 * tests/actions.at (Destructors): Rename as...
13312 (Printers and Destructors): this.
13313 Also exercise %printer.
13314
253862fd
AD
133152002-06-20 Akim Demaille <akim@epita.fr>
13316
13317 * data/bison.simple (YYDSYMPRINT): New.
13318 Use it to remove many of the #if YYDEBUG/if (yydebug).
13319
366eea36
AD
133202002-06-20 Akim Demaille <akim@epita.fr>
13321
13322 * src/symtab.h, src/symtab.c (symbol_t): printer and
13323 printer_location are new members.
13324 (symbol_printer_set): New.
13325 * src/parse-gram.y (PERCENT_PRINTER): New token.
13326 Handle its associated rule.
13327 * src/scan-gram.l: Adjust.
13328 (handle_destructor_at, handle_destructor_dollar): Rename as...
13329 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13330 * src/output.c (symbol_printers_output): New.
13331 (output_skeleton): Call it.
13332 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13333 since there are already many grammar files with a user `yyprint'.
13334 Replace the calls to YYPRINT to calls to yysymprint.
13335 * tests/calc.at: Adjust.
13336 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13337 taking advantage of parser very internal details (stack size!).
13338
4f25ebb0
AD
133392002-06-20 Akim Demaille <akim@epita.fr>
13340
13341 * src/scan-gram.l: Complete the scanner with the missing patterns
13342 to pacify Flex.
13343 Use `quote' and `symbol_tag_get' where appropriate.
13344
93b68a0e
AD
133452002-06-19 Akim Demaille <akim@epita.fr>
13346
13347 * tests/actions.at (Destructors): Augment to test locations.
13348 * data/bison.simple (yydestructor): Pass it the current location
13349 if locations are enabled.
13350 Prototype only when __STDC__ or C++.
13351 Change the argument names to move into the yy name space: there is
13352 user code here.
13353
58612f1d
AD
133542002-06-19 Akim Demaille <akim@epita.fr>
13355
74310291
AD
13356 * data/bison.simple (b4_pure_if): New.
13357 Use it instead of #ifdef YYPURE.
13358
133592002-06-19 Akim Demaille <akim@epita.fr>
13360
13361 * data/bison.simple (b4_location_if): New.
58612f1d
AD
13362 Use it instead of #ifdef YYLSP_NEEDED.
13363
f25bfb75
AD
133642002-06-19 Akim Demaille <akim@epita.fr>
13365
13366 Prepare @$ in %destructor, but currently don't bind it in the
13367 skeleton, as %location use is not cleaned up yet.
13368
13369 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13370 (handle_action_at): New.
13371 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13372 a braced_code_t and a location as additional arguments.
13373 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13374 unquote one when outputting `b4_dollar_dollar'.
13375 Adjust callers.
13376 * data/bison.simple (b4_eval): Remove.
13377 (b4_symbol_destructor): Adjust.
13378 * tests/input.at (Invalid @n): Adjust.
13379
c732d2c6
AD
133802002-06-19 Zack Weinberg <zack@codesourcery.com>
13381
13382 * doc/bison.texinfo: Document ability to have multiple
13383 prologue sections.
13384
8c165d89
AD
133852002-06-18 Akim Demaille <akim@epita.fr>
13386
13387 * src/files.c (compute_base_names): When computing the output file
13388 names from the input file name, strip the directory part.
13389
ca98bf57
AD
133902002-06-18 Akim Demaille <akim@epita.fr>
13391
13392 * data/bison.simple.new: Comment changes.
13393 Reported by Andreas Schwab.
13394
0bfb02ff
AD
133952002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13396
13397 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13398 there are no `label `yyoverflowlab' defined but not used' warnings
13399 when yyoverflow is defined.
13400
24c0aad7
AD
134012002-06-18 Akim Demaille <akim@epita.fr>
13402
13403 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13404 new member.
13405 (symbol_destructor_set): Adjust.
13406 * src/output.c (symbol_destructors_output): Output the destructor
13407 locations.
13408 Output the symbol name.
13409 * data/bison.simple (b4_symbol_destructor): Adjust.
13410
5719c109
AD
134112002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13412 and Akim Demaille <akim@epita.fr>
13413
13414 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13415 what's left on the stack when the error recovery hits EOF.
13416 * tests/actions.at (Destructors): Complete to exercise this case.
13417
9280d3ef
AD
134182002-06-17 Akim Demaille <akim@epita.fr>
13419
13420 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13421 arguments is really empty, not only equal to `[]'.
13422 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13423 member.
13424 (symbol_destructor_set): New.
13425 * src/output.c (symbol_destructors_output): New.
13426 * src/reader.h (brace_code_t, current_braced_code): New.
13427 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13428 (handle_dollar): Rename as...
13429 (handle_action_dollar): this.
13430 (handle_destructor_dollar): New.
13431 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13432 (grammar_declaration): Use it.
13433 * data/bison.simple (yystos): Is always defined.
13434 (yydestructor): New.
13435 * tests/actions.at (Destructors): New.
13436 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13437
dafdc66f
AD
134382002-06-17 Akim Demaille <akim@epita.fr>
13439
13440 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13441 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13442 rule_length only when needed.
13443 * src/output.c (actions_output, token_definitions_output): Output
13444 the full M4 block.
13445 * src/symtab.c: Don't access directly to the symbol tag, use
13446 symbol_tag_get.
13447 * src/parse-gram.y: Use symbol_list_free.
13448
56c47203
AD
134492002-06-17 Akim Demaille <akim@epita.fr>
13450
13451 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13452 (symbol_list_prepend, get_type_name): Move to...
13453 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13454 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13455 Adjust all callers.
13456 (symbol_list_free): New.
13457 * src/scan-gram.l (handle_dollar): Takes a location.
13458 * tests/input.at (Invalid $n): Adjust.
13459
1e0bab92
AD
134602002-06-17 Akim Demaille <akim@epita.fr>
13461
13462 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13463 (symbol_list_prepend): New.
13464 * src/parse-gram.y (%union): `list' is a new member.
13465 (symbols.1): New, replaces...
13466 (terms_to_prec.1, nterms_to_type.1): these.
13467 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13468 Take a location as additional argument.
13469 Adjust all callers.
13470
04e60654
AD
134712002-06-15 Akim Demaille <akim@epita.fr>
13472
13473 * src/parse-gram.y: Move %token in the declaration section so that
13474 we don't depend upon CVS Bison.
13475
10e5b8bd
AD
134762002-06-15 Akim Demaille <akim@epita.fr>
13477
13478 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13479 * src/print.c (print_core): Use it.
13480
9801d40c
AD
134812002-06-15 Akim Demaille <akim@epita.fr>
13482
13483 * src/conflicts.c (log_resolution): Accept the rule involved in
13484 the sr conflicts instead of the lookahead number that points to
13485 that rule.
13486 (flush_reduce): Accept the current lookahead vector as argument,
13487 instead of the index in LA.
13488 (resolve_sr_conflict): Accept the current number of lookahead
13489 bitset to consider for the STATE, instead of the index in LA.
13490 (set_conflicts): Adjust.
13491 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13492
c0263492
AD
134932002-06-15 Akim Demaille <akim@epita.fr>
13494
13495 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13496 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13497 Adjust all dependencies.
13498 * src/lalr.c (initialize_lookaheads): Split into...
13499 (states_lookaheads_count, states_lookaheads_initialize): these.
13500 (lalr): Adjust.
13501
9757c359
AD
135022002-06-15 Akim Demaille <akim@epita.fr>
13503
13504 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13505 out of...
13506 (grammar_rules_print): here.
13507 * src/reduce.c (reduce_output): Use it.
13508 * tests/reduce.at (Useless Rules, Reduced Automaton)
13509 (Underivable Rules): Adjust.
13510
6b98e4b5
AD
135112002-06-15 Akim Demaille <akim@epita.fr>
13512
13513 Copy BYacc's nice way to report the grammar.
13514
13515 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13516 New.
13517 Don't print the rules' location, it is confusing and useless.
13518 (rule_print): Use grammar_rhs_print.
13519 * src/print.c (print_grammar): Use grammar_rules_print.
13520
6b98e4b5
AD
135212002-06-15 Akim Demaille <akim@epita.fr>
13522
13523 Complete and rationalize `useless thing' warnings.
13524
13525 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13526 (symbol_tag_print): New.
13527 Use them everywhere in place of accessing directly the tag member.
13528 * src/gram.h, src/gram.c (rule_print): New.
13529 Use it where a rule used to be printed `by hand'.
13530 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13531 (reduce_grammar_tables): Report the useless rules.
13532 (reduce_print): Useless things are a warning, not an error.
13533 Report it as such.
13534 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13535 (Reduced Automaton, Underivable Rules): Adjust.
13536 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13537 * tests/conflicts.at (Unresolved SR Conflicts)
13538 (Solved SR Conflicts): Adjust.
13539
ee000ba4
AD
135402002-06-15 Akim Demaille <akim@epita.fr>
13541
13542 Let symbols have a location.
13543
13544 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13545 (getsym): Adjust.
13546 Adjust all callers.
13547 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13548 Use location_t, not int.
13549 * src/symtab.c (symbol_check_defined): Take advantage of the
13550 location.
13551 * tests/regression.at (Invalid inputs): Adjust.
13552
8efe435c
AD
135532002-06-15 Akim Demaille <akim@epita.fr>
13554
13555 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13556 (input): Don't try to initialize yylloc here, do it in the
13557 scanner.
13558 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13559 * src/gram.h (rule_t): Change line and action_line into location
13560 and action_location, of location_t type.
13561 Adjust all dependencies.
13562 * src/location.h, src/location.c (empty_location): New.
13563 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13564 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13565 (grammar_current_rule_symbol_append)
13566 (grammar_current_rule_action_append): Expect a location as argument.
13567 * src/reader.c (grammar_midrule_action): Adjust to attach an
13568 action's location as dummy symbol location.
13569 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13570 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13571 the line numbers.
13572
1921f1d7
AD
135732002-06-14 Akim Demaille <akim@epita.fr>
13574
13575 Grammar declarations may be found in the grammar section.
13576
13577 * src/parse-gram.y (rules_or_grammar_declaration): New.
13578 (declarations): Each declaration may end with a semicolon, not
13579 just...
13580 (grammar_declaration): `"%union"'.
13581 (grammar): Branch to rules_or_grammar_declaration.
13582
4515534c
AD
135832002-06-14 Akim Demaille <akim@epita.fr>
13584
13585 * src/main.c (main): Invoke scanner_free.
13586
f958596b
AD
135872002-06-14 Akim Demaille <akim@epita.fr>
13588
13589 * src/output.c (m4_invoke): Extracted from...
13590 (output_skeleton): here.
13591 Free tempfile.
13592
2c569025
AD
135932002-06-14 Akim Demaille <akim@epita.fr>
13594
13595 * src/parse-gram.y (directives, directive, gram)
13596 (grammar_directives, precedence_directives, precedence_directive):
13597 Rename as...
13598 (declarations, declaration, grammar, grammar_declaration)
13599 (precedence_declaration, precedence_declarator): these.
13600 (symbol_declaration): New.
13601
592e8d4d
AD
136022002-06-14 Akim Demaille <akim@epita.fr>
13603
13604 * src/files.c (action_obstack): Remove, unused.
13605 (output_obstack): Remove it, and all its dependencies, as it is no
13606 longer needed.
13607 * src/reader.c (epilogue_set): Build the epilogue in the
13608 muscle_obstack.
13609 * src/output.h, src/output.c (muscle_obstack): Move to...
13610 * src/muscle_tab.h, src/muscle_tab.h: here.
13611 (muscle_init): Initialize muscle_obstack.
13612 (muscle_free): New.
13613 * src/main.c (main): Call it.
13614
0c15323d
AD
136152002-06-14 Akim Demaille <akim@epita.fr>
13616
13617 * src/location.h: New, extracted from...
13618 * src/reader.h: here.
13619 * src/Makefile.am (noinst_HEADERS): Merge into
13620 (bison_SOURCES): this.
13621 Add location.h.
13622 * src/parse-gram.y: Use location_t instead of Bison's.
13623 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13624 Use location_t instead of ints.
13625
e96c9728
AD
136262002-06-14 Akim Demaille <akim@epita.fr>
13627
13628 * data/bison.simple, data/bison.c++: Be sure to restore the
13629 current #line when returning to the skeleton contents after having
13630 exposed the input file's #line.
13631
75d1fe16
AD
136322002-06-12 Akim Demaille <akim@epita.fr>
13633
13634 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13635 eager.
13636 * tests/actions.at (Exotic Dollars): New.
13637
6c35d22c
AD
136382002-06-12 Akim Demaille <akim@epita.fr>
13639
13640 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13641 ['"/] too eagerly.
13642 * tests/input.at (Torturing the Scanner): New.
13643
1d6412ad
AD
136442002-06-11 Akim Demaille <akim@epita.fr>
13645
13646 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13647 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13648 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13649 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13650 * src/reader.c (reader): Use it.
13651
4cdb01db
AD
136522002-06-11 Akim Demaille <akim@epita.fr>
13653
13654 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13655 Adjust all callers.
13656 (scanner_last_string_free): New.
13657
44995b2e
AD
136582002-06-11 Akim Demaille <akim@epita.fr>
13659
13660 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13661 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13662 (last_string, YY_OBS_FREE): New.
13663 Use them when returning an ID.
13664
e9955c83
AD
136652002-06-11 Akim Demaille <akim@epita.fr>
13666
13667 Have Bison grammars parsed by a Bison grammar.
13668
13669 * src/reader.c, src/reader.h (prologue_augment): New.
13670 * src/reader.c (copy_definition): Remove.
13671
13672 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13673 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13674 (grammar_current_rule_prec_set, grammar_current_rule_check)
13675 (grammar_current_rule_symbol_append)
13676 (grammar_current_rule_action_append): Export.
13677 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13678 (symbol_list_action_append): Remove.
13679 Hook the routines from reader.
13680 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13681 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13682
13683 * src/reader.c (read_declarations): Remove, unused.
13684
13685 * src/parse-gram.y: Handle the epilogue.
13686 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13687 (grammar_start_symbol_set): this.
13688 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13689 * src/reader.c (readgram): Remove, unused.
13690 (reader): Adjust to insert eoftoken and axiom where appropriate.
13691
13692 * src/reader.c (copy_dollar): Replace with...
13693 * src/scan-gram.h (handle_dollar): this.
13694 * src/parse-gram.y: Remove `%thong'.
13695
13696 * src/reader.c (copy_at): Replace with...
13697 * src/scan-gram.h (handle_at): this.
13698
13699 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13700 New.
13701
13702 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13703 time being.
13704
13705 * src/reader.h, src/reader.c (grammar_rule_end): New.
13706
13707 * src/parse.y (current_type, current_class): New.
13708 Implement `%nterm', `%token' support.
13709 Merge `%term' into `%token'.
13710 (string_as_id): New.
13711 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13712 type name.
13713
13714 * src/parse-gram.y: Be sure to handle properly the beginning of
13715 rules.
13716
13717 * src/parse-gram.y: Handle %type.
13718 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13719
13720 * src/parse-gram.y: More directives support.
13721 * src/options.c: No longer handle source directives.
13722
13723 * src/parse-gram.y: Fix %output.
13724
13725 * src/parse-gram.y: Handle %union.
13726 Use the prologue locations.
13727 * src/reader.c (parse_union_decl): Remove.
13728
13729 * src/reader.h, src/reader.c (epilogue_set): New.
13730 * src/parse-gram.y: Use it.
13731
13732 * data/bison.simple, data/bison.c++: b4_stype is now either not
13733 defined, then default to int, or to the contents of %union,
13734 without `union' itself.
13735 Adjust.
13736 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13737
13738 * src/output.c (actions_output): Don't output braces, as they are
13739 already handled by the scanner.
13740
13741 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13742 characters to themselves.
13743
13744 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13745 that the epilogue has a proper #line.
13746
13747 * src/parse-gram.y: Handle precedence/associativity.
13748
13749 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13750 a terminal.
13751 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13752 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13753 at all to define terminals that cannot be emitted.
13754
13755 * src/scan-gram.l: Escape M4 characters.
13756
13757 * src/scan-gram.l: Working properly with escapes in user
13758 strings/characters.
13759
13760 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13761 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13762 grammar.
13763 Use more modest sizes, as for the time being the parser does not
13764 release memory, and therefore the process swallows a huge amount
13765 of memory.
13766
13767 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13768 stricter %token grammar.
13769
13770 * src/symtab.h (associativity): Add `undef_assoc'.
13771 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13772 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13773
13774 * tests/regression.at (Invalid %directive): Remove, as it is now
13775 meaningless.
13776 (Invalid inputs): Adjust to the new error messages.
13777 (Token definitions): The new grammar doesn't allow too many
13778 eccentricities.
13779
13780 * src/lex.h, src/lex.c: Remove.
13781 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13782 (copy_character, copy_string2, copy_string, copy_identifier)
13783 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13784 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13785 (parse_action): Remove.
13786 * po/POTFILES.in: Adjust.
13787
2e047461
AD
137882002-06-11 Akim Demaille <akim@epita.fr>
13789
cd05d13c 13790 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
13791 rule's action member: return the action as a string.
13792 Don't require `rule_length' as an argument: compute it.
13793 (grammar_current_rule_symbol_append)
13794 (grammar_current_rule_action_append): New, eved out from
13795 (readgram): here.
13796 Remove `action_flag', `rulelength', unused now.
13797
9af3fbce
AD
137982002-06-11 Akim Demaille <akim@epita.fr>
13799
13800 * src/reader.c (grammar_current_rule_prec_set).
13801 (grammar_current_rule_check): New, eved out from...
13802 (readgram): here.
13803 Remove `xaction', `first_rhs': useless.
13804 * tests/input.at (Type clashes): New.
13805 * tests/existing.at (GNU Cim Grammar): Adjust.
13806
1485e106
AD
138072002-06-11 Akim Demaille <akim@epita.fr>
13808
13809 * src/reader.c (grammar_midrule_action): New, Eved out from
13810 (readgram): here.
13811
da4160c3
AD
138122002-06-11 Akim Demaille <akim@epita.fr>
13813
13814 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13815 New.
13816 (readgram): Use them as replacement of inlined code, crule and
13817 crule1.
13818
f6d0f937
AD
138192002-06-11 Akim Demaille <akim@epita.fr>
13820
13821 * src/reader.c (grammar_end, grammar_symbol_append): New.
13822 (readgram): Use them.
13823 Make the use of `p' as local as possible.
13824
69078d4b
AD
138252002-06-10 Akim Demaille <akim@epita.fr>
13826
13827 GCJ's parser requires the tokens to be defined before the prologue.
13828
13829 * data/bison.simple: Output the token definition before the user's
13830 prologue.
13831 * tests/regression.at (Braces parsing, Duplicate string)
13832 (Mixing %token styles): Check the output from bison.
13833 (Early token definitions): New.
13834
5e424082
AD
138352002-06-10 Akim Demaille <akim@epita.fr>
13836
13837 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13838 assigning twice the same user number to a token, so that we can
13839 use it in...
13840 * src/lex.c (lex): here.
13841 Also use `symbol_class_set' instead of hand written code.
13842 * src/reader.c (parse_assoc_decl): Likewise.
13843
44536b35
AD
138442002-06-10 Akim Demaille <akim@epita.fr>
13845
13846 * src/symtab.c, src/symtab.c (symbol_class_set)
13847 (symbol_user_token_number_set): New.
13848 * src/reader.c (parse_token_decl): Use them.
13849 Use a switch instead of ifs.
13850 Use a single argument.
13851
8b9f2372
AD
138522002-06-10 Akim Demaille <akim@epita.fr>
13853
13854 Remove `%thong' support as it is undocumented, unused, duplicates
13855 `%token's job, and creates useless e-mail traffic with people who
13856 want to know what it is, why it is undocumented, unused, and
13857 duplicates `%token's job.
13858
13859 * src/reader.c (parse_thong_decl): Remove.
13860 * src/options.c (option_table): Remove "thong".
13861 * src/lex.h (tok_thong): Remove.
13862
3ae2b51f
AD
138632002-06-10 Akim Demaille <akim@epita.fr>
13864
13865 * src/symtab.c, src/symtab.c (symbol_type_set)
13866 (symbol_precedence_set): New.
13867 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13868 (value_components_used): Remove, unused.
13869
2f1afb73
AD
138702002-06-09 Akim Demaille <akim@epita.fr>
13871
13872 Move symbols handling code out of the reader.
13873
13874 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13875 (axiom): Move to...
13876 * src/symtab.h, src/symtab.c: here.
13877
13878 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13879 * src/reader.c (startval): Rename as...
13880 * src/symtab.h, src/symtab.c (startsymbol): this.
13881 * src/reader.c: Adjust.
13882
13883 * src/reader.c (symbol_check_defined, symbol_make_alias)
13884 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13885 (token_translations_init)
13886 Move to...
13887 * src/symtab.c: here.
13888 * src/reader.c (packsymbols): Move to...
13889 * src/symtab.h, src/symtab.c (symbols_pack): here.
13890 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13891 argument.
13892
e9bca3ad
AD
138932002-06-03 Akim Demaille <akim@epita.fr>
13894
13895 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13896 then statements.
13897
86eff183
AD
138982002-06-03 Akim Demaille <akim@epita.fr>
13899
13900 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13901 structs with non literals.
13902 * src/scan-skel.l: never-interactive.
13903 * src/conflicts.c (enum conflict_resolution_e): No trailing
13904 comma.
13905 * src/getargs.c (usage): Split long literal strings.
13906 Reported by Hans Aberg.
13907
717be197
AD
139082002-05-28 Akim Demaille <akim@epita.fr>
13909
13910 * data/bison.c++: Use C++ ostreams.
13911 (cdebug_): New member.
13912
670ddffd
AD
139132002-05-28 Akim Demaille <akim@epita.fr>
13914
13915 * src/output.c (output_skeleton): Be sure to allocate enough room
13916 for `/' _and_ for `\0' in full_skeleton.
13917
769b430f
AD
139182002-05-28 Akim Demaille <akim@epita.fr>
13919
13920 * data/bison.c++: Catch up with bison.simple:
13921 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13922 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13923 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13924 and popping traces.
13925
7067cb36
PH
139262002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13927
13928 * src/output.c (output_skeleton): Put an explicit path in front of
13929 the skeleton file name, rather than relying on the -I directory,
13930 to partially alleviate effects of having a skeleton file lying around
13931 in the current directory.
769b430f 13932
4a713ec2
PH
139332002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13934
769b430f 13935 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
13936 obstack_printf should be obstack_fgrow1.
13937
b408954b
AD
139382002-05-26 Akim Demaille <akim@epita.fr>
13939
13940 * src/state.h (state_t): `solved_conflicts' is a new member.
13941 * src/LR0.c (new_state): Set it to 0.
13942 * src/conflicts.h, src/conflicts.c (print_conflicts)
13943 (free_conflicts, solve_conflicts): Rename as...
13944 (conflicts_print, conflicts_free, conflicts_solve): these.
13945 Adjust callers.
13946 * src/conflicts.c (enum conflict_resolution_e)
13947 (solved_conflicts_obstack): New, used by...
13948 (log_resolution): this.
13949 Adjust to attach the conflict resolution to each state.
13950 Complete the description with the precedence/associativity
13951 information.
13952 (resolve_sr_conflict): Adjust.
13953 * src/print.c (print_state): Output its solved_conflicts.
13954 * tests/conflicts.at (Unresolved SR Conflicts)
13955 (Solved SR Conflicts): Exercise --report=all.
13956
a49aecd5
AD
139572002-05-26 Akim Demaille <akim@epita.fr>
13958
13959 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13960 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13961 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13962 (token_number_t, item_number_as_token_number)
13963 (token_number_as_item_number, muscle_insert_token_number_table):
13964 Rename as...
13965 (symbol_number_t, item_number_as_symbol_number)
13966 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13967 these, since it is more appropriate.
13968
5504898e
AD
139692002-05-26 Akim Demaille <akim@epita.fr>
13970
13971 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13972 `Error:' lines.
13973 * data/bison.simple (yystos) [YYDEBUG]: New.
13974 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13975 error recovery.
13976 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13977
ec3bc396
AD
139782002-05-25 Akim Demaille <akim@epita.fr>
13979
13980 * doc/bison.texinfo (Debugging): Split into...
13981 (Tracing): this new section, its former contents, and...
13982 (Understanding): this new section.
13983 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13984 by...
13985 (report_flag): this.
13986 Adjust all dependencies.
13987 (report_args, report_types, report_argmatch): New.
13988 (usage, getargs): Report/support -r, --report.
13989 * src/options.h
13990 (struct option_table_struct): Rename as..,
13991 (struct option_table_s): this.
13992 Rename the `set_flag' member to `flag' to match with getopt_long's
13993 struct.
13994 * src/options.c (option_table): Split verbose into an entry for
13995 %verbose, and another for --verbose.
13996 Support --report/-r, so remove -r from the obsolete --raw.
13997 * src/print.c: Attach full item sets and lookaheads reports to
13998 report_flag instead of trace_flag.
13999 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14000
78df8250
PE
140012002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14002 and Paul Eggert <eggert@twinsun.com>
769b430f 14003
78df8250
PE
14004 * data/bison.simple (yyparse): Correct error handling to conform to
14005 POSIX and yacc. Specifically, after syntax error is discovered,
14006 do not reduce further before shifting the error token.
14007 Clean up the code a bit by removing the labels yyerrdefault,
14008 yyerrhandle, yyerrpop.
14009 * NEWS: Document the above.
14010
c0c9ea05
PH
140112002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14012
14013 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14014 type; it isn't always big enough, since it doesn't necessarily
14015 include non-terminals.
769b430f 14016 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
14017 the latter can be removed.
14018 (yy_token_number_type): Remove, only one use.
14019 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14020 don't use TokenNumberType as element type.
769b430f 14021
c0c9ea05
PH
14022 * tests/regression.at: Modify expected output to agree with change
14023 to yyr1 and yytranslate.
769b430f 14024
6390a83f
FK
140252002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14026
14027 * src/reader.c (parse_action): Use copy_character instead of
14028 obstack_1grow.
14029
db7c8e9a
AD
140302002-05-13 Akim Demaille <akim@epita.fr>
14031
14032 * tests/regression.at (Token definitions): Prototype yylex and
14033 yyerror.
14034
fcc61800
PH
140352002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14036
158c687b 14037 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
14038 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14039 32-bit arithmetic.
14040 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14041
5683e9b2
AD
140422002-05-07 Akim Demaille <akim@epita.fr>
14043
14044 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14045 avoid GCC warnings.
14046
0c2d3f4c
AD
140472002-05-07 Akim Demaille <akim@epita.fr>
14048
14049 Kill GCC warnings.
14050
14051 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14052 over the RHS of each rule.
14053 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14054 * src/state.h (state_t): Member `nitems' is unsigned short.
14055 * src/LR0.c (get_state): Adjust.
14056 * src/reader.c (packgram): Likewise.
14057 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14058 `Type'.
14059 (muscle_insert_int_table): Remove, unused.
14060 (prepare_rules): Remove `max'.
14061
1565b720
AD
140622002-05-06 Akim Demaille <akim@epita.fr>
14063
14064 * src/closure.c (print_firsts): Display of the symbol tags.
14065 (bitmatrix_print): Move to...
14066 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14067 here.
14068 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14069
cfaee611
AD
140702002-05-06 Akim Demaille <akim@epita.fr>
14071
14072 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14073 hash_do_for_each.
14074
458be8e0
AD
140752002-05-06 Akim Demaille <akim@epita.fr>
14076
14077 * src/LR0.c (new_state, get_state): Instead of using the global
14078 `kernel_size' and `kernel_base', have two new arguments:
14079 `core_size' and `core'.
14080 Adjust callers.
14081
a900a624
AD
140822002-05-06 Akim Demaille <akim@epita.fr>
14083
14084 * src/reader.c (packgram): No longer end `ritem' with a 0
14085 sentinel: it is not used.
14086
d4e7d3a1
AD
140872002-05-05 Akim Demaille <akim@epita.fr>
14088
14089 New experimental feature: display the lookaheads in the report and
14090 graph.
14091
14092 * src/print (print_core): When --trace-flag, display the rules
14093 lookaheads.
14094 * src/print_graph.c (print_core): Likewise.
14095 Swap the arguments.
14096 Adjust caller.
14097
39ceb25b
AD
140982002-05-05 Akim Demaille <akim@epita.fr>
14099
14100 * tests/torture.at (Many lookaheads): New test.
14101
5372019f
AD
141022002-05-05 Akim Demaille <akim@epita.fr>
14103
14104 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14105 (GENERATE_MUSCLE_INSERT_TABLE): this.
14106 (output_int_table, output_unsigned_int_table, output_short_table)
14107 (output_token_number_table, output_item_number_table): Replace with...
14108 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14109 (muscle_insert_short_table, muscle_insert_token_number_table)
14110 (muscle_insert_item_number_table): these.
14111 Adjust all callers.
14112 (prepare_tokens): Don't free `translations', since...
14113 * src/reader.h, src/reader.c (grammar_free): do it.
14114 Move to...
14115 * src/gram.h, src/gram.c (grammar_free): here.
14116 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14117 b4_translate_max.
14118
5df5f6d5
AD
141192002-05-05 Akim Demaille <akim@epita.fr>
14120
14121 * src/output.c (output_unsigned_int_table): New.
14122 (prepare_rules): `i' is unsigned.
14123 `prhs', `rline', `r2' are unsigned int.
14124 Rename muscle `rhs_number_max' as `rhs_max'.
14125 Output muscles `prhs_max', `rline_max', and `r2_max'.
14126 Free rline and r1.
14127 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14128 to compute types instead of constant types.
14129 * tests/regression.at (Web2c Actions): Adjust.
14130
b87f8b21
AD
141312002-05-04 Akim Demaille <akim@epita.fr>
14132
14133 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14134 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14135 Adjust dependencies.
14136 * src/output.c (token_definitions_output): Be sure not to output a
14137 `#define 'a'' when fed with `%token 'a' "a"'.
14138 * tests/regression.at (Token definitions): New.
14139
8bb936e4
PE
141402002-05-03 Paul Eggert <eggert@twinsun.com>
14141
14142 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14143 for K&R C.
14144
141452002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14146
14147 * Makefile.am (SUBDIRS): Remove intl.
14148 (EXTRA_DIST): Add config/config.rpath.
14149
53c71a12
AD
141502002-05-03 Akim Demaille <akim@epita.fr>
14151
14152 * data/bison.simple (m4_if): Don't output empty enums.
14153 And actually, output valid enum definitions :(.
14154
289dd0cf
AD
141552002-05-03 Akim Demaille <akim@epita.fr>
14156
14157 * configure.bat: Remove, completely obsolete.
14158 * Makefile.am (EXTRA_DIST): Adjust.
14159 Don't distribute config.rpath...
14160 * config/Makefile.am (EXTRA_DIST): Do it.
14161
db85e524
AD
141622002-05-03 Akim Demaille <akim@epita.fr>
14163
14164 * configure.in (GETTEXT_VERSION): New.
14165 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14166
83ccf991
AD
141672002-05-03 Akim Demaille <akim@epita.fr>
14168
14169 * data/bison.simple (b4_token_enum): New.
14170 (b4_token_defines): Use it to output tokens both as #define and
14171 enums.
14172 Suggested by Paul Eggert.
14173 * src/output.c (token_definitions_output): Don't output spurious
14174 white spaces.
14175
1f418995
AD
141762002-05-03 Akim Demaille <akim@epita.fr>
14177
14178 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14179
45119f04
RA
141802002-05-02 Robert Anisko <robert@lrde.epita.fr>
14181
14182 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14183 Update the stack class, give a try to deque as the default container.
14184
b2d52318
AD
141852002-05-02 Akim Demaille <akim@epita.fr>
14186
14187 * data/bison.simple (yyparse): Do not implement @$ = @1.
14188 (YYLLOC_DEFAULT): Adjust to do it.
14189 * doc/bison.texinfo (Location Default Action): Fix.
14190
3a8b4109
AD
141912002-05-02 Akim Demaille <akim@epita.fr>
14192
14193 * src/reader.c (parse_braces): Merge into...
14194 (parse_action): this.
14195
84614e13
AD
141962002-05-02 Akim Demaille <akim@epita.fr>
14197
14198 * configure.in (ALL_LINGUAS): Remove.
14199 * po/LINGUAS, hr.po: New.
14200
fdbcd8e2
AD
142012002-05-02 Akim Demaille <akim@epita.fr>
14202
14203 Remove the so called hairy (semantic) parsers.
14204
14205 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14206 * src/gram.h, src/gram.c (semantic_parser): Remove.
14207 (rule_t): Remove the guard and guard_line members.
14208 * src/lex.h (token_t): remove tok_guard.
14209 * src/options.c (option_table): Remove %guard and %semantic_parser
14210 support.
14211 * src/output.c, src/output.h (guards_output): Remove.
14212 (prepare): Adjust.
14213 (token_definitions_output): Don't output the `T'
14214 tokens (???).
14215 (output_skeleton): Don't output the guards.
14216 * src/files.c, src/files.c (attrsfile): Remove.
14217 * src/reader.c (symbol_list): Remove the guard and guard_line
14218 members.
14219 Adjust dependencies.
14220 (parse_guard): Remove.
14221 * data/bison.hairy: Remove.
14222 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14223 BISON_HAIRY.
14224
82b6cb3f
AD
142252002-05-02 Akim Demaille <akim@epita.fr>
14226
14227 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14228 (parse_guard): Rename the formal argument `stack_offset' as
14229 `rule_length', which is more readable.
14230 Adjust callers.
14231 (copy_at, copy_dollar): Instead of outputting the hard coded
14232 values of $$, $n and so forth, output invocation to b4_lhs_value,
14233 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
14234 Note: this patch partially drops `semantic-parser' support: it
14235 always does `rule_length - n', where semantic parsers ought to
14236 always use `-n'.
82b6cb3f
AD
14237 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14238 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14239
6cbfbcc5
AD
142402002-05-02 Akim Demaille <akim@epita.fr>
14241
14242 * configure.in (AC_INIT): Bump to 1.49b.
14243 (AM_INIT_AUTOMAKE): Short invocation.
14244
b8548114
AD
142452002-05-02 Akim Demaille <akim@epita.fr>
14246
14247 Version 1.49a.
14248
c20cd1fa
AD
142492002-05-01 Akim Demaille <akim@epita.fr>
14250
14251 * src/skeleton.h: Remove.
14252
8a9566d4
AD
142532002-05-01 Akim Demaille <akim@epita.fr>
14254
14255 * src/skeleton.h: Fix the #endif.
14256 Reported by Magnus Fromreide.
14257
8c6d399a
PE
142582002-04-26 Paul Eggert <eggert@twinsun.com>
14259
14260 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14261 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 14262 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 14263
2b7ed18a
RA
142642002-04-25 Robert Anisko <robert@lrde.epita.fr>
14265
14266 * src/scan-skel.l: Postprocess quadrigraphs.
14267
14268 * src/reader.c (copy_character): New function, used to output
14269 single characters while replacing `[' and `]' with quadrigraphs, to
14270 avoid troubles with M4 quotes.
14271 (copy_comment): Output characters with copy_character.
14272 (read_additionnal_code): Likewise.
14273 (copy_string2): Likewise.
14274 (copy_definition): Likewise.
14275
14276 * tests/calc.at: Exercise M4 quoting.
14277
34a89c50
AD
142782002-04-25 Akim Demaille <akim@epita.fr>
14279
14280 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14281 between `!' and the command.
14282 Reported by Paul Eggert.
14283
0dd1580a
RA
142842002-04-24 Robert Anisko <robert@lrde.epita.fr>
14285
14286 * tests/calc.at: Exercise prologue splitting.
14287
14288 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14289 `b4_post_prologue' instead of `b4_prologue'.
14290
14291 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14292 muscles.
14293 (output): Free pre_prologue_obstack and post_prologue_obstack.
14294 * src/files.h, src/files.c (attrs_obstack): Remove.
14295 (pre_prologue_obstack, post_prologue_obstack): New.
14296 * src/reader.c (copy_definition): Add a parameter to specify the
14297 obstack to fill, instead of using attrs_obstack unconditionally.
14298 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14299 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14300
83c1796f
PE
143012002-04-23 Paul Eggert <eggert@twinsun.com>
14302
14303 * data/bison.simple: Remove unnecessary commentary and white
14304 space differences from 1_29-branch.
14305 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14306
14307 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14308 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14309 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14310 constructors or destructors.
14311
14312 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14313
1207eeac
AD
143142002-04-23 Akim Demaille <akim@epita.fr>
14315
14316 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14317 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14318 location with columns.
14319 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14320 All reported by Paul Eggert.
14321
78ab8f67
AD
143222002-04-22 Akim Demaille <akim@epita.fr>
14323
14324 * src/reduce.c (dump_grammar): Move to...
14325 * src/gram.h, src/gram.c (grammar_dump): here.
14326 Be sure to separate long item numbers.
14327 Don't read the members of a rule's prec if its nil.
14328
133c20e2
AD
143292002-04-22 Akim Demaille <akim@epita.fr>
14330
14331 * src/output.c (table_size, table_grow): New.
14332 (MAXTABLE): Remove, replace uses with table_size.
14333 (pack_vector): Instead of dying when the table is too big, grow it.
14334
9515e8a7
AD
143352002-04-22 Akim Demaille <akim@epita.fr>
14336
14337 * data/bison.simple (yyr1): Its type is that of a token number.
14338 * data/bison.c++ (r1_): Likewise.
14339 * tests/regression.at (Web2c Actions): Adjust.
14340
23c5a174
AD
143412002-04-22 Akim Demaille <akim@epita.fr>
14342
14343 * src/reader.c (token_translations_init): 256 is now the default
14344 value for the error token, i.e., it will be assigned another
14345 number if the user assigned 256 to one of her tokens.
14346 (reader): Don't force 256 to error.
14347 * doc/bison.texinfo (Symbols): Adjust.
14348 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14349 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14350 etc. instead of 10, 20, 30 (which was used to `jump' over error
14351 (256) and undefined (2)).
14352
5fbb0954
AD
143532002-04-22 Akim Demaille <akim@epita.fr>
14354
14355 Propagate more token_number_t.
14356
14357 * src/gram.h (token_number_as_item_number)
14358 (item_number_as_token_number): New.
14359 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14360 Use it to create output_item_number_table and
14361 output_token_number_table.
14362 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14363 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14364 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14365 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14366
4f940944
AD
143672002-04-22 Akim Demaille <akim@epita.fr>
14368
14369 * src/output.h, src/output.c (get_lines_number): Remove.
14370
3ded9a63
AD
143712002-04-19 Akim Demaille <akim@epita.fr>
14372
14373 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14374 as Lex/Flex'.
14375 (Debugging): More details about enabling the debugging features.
14376 (Table of Symbols): Describe $$, $n, @$, and @n.
14377 Suggested by Tim Josling.
14378
e0c471a9
AD
143792002-04-19 Akim Demaille <akim@epita.fr>
14380
14381 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14382
fecc10cd
AD
143832002-04-10 Akim Demaille <akim@epita.fr>
14384
14385 * src/system.h: Rely on HAVE_LIMITS_H.
14386 Suggested by Paul Eggert.
14387
51dec47b
AD
143882002-04-09 Akim Demaille <akim@epita.fr>
14389
14390 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14391 full stderr, and strip it according to the bison options, instead
14392 of composing the error message from different bits.
14393 This makes it easier to check for several error messages.
14394 Adjust all the invocations.
14395 Add an invocation exercising the error token.
14396 Add an invocation demonstrating a stupid error message.
14397 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14398 Adjust the tests.
14399 Error message are for stderr, not stdout.
14400
007a50a4
AD
144012002-04-09 Akim Demaille <akim@epita.fr>
14402
14403 * src/gram.h, src/gram.c (error_token_number): Remove, use
14404 errtoken->number.
14405 * src/reader.c (reader): Don't specify the user token number (2)
14406 for $undefined, as it uselessly prevents using it.
14407 * src/gram.h (token_number_t): Move to...
14408 * src/symtab.h: here.
14409 (state_t.number): Is a token_number_t.
14410 * src/print.c, src/reader.c: Use undeftoken->number instead of
14411 hard coded 2.
14412 (Even though this 2 is not the same as above: the number of the
14413 undeftoken remains being 2, it is its user token number which
14414 might not be 2).
14415 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14416 `user_token_number_max'.
14417 Output `undef_token_number'.
14418 * data/bison.simple, data/bison.c++: Use them.
14419 Be sure to map invalid yylex return values to
14420 `undef_token_number'. This saves us from gratuitous SEGV.
14421
14422 * tests/conflicts.at (Solved SR Conflicts)
14423 (Unresolved SR Conflicts): Adjust.
14424 * tests/regression.at (Web2c Actions): Adjust.
14425
06446ccf
AD
144262002-04-08 Akim Demaille <akim@epita.fr>
14427
14428 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14429 Adding #line.
14430 Remove the duplicate `typedefs'.
14431 (RhsNumberType): Fix the declaration and various other typos.
14432 Use __ofile__.
14433 * data/bison.simple: Use __ofile__.
14434 * src/scan-skel.l: Handle __ofile__.
14435
62a3e4f0
AD
144362002-04-08 Akim Demaille <akim@epita.fr>
14437
14438 * src/gram.h (item_number_t): New, the type of item numbers in
14439 RITEM. Note that it must be able to code symbol numbers as
14440 positive number, and the negation of rule numbers as negative
14441 numbers.
14442 Adjust all dependencies (pretty many).
14443 * src/reduce.c (rule): Remove this `short *' pointer: use
14444 item_number_t.
14445 * src/system.h (MINSHORT, MAXSHORT): Remove.
14446 Include `limits.h'.
14447 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14448 (shortcpy): Remove.
14449 (MAXTABLE): Move to...
14450 * src/output.c (MAXTABLE): here.
14451 (prepare_rules): Use output_int_table to output rhs.
14452 * data/bison.simple, data/bison.c++: Adjust.
14453 * tests/torture.at (Big triangle): Move the limit from 254 to
14454 500.
14455 * tests/regression.at (Web2c Actions): Ajust.
14456
14457 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14458 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14459 passes, but produces negative #line number, once fixed, GCC is
14460 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14461 C), it passes.
14462 * src/state.h (state_h): Code input lines on ints, not shorts.
14463
bb88b0fc
AD
144642002-04-08 Akim Demaille <akim@epita.fr>
14465
14466 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14467 and then the grammar.
14468
9a636f47
AD
144692002-04-08 Akim Demaille <akim@epita.fr>
14470
14471 * src/system.h: No longer using strndup.
14472
680e8701
AD
144732002-04-07 Akim Demaille <akim@epita.fr>
14474
14475 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14476 * src/output.c (output_table_data): Return the longest number.
14477 (prepare_tokens): Output `token_number_max').
14478 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14479 New.
14480 Use them to define yy_token_number_type/TokenNumberType.
14481 Use this type for yytranslate.
14482 * tests/torture.at (Big triangle): Push the limit from 124 to
14483 253.
14484 * tests/regression.at (Web2c Actions): Adjust.
14485
817e9f41
AD
144862002-04-07 Akim Demaille <akim@epita.fr>
14487
14488 * tests/torture.at (Big triangle): New.
14489 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14490 * tests/existing.at: here.
14491
5123689b
AD
144922002-04-07 Akim Demaille <akim@epita.fr>
14493
14494 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14495 nritems.
14496 Adjust dependencies.
14497
f3849179
AD
144982002-04-07 Akim Demaille <akim@epita.fr>
14499
14500 * src/reader.c: Normalize increments to prefix form.
14501
bd02036a
AD
145022002-04-07 Akim Demaille <akim@epita.fr>
14503
14504 * src/reader.c, symtab.c: Remove debugging code.
14505
db8837cb
AD
145062002-04-07 Akim Demaille <akim@epita.fr>
14507
14508 Rename all the `bucket's as `symbol_t'.
14509
14510 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14511 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14512 * src/symtab.c, src/symtab.h (bucket): Rename as...
14513 (symbol_t): this.
14514 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14515 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14516 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14517 (buckets_new, buckets_free, buckets_do): Rename as...
14518 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14519 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14520 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14521 (symbols_new, symbols_free, symbols_do): these.
14522
72a23c97
AD
145232002-04-07 Akim Demaille <akim@epita.fr>
14524
14525 Use lib/hash for the symbol table.
14526
14527 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14528 EOF.
14529 * src/lex.c (lex): Set the `number' member of new terminals.
14530 * src/reader.c (bucket_check_defined, bucket_make_alias)
14531 (bucket_check_alias_consistence, bucket_translation): New.
14532 (reader, grammar_free, readgram, token_translations_init)
14533 (packsymbols): Adjust.
14534 (reader): Number the predefined tokens.
14535 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14536 for predefined tokens.
14537 * src/symtab.h (bucket): Remove all the hash table related
14538 members.
14539 * src/symtab.c (symtab): Replace by...
14540 (bucket_table): this.
14541 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14542 (buckets_new, buckets_do): New.
14543
280a38c3
AD
145442002-04-07 Akim Demaille <akim@epita.fr>
14545
14546 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14547 (start_symbol, max_user_token_number, semantic_parser)
14548 (error_token_number): Initialize.
14549 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14550 Initialize.
14551 (reader): Don't.
14552 (errtoken, eoftoken, undeftoken, axiom): Extern.
14553
03b31c0c
AD
145542002-04-07 Akim Demaille <akim@epita.fr>
14555
14556 * src/gram.h (rule_s): prec and precsym are now pointers
14557 to the bucket giving the priority/associativity.
14558 Member `associativity' removed: useless.
14559 * src/reduce.c, src/conflicts.c: Adjust.
14560
8b3df748
AD
145612002-04-07 Akim Demaille <akim@epita.fr>
14562
14563 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14564 Properly escape the symbols' TAG when outputting them.
14565
e601aa1d
AD
145662002-04-07 Akim Demaille <akim@epita.fr>
14567
14568 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14569
b0299a2e
AD
145702002-04-07 Akim Demaille <akim@epita.fr>
14571
14572 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14573 (LArule): this, which is an array to rule_t*.
14574 * src/print.c, src/conflicts.c: Adjust.
14575
d7e1f00c
AD
145762002-04-07 Akim Demaille <akim@epita.fr>
14577
14578 * src/gram.h (rule_t): Rename `number' as `user_number'.
14579 `number' is a new member.
14580 Adjust dependencies.
14581 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14582
cc9305dd
AD
145832002-04-07 Akim Demaille <akim@epita.fr>
14584
14585 As a result of the previous patch, it is no longer needed
14586 to reorder ritem itself.
14587
14588 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14589
b0940840
AD
145902002-04-07 Akim Demaille <akim@epita.fr>
14591
14592 Be sure never to walk through RITEMS, but use only data related to
14593 the rules themselves. RITEMS should be banished.
14594
14595 * src/output.c (output_token_translations): Rename as...
14596 (prepare_tokens): this.
14597 In addition to `translate', prepare the muscles `tname' and
14598 `toknum', which were handled by...
14599 (output_rule_data): this.
14600 Remove, and move the remainder of its outputs into...
14601 (prepare_rules): this new routines, which also merges content from
14602 (output_gram): this.
14603 (prepare_rules): Be sure never to walk through RITEMS.
14604 (output_stos): Rename as...
14605 (prepare_stos): this.
14606 (output): Always invoke prepare_states, after all, just don't use it
14607 in the output if you don't need it.
14608
643a5994
AD
146092002-04-07 Akim Demaille <akim@epita.fr>
14610
14611 * src/LR0.c (new_state): Display `nstates' as the name of the
14612 newly created state.
14613 Adjust to initialize first_state and last_state if needed.
14614 Be sure to distinguish the initial from the final state.
14615 (new_states): Create the itemset of the initial state, and use
14616 new_state.
14617 * src/closure.c (closure): Now that the initial state has its
14618 items properly set, there is no need for a special case when
14619 creating `ruleset'.
14620
14621 As a result, now the rule 0, reducing to $axiom, is visible in the
14622 outputs. Adjust the test suite.
14623
14624 * tests/conflicts.at (Solved SR Conflicts)
14625 (Unresolved SR Conflicts): Adjust.
14626 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14627 * tests/conflicts.at (S/R in initial): New.
14628
b4c4ccc2
AD
146292002-04-07 Akim Demaille <akim@epita.fr>
14630
14631 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14632 the RHS of the rules.
14633 * src/output.c (output_gram): Likewise.
14634
bba97eb2
AD
146352002-04-07 Akim Demaille <akim@epita.fr>
14636
14637 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14638 bucket.
14639 Adjust all dependencies.
14640 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14641 `number' of the buckets too.
14642 * src/gram.h: Include `symtab.h'.
14643 (associativity): Move to...
14644 * src/symtab.h: here.
14645 No longer include `gram.h'.
14646
c3b407f4
AD
146472002-04-07 Akim Demaille <akim@epita.fr>
14648
14649 * src/gram.h, src/gram.c (rules_rhs_length): New.
14650 (ritem_longest_rhs): Use it.
14651 * src/gram.h (rule_t): `number' is a new member.
14652 * src/reader.c (packgram): Set it.
14653 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14654 the end of `rules', and count them out of `nrules'.
14655 (reduce_output, dump_grammar): Adjust.
14656 * src/print.c (print_grammar): It is no longer needed to check for
14657 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14658 * tests/reduce.at (Reduced Automaton): New test.
14659
11652ab3
AD
146602002-04-07 Akim Demaille <akim@epita.fr>
14661
14662 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14663 lacking `+ 1' to nrules, Bison reported as useless a token if it
14664 was used solely to set the precedence of the last rule...
14665
26b23c1a
AD
146662002-04-07 Akim Demaille <akim@epita.fr>
14667
14668 * data/bison.c++, data/bison.simple: Don't output the current file
14669 name in #line, to avoid useless diffs between two identical
14670 outputs under different names.
14671
18bcecb0
AD
146722002-04-07 Akim Demaille <akim@epita.fr>
14673
14674 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14675 Normalize loops to using `< nrules + 1', not `<= nrules'.
14676
fa770c86
AD
146772002-04-07 Akim Demaille <akim@epita.fr>
14678
14679 * TODO: Update.
14680
d9b739c3
AD
146812002-04-07 Akim Demaille <akim@epita.fr>
14682
14683 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14684 bucket.value as bucket.number.
14685
99013900
AD
146862002-04-07 Akim Demaille <akim@epita.fr>
14687
14688 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14689 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14690 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14691 RHS, instead of being an index in RITEMS.
14692
e966383b
PE
146932002-04-04 Paul Eggert <eggert@twinsun.com>
14694
14695 * doc/bison.texinfo: Update copyright date.
14696 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14697 (Symbols): Warn about running Bison in one character set,
14698 but compiling and/or running in an incompatible one.
14699 Warn about character code 256, too.
14700
147012002-04-03 Paul Eggert <eggert@twinsun.com>
14702
14703 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14704 YYERROR_VERBOSE is nonzero, not whether it is defined.
14705
14706 Merge changes from bison-1_29-branch.
c307773e 14707
8d6c48b9
PE
147082002-03-20 Paul Eggert <eggert@twinsun.com>
14709
14710 Merge fixes from Debian bison_1.34-1.diff.
14711
14712 * configure.in (AC_PREREQ): 2.53.
14713
e53c6322
AD
147142002-03-20 Akim Demaille <akim@epita.fr>
14715
14716 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14717
9ffbeca7
PE
147182002-03-19 Paul Eggert <eggert@twinsun.com>
14719
21db0b2a
PE
14720 * src/bison.simple (YYCOPY): New macro.
14721 (YYSTACK_RELOCATE): Use it.
14722 Remove Type arg; no longer needed. All callers changed.
14723 (yymemcpy): Remove; no longer needed.
14724
9ffbeca7
PE
14725 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14726 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14727
642cb8f8
AD
147282002-03-19 Akim Demaille <akim@epita.fr>
14729
14730 Test and fix the #line outputs.
14731
14732 * tests/atlocal.at (GCC): New.
14733 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 14734 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
14735 (Action synch line, Epilogue synch line): New tests.
14736 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14737 * data/bison.simple, data/bison.c++: Use it.
14738
3c31a486
AD
147392002-03-19 Akim Demaille <akim@epita.fr>
14740
14741 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14742 (Solved SR Conflicts, %expect not enough, %expect right)
14743 (%expect too much): Move to...
14744 * tests/conflicts.at: this new file.
14745
0d8bed56
AD
147462002-03-19 Akim Demaille <akim@epita.fr>
14747
14748 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14749 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14750 that we can move to enums for instance.
14751 * src/output.c (token_definitions_output): Output a list of
14752 `token-name, token-number' instead of the #define.
14753 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14754
9208d17f
AD
147552002-03-14 Akim Demaille <akim@epita.fr>
14756
14757 Use Gettext 0.11.1.
14758
af27eacb
RA
147592002-03-09 Robert Anisko <robert@lrde.epita.fr>
14760
14761 * data/bison.c++: Make the user able to add members to the generated
14762 parser by subclassing.
14763
9101a310
RA
147642002-03-05 Robert Anisko <robert@lrde.epita.fr>
14765
14766 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14767 a character.
14768 Reported by Nicolas Tisserand and Nicolas Burrus.
14769
fff9bf0b
RA
147702002-03-04 Robert Anisko <robert@lrde.epita.fr>
14771
14772 * src/reader.c: Warn about lacking semi-colons, do not complain.
14773
64dba31e
RA
147742002-03-04 Robert Anisko <robert@lrde.epita.fr>
14775
14776 * data/bison.c++: Remove a debug line.
14777
374f5a14
RA
147782002-03-04 Robert Anisko <robert@lrde.epita.fr>
14779
14780 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14781 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14782 provide a default implementation.
14783
bfcf1f3a
AD
147842002-03-04 Akim Demaille <akim@epita.fr>
14785
14786 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14787 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14788 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14789 * tests/semantic.at (Parsing Guards): Similarly.
14790 * src/reader.at (readgram): Complain if the last rule is not ended
14791 with a semi-colon.
14792
65ccf9fc
AD
147932002-03-04 Akim Demaille <akim@epita.fr>
14794
14795 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14796 * src/closure.c: here.
14797 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14798 RTC.
14799 * src/warshall.h, src/warshall.c: Remove.
14800 * tests/sets.at (Broken Closure): Adjust.
14801
d0039cbc
AD
148022002-03-04 Akim Demaille <akim@epita.fr>
14803
14804 * src/output.c (output_skeleton): tempdir is const.
14805 bytes_read is unused.
14806
345cea78
AD
148072002-03-04 Akim Demaille <akim@epita.fr>
14808
14809 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14810 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14811 Update.
14812 From Michael Hayes.
14813
564801f7
AD
148142002-03-04 Akim Demaille <akim@epita.fr>
14815
14816 * src/closure.c (closure): `r' is unused.
14817
e5352bc7
AD
148182002-03-04 Akim Demaille <akim@epita.fr>
14819
14820 * tests/sets.at (Broken Closure): Add the ending `;'.
14821 * src/reader.at (readgram): Complain if a rule is not ended with a
14822 semi-colon.
14823
914feea9
AD
148242002-03-04 Akim Demaille <akim@epita.fr>
14825
14826 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14827 (count_sr_conflicts): Use bitset_count.
14828 * src/reduce.c (inaccessable_symbols): Ditto.
14829 (bits_size): Remove.
14830 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14831
f0250de6
AD
148322002-03-04 Akim Demaille <akim@epita.fr>
14833
14834 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14835 * src/reduce.c: Remove the `bitset_zero's following the
14836 `bitset_create's, as now it is performed by the latter.
14837
ef017502
AD
148382002-03-04 Akim Demaille <akim@epita.fr>
14839
14840 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14841 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14842 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14843 latest sources from Michael.
14844
76514394
AD
148452002-03-04 Akim Demaille <akim@epita.fr>
14846
14847 * src/output.c (output): Don't free the grammar.
14848 * src/reader.c (grammar_free): New.
14849 * src/main.c (main): Call it and don't free symtab here.
14850
55024580
AD
148512002-03-04 Akim Demaille <akim@epita.fr>
14852
14853 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14854 before returning.
14855 Reported by Benoit Perrot.
14856
f9abaa2c
AD
148572002-03-04 Akim Demaille <akim@epita.fr>
14858
14859 Use bitset operations when possible, not loops over bits.
14860
14861 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14862 bitset_or.
14863 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14864 * src/reduce.c (useless_nonterminals): Formatting changes.
14865 * src/warshall.c (TC): Use bitset_or.
14866
0e721e75
AD
148672002-03-04 Akim Demaille <akim@epita.fr>
14868
14869 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14870 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14871 Ditto.
14872
0fb1ffb1
AD
148732002-03-04 Akim Demaille <akim@epita.fr>
14874
14875 * src/lalr.c (F): Now a bitset*.
14876 Adjust all dependencies.
14877
b86796bf
AD
148782002-03-04 Akim Demaille <akim@epita.fr>
14879
14880 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14881 Adjust all dependencies.
14882
602bbf31
AD
148832002-03-04 Akim Demaille <akim@epita.fr>
14884
14885 * src/L0.c, src/LR0.h (nstates): Be size_t.
14886 Adjust comparisons (signed vs unsigned).
14887 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14888 bitset*.
14889 Adjust all dependencies.
14890
d8a0245c
AD
148912002-03-04 Akim Demaille <akim@epita.fr>
14892
14893 * src/closure.c (firsts): Now, also a bitset.
14894 Adjust all dependencies.
14895 (varsetsize): Remove, now unused.
14896 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14897
34ba9743
AD
148982002-03-04 Akim Demaille <akim@epita.fr>
14899
14900 * src/print.c: Convert to use bitset.h, not hand coded iterations
14901 over ints.
14902
ed86e78c
AD
149032002-03-04 Akim Demaille <akim@epita.fr>
14904
14905 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14906
dfdb1797
AD
149072002-03-04 Akim Demaille <akim@epita.fr>
14908
14909 * src/closure.c (ruleset): Be a bitset.
14910 (rulesetsize): Remove.
14911
7086e707
AD
149122002-03-04 Akim Demaille <akim@epita.fr>
14913
14914 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14915 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14916 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14917 * src/closure.c (fderives): Be an array of bitsets.
14918
98254360
RA
149192002-02-28 Robert Anisko <robert@lrde.epita.fr>
14920
14921 * data/bison.c++: Merge the two generated headers. Insert a copyright
14922 notice in each output file.
14923
a75c057f
AD
149242002-02-28 Akim Demaille <akim@epita.fr>
14925
14926 * data/bison.c++: Copy the prologue of bison.simple to fetch
14927 useful M4 definitions, such as b4_header_guard.
14928
06b00abc
AD
149292002-02-25 Akim Demaille <akim@epita.fr>
14930
14931 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
14932 translator friendly scheme for the bgr
14933 copyright notice.
06b00abc 14934
70e7d534
AD
149352002-02-25 Akim Demaille <akim@epita.fr>
14936
14937 * src/output.c (header_output): Remove, now handled completely via
14938 M4.
14939
abe017f6
AD
149402002-02-25 Akim Demaille <akim@epita.fr>
14941
14942 * m4/m4.m4: New, from CVS Autoconf.
14943 * configure.in: Invoke it.
14944 * src/output.c (output_skeleton): Use its result instead of the
14945 hard coded name.
14946
381fb12e
AD
149472002-02-25 Akim Demaille <akim@epita.fr>
14948
14949 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14950 Fileutils 4.1.5.
14951 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14952 * src/output.c (output_skeleton): Use mkstemp to create a real
14953 temporary file.
14954 Move the filling of `skeleton' and its muscle to...
14955 (prepare): here.
14956 (output): Move the definition of the prologue muscle to...
14957 (prepare): here.
14958 * src/system.h (DEFAULT_TMPDIR): New.
14959
6f38107f
PE
149602002-02-14 Paul Eggert <eggert@twinsun.com>
14961
14962 Remove the support for C++ namespace cleanliness; it was
14963 causing more problems than it was curing, since it didn't work
14964 properly on some nonstandard C++ compilers. This can wait
14965 for a proper C++ parser.
14966
14967 * NEWS: Document this.
14968 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14969 of C++, as it's treated like C now.
14970 * src/bison.simple (YYSTD): Remove.
14971 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14972 Treat C++ just like Standard C instead of trying to support
14973 namespace cleanliness.
14974
80cce3da
AD
149752002-02-14 Akim Demaille <akim@epita.fr>
14976
14977 * tests/regression.at (else): Adjust to Andreas' change.
14978
842e8679
AD
149792002-02-14 Akim Demaille <akim@epita.fr>
14980
14981 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14982
4bda3f10
AD
149832002-02-13 Andreas Schwab <schwab@suse.de>
14984
14985 * src/output.c (output_rule_data): Don't output NULL, it might
14986 not be defined yet.
14987
4162fa07 149882002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 14989
4162fa07
RA
14990 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14991 (Copyright notice): Update.
b418ecd8 14992
bd16a5dc
AD
149932002-02-11 Akim Demaille <akim@epita.fr>
14994
14995 * tests/regression.at (%nonassoc and eof): Don't include
14996 nonportable headers.
14997
8d69a1a3
RA
149982002-02-08 Robert Anisko <robert@lrde.epita.fr>
14999
15000 * data/bison.c++: Correct error recovery. Make the user able to
15001 initialize the starting location.
15002
9b2d0677
AD
150032002-02-07 Akim Demaille <akim@epita.fr>
15004
15005 * tests/input.at: New.
15006
69e2658b
RA
150072002-02-07 Robert Anisko <robert@lrde.epita.fr>
15008
15009 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 15010 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
15011 directives around tables only needed for debugging.
15012
4aacc3a7
RA
150132002-02-07 Robert Anisko <robert@lrde.epita.fr>
15014
15015 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15016 C++ parsers.
15017 (yy::b4_name::parse): Use print_.
15018
762a801e
RA
150192002-02-07 Robert Anisko <robert@lrde.epita.fr>
15020
15021 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15022
4bb2bc3f
RA
150232002-02-07 Robert Anisko <robert@lrde.epita.fr>
15024
15025 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15026 C++ parsers.
15027 (yy::b4_name::parse): Build verbose error messages, and use error_.
15028
6b45a3ca
RA
150292002-02-06 Robert Anisko <robert@lrde.epita.fr>
15030
15031 * data/bison.c++: Fix m4 quoting in comments.
15032
50997c6e
RA
150332002-02-06 Robert Anisko <robert@lrde.epita.fr>
15034
15035 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15036 not expanded by m4.
15037
3f3eed27
AD
150382002-02-05 Akim Demaille <akim@epita.fr>
15039
15040 * data/bison.c++: Adjust to the M4 back end.
15041 More is certainly needed.
15042
be2a1a68
AD
150432002-02-05 Akim Demaille <akim@epita.fr>
15044
15045 Give a try to M4 as a back end.
15046
15047 * lib/readpipe.c: New, from wdiff.
15048 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15049 BISON_HAIRY.
15050 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15051 specific values. Now it is m4 that performs the lookup.
15052 * src/parse-skel.y: Remove.
15053 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15054 * src/output.c (actions_output, guards_output)
15055 (token_definitions_output): No longer keeps track of the output
15056 line number, hence remove the second argument.
15057 (guards_output): Check against the guard member of a rule, not the
15058 action member.
15059 Adjust callers.
15060 (output_skeleton): Don't look for the skeleton location, let m4 do
15061 that.
15062 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15063 file will be used.
15064 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15065 (prepare): Given that for the time being changesyntax is not
15066 usable in M4, rename the muscles using `-' to `_'.
15067 Define `defines_flag', `output_parser_name' and `output_header_name'.
15068 * src/output.h (actions_output, guards_output)
15069 (token_definitions_output): Adjust prototypes.
15070 * src/scan-skel.l: Instead of scanning the skeletons, it now
15071 processes the output of m4: `__oline__' and `#output'.
15072 * data/bison.simple: Adjust to be used by M4(sugar).
15073 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15074 to date.
15075 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15076 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15077 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15078 shamelessly stolen from CVS Autoconf.
15079
beda758b
AD
150802002-02-05 Akim Demaille <akim@epita.fr>
15081
15082 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15083 * configure.in: Check for the declarations of free and malloc.
15084 * src/muscle_tab.c: Adjust.
15085
5ece6d43
AD
150862002-02-05 Akim Demaille <akim@epita.fr>
15087
15088 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15089 which have no values.
15090
5bb18f9a
AD
150912002-02-05 Akim Demaille <akim@epita.fr>
15092
15093 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15094 * data/: here.
15095
894dd62e
PE
150962002-01-29 Paul Eggert <eggert@twinsun.com>
15097
15098 * src/bison.simple (YYSIZE_T): Do not define merely because
15099 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15100 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15101
82841af7
AD
151022002-01-27 Akim Demaille <akim@epita.fr>
15103
15104 Fix `%nonassoc and eof'.
15105
15106 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15107 which were not properly copied! Replace
15108 memcpy (res->errs, src->errs, src->nerrs);
15109 with
15110 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15111 !!!
15112 * tests/regression.at (%nonassoc and eof): Adjust to newest
15113 Autotest: `.' is not in the PATH.
15114
318b76e9
AD
151152002-01-27 Akim Demaille <akim@epita.fr>
15116
15117 * tests/sets.at (AT_EXTRACT_SETS): New.
15118 (Nullable): Use it.
15119 (Firsts): New.
15120
30d2f3d5
AD
151212002-01-26 Akim Demaille <akim@epita.fr>
15122
15123 * tests/actions.at, tests/calc.at, tests/headers.at,
15124 * tests/torture.at: Adjust to the newest Autotest which no longer
15125 forces `.' in the PATH.
15126
30f8c395
AD
151272002-01-25 Akim Demaille <akim@epita.fr>
15128
15129 * tests/regression.at (%nonassoc and eof): New.
15130 Suggested by Robert Anisko.
15131
29ae55f1
AD
151322002-01-24 Akim Demaille <akim@epita.fr>
15133
15134 Bison dumps core when trying to complain about broken input files.
15135 Reported by Cris van Pelt.
15136
15137 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15138 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15139 into...
15140 (Invalid inputs): Strengthen: exercise parse_percent_token.
15141
2b548aa6
RA
151422002-01-24 Robert Anisko <robert.anisko@epita.fr>
15143
15144 * src/Makefile.am: Add bison.c++.
15145 * src/bison.c++: New skeleton.
15146
bb0146c2
AD
151472002-01-21 Paolo Bonzini <bonzini@gnu.org>
15148
15149 * po/it.po: New.
15150
bec30531
AD
151512002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15152
15153 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15154
fc6edc45
MA
151552002-01-20 Marc Autret <marc@gnu.org>
15156
15157 * src/files.c (compute_output_file_names): Fix
15158
5e5d5415
MA
151592002-01-20 Marc Autret <marc@gnu.org>
15160
15161 * tests/output.at: New test.
15162 * src/files.c (compute_base_names): Don't map extensions when
15163 the YACC flag is set, use defaults.
15164 Reported by Evgeny Stambulchik.
15165
44ea3fbd
MA
151662002-01-20 Marc Autret <marc@gnu.org>
15167
ba0fe3c7
PE
15168 * src/system.h: Need to define __attribute__ away for non-GCC
15169 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
15170 Suggested by Albert Chin-A-Young.
15171
338963d1
TVH
151722002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15173
15174 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15175 canonical definition.
15176 * src/system.h: Use the canonical definition for PARAMS (avoids
15177 a conflict with the macro from lib/hash.h).
15178
c57b2479
AD
151792002-01-11 Akim Demaille <akim@epita.fr>
15180
15181 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 15182 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 15183
b85810ae
AD
151842002-01-09 Akim Demaille <akim@epita.fr>
15185
15186 * src/files.c, src/files.h (output_infix): New.
15187 (tab_extension): Remove.
15188 (compute_base_names): Compute the former, drop the latter.
15189 * src/output.c (prepare): Insert the muscles `output-infix', and
15190 `output-suffix'.
15191 * src/parse-skel.y (string, string.1): New.
15192 (section.header): Use it.
15193 (section.yacc): Remove.
15194 (prefix): Remove too.
15195 * src/scan-skel.l: Adjust.
15196 * src/bison.simple, src/bison.hairy: Adjust.
15197
cae60122
AD
151982002-01-09 Akim Demaille <akim@epita.fr>
15199
15200 * configure.in (WERROR_CFLAGS): Compute it.
15201 * src/Makefile.am (CFLAGS): Pass it.
15202 * tests/atlocal.in (CFLAGS): Idem.
15203 * src/files.c: Fix a few warnings.
15204 (get_extension_index): Remove, unused.
15205
ae404801
AD
152062002-01-08 Akim Demaille <akim@epita.fr>
15207
15208 * src/getargs.c (AS_FILE_NAME): New.
15209 (getargs): Use it to convert DOSish file names.
15210 * src/files.c (base_name): Rename as full_base_name to avoid
15211 clashes with `base_name ()'.
15212 (filename_split): New.
15213 (compute_base_names): N-th rewrite, using filename_split.
15214
22312b71
AD
152152002-01-08 Akim Demaille <akim@epita.fr>
15216
15217 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15218 New, stolen from the Fileutils 4.1.
15219 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15220 * configure.in: Check for the presence of memrchr, and of its
15221 prototype.
15222
a67cef01
TVH
152232002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15224
15225 * lib/hash.h (__P): Added definition for this macro.
15226 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15227 BUILT_SOURCES, to ensure they are generated first.
15228 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15229 %error-verbose to allow bootstrapping with bison 1.30x.
15230
2b25d624
AD
152312002-01-06 Akim Demaille <akim@epita.fr>
15232
15233 * src/reader.c (parse_braces): Don't fetch the next char, the
15234 convention is to fetch on entry.
15235 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15236 'switch' without a following semicolon.
15237 * tests/regression.at (braces parsing): New.
15238
3460813b
AD
152392002-01-06 Akim Demaille <akim@epita.fr>
15240
15241 Bison is dead wrong in its RR conflict reports.
15242
15243 * tests/torture.at (GNU Cim Grammar): New.
15244 * src/conflicts.c (count_rr_conflicts): Fix.
15245
73784c64
AD
152462002-01-06 Akim Demaille <akim@epita.fr>
15247
15248 Creating package.m4 from configure.ac causes too many problems.
15249
15250 * tests/Makefile.am (package.m4): Create it by hand,
15251 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15252
25d81090
AD
152532002-01-06 Akim Demaille <akim@epita.fr>
15254
15255 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15256 skeleton.h.
15257
a9b8959e
PE
152582002-01-04 Paul Eggert <eggert@twinsun.com>
15259
15260 * doc/bison.texinfo (Debugging):
15261 Remove YYSTDERR; it's no longer defined or used.
15262 Also, s/cstdio.h/cstdio/.
15263
25d81090
AD
152642002-01-03 Akim Demaille <akim@epita.fr>
15265
15266 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15267
1109455c
AD
152682002-01-03 Akim Demaille <akim@epita.fr>
15269
15270 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15271 tracing code to --trace, wait for a better --trace option, with
15272 args.
15273
7ea5e977
AD
152742002-01-03 Akim Demaille <akim@epita.fr>
15275
15276 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15277 The ISO C++ standard is extremely clear about it: stderr is
15278 considered a macro, not a regular symbol (see table 94 `Header
15279 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15280 Therefore std:: does not apply to it. It still does with fprintf.
15281 Also, s/cstdio.h/cstdio/.
15282
fab5b110
AD
152832002-01-03 Akim Demaille <akim@epita.fr>
15284
15285 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15286 for non system headers.
15287
aed7fd9b
AD
152882002-01-02 Akim Demaille <akim@epita.fr>
15289
15290 Equip the skeleton chain with location tracking, runtime trace,
15291 pure parser and scanner.
15292
15293 * src/parse-skel.y: Request a pure parser, locations, and prefix
15294 renaming.
15295 (%union): Having several members with the same type does not help
15296 type mismatches, simplify.
15297 (YYPRINT, yyprint): New.
15298 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15299 (skel_error): this.
15300 Handle locations.
15301 * src/scan-skel.l: Adjust to these changes.
15302 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15303 (LOCATION_PRINT, skel_control_t): New.
15304
24fad99e
AD
153052001-12-30 Akim Demaille <akim@epita.fr>
15306
15307 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15308 replace `gb' with BLANKS.
15309 * src/scan-skel.l: Adjust.
15310
a4b36db4
AD
153112001-12-30 Akim Demaille <akim@epita.fr>
15312
15313 * src/system.h: We don't need nor want bcopy.
15314 Throw away MS-DOS crap: we don't need getpid.
15315 * configure.in: We don't need strndup. It was even causing
15316 problems: because Flex includes the headers *before* us,
15317 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15318 not visible.
15319 * lib/xstrndup.c: New.
15320 * src/scan-skel.l: Use it.
15321 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15322 * src/parse-skel.y: Use %directives instead of #defines.
15323
1239777d
AD
153242001-12-30 Akim Demaille <akim@epita.fr>
15325
15326 * src/skeleton.h: New.
15327 * src/output.c (output_parser, output_master_parser): Remove, dead
15328 code.
15329 * src/output.h (get_lines_number, actions_output, guards_output)
15330 (token_definitions_output): Prototype them.
15331 * src/parse-skel.y: Add the license notice.
15332 Include output.h and skeleton.h.
15333 (process_skeleton): Returns void, and takes a single parameter.
15334 * src/scan-skel.l: Add the license notice.
15335 Include skeleton.h.
15336 Don't use %option yylineno: it seems that then Flex imagines
15337 REJECT has been used, and therefore it won't reallocate its
15338 buffers (which makes no other sense to me than a bug). It results
15339 in warnings for `unused: yy_flex_realloc'.
15340
9b3add5b
RA
153412001-12-30 Robert Anisko <robert.anisko@epita.fr>
15342
15343 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15344 (MUSCLE_INSERT_PREFIX): ...to there.
15345 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15346 (MUSCLE_INSERT_PREFIX): Move from here...
15347
15348 * src/bison.hairy: Add a section directive. Put braces around muscle
15349 names. This parser skeleton is still broken, but Bison should not
15350 choke on a bad muscle 'syntax'.
15351 * src/bison.simple: Add a section directive. Put braces around muscle
15352 names.
15353
15354 * src/files.h (strsuffix, stringappend): Add declarations.
15355 (tab_extension): Add declaration.
15356 (short_base_name): Add declaration.
15357
15358 * src/files.c (strsuffix, stringappend): No longer static. These
15359 functions are used in the skeleton parser.
15360 (tab_extension): New.
15361 (compute_base_names): Use the computations done in this function
fab5b110 15362 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
15363 names.
15364 (short_base_name): No longer static.
15365
15366 * src/output.c (output_skeleton): New.
15367 (output): Disable call to output_master_parser, and give a try to
15368 a new skeleton handling system.
15369 (guards_output, actions_output): No longer static.
15370 (token_definitions_output, get_lines_number): No longer static.
15371
15372 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15373
fab5b110 15374 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
15375 parse-skel.y.
15376
15377 * src/parse-skel.y: New file.
15378 * src/scan-skel.l: New file.
15379
b5b61c61
AD
153802001-12-29 Akim Demaille <akim@epita.fr>
15381
15382 %name-prefix is broken.
15383
15384 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15385 Adjust all dependencies.
15386 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15387 %name-prefix.
15388
15389 Renaming yylval but not yylloc is not consistent. Now we do.
15390
15391 * src/bison.simple: Prefix yylloc if used.
15392 * doc/bison.texinfo (Decl Summary): Document that.
15393
8c9a50be
AD
153942001-12-29 Akim Demaille <akim@epita.fr>
15395
15396 * doc/bison.texinfo: Promote `%long-directive' over
15397 `%long_directive'.
15398 Remove all references to fixed-output-files, yacc is enough.
15399
d99361e6
AD
154002001-12-29 Akim Demaille <akim@epita.fr>
15401
15402 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15403 user prologue. These are defaults.
15404 * tests/actions.at (Mid-rule actions): Make sure the user can
15405 define YYDEBUG and YYERROR_VERBOSE.
15406
b9cecb91
AD
154072001-12-29 Akim Demaille <akim@epita.fr>
15408
15409 * src/output.c (header_output): Don't forget to export YYLTYPE and
15410 yylloc.
15411 * tests/headers.at (export YYLTYPE): New, make sure it does.
15412 * tests/regression.at (%union and --defines, Invalid CPP headers):
15413 Move to...
15414 * tests/headers.at: here.
15415
aea13e97
AD
154162001-12-29 Akim Demaille <akim@epita.fr>
15417
15418 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15419
931394cb
AD
154202001-12-29 Akim Demaille <akim@epita.fr>
15421
15422 * tests/actions.at (Mid-rule actions): Output on a single line
15423 instead of several.
15424
704a47c4
AD
154252001-12-29 Akim Demaille <akim@epita.fr>
15426
15427 * doc/bison.texinfo: Formatting changes.
15428
091e20bb
AD
154292001-12-29 Akim Demaille <akim@epita.fr>
15430
15431 Don't store the token defs in a muscle, just be ready to output it
15432 on command. Now possible via `symbols'. Fixes a memory leak.
15433
15434 * src/output.c (token_definitions_output): New.
15435 (output_parser, header_output): Use it.
15436 * src/reader.c (symbols_save): Remove.
15437
cce71710
AD
154382001-12-29 Akim Demaille <akim@epita.fr>
15439
15440 * src/bison.simple: Do not provide a default for YYSTYPE and
15441 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15442 default.
15443
82c035a8
AD
154442001-12-29 Akim Demaille <akim@epita.fr>
15445
15446 Mid-rule actions are simply... ignored!
15447
15448 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15449 the empty-rule associated to the dummy symbol, not to the host
15450 rule.
15451 * tests/actions.at (Mid-rule actions): New.
15452
8419d367
AD
154532001-12-29 Akim Demaille <akim@epita.fr>
15454
15455 Memory leak.
15456
15457 * src/reader.c (reader): Free grammar.
15458
375d5806
AD
154592001-12-29 Akim Demaille <akim@epita.fr>
15460
15461 Memory leak.
15462
15463 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15464 since it allocates it for each state, although only one is needed.
15465 (allocate_storage): Do it here.
15466
f51cb8ff
AD
154672001-12-29 Akim Demaille <akim@epita.fr>
15468
15469 * src/options.h, src/options.c (create_long_option_table): Rename
15470 as...
15471 (long_option_table_new): this, with a clearer prototype.
15472 (percent_table): Remove, unused,
15473 * src/getargs.c (getargs): Adjust.
15474
29e88316
AD
154752001-12-29 Akim Demaille <akim@epita.fr>
15476
15477 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15478 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15479 as states.
15480
b9f71f19
AD
154812001-12-29 Akim Demaille <akim@epita.fr>
15482
15483 * src/lalr.c (build_relations): Rename `states' as `states1'.
15484 Sorry, I don't understand exactly what it is, no better name...
15485
1a2b5d37
AD
154862001-12-29 Akim Demaille <akim@epita.fr>
15487
15488 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15489 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15490 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15491 as rules.
15492
1cca533e
AD
154932001-12-29 Akim Demaille <akim@epita.fr>
15494
15495 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15496 ago.
15497
c03ae966
AD
154982001-12-29 Akim Demaille <akim@epita.fr>
15499
15500 * src/reader.c, src/reader.h (user_toknums): Remove.
15501 Adjust all users to use symbols[i]->user_token_number.
15502
5a670b1e
AD
155032001-12-29 Akim Demaille <akim@epita.fr>
15504
15505 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15506 Adjust all users to use symbols[i]->prec or ->assoc.
15507
ad949da9
AD
155082001-12-29 Akim Demaille <akim@epita.fr>
15509
15510 * src/reader.c, src/reader.h (tags): Remove.
15511 Adjust all users to use symbols[i]->tag.
15512
0e78e603
AD
155132001-12-29 Akim Demaille <akim@epita.fr>
15514
15515 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15516 and rule_table.
15517 * src/reader.c (packsymbols): Fill this table.
15518 Drop sprec.
15519 * src/conflicts.c (resolve_sr_conflict): Adjust.
15520 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15521 single table.
15522 Use symbols[i]->tag instead of tags[i].
15523
213e640e
AD
155242001-12-29 Akim Demaille <akim@epita.fr>
15525
15526 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15527 In addition, put a comment in there, to replace...
15528 * tests/regression.at (%union and C comments): Remove.
15529
e7b8bef1
AD
155302001-12-29 Akim Demaille <akim@epita.fr>
15531
15532 * tests/regression.at (Web2c Actions): Blindly move the actual
15533 output as expected output. The contents *seem* right to me, but I
15534 can't pretend reading perfectly parser tables... Nonetheless, all
15535 the other tests pass correctly, the table look OK, even though the
15536 presence of `$axiom' is to be noted: AFAICS it is useless (but
15537 harmless).
15538
b68e7744
AD
155392001-12-29 Akim Demaille <akim@epita.fr>
15540
15541 * src/reader.c (readgram): Don't add the rule 0 if there were no
15542 rules read. In other words, add it _after_ having performed
15543 grammar sanity checks.
15544 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15545
78d5bae9
AD
155462001-12-29 Akim Demaille <akim@epita.fr>
15547
15548 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15549 visible, and some states have now a different number.
15550
ff442794
AD
155512001-12-29 Akim Demaille <akim@epita.fr>
15552
15553 * src/reader.c (readgram): Bind the initial rule's lineno to that
15554 of the first rule.
15555 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15556 (Solved SR Conflicts): Adjust rule 0's line number.
15557
610ab194
AD
155582001-12-29 Akim Demaille <akim@epita.fr>
15559
15560 Fix the `GAWK Grammar' failure.
15561
15562 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15563 the reductions of the first state which was mistakenly confused
15564 with the final state because precisely final_state was initialized
15565 to 0.
15566 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15567 now noticed by Bison.
15568 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15569 have a reduction on $default.
15570
29d29c8f
AD
155712001-12-29 Akim Demaille <akim@epita.fr>
15572
15573 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15574 rule line numbers.
15575 * src/closure.c (print_closure): Likewise.
15576 * src/derives.c (print_derives): Likewise.
15577 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15578 now.
15579
7c6b64d0
AD
155802001-12-29 Akim Demaille <akim@epita.fr>
15581
15582 * src/lalr.c (lookaheads_print): New.
15583 (lalr): Call it when --trace-flag.
15584 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15585 are dumped.
15586
3d4daee3
AD
155872001-12-29 Akim Demaille <akim@epita.fr>
15588
15589 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15590 when walking through ritem, even via rule->rhs.
15591 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15592 (useful_production, useless_nonterminals): Likewise.
15593 (reduce_grammar_tables): Likewise, plus update nritems.
15594 * src/nullable.c (set_nullable): Likewise.
15595 * src/lalr.c (build_relations): Likewise.
15596 * tests/sets.at (Nullable): Adjust.
15597 Fortunately, now, the $axiom is no longer nullable.
15598
9e7f6bbd
AD
155992001-12-29 Akim Demaille <akim@epita.fr>
15600
15601 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15602 the 0-sentinel.
15603 * src/gram.c (ritem_longest_rhs): Likewise.
15604 * src/reduce.c (nonterminals_reduce): Likewise.
15605 * src/print_graph.c (print_graph): Likewise.
15606 * src/output.c (output_rule_data): Likewise.
15607 * src/nullable.c (set_nullable): Likewise.
15608
255ef638
AD
156092001-12-29 Akim Demaille <akim@epita.fr>
15610
15611 * src/output.c: Comment changes.
15612
0d8a7363
AD
156132001-12-27 Paul Eggert <eggert@twinsun.com>
15614
15615 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15616 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15617 Sparc, as they were causing more porting problems than the
15618 (minor) performance improvement was worth.
15619
15620 Also, catch up with 1.31's YYSTD.
15621
3db472b9
AD
156222001-12-27 Akim Demaille <akim@epita.fr>
15623
15624 * src/output.c (output_gram): Rely on nritems, not the
15625 0-sentinel. See below.
15626 Use -1 as separator, not 0.
15627 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15628 Rely on -1 as separator in yyrhs, instead of 0.
15629 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15630 twice `Now at end of input', therefore there are two lines less to
15631 expect.
15632
b365aa05
AD
156332001-12-27 Akim Demaille <akim@epita.fr>
15634
15635 * tests/regression.at (Unresolved SR Conflicts):
15636 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15637 below.
15638
30171f79
AD
156392001-12-27 Akim Demaille <akim@epita.fr>
15640
15641 * src/LR0.c (new_state): Recognize the final state by the fact it
15642 is reached by eoftoken.
15643 (insert_start_shifting_state, insert_eof_shifting_state)
15644 (insert_accepting_state, augment_automaton): Remove, since now
15645 these states are automatically computed from the initial state.
15646 (generate_states): Adjust.
15647 * src/print.c: When reporting a rule number to the user, substract
15648 1, so that the axiom rule is rule 0, and the first user rule is 1.
15649 * src/reduce.c: Likewise.
15650 * src/print_graph.c (print_core): For the time being, just as for
15651 the report, depend upon --trace-flags to dump the full set of
15652 items.
15653 * src/reader.c (readgram): Once the grammar read, insert the rule
15654 0: `$axiom: START-SYMBOL $'.
15655 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15656 number of the states has changed (the final state is no longer
15657 necessarily the last), catch up.
15658
75142d45
AD
156592001-12-27 Akim Demaille <akim@epita.fr>
15660
15661 Try to make the use of the eoftoken valid. Given that its value
15662 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15663 is used instead of > 0 where appropriate, (ii), depend upon nritems
15664 instead of the 0-sentinel.
15665
15666 * src/gram.h, src/gram.c (nritems): New.
15667 Expected to be duplication of nitems, but for the time being...
15668 * src/reader.c (packgram): Assert nritems and nitems are equal.
15669 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15670 * src/closure.c (print_closure, print_fderives): Likewise.
15671 * src/gram.c (ritem_print): Likewise.
15672 * src/print.c (print_core, print_grammar): Likewise.
15673 * src/print_graph.c: Likewise.
15674
b7c49edf
AD
156752001-12-27 Akim Demaille <akim@epita.fr>
15676
15677 * src/main.c (main): If there are complains after grammar
15678 reductions, then output the report anyway if requested, then die.
15679 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15680 * src/reader.c (eoftoken): New.
15681 (parse_token_decl): If the token being defined has value `0', it
15682 is the eoftoken.
15683 (packsymbols): No longer hack `tags' to insert `$' by hand.
15684 Be sure to preserve the value of the eoftoken.
15685 (reader): Make sure eoftoken is defined.
15686 Initialize nsyms to 0: now eoftoken is created just like the others.
15687 * src/print.c (print_grammar): Don't special case the eof token.
15688 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15689 lie anyway, albeit pleasant.
15690 * tests/calc.at: Exercise error messages with eoftoken.
15691 Change the grammar so that empty input is invalid.
15692 Adjust expectations.
15693 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15694
ec2da99f
AD
156952001-12-27 Akim Demaille <akim@epita.fr>
15696
15697 * configure.in: Check the protos of strchr ans strspn.
15698 Replace strchr if needed.
15699 * src/system.h: Provide the protos of strchr, strspn and memchr if
15700 missing.
15701 * lib/strchr.c: New.
15702 * src/reader.c (symbols_save): Use strchr.
15703
8adfa272
AD
157042001-12-27 Akim Demaille <akim@epita.fr>
15705
15706 * src/print.c, src/print_graph.c (escape): New.
15707 Use it to quote the TAGS outputs.
15708 * src/print_graph.c (print_state): Now errors are in red, and
15709 reductions in green.
15710 Prefer high to wide: output the state number on a line of its own.
15711
80dac38c
AD
157122001-12-27 Akim Demaille <akim@epita.fr>
15713
15714 * src/state.h, src/state.c (reductions_new): New.
15715 * src/LR0.c (set_state_table): Let all the states have a
15716 `reductions', even if reduced to 0.
15717 (save_reductions): Adjust.
15718 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15719 * src/print.c (print_reductions, print_actions): Adjust.
15720 * src/output.c (action_row): Adjust.
15721
2cec70b9
AD
157222001-12-27 Akim Demaille <akim@epita.fr>
15723
15724 * src/state.h, src/state.c (errs_new, errs_dup): New.
15725 * src/LR0.c (set_state_table): Let all the states have an errs,
15726 even if reduced to 0.
15727 * src/print.c (print_errs, print_reductions): Adjust.
15728 * src/output.c (output_actions, action_row): Adjust.
15729 * src/conflicts.c (resolve_sr_conflict): Adjust.
15730
13ca549a
AD
157312001-12-27 Akim Demaille <akim@epita.fr>
15732
15733 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15734
5092aba5
AD
157352001-12-27 Akim Demaille <akim@epita.fr>
15736
15737 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15738 * src/print.c: here.
15739 (lookaheadset, shiftset): New, used as additional storage by
15740 print_reductions.
15741 (print_results): Adjust.
15742 (print_shifts, print_gotos, print_errs): New, extracted from...
15743 (print_actions): here.
15744 * src/print_graph.c (print_actions): Remove dead code.
15745
11e2beca
AD
157462001-12-27 Akim Demaille <akim@epita.fr>
15747
15748 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15749 `$n' and `@n'.
15750
dac3c910
AD
157512001-12-27 Akim Demaille <akim@epita.fr>
15752
15753 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15754 (build_relations): Adjust.
15755
d0b0fefa
AD
157562001-12-27 Akim Demaille <akim@epita.fr>
15757
15758 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15759 duplication.
15760
adc8c848
AD
157612001-12-27 Akim Demaille <akim@epita.fr>
15762
15763 * src/reader.c (packgram): Catch nitems overflows.
15764
14d293ac
AD
157652001-12-27 Akim Demaille <akim@epita.fr>
15766
15767 * src/files.c, src/files.h (guard_obstack): Remove.
15768 * src/output.c (output): Adjust.
15769 * src/reader.c (parse_braces): New, factoring...
15770 (copy_action, copy_guard): these two which are renamed as...
15771 (parse_action, parse_guard): these.
15772 As a voluntary consequence, using braces around guards is now
15773 mandatory.
15774
f499b062
AD
157752001-12-27 Akim Demaille <akim@epita.fr>
15776
15777 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15778 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15779 members.
15780 (symbol_list_new): Adjust.
15781 (copy_action): action_line is the first line, not the last.
15782 (copy_guard): Just as for actions, store the `action' only, not
15783 the switch/case/break flesh.
15784 Don't parse the user action that might follow the guard, let...
15785 (readgram): do it, i.e., now, there can be an action after a
15786 guard.
15787 In other words the guard is just explicitly optional.
15788 (packgram): Adjust.
15789 * src/output.c (guards_output): New.
15790 (output_parser): Call it when needed.
15791 (output): Also free the guard and attrs obstacks.
15792 * src/files.c, src/files.h (obstack_save): Remove.
15793 (output_files): Remove.
15794 As a result, if one needs the former `.act' file, using an
15795 appropriate skeleton which requires actions and guards is now
15796 required.
15797 * src/main.c (main): Adjust.
15798 * tests/semantic.at: New.
15799 * tests/regression.at: Use `input.y' as input file name.
15800 Avoid 8+3 problems by requiring input.c when the test needs the
15801 parser.
15802
d945f5cd
AD
158032001-12-27 Akim Demaille <akim@epita.fr>
15804
15805 * src/reader.c (symbol_list_new): Be sure to initialize all the
15806 fields.
15807
d200e455
AD
158082001-12-27 Akim Demaille <akim@epita.fr>
15809
15810 All the hacks using a final pseudo state are now useless.
15811
15812 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15813 * src/lalr.c (nLA): New.
15814 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15815 instead of lookaheadsp from the pseudo state (nstate + 1).
15816
f9507c28
AD
158172001-12-27 Akim Demaille <akim@epita.fr>
15818
15819 * src/output.c (action_row, token_actions): Use a state_t instead
15820 of a integer, and nlookaheads instead of the following state's
15821 lookaheadsp.
15822
065fbd27
AD
158232001-12-27 Akim Demaille <akim@epita.fr>
15824
15825 * src/conflicts.c (log_resolution, flush_shift)
15826 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15827 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15828 (conflicts_print, print_reductions): Use a state_t instead of an
15829 integer when referring to a state.
15830 As much as possible, depend upon nlookaheads, instead of the
15831 `lookaheadsp' member of the following state (since lookaheads of
15832 successive states are successive, the difference between state n + 1
15833 and n served as the number of lookaheads for state n).
15834 * src/lalr.c (add_lookback_edge): Likewise.
15835 * src/print.c (print_core, print_actions, print_state)
15836 (print_results): Likewise.
15837 * src/print_graph.c (print_core, print_actions, print_state)
15838 (print_graph): Likewise.
15839 * src/conflicts.h: Adjust.
15840
1b177bd7
AD
158412001-12-27 Akim Demaille <akim@epita.fr>
15842
15843 * src/bison.hairy: Formatting/comment changes.
15844 ANSIfy.
15845 Remove `register' indications.
15846 Add plenty of `static'.
15847
7742ddeb
AD
158482001-12-27 Akim Demaille <akim@epita.fr>
15849
15850 * src/output.c (prepare): Drop the muscle `ntbase' which
15851 duplicates ntokens.
15852 * src/bison.simple: Formatting/comment changes.
15853 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15854 is an undocumented synonym.
15855
1fa14068
AD
158562001-12-22 Akim Demaille <akim@epita.fr>
15857
15858 * src/output.c (output_table_data): Change the prototype to use
15859 `int' for array ranges: some invocations do pass an int, not a
15860 short.
15861 Reported by Wayne Green.
15862
b9752825
AD
158632001-12-22 Akim Demaille <akim@epita.fr>
15864
15865 Some actions of web2c.y are improperly triggered.
15866 Reported by Mike Castle.
15867
15868 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15869 * tests/regression.at (Web2c): Rename as...
15870 (Web2c Report): this.
15871 (Web2c Actions): New.
15872
776209d6
AD
158732001-12-22 Akim Demaille <akim@epita.fr>
15874
15875 Reductions in web2c.y are improperly reported.
15876 Reported by Mike Castle.
15877
15878 * src/conflicts.c (print_reductions): Fix.
15879 * tests/regression.at (Web2c): New.
15880
275fc3ad
AD
158812001-12-18 Akim Demaille <akim@epita.fr>
15882
15883 Some host fail on `assert (!"foo")', which expands to
15884 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15885 Reported by Nelson Beebee.
15886
15887 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15888 `#define it_succeeded 0' and `assert (it_succeeded)'.
15889
897668ee
MA
158902001-12-17 Marc Autret <autret_m@epita.fr>
15891
15892 * src/bison.simple: Don't hard code the skeleton line and filename.
15893 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15894 New line counter 'skeleton_line' (skeleton-line muscle).
15895
ab3399e0
PE
158962001-12-17 Paul Eggert <eggert@twinsun.com>
15897
15898 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15899 YYDEBUG must be defined to a nonzero value.
15900
15901 * src/bison.simple (yytname): Do not assume that the user defines
15902 YYDEBUG to a properly parenthesized expression.
15903
3877f72b
AD
159042001-12-17 Akim Demaille <akim@epita.fr>
15905
15906 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15907 nlookaheads is a new member.
15908 Adjust all users.
15909 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15910 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15911 state.
776209d6 15912
331dbc1b
AD
159132001-12-17 Akim Demaille <akim@epita.fr>
15914
15915 * src/files.h, src/files.c (open_files, close_files): Remove.
15916 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15917 let...
15918 * src/reader.c (reader): Do it.
776209d6 15919
be750e4c
AD
159202001-12-17 Akim Demaille <akim@epita.fr>
15921
15922 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 15923
709ae8c6
AD
159242001-12-17 Akim Demaille <akim@epita.fr>
15925
15926 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15927 (flush_reduce): New.
15928 (resolve_sr_conflict): Adjust.
776209d6 15929
f87685c3
AD
159302001-12-17 Akim Demaille <akim@epita.fr>
15931
15932 * src/output.c (output_obstack): Be static and rename as...
15933 (format_obstack): this, to avoid any confusion with files.c's
15934 output_obstack.
15935 * src/reader.h (muscle_obstack): Move to...
15936 * src/output.h: here, since it's defined in output.c.
15937
837491d8
AD
159382001-12-17 Akim Demaille <akim@epita.fr>
15939
15940 * src/output.c (action_row, save_column, default_goto)
15941 (sort_actions, matching_state, pack_vector): Better variable
15942 locality.
15943
796d61fb
AD
159442001-12-17 Akim Demaille <akim@epita.fr>
15945
15946 * src/output.c: Various formatting changes.
776209d6 15947
64d15509
AD
159482001-12-17 Akim Demaille <akim@epita.fr>
15949
15950 * src/files.c (output_files): Free the output_obstack.
15951 * src/main.c (main): Call print and print_graph conditionally.
15952 * src/print.c (print): Work unconditionally.
15953 * src/print_graph.c (print_graph): Work unconditionally.
15954 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15955
fbc8ecb7
MA
159562001-12-16 Marc Autret <autret_m@epita.fr>
15957
15958 * src/output.c (actions_output): Fix. When we use %no-lines,
15959 there is one less line per action.
15960
f0440388
MA
159612001-12-16 Marc Autret <autret_m@epita.fr>
15962
15963 * src/bison.simple: Remove a useless #line directive.
15964 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15965 * src/output.c (get_lines_number): New.
776209d6 15966 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
15967 output muscles.
15968 Fix line numbering.
15969 (actions_output): Computes the number of lines taken by actions.
15970 (output_master_parser): Insert new skeleton which is the name of
15971 the output parser file name.
15972
a79986b8
MA
159732001-12-15 Marc Autret <autret_m@epita.fr>
15974
15975 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15976
4ec8e00f
MA
159772001-12-15 Marc Autret <autret_m@epita.fr>
15978
15979 * src/output.c (output_gram): Keep track of the hairy one.
15980
1a4648ff
AD
159812001-12-15 Akim Demaille <akim@epita.fr>
15982
15983 Make `make distcheck' work.
15984
15985 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15986 system.h which uses libgettext.h.
15987
9c2c67e6
AD
159882001-12-15 Akim Demaille <akim@epita.fr>
15989
15990 * src/nullable.c (set_nullable): Useless rules must be skipped,
15991 otherwise, since we range over their symbols, we might look at a
15992 nonterminal which no longer ``exists'', i.e., it is not counted in
15993 `nvars', hence we overflow our arrays.
15994
93ede233
AD
159952001-12-15 Akim Demaille <akim@epita.fr>
15996
15997 The header can also be produced directly, without any obstack!
15998 Yahoo!
15999
16000 * src/files.c, src/files.h (defines_obstack): Remove.
16001 (compute_header_macro): Global.
16002 (defines_obstack_save): Remove.
16003 * src/reader.c (parse_union_decl): No longer output to
16004 defines_obstack: its content can be found in the `stype' muscle
16005 anyway.
16006 (output_token_translations): Merge into...
16007 (symbols_output): this.
16008 Rename as...
16009 (symbols_save): this.
16010 (reader): Adjust.
16011 * src/output.c (header_output): New.
16012 (output): Call it.
16013
2666f928
AD
160142001-12-15 Akim Demaille <akim@epita.fr>
16015
16016 * src/reader.c (parse_union_decl): Instead of handling two obstack
16017 simultaneously, use one to define the `stype' muscle, and use the
16018 value of the latter to fill defines_obstack.
16019 (copy_comment): Remove.
16020 (copy_comment2): Work for a single obstack.
16021 Rename as...
16022 (copy_comment): this.
16023
428046f8
AD
160242001-12-15 Akim Demaille <akim@epita.fr>
16025
16026 * src/lex.c, src/lex.h (xgetc): No longer static.
16027 * src/reader.c (parse_union_decl): Revamp.
16028
ea52d706
AD
160292001-12-15 Akim Demaille <akim@epita.fr>
16030
16031 Still making progress in separating Bison into (i) input, (ii)
16032 process, (iii) output: now we can directly output the parser file
16033 without using table_obstack at all.
16034
16035 * src/files.c, src/files.h (table_obstack): Bye bye.
16036 (parser_file_name): New.
16037 * src/files.c (compute_output_file_names): Compute it.
16038 * src/output.c (actions_output, output_parser)
16039 (output_master_parser): To a file instead of an obstack.
16040
3f96f4dc
AD
160412001-12-15 Akim Demaille <akim@epita.fr>
16042
16043 Attach actions to rules, instead of pre-outputting them to
16044 actions_obstack.
16045
16046 * src/gram.h (rule_t): action and action_line are new members.
16047 * src/reader.c (symbol_list): Likewise.
16048 (copy_action): Save the actions within the rule.
16049 (packgram): Save them in rule_table.
16050 * src/output.c (actions_output): New.
16051 (output_parser): Use it on `%%actions'.
16052 (output_rule_data): Don't free rule_table.
16053 (output): Do it.
16054 (prepare): Don't save the `action' muscle.
16055 * src/bison.simple: s/%%action/%%actions/.
16056
51576fb3
AD
160572001-12-15 Akim Demaille <akim@epita.fr>
16058
16059 * src/reader.c (copy_action): When --yacc, don't append a `;'
16060 to the user action: let it fail if lacking.
dee049eb 16061 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 16062
2648a72d
AD
160632001-12-14 Akim Demaille <akim@epita.fr>
16064
16065 * src/lex.c (literalchar): Simply return the char you decoded, non
16066 longer mess around with obstacks and int pointers.
16067 Adjust all callers.
16068
92790e5b
AD
160692001-12-14 Akim Demaille <akim@epita.fr>
16070
16071 * src/lex.c (literalchar): Don't escape the special characters,
16072 just decode them, and keep them as char (before, eol was output as
16073 the 2 char string `\n' etc.).
16074 * src/output.c (output_rule_data): Use quotearg to output the
16075 token strings.
16076
927c1557
PE
160772001-12-13 Paul Eggert <eggert@twinsun.com>
16078
16079 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16080 Do not infringe on the global user namespace when using C++.
16081 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16082 All uses of `fprintf' and `stderr' changed.
16083
16084 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16085
ed8e1f68
AD
160862001-12-13 Akim Demaille <akim@epita.fr>
16087
16088 The computation of nullable is broken: it doesn't handle empty
16089 RHS's properly.
16090
16091 * tests/torture.at (GNU AWK Grammar): New.
16092 * tests/sets.at (Nullable): New.
16093 * src/nullable.c (set_nullable): Instead of blindly looping over
16094 `ritems', loop over the rules, and then over their rhs's.
16095
16096 Work around Autotest bugs.
16097
16098 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16099 frame, because Autotest understand lines starting with a `+' as
16100 traces from the shell. Then, they are not processed properly.
16101 Admittedly an Autotest bug, but we don't have time to wait for
16102 Autotest to catch up.
16103 * tests/regression.at (Broken Closure): Adjust to the new table
16104 frames.
16105 Move to...
16106 * tests/sets.at: here.
16107
cb581495
AD
161082001-12-13 Akim Demaille <akim@epita.fr>
16109
16110 * src/closure.c (closure): Use nrules instead of playing tricks
16111 with BITS_PER_WORD.
16112
2e729273
AD
161132001-12-13 Akim Demaille <akim@epita.fr>
16114
16115 * src/print.c (print_actions): Output the handling of `$' as the
16116 traces do: shifting the token EOF. Before EOF was treated as a
16117 nonterminal.
16118 * tests/regression.at: Adjust some tests.
16119 * src/print_graph.c (print_core): Complete the set of items via
16120 closure. The next-to-final and final states are still unsatisfying,
16121 but that's to be addressed elsewhere.
16122 No longer output the rule numbers, but do output the state number.
16123 A single loop for the shifts + gotos is enough, but picked a
16124 distinct color for each.
16125 (print_graph): Initialize and finalize closure.
16126
107f7dfb
AD
161272001-12-13 Akim Demaille <akim@epita.fr>
16128
16129 * src/reader.c (readgram): Remove dead code, an strip useless
16130 braces.
16131 (get_type): Remove, unused.
16132
9b53a24f
AD
161332001-12-12 Akim Demaille <akim@epita.fr>
16134
16135 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16136 on that of lib/error.c.
16137
dbfb6dcd
AD
161382001-12-12 Akim Demaille <akim@epita.fr>
16139
16140 Some hosts don't like `/' in includes.
16141
16142 * src/system.h: Include libgettext.h without qualifying the path.
16143 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16144 $(top_srcdir).
16145
c25fb648
MA
161462001-12-11 Marc Autret <autret_m@epita.fr>
16147
16148 * src/output.c (output_parser): Remove useless muscle.
16149
710ddc4f
MA
161502001-12-11 Marc Autret <autret_m@epita.fr>
16151
16152 * src/bison.simple: Remove #line just before %%epilogue. It
16153 is now handled in ...
16154 * src/reader.c (read_additionnal_code): Add the output of a
16155 #line for the epilogue.
16156
e83d80b8
MA
161572001-12-10 Marc Autret <autret_m@epita.fr>
16158
927c1557 16159 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
16160 replace precedent remove.
16161 * src/bison.simple: Remove #line before %%prologue because
16162 %%input-line is wrong at this time.
16163
971d5158
MA
161642001-12-10 Marc Autret <autret_m@epita.fr>
16165
16166 * src/reader.c (symbols_output): Clean up.
927c1557 16167 * src/output.c (output_gram, output): Clean up.
971d5158 16168
5edafffd
AD
161692001-12-10 Akim Demaille <akim@epita.fr>
16170
16171 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16172 * src/LR0.c (set_state_table): here.
16173 * src/lalr.c (lalr): Call it.
16174
0279f8e9
AD
161752001-12-10 Akim Demaille <akim@epita.fr>
16176
16177 * src/state.h (shifts): Remove the `number' member: shifts are
16178 attached to state, hence no longer need to be labelled with a
16179 state number.
16180
190c4f5f
AD
161812001-12-10 Akim Demaille <akim@epita.fr>
16182
16183 Now that states have a complete set of members, the linked list of
16184 shifts is useless: just fill directly the state's shifts member.
16185
16186 * src/state.h (shifts): Remove the `next' member.
16187 * src/LR0.c (first_state, last_state): Remove.
16188 Adjust the callers.
16189 (augment_automaton): Don't look for the shifts that must be added
16190 a shift on EOF: it is those of the state we looked for! But now,
16191 since shifts are attached, it is no longer needed to looking
16192 merely by its id: its number.
16193
2a73b93d
AD
161942001-12-10 Akim Demaille <akim@epita.fr>
16195
16196 * src/LR0.c (augment_automaton): Better variable locality.
16197 Remove an impossible branch: if there is a state corresponding to
16198 the start symbol being shifted, then there is shift for the start
16199 symbol from the initial state.
16200
74392f6a
AD
162012001-12-10 Akim Demaille <akim@epita.fr>
16202
16203 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16204 only when appropriate: when insert_start_shifting_state' is not
16205 invoked.
16206 * tests/regression.at (Rule Line Numbers): Adjust.
16207
37c82725
AD
162082001-12-10 Akim Demaille <akim@epita.fr>
16209
16210 * src/LR0.c (augment_automaton): Now that all states have shifts,
16211 merge the two cases addition shifts to the initial state.
16212
6a164e0c
AD
162132001-12-10 Akim Demaille <akim@epita.fr>
16214
16215 * src/lalr.c (set_state_table): Move to...
16216 * src/LR0.c: here.
16217 * src/lalr.c (lalr): Don't call it...
16218 * src/LR0.c (generate_states): do it.
16219 * src/LR0.h (first_state): Remove, only the table is used.
16220
7215de24
AD
162212001-12-10 Akim Demaille <akim@epita.fr>
16222
16223 * src/LR0.h (first_shift, first_reduction): Remove.
16224 * src/lalr.c: Don't use first_shift: find shifts through the
16225 states.
16226
80e25d4d
AD
162272001-12-10 Akim Demaille <akim@epita.fr>
16228
16229 * src/LR0.c: Attach shifts to states as soon as they are
16230 computed.
16231 * src/lalr.c (set_state_table): Instead of assigning shifts to
16232 state, just assert that the mapping was properly done.
16233
0ab3728b
AD
162342001-12-10 Akim Demaille <akim@epita.fr>
16235
16236 * src/LR0.c (insert_start_shift): Rename as...
16237 (insert_start_shifting_state): this.
16238 (insert_eof_shifting_state, insert_accepting_state): New.
16239 (augment_automaton): Adjust.
16240 Better locality of the variables.
16241 When looking if the start_symbol is shifted from the initial
16242 state, using `while (... symbol != start_symbol ...)' sounds
16243 better than `while (... symbol < start_symbol ...)': If fail
16244 to see how the order between symbols could be relevant!
16245
78af9bbc
AD
162462001-12-10 Akim Demaille <akim@epita.fr>
16247
16248 * src/getargs.h: Don't declare `spec_name_prefix' and
16249 `spec_file_prefix', declared by src/files.h.
16250 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16251 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16252 * src/output.c (prepare): Adjust.
16253 * src/reader.c (symbols_output): Likewise.
16254 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16255
bdef2a41
AD
162562001-12-10 Akim Demaille <akim@epita.fr>
16257
16258 * src/muscle_tab.c (muscle_init): NULL is a better default than
16259 `"0"'.
16260
3735969c
AD
162612001-12-10 Akim Demaille <akim@epita.fr>
16262
16263 * src/reader.c (reader): Calling symbols_output once is enough.
16264
49701457
AD
162652001-12-10 Akim Demaille <akim@epita.fr>
16266
16267 Now that states have a complete set of members, the linked list of
16268 reductions is useless: just fill directly the state's reductions
16269 member.
16270
16271 * src/state.h (struct reductions): Remove member `number' and
16272 `next'.
16273 * src/LR0.c (first_reduction, last_reduction): Remove.
16274 (save_reductions): Don't link the new reductions, store them in
16275 this_state.
16276 * src/lalr.c (set_state_table): No need to attach reductions to
16277 states, it's already done.
16278 * src/output.c (output_actions): No longer free the shifts, then
16279 the reductions, then the states: free all the states and their
16280 members.
16281
0edad749
AD
162822001-12-10 Akim Demaille <akim@epita.fr>
16283
16284 * src/options.c (OPTN, DRTV, BOTH): New.
16285 (option_table): Use them.
16286
0edad749
AD
16287 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16288 the job of system.h.
16289 * src/options.c: Don't include stdio.h and xalloc.h for the same
16290 reasons.
16291
5449dd0f
AD
162922001-12-10 Akim Demaille <akim@epita.fr>
16293
16294 * src/output.c (output, prepare): Make sure the values of the
16295 muscles `action' and `prologue' are 0-terminated.
16296
a870c567
AD
162972001-12-10 Akim Demaille <akim@epita.fr>
16298
16299 Clean up GCC warnings.
16300
16301 * src/reader.c (copy_action): `buf' is not used.
16302 (parse_skel_decl): Be static.
16303 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16304 * src/options.h (create_long_option_table): Have a real prototype.
16305 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16306 (hash_delete_at): Return const void *.
16307 Adjust casts to preserve the const.
16308
80df8768
AD
163092001-12-10 Akim Demaille <akim@epita.fr>
16310
16311 * configure.in: Require 2.52g.
16312 M4 is not needed, but AUTOM4TE is.
16313 * m4/m4.m4: Remove.
16314 * tests/Makefile.am: Adjust.
16315
f693ad14
AD
163162001-12-10 Akim Demaille <akim@epita.fr>
16317
16318 One structure for states is enough, even though theoretically
16319 there are LR(0) states and LALR(1) states.
16320
16321 * src/lalr.h (state_t): Remove.
16322 (state_table): Be state_t **, not state_t *.
16323 * src/state.h (core, CORE_ALLOC): Rename as...
16324 (state_t, STATE_ALLOC): this.
16325 Add the LALR(1) members: shifts, reductions, errs.
16326 * src/LR0.c (state_table): Rename as...
16327 (state_hash): this, to avoid name clashes with the global
16328 `state_table'.
16329 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16330 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16331
74ffbcb6
AD
163322001-12-10 Akim Demaille <akim@epita.fr>
16333
16334 Bison dumps core on bash.y.
16335 Reported by Pascal Bart.
16336
16337 * src/warshall.c (bitmatrix_print): New.
16338 (TC): Use it.
ba0fe3c7 16339 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
16340 j must be the outer loop.
16341 * tests/regression.at (Broken Closure): New.
16342
07708e19
AD
163432001-12-05 Akim Demaille <akim@epita.fr>
16344
16345 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16346 its argument.
ba1ecc07 16347 Reported by Peter Hamorsky.
07708e19 16348
92b16366
AD
163492001-12-05 Akim Demaille <akim@epita.fr>
16350
16351 * src/conflicts.c (err_table): Remove.
16352 (resolve_sr_conflict): Adjust.
16353 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16354 Rename as...
16355 (state_t.reductions, state_t.shifts): this.
16356
076ab033
AD
163572001-12-05 Akim Demaille <akim@epita.fr>
16358
16359 * src/reduce.c (reduce_grammar_tables): No longer disable the
16360 removal of useless rules via CPP but via `if (0)', so that the
16361 compiler still check the code is valid.
16362 For instance, it should have noticed `rline' no longer exists: use
16363 the `line' member of rule_t.
16364 * src/gram.c (dummy, rline): Remove, unused.
16365
3843c413
AD
163662001-12-05 Akim Demaille <akim@epita.fr>
16367
16368 * src/output.c (pack_vector): Use assert, not berror.
16369 * src/main.c (berror): Remove, unused.
16370
43168960
AD
163712001-12-05 Akim Demaille <akim@epita.fr>
16372
16373 New experimental feature: if --verbose --trace output all the
16374 items of a state, not only its kernel.
16375
16376 * src/print.c (print_core): If `trace_flag', then invoke closure
16377 before outputting the items of the state (print_core is no longer
16378 a correct name them).
16379 (print_results): Invoke new_closure/free_closure if needed.
16380
b2872512
AD
163812001-12-05 Akim Demaille <akim@epita.fr>
16382
16383 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16384 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16385 (nitemset): for consistency with the rest of the project.
16386
23cbcc6c
AD
163872001-12-05 Akim Demaille <akim@epita.fr>
16388
16389 * src/closure.c (print_closure): Improve.
16390 (closure): Use it for printing input and output.
16391
03ec521c
AD
163922001-12-05 Akim Demaille <akim@epita.fr>
16393
16394 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16395 indexed by nonterminals.
16396
3a7456dd
AD
163972001-12-05 Akim Demaille <akim@epita.fr>
16398
16399 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16400 what it was!).
16401 * src/warshall.h: Remove accidental duplication of the content.
16402
1cbcf2e7
AD
164032001-12-05 Akim Demaille <akim@epita.fr>
16404
16405 * src/closure.c (set_fderives): De-obfuscate.
16406
84182270
AD
164072001-12-05 Akim Demaille <akim@epita.fr>
16408
16409 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16410
3f6f053c
AD
164112001-12-05 Akim Demaille <akim@epita.fr>
16412
16413 * src/closure.c (set_firsts): De-obfuscate.
16414
7a5350ba
AD
164152001-12-05 Akim Demaille <akim@epita.fr>
16416
16417 * src/output.c (action_row): De-obfuscate
16418 using the good o' techniques: arrays not pointers, variable
16419 locality, BITISSET, RESETBIT etc.
16420
d954473d
AD
164212001-12-05 Akim Demaille <akim@epita.fr>
16422
16423 Pessimize the code to simplify it: from now on, all the states
16424 have a valid SHIFTS, which NSHIFTS is possibly 0.
16425
16426 * src/LR0.c (shifts_new): Be global and move to..
16427 * src/state.c, src/state.h: here.
16428 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16429 * src/print_graph: Adjust.
16430
9839bbe5
AD
164312001-12-05 Akim Demaille <akim@epita.fr>
16432
16433 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16434 * src/conflicts.c: Use it.
16435 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16436 incorrectly ``simplified''.
16437
9f136c07
AD
164382001-12-05 Akim Demaille <akim@epita.fr>
16439
16440 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16441 using the good o' techniques: arrays not pointers, variable
16442 locality, BITISSET, RESETBIT etc.
16443
b608206e
AD
164442001-12-05 Akim Demaille <akim@epita.fr>
16445
16446 * src/state.h (SHIFT_SYMBOL): New.
16447 * src/conflicts.c: Use it to deobfuscate.
16448
52afa962
AD
164492001-12-05 Akim Demaille <akim@epita.fr>
16450
16451 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16452 (print_reductions): De-obfuscate using the good o' techniques:
16453 arrays not pointers, variable locality, BITISSET.
16454
e74dc321
AD
164552001-12-05 Akim Demaille <akim@epita.fr>
16456
16457 * src/conflicts.c (print_reductions): Arrays, not pointers.
16458 Use BITISSET.
16459
768fca83
AD
164602001-12-05 Akim Demaille <akim@epita.fr>
16461
16462 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16463
a17e599f
AD
164642001-12-05 Akim Demaille <akim@epita.fr>
16465
16466 * src/conflicts.c (print_reductions): Improve variable locality.
16467
a04bc341
AD
164682001-12-05 Akim Demaille <akim@epita.fr>
16469
16470 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16471
c8ea038e
AD
164722001-12-05 Akim Demaille <akim@epita.fr>
16473
16474 * src/conflicts.c (print_reductions): Improve variable locality.
16475
aa2aab3c
AD
164762001-12-05 Akim Demaille <akim@epita.fr>
16477
16478 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16479 * src/lalr.c: Use them.
16480
b178c8cc
AD
164812001-12-05 Akim Demaille <akim@epita.fr>
16482
16483 * src/LR0.c (augment_automaton): Formatting changes.
16484 Better variable locality.
16485
f67d13aa
AD
164862001-12-05 Akim Demaille <akim@epita.fr>
16487
16488 * src/lalr.c (matrix_print): New.
16489 (transpose): Use it.
16490 Use arrays instead of pointers.
16491
c2713865
AD
164922001-12-05 Akim Demaille <akim@epita.fr>
16493
16494 * src/lalr.c (maxrhs): Move to...
16495 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16496 * src/lalr.c (build_relations): Adjust.
16497
9887c18a
AD
164982001-12-05 Akim Demaille <akim@epita.fr>
16499
16500 * src/lalr.c (transpose): Free the memory allocated to the
16501 argument, as it is replaced by the results by the unique caller.
16502 (build_relations): Merely invoke transpose: it handles the memory
16503 deallocation.
16504 Improve variable locality.
16505 Avoid variables used as mere abbreviations.
16506 (compute_lookaheads): Use arrays instead of pointers.
16507
4d4f699c
AD
165082001-12-05 Akim Demaille <akim@epita.fr>
16509
16510 * src/lalr.c (initialize_F): Improve variable locality.
16511 Avoid variables used as mere abbreviations.
16512
80a69750
AD
165132001-12-05 Akim Demaille <akim@epita.fr>
16514
16515 * src/derives.c (print_derives): Display the ruleno.
16516 * src/lalr.c (initialize_F, transpose): Better variable locality
16517 to improve readability.
16518 Avoid variables used as mere abbreviations.
16519
fe961097
AD
165202001-12-05 Akim Demaille <akim@epita.fr>
16521
16522 * src/lalr.c (traverse): Use arrays instead of pointers.
16523
e3e4e814
AD
165242001-12-05 Akim Demaille <akim@epita.fr>
16525
16526 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16527 the handling of squeue.
16528 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16529
630e182b
AD
165302001-12-05 Akim Demaille <akim@epita.fr>
16531
16532 Because useless nonterminals are now kept alive (instead of being
16533 `destroyed'), we now sometimes examine them, and store information
16534 related to them. Hence we need to know their number, and adjust
16535 memory allocations.
16536
16537 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16538 static.
16539 * src/LR0.c (allocate_itemsets): The memory allocated to
16540 `symbol_count' was used for two different purpose: once to count
16541 the number of occurrences of each symbol, and later reassigned to
16542 `shift_symbol', containing the symbol that can be shifted from a
16543 given state.
16544 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16545 only, and...
16546 (new_itemsets): Allocate `shift_symbol' here.
16547 (allocate_itemsets): symbol_count includes useless nonterminals.
16548 Make room for them.
16549 (free_storage): Use `free', not `XFREE', for pointers that cannot
16550 be null.
16551
81b51460
AD
165522001-12-05 Akim Demaille <akim@epita.fr>
16553
16554 * src/nullable.c (set_nullable): Deobfuscate the handling of
16555 ritem.
16556 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16557
3067fbef
AD
165582001-12-05 Akim Demaille <akim@epita.fr>
16559
16560 * src/gram.c, src/gram.h (ritem_print): New.
16561 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16562 (This useless function was defined only to work around VMS linkers
16563 that can't handle compilation units with variables only).
16564 * src/reduce.c (dump_grammar): Use it to trace the construction of
16565 ritem.
16566
c2bea5f9
PE
165672001-12-04 Paul Eggert <eggert@twinsun.com>
16568
7d27c823
PE
16569 * src/bison.simple (union yyalloc): Change member names
16570 to be the same as the stack names.
16571 (yyparse): yyptr is now union yyalloc *, not char *.
16572 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16573 and may generate better code on some machines.
c2bea5f9
PE
16574 (yystpcpy): Use prototype if __STDC__ is defined, not just
16575 if __cplusplus is defined.
35687a9d 16576
2c8a9dfa
AD
165772001-11-30 Akim Demaille <akim@epita.fr>
16578
16579 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16580 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16581 Gettext doesn't compile cleanly, and dies with -Werror.
16582 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16583 Include WARNING_CFLAGS here.
16584 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16585 before being defined.
16586
f4e421e6
AD
165872001-11-27 Paul Eggert <eggert@twinsun.com>
16588
16589 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16590 First arg is int, not unsigned.
16591 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16592 (SIZE_MAX, UINT_MAX): New macros.
16593 (quotearg_n_options): Abort if N is negative.
16594 Avoid overflow check on hosts where size_t is 64 bits and int
16595 is 32 bits, as overflow is impossible there.
16596 Fix off-by-one typo that caused unnecessary reallocation.
16597
7093d0f5
AD
165982001-11-29 Paul Eggert <eggert@twinsun.com>
16599
16600 Name space cleanup in generated parser.
16601
16602 * doc/bison.texinfo (Bison Parser): Discuss system headers
16603 and their effect on the user name space.
16604
16605 * src/bison.simple:
16606 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16607 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16608 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16609
16610 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16611 on user names when possible.
16612
16613 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16614 Simplify test for whather <alloca.h> exists.
16615
16616 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16617
16618 (<stdio.h>): Include if YYDEBUG.
16619
16620 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16621 ! defined (yyoverflow) && ! defined (yymemcpy).
16622
16623 (yymemcpy, yyparse): Rename local variables as needed so that
16624 they all begin with 'yy'.
16625
16626 (yystrlen, yystpcpy): New functions.
16627
16628 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16629 All uses changed.
16630
16631 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16632 instead of relying on string.h functions. Use YYSTACK_ALLOC
16633 and YYSTACK_FREE instead of malloc and free.
16634
fd51e5ff
AD
166352001-11-30 Akim Demaille <akim@epita.fr>
16636
16637 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16638 before their first uses.
16639 (YYBISON, YYPURE): Move to the top of the output.
16640
7d13ff5f
AD
166412001-11-30 Akim Demaille <akim@epita.fr>
16642
16643 * tests/reduce.at (Useless Nonterminals): Fix.
16644
892a3995
AD
166452001-11-30 Akim Demaille <akim@epita.fr>
16646
16647 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16648 if body instead of `;' to pacify GCC's warnings.
16649
68f1e3ed
AD
166502001-11-30 Akim Demaille <akim@epita.fr>
16651
16652 Instead of mapping the LHS of unused rules to -1, keep the LHS
16653 valid, but flag the rules as invalid.
16654
16655 * src/gram.h (rule_t): `useful' is a new member.
16656 * src/print.c (print_grammar): Adjust.
16657 * src/derives.c (set_derives): Likewise.
16658 * src/reader.c (packgram, reduce_output): Likewise.
16659 * src/reduce.c (reduce_grammar_tables): Likewise.
16660 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16661
d2d1b42b
AD
166622001-11-30 Akim Demaille <akim@epita.fr>
16663
16664 * src/reduce.c (reduce_output): Formatting changes.
16665 * src/print.c (print_results, print_grammar): Likewise.
16666 * tests/regression.at (Rule Line Numbers)
16667 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16668
760b53a8
AD
166692001-11-30 Akim Demaille <akim@epita.fr>
16670
16671 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16672 useless nonterminals, move them at the end of the symbol arrays.
16673 (reduce_output): Adjust.
16674 * tests/reduce.at (Useless Nonterminals): Adjust.
16675
00238958
AD
166762001-11-30 Akim Demaille <akim@epita.fr>
16677
16678 * src/reduce.c: Various comment/formatting changes.
16679 (nonterminals_reduce): New, extracted from...
16680 (reduce_grammar_tables): here.
16681 (reduce_grammar): Call nonterminals_reduce.
16682
396452de
PE
166832001-11-29 Paul Eggert <eggert@twinsun.com>
16684
16685 * src/bison.simple (YYSTACK_REALLOC): Remove.
16686 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16687 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16688 New macros.
16689 (union yyalloc): New type.
16690 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16691 an arbitrary restriction on hosts where size_t is wider than int.
16692
16693 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16694 a parser stack overflow. Allocate just one block of memory for all
16695 three stacks, instead of allocating three blocks; this typically is
16696 faster and reduces fragmentation.
16697
16698 Do not limit the number of items in the stack to a value that fits
16699 in 'int', as this is an arbitrary limit on hosts with 64-bit
16700 size_t and 32-bit int.
16701
147e184c
MA
167022001-11-29 Marc Autret <autret_m@epita.fr>
16703
16704 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16705 of defining YYERROR_VERBOSE.
16706 [AT_DATA]: $4 is now out of C declarations in the prologue.
16707
426cf563
MA
167082001-11-28 Marc Autret <autret_m@epita.fr>
16709
16710 * src/reader.c (parse_dquoted_param): New.
16711 (parse_skel_decl): Use it.
16712 * src/lex.h: Add its prototype.
16713 * src/lex.c (literalchar): Become not static.
16714
c7925b99
MA
167152001-11-28 Marc Autret <autret_m@epita.fr>
16716
16717 * src/output.h: And put its extern declaration here.
16718 * src/output.c (error_verbose): Define here.
16719 (prepare): Echo name modification.
16720 * src/getargs.h: Clean its extern declaration.
16721 * src/getargs.c (error_verbose_flag): Remove.
16722 (getargs): Remove case 'e'.
16723 * src/options.c (option_table): 'error-verbose' is now seen as simple
16724 percent option.
16725 Include output.h.
16726
16727 * src/reader.c (read_declarations): Remove case tok_include.
16728 (parse_include_decl): Remove.
16729 * src/lex.h (token_t): Remove tok_include.
16730 * src/options.c (option_table): 'include' is now a simple command line
16731 option.
16732
5b5d1929
MA
167332001-11-28 Marc Autret <autret_m@epita.fr>
16734
16735 * src/bison.simple: Adjust muscle names.
16736 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16737 * src/output.c (prepare): s/_/-/ for the muscles names.
16738 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16739
8850be4b
MA
167402001-11-28 Marc Autret <autret_m@epita.fr>
16741
16742 * src/bison.simple: Fix debug.
16743 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16744
4a38e613
AD
167452001-11-28 Akim Demaille <akim@epita.fr>
16746
16747 * src/LR0.c (shifts_new): New.
16748 (save_shifts, insert_start_shift, augment_automaton): Use it.
16749
4b35e1c1
AD
167502001-11-28 Akim Demaille <akim@epita.fr>
16751
16752 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16753 keep ruleno only.
16754
d2b04478
AD
167552001-11-28 Akim Demaille <akim@epita.fr>
16756
16757 * src/closure.c (closure): Instead of looping over word in array
16758 then bits in words, loop over bits in array.
16759
2c4c30aa
AD
167602001-11-28 Akim Demaille <akim@epita.fr>
16761
16762 * src/closure.c (closure): No longer optimize the special case
16763 where all the bits of `ruleset[r]' are set to 0, to make the code
16764 clearer.
16765
576890b7
AD
167662001-11-28 Akim Demaille <akim@epita.fr>
16767
16768 * src/closure.c (closure): `r' and `c' are new variables, used to
16769 de-obfuscate accesses to RULESET and CORE.
16770
cb487d7d
AD
167712001-11-28 Akim Demaille <akim@epita.fr>
16772
16773 * src/reduce.c (reduce_print): Use ngettext.
16774 (dump_grammar): Improve the trace accuracy.
16775
6013d43f
AD
167762001-11-28 Akim Demaille <akim@epita.fr>
16777
16778 * src/reduce.c (dump_grammar): Don't translate trace messages.
16779
cb4956ee
AD
167802001-11-28 Akim Demaille <akim@epita.fr>
16781
16782 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16783 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16784 as all tags are free'ed afterwards.
16785 From Enrico Scholz.
16786
648185ab
PE
167872001-11-27 Paul Eggert <eggert@twinsun.com>
16788
16789 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16790 use alloca when we didn't want to, and vice versa.
16791
68254a03
MA
167922001-11-27 Marc Autret <autret_m@epita.fr>
16793
9113b58f
AD
16794 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16795 initialization.
68254a03
MA
16796 * src/output.c (prepare): Remove its update.
16797
04d843a2
MA
167982001-11-27 Marc Autret <autret_m@epita.fr>
16799
16800 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16801 Use %error-verbose.
16802
d2079671 168032001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
16804
16805 * src/bison.simple: Remove YYERROR_VERBOSE using.
16806 Use %%error_verbose.
16807 (yyparse): Likewise.
16808 * src/output.c (prepare): Give its final value.
16809 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16810 * src/getargs.h: Add its extern declaration.
16811 * src/getargs.c (error_verbose_flag): New int.
16812 (getargs): Update to catch new case.
16813 * src/options.c (option_table): 'error-verbose' is a new option.
16814 (shortopts): Update.
16815
e0327bc8
AD
168162001-11-27 Akim Demaille <akim@epita.fr>
16817
16818 * src/system.h: Use intl/libgettext.h.
16819 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16820
000f1a3c
AD
168212001-11-27 Akim Demaille <akim@epita.fr>
16822
16823 * tests/torture.at (Exploding the Stack Size with Malloc):
16824 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16825
26cfe0be
AD
168262001-11-27 Akim Demaille <akim@epita.fr>
16827
16828 * src/files.c: Include error.h.
16829 Reported by Hans Aberg.
16830
f6bd5427
MA
168312001-11-26 Marc Autret <autret_m@epita.fr>
16832
d2079671 16833 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
16834 (read_declarations): Add case tok_include.
16835 * src/getargs.h (include): Add its extern definition.
16836 * src/getargs.c (include): New const char *.
16837 (getargs): Add case '-I'.
16838 * src/options.c (option_table): Add include as command line and
16839 percent option.
16840 * src/lex.h (token_t): Add tok_include.
16841
2ca209c1
AD
168422001-11-26 Akim Demaille <akim@epita.fr>
16843
16844 * src/reader.c (readgram): Make sure rules for mid-rule actions
16845 have a lineno equal to that of their host rule.
16846 Reported by Hans Aberg.
16847 * tests/regression.at (Rule Line Numbers): New.
16848
0e41b407
AD
168492001-11-26 Akim Demaille <akim@epita.fr>
16850
16851 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16852 size_ts.
16853
168542001-11-26 Akim Demaille <akim@epita.fr>
16855
16856 * src/complain.c, src/complain.h (error): Remove, provided by
16857 lib/error.[ch].
16858
e0c40012
AD
168592001-11-26 Akim Demaille <akim@epita.fr>
16860
16861 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16862 issue an error message.
16863 * tests/regression.at (Invalid %directive): New.
16864 Reported by Hans Aberg.
16865
5e147124
AD
168662001-11-26 Akim Demaille <akim@epita.fr>
16867
16868 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16869 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16870
a034c8b8
AD
168712001-11-26 Akim Demaille <akim@epita.fr>
16872
16873 * src/conflicts.c (conflicts_print): Don't complain at all when
16874 there are no reduce/reduce conflicts, and as many shift/reduce
16875 conflicts as expected.
16876 * tests/regression.at (%expect right): Adjust.
16877
c64a20f3
AD
168782001-11-23 Akim Demaille <akim@epita.fr>
16879
16880 * lib/alloca.c: Update, from fileutils.
16881
5b0d29bb
AD
168822001-11-23 Akim Demaille <akim@epita.fr>
16883
16884 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16885
722c4bfe
AD
168862001-11-23 Akim Demaille <akim@epita.fr>
16887
16888 * src/system.h: Include alloca.h.
16889 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16890
6255b435
AD
168912001-11-23 Akim Demaille <akim@epita.fr>
16892
16893 * src/print_graph.c (print_actions): Remove `rule', unused.
16894 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16895 pacify GCC's signed < unsigned warnings.
16896 * src/closure.c (itemsetsize): Likewise.
16897 * src/reader.c (symbol_list_new): Static.
16898
b29b2ed5
AD
168992001-11-23 Akim Demaille <akim@epita.fr>
16900
16901 Attaching lineno to buckets is stupid, since only one copy of each
16902 symbol is kept, only the line of the first occurrence is kept too.
16903
16904 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16905 * src/reader.c (rline_allocated): Remove, unused.
16906 (symbol_list): Have a `line' member.
16907 (symbol_list_new): New.
16908 (readgram): Use it.
16909 * src/print.c (print_grammar): Output the rule line numbers.
16910 * tests/regression.at (Solved SR Conflicts)
16911 (Unresolved SR Conflicts): Adjust.
16912 Reported by Hans Aberg.
16913
a81b1d4a
MA
169142001-11-22 Marc Autret <autret_m@epita.fr>
16915
16916 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16917
c1ecb3c1
MA
169182001-11-22 Marc Autret <autret_m@epita.fr>
16919
16920 * src/muscle_tab.c (muscle_init): Remove initialization of
16921 skeleton muscle.
16922 * src/output.c (output_master_parser): Do it here.
16923
fbe01355
AD
169242001-11-20 Akim Demaille <akim@epita.fr>
16925
16926 * po/sv.po: New.
16927 * configure.in (ALL_LINGUAS): Adjust.
16928 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16929 longer contains strings to translate.
16930
81e895c0
AD
169312001-11-19 Akim Demaille <akim@epita.fr>
16932
16933 * src/conflicts.c (conflicts_print): Add a missing \n.
16934
6bb1878b
AD
169352001-11-19 Akim Demaille <akim@epita.fr>
16936
16937 * src/nullable.c (nullable_print): New.
16938 (set_nullable): Call it when tracing.
16939 Better locality of variables.
16940
d9ec2d07
AD
169412001-11-19 Akim Demaille <akim@epita.fr>
16942
16943 * src/print.c (print_actions): Better locality of variables.
16944
720e5c1b
AD
169452001-11-19 Akim Demaille <akim@epita.fr>
16946
16947 * src/derives.c (print_derives): Fix and enrich.
16948 * src/closure.c (print_fderives): Likewise.
16949
fb908786
AD
169502001-11-19 Akim Demaille <akim@epita.fr>
16951
16952 * src/closure.c (itemsetend): Remove, replaced with...
16953 (itemsetsize): new.
16954
125ecb56
AD
169552001-11-19 Akim Demaille <akim@epita.fr>
16956
16957 * src/LR0.c (kernel_end): Remove, replaced with...
16958 (kernel_size): new.
16959
d8cf039f
AD
169602001-11-19 Akim Demaille <akim@epita.fr>
16961
16962 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16963 to clarify.
16964
7bec0760
AD
169652001-11-19 Akim Demaille <akim@epita.fr>
16966
16967 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16968
c87d4863
AD
169692001-11-19 Akim Demaille <akim@epita.fr>
16970
16971 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16972 trace messages.
16973 * src/LR0.c: Likewise.
16974 (allocate_itemsets): Use arrays instead of pointers to clarify.
16975
9bfe901c
AD
169762001-11-19 Akim Demaille <akim@epita.fr>
16977
16978 * src/getargs.c (statistics_flag): Replace with...
16979 (trace_flag): New.
16980 (longopts): Accept --trace instead of --statistics.
16981 * src/getargs.h, src/options.c: Adjust.
16982 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16983 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16984
97db7bd4
AD
169852001-11-19 Akim Demaille <akim@epita.fr>
16986
cc72668c 16987 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
16988 pointers to clarify the code.
16989 (save_reductions, save_shifts): Factor common parts of alternatives.
16990
2c5f66ed
AD
169912001-11-19 Akim Demaille <akim@epita.fr>
16992
16993 * src/LR0.c (new_state, get_state): Complete TRACE code.
16994 * src/closure.c: Include `reader.h' to get `tags', needed by the
16995 trace code.
16996 Rename the conditional DEBUG as TRACE.
16997 Output consistently TRACEs to stderr, not stdout.
16998 * src/derives.c: Likewise.
16999 * src/reduce.c: (inaccessable_symbols): Using if is better style
17000 than goto.
17001 Use `#if TRACE' instead of `#if 0' for tracing code.
17002
300f275f
AD
170032001-11-19 Akim Demaille <akim@epita.fr>
17004
17005 * src/system.h (LIST_FREE, shortcpy): New.
17006 * src/LR0.c: Use them.
17007 * src/output.c (free_itemsets, free_reductions, free_shifts):
17008 Remove, replaced by LIST_FREE.
17009
f59c437a
AD
170102001-11-19 Akim Demaille <akim@epita.fr>
17011
17012 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17013 (REDUCTIONS_ALLOC): New.
17014 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17015 allocation.
17016
6986fd9e
AD
170172001-11-19 Akim Demaille <akim@epita.fr>
17018
17019 * src/LR0.c (new_state): Complete trace code.
17020 * src/nullable.c (set_nullable): Don't translate traces.
17021
4bc30f78
AD
170222001-11-19 Akim Demaille <akim@epita.fr>
17023
17024 * src/print_graph.c (print_core): Better locality of variables.
17025 * src/print.c (print_core): Likewise.
17026
08a946e0
AD
170272001-11-19 Akim Demaille <akim@epita.fr>
17028
17029 * src/vcg.c: You do the output, so you are responsible of the
17030 handling of VCG syntax, in particular: use quotearg.
17031 * src/print_graph.c: Don't.
17032 (print_actions): Don't output the actions as part of the nodes,
17033 since that's the job of the edges.
17034 (print_state): Don't output by hand: fill the node description,
9bfe901c 17035 and ask for its output.
08a946e0 17036
f0473484
AD
170372001-11-19 Akim Demaille <akim@epita.fr>
17038
cc72668c
AD
17039 * src/bison.simple (yyparse): When verbosely reporting an error,
17040 no longer put additional quotes around token names.
f0473484
AD
17041 * tests/calc.at: Adjust.
17042
e41dc700
AD
170432001-11-19 Akim Demaille <akim@epita.fr>
17044
17045 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17046 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17047 * src/output.c: Adjust.
17048
652a871c
AD
170492001-11-19 Akim Demaille <akim@epita.fr>
17050
17051 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17052 (rule_t): this.
17053 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17054
b2ed6e58
AD
170552001-11-19 Akim Demaille <akim@epita.fr>
17056
17057 * src/gram.h (rule_t): New.
17058 (rule_table): New.
17059 (rrhs, rlhs): Remove, part of state_t.
17060 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17061 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17062 * src/reader.c, src/reduce.c: Adjust.
17063
edad7067
AD
170642001-11-19 Akim Demaille <akim@epita.fr>
17065
17066 * src/reader.c (symbols_output): New, extracted from...
17067 (packsymbols): Here.
17068 (reader): Call it.
17069
3feec034
AD
170702001-11-19 Akim Demaille <akim@epita.fr>
17071
17072 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17073 (maxrhs): this new function.
17074
ddcd5fdf
AD
170752001-11-19 Akim Demaille <akim@epita.fr>
17076
cc72668c 17077 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
17078 Adjust.
17079
bb527fc2
AD
170802001-11-19 Akim Demaille <akim@epita.fr>
17081
cc72668c 17082 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
17083 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17084 * src/lalr.c: Adjust.
17085
a845a697
AD
170862001-11-19 Akim Demaille <akim@epita.fr>
17087
17088 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17089 (set_state_table): handle the `lookaheads' members.
17090
f004bf6a
AD
170912001-11-19 Akim Demaille <akim@epita.fr>
17092
cc72668c
AD
17093 * src/lalr.h (lookaheads): Removed array, whose contents is now
17094 a member of...
f004bf6a
AD
17095 (state_t): this structure.
17096 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17097 Adjust.
17098
de326cc0
AD
170992001-11-19 Akim Demaille <akim@epita.fr>
17100
cc72668c
AD
17101 * src/lalr.h (consistent): Removed array, whose contents is now
17102 a member of...
de326cc0
AD
17103 (state_t): this structure.
17104 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17105 Adjust.
17106
90b4416b
AD
171072001-11-19 Akim Demaille <akim@epita.fr>
17108
cc72668c
AD
17109 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17110 contents are now members of...
90b4416b
AD
17111 (state_t): this structure.
17112 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17113 Adjust.
17114
9703cc49
AD
171152001-11-19 Akim Demaille <akim@epita.fr>
17116
17117 * src/lalr.h (state_t): New.
17118 (state_table): Be a state_t * instead of a core **.
17119 (accessing_symbol): Remove, part of state_t.
17120 * src/lalr.c: Adjust.
17121 (set_accessing_symbol): Merge into...
17122 (set_state_table): this.
17123 * src/print_graph.c, src/conflicts.c: Adjust.
17124
d803322e
AD
171252001-11-14 Akim Demaille <akim@epita.fr>
17126
17127 * tests/calc.at, tests/output.at, tests/regression.at,
17128 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17129 now the tests are run in private dirs, therefore AC_CLEANUP and
17130 family can be simplified to 0-ary.
17131 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17132 use abs. path to find config.h.
17133 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17134 stderr, there can be way too much random noise.
17135 Instead pass -Werror to GCC and rely on the exit status.
17136 Reported by Wolfram Wagner.
17137
3d76b07d
AD
171382001-11-14 Akim Demaille <akim@epita.fr>
17139
17140 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17141 defined only if yyoverflow is defined, to avoid `warning: unused
17142 variable `yyvs1''.
17143 Reported by The Test Suite.
17144
09b503c8
AD
171452001-11-14 Akim Demaille <akim@epita.fr>
17146
17147 * src/print.c: Include reduce.h.
17148 Reported by Hans Aberg.
17149
171502001-11-14 Akim Demaille <akim@epita.fr>
17151
17152 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17153 Revert a previous patch: these are really const.
17154 * src/conflicts.c (conflict_report): Additional useless pair of
17155 braces to pacify GCC's warnings for `if () if () {} else {}'.
17156 * src/lex.c (parse_percent_token): Replace equal_offset with
17157 arg_offset.
17158 arg is const.
17159 Be sure to strdup `arg' when used, since there is no reason for
17160 token_buffer not to change.
17161
0f37a994
AD
171622001-11-14 Akim Demaille <akim@epita.fr>
17163
17164 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17165 definition.
17166 * src/main.c (main): Use them.
17167 Suggested by Hans Aberg.
17168
d39d93b8
AD
171692001-11-12 Akim Demaille <akim@epita.fr>
17170
17171 * src/system.h (ngettext): Now that we use ngettext, be sure to
17172 provide a default definition when NLS are not used.
17173
9edcd895
AD
171742001-11-12 Akim Demaille <akim@epita.fr>
17175
17176 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17177 Use @kbd to denote user input.
17178 (Language and Grammar): ANSIfy the example.
17179 Adjust its layout for info/notinfo.
17180 (Location Tracking Calc): Output error messages to stderr.
17181 Output locations in a more GNUtically correct way.
17182 Fix a couple of Englishos.
17183 Adjust @group/@end group pairs.
17184
7da99ede
AD
171852001-11-12 Akim Demaille <akim@epita.fr>
17186
e3aa65c5 17187 %expect was not functioning at all.
7da99ede
AD
17188
17189 * src/conflicts.c (expected_conflicts): Set to -1.
17190 (conflict_report): Use ngettext.
17191 (conflicts_print): Check %expect and make its violation an error.
17192 * doc/bison.texinfo (Expect Decl): Adjust.
17193 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17194 * tests/regression.at (%expect not enough, %expect right)
17195 (%expect too much): New.
17196
ba9dda1a
AD
171972001-11-12 Akim Demaille <akim@epita.fr>
17198
17199 * tests/regression.at (Conflicts): Rename as...
17200 (Unresolved SR Conflicts): this.
17201 (Solved SR Conflicts): New.
17202
337c5bd1
AD
172032001-11-12 Akim Demaille <akim@epita.fr>
17204
17205 * src/reduce.c (print_results): Rename as...
17206 (reduce_output): This.
17207 Output to OUT, passed as argument, instead of output_obstack.
17208 (dump_grammar): Likewise.
17209 (reduce_free): New.
17210 Also free V1.
17211 (reduce_grammar): No longer call reduce_output, since...
17212 * src/print.c (print_results): do it.
17213 * src/main.c (main): Call reduce_free;
17214
c73a41af
AD
172152001-11-12 Akim Demaille <akim@epita.fr>
17216
17217 * src/conflicts.c (print_reductions): Accept OUT as argument.
17218 Output to it, not to output_obstack.
17219 * src/print.c (print_actions): Adjust.
17220
0df87bb6
AD
172212001-11-12 Akim Demaille <akim@epita.fr>
17222
17223 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17224 the result instead of using...
17225 (src_total, rrc_total, src_count, rrc_count): Remove.
17226 (any_conflicts): Remove.
17227 (print_conflicts): Split into...
17228 (conflicts_print, conflicts_output): New.
17229 * src/conflicts.h: Adjust.
17230 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 17231 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
17232 * tests/regression.at (Conflicts): New.
17233 Reported by Tom Lane.
17234
e4d3d4de
AD
172352001-11-12 Akim Demaille <akim@epita.fr>
17236
17237 * tests/regression.at (Invalid input): Remove, duplicate with
17238 ``Invalid input: 1''.
17239
6d7d248e
AD
172402001-11-12 Akim Demaille <akim@epita.fr>
17241
17242 * tests/torture.at (AT_DATA_STACK_TORTURE)
17243 (Exploding the Stack Size with Alloca)
17244 (Exploding the Stack Size with Malloc): New.
17245
e9e4c321
AD
172462001-11-12 Akim Demaille <akim@epita.fr>
17247
17248 * src/bison.simple (YYSTACK_REALLOC): New.
17249 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 17250 Reported by Per Allansson.
e9e4c321 17251
5f7e0832
AD
172522001-11-12 Pascal Bart <pascal.bart@epita.fr>
17253
17254 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17255 define CPP macro, which substitute YYSTYPE by yystype.
17256 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17257 with yyltype/YYLTYPE. This allows inclusion of the generated
17258 header within the parser if the compiler, such as GGC, accepts
17259 multiple equivalent #defines.
17260 From Akim.
17261
e3f1699f
AD
172622001-11-05 Akim Demaille <akim@epita.fr>
17263
17264 * src/reader.c (symbols_output): New, extracted from...
17265 (packsymbols): here.
17266 (reader): Adjust.
17267
65be0866
AD
172682001-11-05 Akim Demaille <akim@epita.fr>
17269
17270 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17271
e4d910bf
AD
172722001-11-05 Akim Demaille <akim@epita.fr>
17273
17274 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17275 pattern.
17276
951366c1
AD
172772001-11-05 Akim Demaille <akim@epita.fr>
17278
17279 * src/options.h (struct option_table_struct): set_flags is void*.
17280 * src/options.c (longopts): Support `--output' and `%output'.
17281 (usage): Adjust.
17282 * src/lex.h (tok_setopt): Remove, replaced with...
17283 (tok_intopt, tok_stropt): these new guys.
17284 * src/lex.c (getopt.h): Not needed.
17285 (token_buffer, unlexed_token_buffer): Not const.
17286 (percent_table): Promote `-' over `_' in directive names.
17287 Active `%name-prefix', `file-prefix', and `output'.
17288 (parse_percent_token): Accept possible arguments to directives.
17289 Promote `-' over `_' in directive names.
17290
d8988b2f
AD
172912001-11-04 Akim Demaille <akim@epita.fr>
17292
17293 * doc/bison.texinfo (Decl Summary): Split the list into
17294 `directives for grammars' and `directives for bison'.
17295 Sort'em.
17296 Add description of `%name-prefix', `file-prefix', and `output'.
17297 Promote `-' over `_' in directive names.
17298 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17299 Simplify the description of `--name-prefix'.
17300 Promote `-' over `_' in directive names.
17301 Promote `--output' over `--output-file'.
17302 Fix the description of `--defines'.
17303 * tests/output.at: Exercise %file-prefix and %output.
17304
6468d18e
AD
173052001-11-02 Akim Demaille <akim@epita.fr>
17306
17307 * doc/refcard.tex: Update.
17308
6b7e85b9
AD
173092001-11-02 Akim Demaille <akim@epita.fr>
17310
17311 * src/symtab.h (SUNDEF): New.
17312 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17313 stand for `uninitialized', instead of 0.
17314 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17315 * src/lex.c (lex): Adjust.
17316
17317 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17318 Number it 0.
17319 Let yylex return it instead of a plain 0.
17320 Reported by Dick Streefland.
17321
cd5aafcf
AD
173222001-11-02 Akim Demaille <akim@epita.fr>
17323
17324 * tests/regression.at (Mixing %token styles): New test.
17325
037ca2f1
AD
173262001-11-02 Akim Demaille <akim@epita.fr>
17327
17328 * src/reader.c (parse_thong_decl): Formatting changes.
17329 (token_translations_init): New, extracted from...
17330 (packsymbols): Here.
17331 Adjust.
17332
270a173c
AD
173332001-11-01 Akim Demaille <akim@epita.fr>
17334
17335 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17336 Check that `9foo.y' produces correct cpp guards.
17337 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17338 guards.
17339 Reported by Wwp.
17340
561f9a30
AD
173412001-11-01 Akim Demaille <akim@epita.fr>
17342
17343 * tests/regression.at (Invalid input: 2): New.
17344 * src/lex.c (unlexed_token_buffer): New.
17345 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17346 too.
17347 Reported by Wwp.
17348
f987e9d2
AD
173492001-11-01 Akim Demaille <akim@epita.fr>
17350
17351 * tests/calc.at: Catch up with 1.30.
17352 * configure.in: Bump to 1.49a.
17353 Adjust to newer Autotest.
17354
0846f581
PB
173552001-10-19 Pascal Bart <pascal.bart@epita.fr>
17356
17357 * src/conflicts.c: Move global variables rrc_total and src_total ...
17358 (print_conflicts): here.
17359 * src/output.c (output): Free global variable user_toknums.
17360 * src/lex.c (token_obstack): Become static.
17361
3c1a79b3
AD
173622001-10-18 Akim Demaille <akim@epita.fr>
17363
17364 * tests/atlocal.in (GCC): Add.
17365 * tests/calc.at: s/m4_match/m4_bmatch/.
17366 s/m4_patsubst/m4_bpatsubst/.
17367 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17368 * configure.in: AC_SUBST(GCC).
17369
5d52e7d0
MA
173702001-10-14 Marc Autret <autret_m@epita.fr>
17371
17372 * src/options.c (create_long_option_table): Fix.
17373
631aa1d3
AD
173742001-10-10 Akim Demaille <akim@epita.fr>
17375
17376 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17377
f6ec6d13
AD
173782001-10-04 Akim Demaille <akim@epita.fr>
17379
17380 * src/reader.c (parse_union_decl): Push the caracters in
17381 union_obstack, not attrs_obstack.
17382
342b8b6e
AD
173832001-10-04 Akim Demaille <akim@epita.fr>
17384
17385 Merge in the branch 1.29.
17386
17387 * src/reader.c (packsymbols): Use a temporary obstack for
17388 `%%tokendef', since output_stack is already used elsewhere.
17389
17390 2001-10-02 Akim Demaille <akim@epita.fr>
17391
17392 Bump 1.29d.
17393
17394 2001-10-02 Akim Demaille <akim@epita.fr>
17395
17396 Version 1.29c.
17397
17398 2001-10-02 Akim Demaille <akim@epita.fr>
17399
17400 * tests/regression.at (Invalid CPP headers): New.
17401 From Alexander Belopolsky.
17402 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17403
17404 2001-10-02 Akim Demaille <akim@epita.fr>
17405
17406 * tests/regression.at (Invalid input): New.
17407 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17408 Reported by Shura.
17409
17410 2001-10-02 Akim Demaille <akim@epita.fr>
17411
17412 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17413
17414 2001-10-02 Akim Demaille <akim@epita.fr>
17415
17416 * src/output.c (output_parser): Assert `skeleton'.
17417 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17418 systems.
17419 From Shura.
17420
17421 2001-10-01 Marc Autret <autret_m@epita.fr>
17422
17423 * src/lex.h: Echo modifications.
17424 * src/lex.c (unlex): Parameter is now token_t.
17425 From Hans Aberg.
17426
17427 2001-10-01 Marc Autret <autret_m@epita.fr>
17428
17429 * src/main.c: Include lex.h.
17430 From Hans Aberg.
17431
17432 2001-09-29 Akim Demaille <akim@epita.fr>
17433
17434 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17435
17436 2001-09-28 Akim Demaille <akim@epita.fr>
17437
17438 * tests/testsuite.at: Update to newer Autotest.
17439 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17440
17441 2001-09-27 Akim Demaille <akim@epita.fr>
17442
17443 Position independent wrapper.
17444
17445 * tests/bison: Remove.
17446 * tests/bison.in: New.
17447 * configure.in: Adjust.
17448
17449 2001-09-27 Paul Eggert <eggert@twinsun.com>
17450
17451 Port quotearg fixes from tar 1.13.24.
17452
17453 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17454 tm to be declared.
17455 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17456 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17457
17458 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17459 * m4/mbrtowc.m4: New file.
17460 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17461 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17462
17463 2001-09-27 Akim Demaille <akim@epita.fr>
17464
17465 Bump to 1.29c.
17466
17467 2001-09-27 Akim Demaille <akim@epita.fr>
17468
17469 Version 1.29b.
17470
17471 2001-09-25 Akim Demaille <akim@epita.fr>
17472
17473 * src/system.h: Include `xalloc.h'.
17474 Remove it from the C files.
17475 * src/files.c (output_files): Free the obstacks.
17476 * src/lex.c (init_lex): Rename as...
17477 (lex_init): this.
17478 (lex_free): New.
17479 * src/main.c (main): Use it.
17480
17481 2001-09-24 Marc Autret <autret_m@epita.fr>
17482
17483 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17484 to output informations in fout (FILE*).
17485 (open_graph, close_graph): Likewise.
17486 (output_graph, output_edge, output_node): Likewise.
17487 * src/vcg.h: Update function prototypes.
17488 * src/print_graph.c (print_graph): Open output graph file.
17489 (print_actions): Adjust.
17490 * src/files.h: Remove extern declaration.
17491 * src/files.c: Remove graph_obstack declaration.
17492 (open_files): Remove graph_obstack initialization.
17493 (output_files): Remove graph_obstack saving.
17494
17495 2001-09-24 Marc Autret <autret_m@epita.fr>
17496
17497 * src/files.c (compute_output_file_names): Fix.
17498
17499 2001-09-24 Marc Autret <autret_m@epita.fr>,
17500 Akim Demaille <akim@epita.fr>
17501
17502 * src/reader.c (reader): Remove call to free_symtab ().
17503 * src/main.c (main): Call it here.
17504 Include symtab.h.
17505 * src/conflicts.c (initialize_conflicts): Rename as...
17506 (solve_conflicts): this.
17507 * src/print.c (print_core, print_actions, print_state)
17508 (print_grammar): Dump to a file instead a `output_obstack'.
17509 (print_results): Dump `output_obstack', and then proceed with the
17510 FILE *.
17511 * src/files.c (compute_output_file_names, close_files): New.
17512 (output_files): Adjust.
17513 * src/main.c (main): Adjust.
17514
17515 2001-09-23 Marc Autret <autret_m@epita.fr>
17516
17517 * src/files.c (compute_header_macro): Computes header macro name
17518 from spec_defines_file when given.
17519
17520 2001-09-23 Marc Autret <autret_m@epita.fr>
17521
17522 * src/files.c (output_files): Add default extensions.
17523
17524 2001-09-22 Akim Demaille <akim@epita.fr>
17525
17526 * src/conflicts.c (finalize_conflicts): Rename as...
17527 (free_conflicts): this.
17528
17529 2001-09-22 Akim Demaille <akim@epita.fr>
17530
17531 * src/gram.c (gram_free): Rename back as...
17532 (dummy): this.
17533 (output_token_translations): Free `token_translations'.
17534 * src/symtab.c (free_symtab): Free the tag field.
17535
17536 2001-09-22 Akim Demaille <akim@epita.fr>
17537
17538 Remove `translations' as it is always set to true.
17539
17540 * src/gram.h: Adjust.
17541 * src/reader.c (packsymbols, parse_token_decl): Adjust
17542 * src/print.c (print_grammar): Adjust.
17543 * src/output.c (output_token_translations): Adjust.
17544 * src/lex.c (lex): Adjust.
17545 * src/gram.c: Be sure the set pointers to NULL.
17546 (dummy): Rename as...
17547 (gram_free): this.
17548
17549 2001-09-22 Akim Demaille <akim@epita.fr>
17550
17551 * configure.in: Invoke AM_LIB_DMALLOC.
17552 * src/system.h: Use dmalloc.
17553 * src/LR0.c: Be sure to have pointers initialized to NULL.
17554 (allocate_itemsets): Allocate kernel_items only if needed.
17555
17556 2001-09-22 Akim Demaille <akim@epita.fr>
17557
17558 * configure.in: Bump to 1.29b.
17559 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17560 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17561 need xmalloc.c in calc.y.
17562 From Pascal Bart.
17563
17564 2001-09-21 Akim Demaille <akim@epita.fr>
17565
17566 Version 1.29a.
17567 * Makefile.maint, config/config.guess, config/config.sub,
17568 * config/missing: Update from masters.
17569 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17570 upon package.m4.
17571 * configure.in (ALL_LINGUAS): Add `tr'.
17572
17573 2001-09-21 Akim Demaille <akim@epita.fr>
17574
17575 * tests/Makefile.am (package.m4): Move to...
17576 ($(srcdir)/$(TESTSUITE)): here.
17577
17578 2001-09-20 Akim Demaille <akim@epita.fr>
17579
17580 * src/complain.c: No longer try to be standalone: use system.h.
17581 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17582 * src/complain.h: Likewise.
17583 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17584 Remove the unused variable `n'.
17585 From Albert Chin-A-Young.
17586
17587 2001-09-18 Marc Autret <autret_m@epita.fr>
17588
17589 * doc/bison.1: Update.
17590 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17591 descriptions.
17592 (Option Cross Key): Update.
17593 Add --graph.
17594
17595 2001-09-18 Marc Autret <autret_m@epita.fr>
17596
17597 * tests/regression.at: New test (comment in %union).
17598
17599 2001-09-18 Marc Autret <autret_m@epita.fr>
17600
17601 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17602 do that.
17603 Reported by Keith Browne.
17604
17605 2001-09-18 Marc Autret <autret_m@epita.fr>
17606
17607 * tests/output.at: Add tests for --defines and --graph.
17608
17609 2001-09-18 Marc Autret <autret_m@epita.fr>
17610
17611 * tests/output.at: Removes tests of %{header,src}_extension features.
17612
17613 2001-09-18 Akim Demaille <akim@epita.fr>
17614
17615 * tests/Makefile.am (package.m4): New.
17616 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17617 (_AT_CHECK_CALC_ERROR): Likewise.
17618 Factor the `, ' part of verbose error messages.
17619
17620 2001-09-18 Marc Autret <autret_m@epita.fr>
17621
17622 * src/getargs.c (longopts): Declare --defines and --graph as options
17623 with optional arguments.
17624 * src/files.h: Add extern declarations.
17625 * src/files.c (spec_graph_file, spec_defines_file): New.
17626 (output_files): Update.
17627 Remove CPP-outed code.
17628
17629 2001-09-18 Marc Autret <autret_m@epita.fr>
17630
17631 Turn off %{source,header}_extension feature.
17632
17633 * src/files.c (compute_exts_from_gf): Update.
17634 (compute_exts_from_src): Update.
17635 (output_files): CPP-out useless code.
17636 * src/files.h: Remove {header,source}_extension extern declarations.
17637 * src/reader.c (parse_dquoted_param): CPP-out.
17638 (parse_header_extension_decl): Remove.
17639 (parse_source_extension_decl): Remove.
17640 (read_declarations): Remove cases tok_{hdrext,srcext}.
17641 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17642 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17643
17644 2001-09-10 Akim Demaille <akim@epita.fr>
17645
17646 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17647 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17648 (AT_CHECK_OUTPUT): this.
17649 Merely check ls' exit status, its output is useless.
17650
17651 2001-09-10 Akim Demaille <akim@epita.fr>
17652
17653 * tests/calc.at: Use m4_match.
17654 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17655
17656 2001-09-10 Marc Autret <autret_m@epita.fr>,
17657 Akim Demaille <akim@epita.fr>
17658
17659 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17660 enum color_e.
17661 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17662 to `normal'.
17663 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17664 * src/lex.h: Adjust prototype.
17665 (token_t): Add `tok_undef'.
17666 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17667 (parse_percent_token): Now returns token_t.
17668 Add default statement in switch.
17669 (lex): Separate `c' as an input variable, from the token_t result
17670 part.
17671 (unlexed): Is a token_t.
17672
17673 2001-09-10 Akim Demaille <akim@epita.fr>
17674
17675 * configure.in: Bump to 1.29a.
17676
17677 2001-09-07 Akim Demaille <akim@epita.fr>
17678
17679 Version 1.29.
17680
17681 2001-08-30 Akim Demaille <akim@epita.fr>
17682
17683 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17684 * m4/atconfig.m4: Remove.
17685 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17686 * tests/bison: New.
17687 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17688 m4_if, m4_patsubst, and m4_regexp.
17689 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17690 `input' file instead of echo.
17691
17692 2001-08-29 Akim Demaille <akim@epita.fr>
17693
17694 Bump to 1.28e.
17695
17696 2001-08-29 Akim Demaille <akim@epita.fr>
17697
17698 Version 1.28d.
17699
17700 2001-08-29 Paul Eggert <eggert@twinsun.com>
17701
17702 * src/bison.simple (yyparse): Don't take the address of an
17703 item before the start of an array, as that doesn't conform to
17704 the C Standard.
17705
17706 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17707
17708 * doc/bison.texinfo (Location Tracking Calc): New node.
17709
17710 2001-08-29 Paul Eggert <eggert@twinsun.com>
17711
17712 * src/output.c (output): Do not define const, as this now
17713 causes more problems than it cures.
17714
17715 2001-08-29 Akim Demaille <akim@epita.fr>
17716
17717 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17718 the nodes.
17719 Be sure to tag the `detailmenu'.
17720
17721 2001-08-29 Akim Demaille <akim@epita.fr>
17722
17723 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17724 download in a tmp dir.
17725
17726 2001-08-28 Marc Autret <autret_m@epita.fr>
17727
17728 * config/depcomp: New file.
17729
17730 2001-08-28 Marc Autret <autret_m@epita.fr>
17731
17732 * doc/bison.1 (mandoc): Adjust.
17733 From Juan Manuel Guerrero.
17734
17735 2001-08-28 Marc Autret <autret_m@epita.fr>
17736
17737 * src/print_graph.c (print_state): Fix.
17738
17739 2001-08-27 Marc Autret <autret_m@epita.fr>
17740
17741 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17742 char * members.
17743 Echo modifications to the functions prototypes.
17744 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17745
17746 2001-08-27 Marc Autret <autret_m@epita.fr>
17747
17748 * src/vcg.c: Include `xalloc.h'.
17749 (add_colorentry): New.
17750 (add_classname): New.
17751 (add_infoname): New.
17752 * src/vcg.h: Add new prototypes.
17753
17754 2001-08-27 Akim Demaille <akim@epita.fr>
17755
17756 * Makefile.maint: Sync. again with CVS Autoconf.
17757
17758 2001-08-27 Akim Demaille <akim@epita.fr>
17759
17760 * Makefile.maint: Formatting changes.
17761 (po-update, cvs-update, update): New targets.
17762 (AMTAR): Remove.
17763
17764 2001-08-27 Akim Demaille <akim@epita.fr>
17765
17766 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17767 * Makefile.maint: Sync. with CVS Autoconf.
17768
17769 2001-08-27 Marc Autret <autret_m@epita.fr>
17770
17771 * src/vcg.h (struct infoname_s): New.
17772 (struct colorentry_s): New.
17773 (graph_s): New fields {vertical,horizontal}_order in structure.
17774 Add `infoname' field.
17775 Add `colorentry' field;
17776 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17777 (G_HORIZONTAL_ORDER): New.
17778 (G_INFONAME): New.
17779 (G_COLORENTRY): New.
17780 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17781 Add output of `infoname'.
17782 Add output of `colorentry'.
17783
17784 2001-08-27 Marc Autret <autret_m@epita.fr>
17785
17786 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17787 This one shadowed a global parameter.
17788
17789 2001-08-24 Marc Autret <autret_m@epita.fr>
17790
17791 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17792 instead of `unsigned'.
17793 (print_state): Do not call obstack_object_size () in obstack_grow ()
17794 to avoid macro variables shadowing.
17795
17796 2001-08-23 Marc Autret <autret_m@epita.fr>
17797
17798 * src/lex.c (percent_table): Typo: s/naem/name/.
17799 Add graph option.
17800 Normalize new options declarations.
17801
17802 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17803
17804 * tests/suite.at: Exercise %header_extension and %source_extension.
17805
17806 2001-08-16 Marc Autret <autret_m@epita.fr>
17807
17808 * src/reader.c (parse_dquoted_param): New.
17809 (parse_header_extension_decl): Use it.
17810 (parse_source_extension_decl): Likewise.
17811
17812 2001-08-16 Marc Autret <autret_m@epita.fr>
17813
17814 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17815 (get_xxxx_str): Use assert () instead of complain ().
17816 Remove return invokations in default cases.
17817 (get_decision_str): Modify default behaviour. Remove second argument.
17818 Echo modifications on calls.
17819 (output_graph): Fix.
17820
17821 2001-08-16 Marc Autret <autret_m@epita.fr>
17822
17823 * src/getargs.c (usage): Update with ``-g, --graph''.
17824
17825 2001-08-16 Marc Autret <autret_m@epita.fr>
17826
17827 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17828 (Option Cross Key): Likewise.
17829 * doc/bison.1: Update.
17830
1c8c2190
PB
178312001-09-25 Pascal Bart <pascal.bart@epita.fr>
17832
17833 * src/output.c (output_master_parser): Don't finish action_obstack.
17834 (output_parser): Don't care about the muscle action, here.
17835 (prepare): Copy the action_obstack in the action muscle.
17836 (output): Free action_obstack.
17837
180d45ba
PB
178382001-09-23 Pascal Bart <pascal.bart@epita.fr>
17839
17840 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17841 will contain `%union' declaration.
17842 (parse_union_decl): Delete #line directive output.
17843 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17844 informations about %union.
17845 (parse_union_decl): Copy the union_obstack in the muscle stype.
17846 * src/bison.simple: Add new #line directive.
17847 Add typdef %%stype YYSTYPE.
17848
c51d1a19
PB
178492001-09-23 Pascal Bart <pascal.bart@epita.fr>
17850
17851 * src/bison.simple: Add new `#line' directive.
17852
6f9344da
PB
178532001-09-22 Pascal Bart <pascal.bart@epita.fr>
17854
17855 * src/bison.simple: New `#line' directive.
17856 * src/output.c (output_parser): Support new dynamic muscle input_line.
17857
652def80
MA
178582001-09-22 Marc Autret <autret_m@epita.fr>
17859
17860 * src/output.c (output_master_parser): New.
17861 (output_parser): Be more re-entrant.
17862
25b222fa
MA
178632001-09-21 Marc Autret <autret_m@epita.fr>
17864
17865 * src/reader.c (copy_definition, parse_union_decl): Update and use
17866 `linef' muscle.
17867 (copy_action): Likewise.
17868 Use obstack_1grow ().
17869 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17870
6bc35ae5
MA
178712001-09-21 Marc Autret <autret_m@epita.fr>
17872
17873 * src/options.c (option_table): Adjust.
17874 * src/lex.c (parse_percent_token): Fix.
17875
c0629aa1
PB
178762001-09-20 Pascal Bart <pascal.bart@epita.fr>
17877
17878 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 17879
82b6d266
PB
178802001-09-20 Pascal Bart <pascal.bart@epita.fr>
17881
17882 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17883 is now an option_table_struct*.
17884 (option_strcmp): New function option_strcmp.
17885 (parse_percent_token): Call option_strcmp.
17886 * src/getargs.c (xalloc.h, options.h): Include it.
17887 (getargs): Call create_long_option_table.
17888 (getargs): Free longopts at the end of the function.
17889 (shortopts): Move in options.c.
17890 * src/options.c (create_long_option_table): New function. Convert
17891 information from option_table to option structure.
17892 * src/reader.c (options.h): Include it.
17893
17894 * src/Makefile.am: Adjust.
17895 * src/options.c (option_table): Create from longopts and percent_table.
17896 * src/getargs.c (longopts): Delete.
17897 * src/lex.c (struct percent_table_struct): Delete.
17898 (percent_table): Delete.
17899 (options.h): Include it.
17900 * src/options.c: Create.
17901 * src/options.h: Create.
17902 Declare enum opt_access_e.
17903 Define struct option_table_struct.
17904
75f5aaea
MA
179052001-09-20 Marc Autret <autret_m@epita.fr>
17906
17907 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17908 sections of Bison.
17909
f508cb0a
PB
179102001-09-19 Pascal Bart <pascal.bart@epita.fr>
17911
17912 * src/bison.simple: s/%%filename/%%skeleton.
17913 * src/muscle_tab.c (getargs.h): Include it.
17914 (muscle_init): Insert new muscle skeleton.
17915
13105fc1
PB
179162001-09-18 Pascal Bart <pascal.bart@epita.fr>
17917
17918 * src/output.c (output_parser): Delete unused variable actions_dumped.
17919
b0c4483e
PB
179202001-09-07 Pascal Bart <pascal.bart@epita.fr>
17921
17922 * src/output.c (output): Delete call to reader_output_yylsp.
17923 * src/reader.c (reader): Likewise.
ba0fe3c7 17924 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 17925
11d82f03
MA
179262001-09-02 Marc Autret <autret_m@epita.fr>
17927
17928 * src/reader.c: Include muscle_tab.h.
17929 (parse_union_decl): Update.
17930 (parse_macro_decl): Rename parse_muscle_decl.
17931 Update to use renamed functions and variable.
17932 (read_declarations, copy_action, read_additionnal_code, : Updated
17933 with correct variables and functions names.
17934 (packsymbols, reader): Likewise.
342b8b6e 17935
11d82f03 17936 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 17937
11d82f03
MA
17938 * src/output.c: Include muscle_tab.h
17939 In all functions using macro_insert, change by using muscle_insert ().
17940 (macro_obstack): Rename muscle_obstack.
17941 Echo modifications in the whole file.
17942 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17943 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17944 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17945
17946 * src/muscle_tab.h: Update double inclusion macros.
17947 (macro_entry_s): Rename muscle_entry_s.
17948 Update prototypes.
342b8b6e 17949
11d82f03
MA
17950 * src/muscle_tab.c: Include muscle_tab.h.
17951 Rename macro_tabble to muscle_table.
17952 (mhash1, mhash2, mcmp): Use muscle_entry.
17953 (macro_init): Rename muscle_init. Update.
17954 (macro_insert): Rename muscle_insert. Update.
17955 (macro_find): Rename muscle_find. Update.
17956
17957 * src/main.c: Include muscle_tab.h.
17958 (main): Call muscle_init ().
17959 * src/Makefile.am (bison_SOURCES): Echo modifications.
17960
93a37297
MA
179612001-09-02 Marc Autret <autret_m@epita.fr>
17962
f753cd62 17963 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 17964
f753cd62
MA
17965 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17966
179672001-09-02 Marc Autret <autret_m@epita.fr>
17968
17969 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 17970
682d48cd
PB
179712001-09-01 Pascal Bart <pascal.bart@epita.fr>
17972
342b8b6e 17973 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
17974 filename.
17975
087c8fda
MA
179762001-09-01 Marc Autret <autret_m@epita.fr>
17977
17978 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17979 to an explicit value to activate the feature. We do it here.
17980
dda680cb
PB
179812001-08-31 Pascal Bart <pascal.bart@epita.fr>
17982
17983 * src/output.c (prepare): Delete the `filename' muscule insertion.
17984 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17985 (parse_union_decl): Likewise.
17986 * src/macrotab.c (macro_init): Initialize filename by infile.
17987
9e644e64
MA
179882001-08-31 Marc Autret <autret_m@epita.fr>
17989
17990 * src/bison.simple (YYLSP_NEEDED): New definition.
17991 * src/output.c (prepare): Add macro insertion of `locations_flag'
17992
17da6427
PB
179932001-08-31 Pascal Bart <pascal.bart@epita.fr>
17994
17995 * src/output.c (prepare): Delete insertion of previous muscles,
17996 and insert the `prefix' muscles.
17997 * src/macrotab.c (macro_init): Likewise.
17998 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 17999 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
18000 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18001 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 18002 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
18003 name_prefix.
18004
e8cb70b9
PB
180052001-08-31 Pascal Bart <pascal.bart@epita.fr>
18006
18007 * src/main.c (main): Standardize.
18008 * src/output.c (output_table_data, output_parser): Likewise.
18009 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18010
63c2d5de
MA
180112001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18012
342b8b6e 18013 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
18014 %%epilogue.
18015 * src/output.c (output): Rename %%declarations to %%prologue.
18016 * src/bison.simple: Echo modifications.
342b8b6e 18017
d8cb5183
MA
180182001-08-31 Marc Autret <autret_m@epita.fr>
18019
18020 * src/reader.c (readgram): CleanUp.
18021 (output_token_defines): Likewise.
18022 (packsymbols): Likewise.
18023 (reader): Likewise.
18024 * src/output.c (output): CPP-out useless code.
18025
6c686258
PB
180262001-08-31 Pascal Bart <pascal.bart@epita.fr>
18027
342b8b6e 18028 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
18029 output_trailers and output_headers.
18030 * src/output.h: Remove obsolete functions prototypes of output_headers
18031 and output_trailers.
18032
8f451ef7
PB
180332001-08-30 Pascal Bart <pascal.bart@epita.fr>
18034
18035 * src/main.c: Include macrotab.h.
342b8b6e 18036 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
18037 Adjust functions prototypes.
18038 * src/macrotab.c (macro_insert): Constify key and value.
18039 (macro_find): Constify key.
18040 (macro_insert): Include 'xalloc.h'
18041 (macro_insert): Use XMALLOC.
18042 (macro_find): Constify return value.
18043 * src/output.c (output_table_data): Rename table to table_data.
18044 (output_parser): Constify macro_key, macro_value.
18045
997b6fd0 180462001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
18047
18048 * src/reader.c (parse_skel_decl): New.
342b8b6e 18049 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
18050 * src/lex.h (token_t): New token `tok_skel'.
18051 * src/lex.c (percent_table): Add skeleton option entry.
18052 Standardize.
18053
ff48177d
MA
180542001-08-29 Marc Autret <autret_m@epita.fr>
18055
18056 * src/bison.simple: Add %%user_code directive at the end.
18057 * src/reader.c (read_additionnal_code): New.
18058 (reader): Use it.
18059 * src/output.c (output_program): Remove.
18060 (output): Update.
18061
b33160bf
MA
180622001-08-28 Marc Autret <autret_m@epita.fr>
18063
18064 * src/output.c (output_actions): Clean up.
4e5caae2 18065 (output_gram): CPP-out useless code.
b33160bf
MA
18066 * src/reader.c (reader): Clean up, CPP-out useless code.
18067
d1a2daf7
PB
180682001-08-28 Pascal Bart <pascal.bart@epita.fr>
18069
342b8b6e 18070 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 18071 directive.
d1a2daf7
PB
18072 * src/bison.simple: Add `%%definitions'.
18073
2b763dfe
MA
180742001-08-28 Marc Autret <autret_m@epita.fr>
18075
18076 * config/depcomp: New file.
18077
f1a87ef6
PE
180782001-08-27 Paul Eggert <eggert@twinsun.com>
18079
18080 * src/bison.simple (yyparse): Don't take the address of an
18081 item before the start of an array, as that doesn't conform to
18082 the C Standard.
18083
82e236e2
RA
180842001-08-27 Robert Anisko <robert.anisko@epita.fr>
18085
f1a87ef6 18086 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
18087 obstack. It was done too late here.
18088
18089 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18090 completely wrong.
18091 (reader): Initialize the macro obstack here, since we need it to grow
18092 '%define' directives.
18093
18094 * src/reader.h: Declare the macro obstack as extern.
18095
b0cfa28a
RA
180962001-08-27 Robert Anisko <robert.anisko@epita.fr>
18097
18098 * src/output.c (output_parser): Fix. Store single '%' characters in
18099 the output obstack instead of throwing them away.
18100
6fc74234
AD
181012001-08-27 Akim Demaille <akim@epita.fr>
18102
18103 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18104
9c76d118
RA
181052001-08-25 Robert Anisko <robert.anisko@epita.fr>
18106
18107 * lib/Makefile.am: Adjust.
18108
a8289c62
RA
181092001-08-25 Robert Anisko <robert.anisko@epita.fr>
18110
18111 * src/bison.simple: Update and add '%%' directives.
18112
b6610515
RA
181132001-08-25 Robert Anisko <robert.anisko@epita.fr>
18114
18115 * src/reader.c (reader): Remove calls to 'output_headers' and
18116 'output_trailers'. Remove some C output.
18117 (readgram): Disable a piece of code that was writing a default
18118 definition for 'YYSTYPE'.
18119 (reader_output_yylsp): Remove.
18120 (packsymbols): Output token defintions to a macro.
18121 (copy_definition): Disable C output.
6fc74234 18122
b6610515
RA
18123 * src/reader.c (parse_macro_decl): New function used to parse macro
18124 declarations.
18125 (copy_string2): Put the body of copy_string into this new function.
18126 Add a parameter to let the caller choose whether he wants to copy the
18127 string delimiters or not.
18128 (copy_string): Be a simple call to copy_string2 with the last argument
18129 bound to true.
18130 (read_declarations): Add case for macro definition.
18131 (copy_identifier): New.
6fc74234 18132 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
18133 rather than lex.
18134
26f609ff
RA
181352001-08-25 Robert Anisko <robert.anisko@epita.fr>
18136
18137 * src/output.c (prepare): Add prefixed names.
18138 (output_parser): Output semantic actions.
18139 (output_parser): Fix bug on '%%line' directives.
6fc74234 18140
26f609ff
RA
18141 * src/output.c (output_headers): Remove. The C code printed by this
18142 function should now be in the skeletons.
18143 (output_trailers): Remove.
18144 (output): Disable call to 'reader_output_yylsp'.
18145 (output_rule_data): Do not output tables to the table obstack.
18146
18147 * src/output.c: Remove some C dedicated output.
18148 Improve the use of macro and output obstacks.
18149 (output_defines): Remove.
6fc74234 18150
26f609ff
RA
18151 * src/output.c (output_token_translations): Associate 'translate'
18152 table with a macro. No output to the table obstack.
18153 (output_gram): Same for 'rhs' and 'prhs'.
18154 (output_stos): Same for 'stos'.
18155 (output_rule_data): Same for 'r1' and 'r2'.
18156 (token_actions): Same for 'defact'.
18157 (goto_actions): Same for 'defgoto'.
18158 (output_base): Same for 'pact' and 'pgoto'.
18159 (output_table): Same for 'table'.
18160 (output_check): Same for 'check'.
6fc74234 18161
26f609ff
RA
18162 * src/output.c (output_table_data): New function.
18163 (output_short_table): Remove.
18164 (output_short_or_char_table): Remove.
6fc74234 18165
26f609ff
RA
18166 * src/output.c (output_parser): Replace most of the skeleton copy code
18167 with something new. Skeletons are now processed character by character
18168 rather than line by line, and Bison looks for '%%' macros. This is the
18169 first step in making Bison's output process (a lot) more flexible.
18170 (output_parser): Use the macro table.
18171
6f43b113
RA
181722001-08-25 Robert Anisko <robert.anisko@epita.fr>
18173
18174 * src/main.c (main): Initialize the macro table.
18175
dd3127cf
RA
181762001-08-25 Robert Anisko <robert.anisko@epita.fr>
18177
18178 * src/lex.c (percent_table): Add tok_define.
18179 * src/lex.h: Add tok_define.
18180
aa321494
RA
181812001-08-25 Robert Anisko <robert.anisko@epita.fr>
18182
18183 * src/macrotab.c: New file.
18184 * src/macrotab.h: New file.
18185 * src/Makefile.am: Update.
18186
68bd3b6b
RA
181872001-08-25 Robert Anisko <robert.anisko@epita.fr>
18188
18189 * lib/hash.c: New file.
18190 * lib/hash.h: New file.
18191 * lib/Makefile.am: Update.
18192
45f8dd1e
AD
181932001-08-15 Akim Demaille <akim@epita.fr>
18194
18195 Version 1.28c.
18196
40a64a7a 181972001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
18198
18199 * src/reader.c (readgram): Indent output macro YYSTYPE.
18200 (packsymbols): Likewise.
18201 (output_token_defines): Likewise.
18202 * src/files.c: Standardize.
18203 (compute_header_macro): New.
18204 (defines_obstack_save): New. Use compute_header_macro.
18205 (output_files): Update. Use defines_obstack_save.
18206
f9a8293a
AD
182072001-08-15 Akim Demaille <akim@epita.fr>
18208
18209 * doc/bison.texinfo (Table of Symbols): Document
18210 YYSTACK_USE_ALLOCA.
18211
150ca7a7
AD
182122001-08-15 Akim Demaille <akim@epita.fr>
18213
18214 * missing: Update from CVS Automake.
18215 * config/config.guess, config/config.sub, config/texinfo.tex:
18216 Update from gnu.org.
18217
69b5cec4
AD
182182001-08-15 Akim Demaille <akim@epita.fr>
18219
18220 * Makefile.maint: Sync with CVS Autoconf.
18221
f2b5126e
PB
182222001-08-14 Pascal Bart <pascal.bart@epita.fr>
18223
69b5cec4 18224 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
18225 `fdl.texi'.
18226 * doc/fdl.texi: Add to package.
18227
4ecbf796
MA
182282001-08-14 Marc Autret <autret_m@epita.fr>
18229
18230 Turn on %{source,header}_extension features.
18231
69b5cec4 18232 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
18233 source_extension.
18234 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 18235 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
18236 between options.
18237
95fb5662
MA
182382001-08-14 Marc Autret <autret_m@epita.fr>
18239
18240 * src/files.c (compute_base_names): Add extensions computing when
18241 `--file-prefix' used.
18242 Standardize function calls.
18243
78d09da9
MA
182442001-08-13 Marc Autret <autret_m@epita.fr>
18245
69b5cec4 18246 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
18247 defining it (defined but null disables alloca).
18248
5a009f2c
MA
182492001-08-13 Marc Autret <autret_m@epita.fr>
18250
18251 * src/bison.simple (_yy_memcpy): CPP reformat.
18252
1e41465a
PB
182532001-08-13 Pascal Bart <pascal.bart@epita.fr>
18254
18255 * tests/atconfig.in (CPPFLAGS): Fix.
18256
c67a198d
PB
182572001-08-10 Pascal Bart <pascal.bart@epita.fr>
18258
79282c6c 18259 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
18260 `gpl.texi'.
18261 * doc/gpl.texi: Add to package.
18262
09a6de7e
MA
182632001-08-10 Marc Autret <autret_m@epita.fr>
18264
18265 * src/print_graph.h: Fix.
18266 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18267
b77b9ee0
AD
182682001-08-10 Akim Demaille <akim@epita.fr>
18269
18270 * src/system.h: Provide default declarations for stpcpy, strndup,
18271 and strnlen.
18272
3e259915
MA
182732001-08-10 Robert Anisko <anisko_r@epita.fr>
18274
18275 * doc/bison.texinfo (Locations): Update @$ stuff.
18276
ca96bc2d
MA
182772001-08-09 Robert Anisko <anisko_r@epita.fr>
18278
18279 * src/bison.simple (YYLLOC_DEFAULT): Update.
18280 (yyparse): Adjust.
18281
fdc6758b
MA
182822001-08-08 Marc Autret <autret_m@epita.fr>
18283
b77b9ee0 18284 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
18285 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18286 Reported by Fabrice Bauzac.
957d4dbf 18287
600cad3b
MA
182882001-08-08 Marc Autret <autret_m@epita.fr>
18289
18290 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18291 * src/vcg.c (output_node): Fix.
18292 * src/vcg.h: Cleanup.
18293 * src/print_graph.c: Add comments.
b77b9ee0 18294 (node_output_size): New global variable. Simplify the formatting of
600cad3b 18295 the VCG graph output.
b77b9ee0 18296 (print_actions): Unused code is now used. It notifies the final state
600cad3b 18297 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 18298 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
18299 blue.
18300 Get the current node name and node_obstack by argument.
18301 (node_obstack): New variable.
18302 (print_state): Manage node_obstack.
18303 (print_core): Use node_obstack given by argument.
18304 A node is not only computed here but in print_actions also.
18305 (print_graph): CPP out useless code instead of commenting it.
18306
976e528f
AD
183072001-08-07 Pascal Bart <pascal.bart@epita.fr>
18308
18309 * tests/atconfig.in (CPPFLAGS): Fix.
18310
20e8e5ca
AD
183112001-08-07 Akim Demaille <akim@epita.fr>
18312
18313 * src/print_graph.c (quote): New.
18314 (print_core): Use it.
18315
957d4dbf 183162001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 18317
3e3da797
AD
18318 * src/vcg.c (complain.h): Include it.
18319 Unepitaize `return' invocations.
c4b66126 18320 [NDEBUG] (main): Remove.
79282c6c 18321 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
18322 * src/files.c (open_files): Initialize graph_obstack.
18323 * src/print_graph.c (print_actions): CPP out useless code.
18324 (print_core): Don't output the last `\n' in labels.
18325 Use `quote'.
18326 * src/files.c (output_files): Output the VCG file.
18327 * src/main.c (main): Invoke print_graph ();
3e3da797 18328
957d4dbf 183292001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
18330
18331 Automaton VCG graph output.
18332 Using option ``-g'' or long option ``--graph'', you can generate
18333 a gram_filename.vcg file containing a VCG description of the LALR (1)
18334 automaton of your grammar.
18335
18336 * src/main.c: Call to print_graph() function.
18337 * src/getargs.h: Update.
18338 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18339 (graph_flag): New flag.
18340 (longopts): Update.
18341 (getargs): Add case `g'.
18342 * src/files.c (graph_obstack): New obstack struct.
18343 (open_files): Initialize new obstack.
18344 (output_files): Saves graph_obstack if required.
18345 * src/files.h (graph_obstack): New extern declaration.
18346 * src/Makefile.am: Add new source files.
18347
927c1557 183482001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
18349
18350 * src/print_graph.c, src/print_graph.h (graph): New.
18351 * src/vcg.h: New file.
18352 * src/vcg.c: New file, VCG graph handling.
18353
7333d403
AD
183542001-08-06 Marc Autret <autret_m@epita.fr>
18355
18356 Add of %source_extension and %header_extension which specify
18357 the source or/and the header output file extension.
18358
18359 * src/files.c (compute_base_names): Remove initialisation of
18360 src_extension and header_extension.
18361 (compute_exts_from_gf): Update.
18362 (compute_exts_from_src): Update.
18363 (output_files): Update.
18364 * src/reader.c (parse_header_extension_decl): New.
18365 (parse_source_extension_decl): New.
18366 (read_declarations): New case statements for the new tokens.
18367 * src/lex.c (percent_table): Add entries for %source_extension
18368 and %header_extension.
18369 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18370
84163231
AD
183712001-08-06 Marc Autret <autret_m@epita.fr>
18372
18373 * configure.in: Bump to 1.28c.
18374 * doc/bison.texinfo: Texinfo thingies.
18375
8303fc42
AD
183762001-08-04 Pascal Bart <pascal.bart@epita.fr>
18377
18378 * tests/atconfig.in (CPPFLAGS): Add.
18379 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18380
70a84437
AD
183812001-08-03 Akim Demaille <akim@epita.fr>
18382
18383 Version 1.28b.
18384
2ce10144
AD
183852001-08-03 Akim Demaille <akim@epita.fr>
18386
18387 * tests/Makefile.am (check-local): Ship testsuite.
18388 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18389 Include `string.h'.
18390
1e3e4bc1
AD
183912001-08-03 Akim Demaille <akim@epita.fr>
18392
18393 * configure.in: Try using -Wformat when compiling.
18394
42b45b7f
AD
183952001-08-03 Akim Demaille <akim@epita.fr>
18396
18397 * configure.in: Bump to 1.28b.
18398
8f13fe33
AD
183992001-08-03 Akim Demaille <akim@epita.fr>
18400
18401 * src/complain.c: Adjust strerror_r portability issues.
18402
b37ba92c
AD
184032001-08-03 Akim Demaille <akim@epita.fr>
18404
18405 Version 1.28a.
18406
b0ce6046
AD
184072001-08-03 Akim Demaille <akim@epita.fr>
18408
18409 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18410 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18411 * src/getargs.c: Include complain.h.
18412 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18413 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18414
d01c415b
AD
184152001-08-03 Akim Demaille <akim@epita.fr>
18416
18417 * src/reader.c (readgram): Display hidden chars in error messages.
18418
459dd1a6
AD
184192001-08-03 Akim Demaille <akim@epita.fr>
18420
18421 Update to gettext 0.10.39.
18422
53b74c0c
AD
184232001-08-03 Akim Demaille <akim@epita.fr>
18424
18425 * lib/strspn.c: New.
18426
234a3be3
AD
184272001-08-01 Marc Autret <autret_m@epita.fr>
18428
18429 * doc/bison.texinfo: Update.
18430 * doc/bison.1 (mandoc): Update.
18431 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18432 * src/files.c: Support output files extensions computing.
18433 (src_extension): New static variable.
18434 (header_extension): New static variable.
18435 (tr): New function.
18436 (get_extension_index): New function, gets the index of an extension
18437 filename in a string.
18438 (compute_exts_from_gf): New function, computes extensions from the
18439 grammar file extension.
18440 (compute_exts_from_src): New functions, computes extensions from the
18441 C source file extension, file given by ``-o'' option.
18442 (compute_base_names): Update.
18443 (output_files): Update.
18444
847bf1f5
AD
184452001-08-01 Robert Anisko <anisko_r@epita.fr>
18446
d995fee7 18447 * doc/bison.texi: Document @$.
847bf1f5
AD
18448 (Locations): New section.
18449
d074a105
AD
184502001-07-18 Akim Demaille <akim@epita.fr>
18451
18452 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18453 * config/prev-version.txt, config/move-if-change: New.
18454 * Makefile.am: Adjust.
18455
3419715d
AD
184562001-07-08 Pascal Bart <pascal.bart@epita.fr>
18457
18458 * src/bison.simple (yyparse): Suppress warning `comparaison
18459 between signed and unsigned'.
18460
62ab6972
AD
184612001-07-05 Pascal Bart <pascal.bart@epita.fr>
18462
18463 * src/getargs.h (raw_flag): Remove.
18464 * src/getargs.c: Die on `-r'/`--raw'.
18465 * src/lex.c (parse_percent_token): Die on `%raw'.
18466 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18467 * tests/calc.at: Suppress test with option `--raw'.
18468
1e24cc5b
AD
184692001-07-14 Akim Demaille <akim@epita.fr>
18470
18471 * config/: New.
18472 * configure.in: Require Autoconf 2.50.
18473 Update to gettext 0.10.38.
18474
32dfccf8
AD
184752001-03-16 Akim Demaille <akim@epita.fr>
18476
18477 * doc/bison.texinfo: ANSIfy the examples.
18478
cd5bd6ac
AD
184792001-03-16 Akim Demaille <akim@epita.fr>
18480
18481 * getargs.c (skeleton): New variable.
18482 (longopts): --skeleton is a new option.
18483 (shortopts, getargs): -S is a new option.
18484 * getargs.h: Declare skeleton.
18485 * output.c (output_parser): Use it.
18486
5141b016
AD
184872001-03-16 Akim Demaille <akim@epita.fr>
18488
18489 * m4/strerror_r.m4: New.
18490 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18491 * lib/error.h, lib/error.c: Update.
18492
447992b9
AD
184932001-03-16 Akim Demaille <akim@epita.fr>
18494
18495 * src/getargs.c (longopts): Clean up.
18496
274d42ce
AD
184972001-02-21 Akim Demaille <akim@epita.fr>
18498
18499 * src/reader.c (gensym): `gensym_count' is your own.
18500 Use a static buf to create the symbol name, as token_buffer is no
18501 longer a buffer.
18502
22c821f3
AD
185032001-02-08 Akim Demaille <akim@epita.fr>
18504
18505 * src/conflicts.c (conflict_report): Be sure not to append to res
18506 between two calls, which could happen if both first sprintf were
18507 skipped, but not the first cp += strlen.
18508
18569462
AD
185092001-02-08 Akim Demaille <akim@epita.fr>
18510
18511 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18512 New, from fileutils 4.0.37.
18513 * configure.in: Require Autoconf 2.49c. I took some time before
18514 making this decision. This is the only way out for portability
18515 issues in Bison, it would mean way too much duplicate effort to
18516 import in Bison features implemented in 2.49c since 2.13.
18517 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18518
0d8f3c8a
AD
185192001-02-02 Akim Demaille <akim@epita.fr>
18520
18521 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 18522 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 18523
f17bcd1f
AD
185242001-01-19 Akim Demaille <akim@epita.fr>
18525
18526 Get rid of the ad hoc handling of token_buffer in the scanner: use
18527 the obstacks.
18528
18529 * src/lex.c (token_obstack): New.
18530 (init_lex): Initialize it. No longer call...
18531 (grow_token_buffer): this. Remove it.
18532 Adjust all the places which used it to use the obstack.
18533
511e79b3
AD
185342001-01-19 Akim Demaille <akim@epita.fr>
18535
18536 * src/lex.h: Rename all the tokens:
18537 s/\bENDFILE\b/tok_eof/g;
18538 s/\bIDENTIFIER\b/tok_identifier/g;
18539 etc.
18540 Let them be enums, not #define, to ease debugging.
18541 Adjust all the code.
18542
0d6508ef
AD
185432001-01-18 Akim Demaille <akim@epita.fr>
18544
18545 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18546 * src/lex.c (maxtoken, grow_token_buffer): Static.
18547
6deb4447
AD
185482001-01-18 Akim Demaille <akim@epita.fr>
18549
18550 Since we now use obstacks, more % directives can be enabled.
18551
18552 * src/lex.c (percent_table): Also accept `%yacc',
18553 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18554 `%debug'.
18555 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18556 instead of returning a token.
18557 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18558 * src/reader.c (read_declarations): Adjust.
18559 * src/files.c (open_files): Don't call `compute_base_names', don't
18560 compute `attrsfile' since they depend upon data which might be
18561 *in* the input file now.
18562 (output_files): Do it here.
18563 * src/output.c (output_headers): Document the fact that this patch
18564 introduces a guaranteed SEGV for semantic parsers.
18565 * doc/bison.texinfo: Document them.
18566 * tests/suite.at: Exercise these %options.
18567
ff4423cc
AD
185682000-12-20 Akim Demaille <akim@epita.fr>
18569
18570 Also handle the output file (--verbose) with obstacks.
18571
18572 * files.c (foutput): Remove.
18573 (output_obstack): New.
18574 Adjust all dependencies.
18575 * src/conflicts.c: Return a string.
18576 * src/system.h (obstack_grow_string): Rename as...
18577 (obstack_sgrow): this. Be ready to work with non literals.
18578 (obstack_fgrow4): New.
18579
956dba3a
AD
185802000-12-20 Akim Demaille <akim@epita.fr>
18581
18582 * src/files.c (open_files): Fix the computation of short_base_name
18583 in the case of `-o foo.tab.c'.
18584
337bab46
AD
185852000-12-20 Akim Demaille <akim@epita.fr>
18586
18587 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18588 (copy_dollar): Now that everything uses obstacks, get rid of the
18589 FILE * parameters.
18590
5d3214b8
AD
185912000-12-20 Akim Demaille <akim@epita.fr>
18592
18593 * src/files.c (open_files): Actually the `.output' file is based
18594 on the short_base_name, not base_name.
18595 * tests/suite.at (Checking output file names): Adjust.
18596
29092a57
AD
185972000-12-20 Akim Demaille <akim@epita.fr>
18598
18599 * src/bison.s1: Remove, we now use directly...
18600 * src/bison.simple: this.
18601 * src/Makefile.am: Use pkgdata instead of data.
18602
ea5607fd
AD
186032000-12-20 Akim Demaille <akim@epita.fr>
18604
18605 * src/files.c (guard_obstack): New.
18606 (open_files): Initialize it.
18607 (output_files): Dump it...
18608 * src/files.h: Export it.
18609 * src/reader.c (copy_guard): Use it.
18610
27110317
AD
186112000-12-19 Akim Demaille <akim@epita.fr>
18612
18613 * src/files.c (outfile, defsfile, actfile): Removed as global
18614 vars.
18615 (open_files): Don't compute them.
18616 (output_files): Adjust.
18617 (base_name, short_base_name): Be global.
18618 Adjust dependencies.
18619
19c50364
AD
186202000-12-19 Akim Demaille <akim@epita.fr>
18621
18622 * src/files.c (strsuffix): New.
18623 (stringappend): Be just like strcat but allocate.
18624 (base_names): Eve out from open_files.
18625 Try to simplify the rather hairy computation of base_name and
18626 short_base_name.
18627 (open_files): Use it.
18628 * tests/suite.at (Checking output file names): New test.
18629
573c1d9f
AD
186302000-12-19 Akim Demaille <akim@epita.fr>
18631
18632 * src/system.h (obstack_grow_literal_string): Rename as...
18633 (obstack_grow_string): this.
18634 * src/output.c (output_parser): Recognize `%% actions' instead of
18635 `$'.
18636 * src/bison.s1: s/$/%% actions/.
18637 * src/bison.hairy: Likewise.
18638
ef7ddedd
AD
186392000-12-19 Akim Demaille <akim@epita.fr>
18640
18641 * src/output.c (output_parser): Compute the `#line' lines when
18642 there are.
18643 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18644 Suggested by Hans Aberg.
18645
ff61dabd
AD
186462000-12-19 Akim Demaille <akim@epita.fr>
18647
18648 Let the handling of the skeleton files be local to the procedures
18649 that use it.
18650
18651 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18652 longer static.
18653 (fparser, open_extra_files): Remove.
18654 (open_files, output_files): Don't take care of fparser.
18655 * src/files.h: Adjust.
18656 * src/output.c (output_parser): Open and close the file to the
18657 skeleton.
18658 * src/reader.c (read_declarations): When %semantic_parser, open
18659 fguard.
18660
55b96341
AD
186612000-12-19 Akim Demaille <akim@epita.fr>
18662
18663 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18664 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18665
358c15b7
AD
186662000-12-19 Akim Demaille <akim@epita.fr>
18667
18668 * src/files.c (open_files): Yipee! We no longer need all the code
18669 looking for `/tmp' since we have no tmp file.
18670
7de3329e
AD
186712000-12-19 Akim Demaille <akim@epita.fr>
18672
18673 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18674 New macros.
18675 * src/files.c (open_files): Less dependency on MSDOS etc.
18676
3abcd459
AD
186772000-12-14 Akim Demaille <akim@epita.fr>
18678
18679 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18680 Provide a default definition.
18681 Use it when executing the default @ action.
18682 * src/reader.c (reader_output_yylsp): No longer include
18683 `timestamp' and `text' in the default YYLTYPE.
18684
2a91a95e
AD
186852000-12-12 Akim Demaille <akim@epita.fr>
18686
18687 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18688 (copy_guard): Quote the file names.
18689 Reported by Laurent Mascherpa.
18690
14d3eb9b
AD
186912000-12-12 Akim Demaille <akim@epita.fr>
18692
18693 * src/output.c (output_headers, output_program, output): Be sure
18694 to escape special characters when outputting filenames.
18695 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18696 (output_headers): Don't depend on them, Use ACTSTR.
18697
d7045ec6
AD
186982000-11-17 Akim Demaille <akim@epita.fr>
18699
18700 * lib/obstack.h: Formatting changes.
18701 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18702 prevents type checking.
18703 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18704 cast the value to (void *): assigning a `foo *' to a `void *'
18705 variable is valid.
18706 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18707 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18708 append characters.
18709
6fd54b73
AD
187102000-11-17 Akim Demaille <akim@epita.fr>
18711
18712 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18713 as...
18714 (suite.m4, regression.m4, calc.m4): these.
18715 * tests/atgeneral.m4: Update from CVS Autoconf.
18716
4c50eae6
AD
187172000-11-17 Akim Demaille <akim@epita.fr>
18718
18719 * tests/regression.m4 (%union and --defines): New test,
18720 demonstrating a current bug in the obstack implementation.
18721
a35f64ea
AD
187222000-11-17 Akim Demaille <akim@epita.fr>
18723
18724 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18725 macros.
18726 Use them to declare the variables which are global or local to
18727 `yyparse'.
18728
7de23534
AD
187292000-11-17 Akim Demaille <akim@epita.fr>
18730
18731 * acconfig.h: Remove, no longer used.
18732
aa7815f5
AD
187332000-11-07 Akim Demaille <akim@epita.fr>
18734
18735 * src: s/Copyright (C)/Copyright/g.
18736
5af1f549
AD
187372000-11-07 Akim Demaille <akim@epita.fr>
18738
18739 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18740 defining.
18741 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18742
553e2b22
AD
187432000-11-07 Akim Demaille <akim@epita.fr>
18744
18745 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18746 Merge in a single CPP if/else.
18747
8a4f41d6
AD
187482000-11-07 Akim Demaille <akim@epita.fr>
18749
18750 * src/output.c (output): Remove useless variables.
18751 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18752 argument `data' for consistency with the prototypes.
18753 Qualify it `const'.
18754 (obstack_copy, obstack_copy0): Rename the second argument as
18755 `address' for consistency. Qualify it `const'.
18756 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18757 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18758 `const' their input argument (`data' or `address').
18759 Adjust the corresponding macros to include `const' in casts.
18760
095a3fb5
AD
187612000-11-03 Akim Demaille <akim@epita.fr>
18762
18763 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18764 s/PFILE1/BISON_HAIRY/.
18765 Adjust dependencies.
18766
d1cdce7c
AD
187672000-11-03 Akim Demaille <akim@epita.fr>
18768
090c5ebf 18769 For some reason, this was not applied.
d1cdce7c
AD
18770
18771 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18772 `unlink': it's no longer used.
18773
9311529b
AD
187742000-11-03 Akim Demaille <akim@epita.fr>
18775
18776 * src/files.c (skeleton_find): New function, eved out of...
18777 (open_files, open_extra_files): here.
18778
d8880f69
AD
187792000-11-03 Akim Demaille <akim@epita.fr>
18780
18781 Don't use `atexit'.
18782
18783 * src/files.c (obstack_save): New function.
18784 (done): Rename as...
18785 (output_files): this.
18786 Use `obstack_save'.
18787 * src/main.c (main): Don't use `atexit' to register `done', since
18788 it no longer has to remove tmp files, just call `output_files'
18789 when there are no errors.
18790
0dbb648e
AD
187912000-11-02 Akim Demaille <akim@epita.fr>
18792
18793 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18794 `unlink': it's no longer used.
18795 * src/files.h: Formatting changes.
18796
896fe5c1
AD
187972000-11-02 Akim Demaille <akim@epita.fr>
18798
18799 Remove the last uses of mktemp and unlink/delete.
18800
18801 * src/files.c (fdefines, ftable): Removed.
18802 (defines_ostack, table_obstack): New.
18803 Adjust dependencies of the former into uses of the latter.
18804 * src/output.c (output_short_or_char_table, output_short_table):
18805 Convert to using obstacks.
18806 * src/reader.c (copy_comment2): Accept one FILE * and two
18807 obstacks.
18808 (output_token_defines, reader_output_yylsp): Use obstacks.
18809 * src/system.h (obstack_fgrow3): New.
1f65350a 18810 * po/POTFILES.in: Adjust.
896fe5c1 18811
dd60faec
AD
188122000-11-01 Akim Demaille <akim@epita.fr>
18813
18814 Change each use of `fattrs' into a use of `attrs_obstack'.
18815
18816 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18817 * src/files.c (fattrs): Remove.
18818 (attrs_obstack): New.
18819 Adjust all dependencies.
18820 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18821
8c7ebe49
AD
188222000-11-01 Akim Demaille <akim@epita.fr>
18823
18824 Introduce obstacks.
18825 Change each use of `faction' into a use of `action_obstack'.
18826
18827 * lib/obstack.h, lib/obstack.c: New files.
18828 * src/files.c (faction): Remove.
18829 (action_obstack): New.
18830 Adjust all dependencies.
18831
77aee789
AD
188322000-10-20 Akim Demaille <akim@epita.fr>
18833
18834 * lib/quote.h (PARAMS): New macro. Use it.
18835
43591cec
AD
188362000-10-16 Akim Demaille <akim@epita.fr>
18837
18838 * src/output.c (output_short_or_char_table): New function.
18839 (output_short_table, output_token_translations): Use it.
18840 (goto_actions): Use output_short_table.
18841
1e9798d5
AD
188422000-10-16 Akim Demaille <akim@epita.fr>
18843
18844 * src/symtab.c (bucket_new): New function.
18845 (getsym): Use it.
18846
18847 * src/output.c (output_short_table): New argument to display the
18848 comment associated with the table.
18849 Adjust dependencies.
18850 (output_gram): Use it.
18851 (output_rule_data): Nicer output layout for YYTNAME.
18852
f282676b
AD
188532000-10-16 Akim Demaille <akim@epita.fr>
18854
18855 * src/lex.c (read_typename): New function.
18856 (lex): Use it.
18857 * src/reader.c (copy_dollar): Likewise.
18858
550a72a3
AD
188592000-10-16 Akim Demaille <akim@epita.fr>
18860
18861 * src/reader.c (copy_comment2): Expect the input stream to be on
18862 the `/' which is suspected to open a comment, instead of being
18863 called after `//' or `/*' was read.
18864 (copy_comment, copy_definition, parse_union_decl, copy_action)
18865 (copy_guard): Adjust.
18866
131e2fef
AD
188672000-10-16 Akim Demaille <akim@epita.fr>
18868
18869 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18870 `read_signed_integer'.
18871
79282c5a
AD
188722000-10-16 Akim Demaille <akim@epita.fr>
18873
18874 * src/reader.c (copy_dollar): New function.
18875 (copy_guard, copy_action): Use it.
18876
ff4a34be
AD
188772000-10-16 Akim Demaille <akim@epita.fr>
18878
18879 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18880 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18881 New files, from Fileutils 4.0.27.
18882 * src/main.c (printable_version): Remove.
18883 * src/lex.c, src/reader.c: Use `quote'.
18884
188852000-10-04 Akim Demaille <akim@epita.fr>
18886
18887 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18888
14ded682
AD
188892000-10-04 Akim Demaille <akim@epita.fr>
18890
18891 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18892
8e03724b
AD
188932000-10-04 Akim Demaille <akim@epita.fr>
18894
18895 When a literal string is used to define two different tokens,
18896 `bison -v' segfaults.
18897 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18898
18899 * tests/regression.m4: New file.
18900 Include the core of the sample provided by Piotr Gackiewicz.
18901 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18902 properly.
18903
a9e64249
AD
189042000-10-04 Akim Demaille <akim@epita.fr>
18905
18906 * src/reader.c (parse_expect_decl): Keep `count' within the size
18907 of `buffer'.
18908 From Neil Booth.
18909
da9abf43
AD
189102000-10-02 Paul Eggert <eggert@twinsun.com>
18911
18912 * bison.s1 (yyparse): Assign the default value
18913 unconditionally, to avoid a GCC warning and make the parser a
18914 tad smaller.
18915
c33638bb
AD
189162000-10-02 Akim Demaille <akim@epita.fr>
18917
18918 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18919 options.
18920
444c570a
AD
189212000-10-02 Akim Demaille <akim@epita.fr>
18922
18923 * src/derives.c, src/print.c, src/reduce.c: To ease the
18924 translation, move some `\n' out of the translated strings.
18925
89cab50d
AD
189262000-10-02 Akim Demaille <akim@epita.fr>
18927
18928 The location tracking mechanism is precious for parse error
18929 messages. Nevertheless, it is enabled only when `@n' is used in
18930 the grammar, which is a different issue (you can use it in error
18931 message, but not in the grammar per se). Therefore, there should
18932 be another means to enable it.
18933
18934 * src/getargs.c (getargs): Support `--locations'.
18935 (usage): Report it.
18936 * src/getargs.h (locationsflag): Export it.
18937 * src/lex.c (percent_table): Support `%locations'.
18938 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18939 with `locationsflag'.
18940 * doc/bison.texinfo: Document `--locations' and `%locations'.
18941 Sort the options.
18942 * tests/calc.m4: Test it.
18943
18944 For regularity of the names, replace each
18945 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18946 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18947 In addition replace each `flag' with `_flag'.
18948
d6c2cba0
AD
189492000-10-02 Akim Demaille <akim@epita.fr>
18950
18951 Also test parse error messages, including with YYERROR_VERBOSE.
18952
18953 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18954 associative).
18955 Use it to check the computations.
18956 Use it to check `nonassoc' is honored.
18957 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18958 `--yyerror-verbose'.
18959 (_AT_CHECK_CALC): Adjust to this option.
18960 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18961
5a35a6cb
AD
189622000-10-02 Akim Demaille <akim@epita.fr>
18963
18964 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18965 the latter demonstrates a flaw in the handling of non debugging
18966 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18967 was used in order to simplify:
18968
18969 #if YYDEBUG
18970 if (yydebug)
18971 {
18972 ...
18973 }
18974 #endif
18975
18976 into
18977
18978 if (yydebug)
18979 {
18980 ...
18981 }
18982
18983 unfortunately this leads to a CPP conflict when
18984 `--name-prefix=foo' is used since it produces `#define yydebug
18985 foodebug'.
18986
18987 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18988 (YYDPRINTF): New macro.
18989 Spread its use.
18990 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18991 the bison options.
18992 Also test `--verbose', `--defines' and `--name-prefix'.
18993
71da9eea
AD
189942000-10-02 Akim Demaille <akim@epita.fr>
18995
18996 Improve the readability of the produced parsers.
18997
18998 * src/bison.s1: Formatting changes.
18999 Improve the comment related to the `$' mark.
19000 (yydefault): Don't fall through to `yyresume': `goto' there.
19001 * src/output.c (output_parser): When the `$' is met, skip the end
19002 of its line.
19003 New variable, `number_of_dollar_signs', to check there's exactly
19004 one `$' in the parser skeleton.
19005
95e36146
AD
190062000-10-02 Akim Demaille <akim@epita.fr>
19007
19008 * lib/xstrdup.c: New file, from the fileutils.
19009 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19010 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19011 instead of strlen + xmalloc + strcpy.
19012 * src/symtab.c (copys): Remove, use xstrdup instead.
19013
d7020c20
AD
190142000-10-02 Akim Demaille <akim@epita.fr>
19015
19016 * src/gram.h (associativity): New enum type which replaces the
19017 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19018 `right_assoc', `left_assoc' and `non_assoc'.
19019 Adjust all dependencies.
19020 * src/reader.c: Formatting changes.
19021 (LTYPESTR): Don't define it, use it as a literal in
19022 `reader_output_yylsp'.
19023 * src/symtab.h (symbol_class): New enum type which replaces the
19024 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19025 `sunknown', `stoken and `snterm'.
19026
1916f98e
AD
190272000-10-02 Akim Demaille <akim@epita.fr>
19028
19029 * src/getargs.c (fixed_outfiles): Rename as...
19030 (yaccflag): for consistency and accuracy.
19031 Adjust dependencies.
19032
d7913476
AD
190332000-10-02 Akim Demaille <akim@epita.fr>
19034
19035 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19036 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19037 difficult and introduced a lot of core dump. It turns out that
19038 Bison used an implementation of `xmalloc' based on `calloc', and
19039 at various places it does depend upon the initialization to 0. I
19040 have not tried to isolate the pertinent places, and all the former
19041 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19042 someone should address this issue.
19043
19044 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19045 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19046 files.
19047 Adjust dependencies.
19048 * src/warshall.h: New file.
19049 Propagate.
19050
340ef489
AD
190512000-10-02 Akim Demaille <akim@epita.fr>
19052
19053 Various anti-`extern in *.c' changes.
19054
19055 * src/system.h: Include `assert.h'.
19056
b2ca4022
AD
190572000-10-02 Akim Demaille <akim@epita.fr>
19058
19059 * src/state.h (nstates, final_state, first_state, first_shift)
19060 (first_reduction): Move their exportation from here...
19061 * src/LR0.h: to here.
19062 Adjust dependencies.
19063 * src/getargs.c (statisticsflag): New variable.
19064 Add support for `--statistics'.
19065 Adjust dependencies.
19066
19067 Remove a lot of now useless `extern' statements in most files.
19068
403b315b
AD
190692000-10-02 Akim Demaille <akim@epita.fr>
19070
19071 * src/LR0.h: New file.
19072 Propagate its use.
19073
07a58c13
AD
190742000-10-02 Akim Demaille <akim@epita.fr>
19075
19076 * src/print.h: New file.
19077 Propagate its use.
19078 * src/print.c: Formatting and ordering changes.
19079 (verbose, terse): Replace with...
19080 (print_results): this new function.
19081 Adjust dependencies.
19082
0619caf0
AD
190832000-10-02 Akim Demaille <akim@epita.fr>
19084
19085 * src/conflicts.c (conflict_report): New function.
19086 (conflict_log, verbose_conflict_log): Replace with...
19087 (print_conflicts): this function.
19088 Adjust dependencies.
19089 * src/conflicts.h: New file.
19090 Propagate its inclusion.
19091
3519ec76
AD
190922000-10-02 Akim Demaille <akim@epita.fr>
19093
19094 * src/nullable.h: New file.
19095 Propagate its inclusion.
19096 * src/nullable.c: Formatting changes.
19097
015acc48
AD
190982000-10-02 Akim Demaille <akim@epita.fr>
19099
19100 * src/reduce.h: New file.
19101 Propagate its inclusion.
19102 * src/reduce.c: Topological sort and other formatting changes.
19103 (bool, TRUE, FALSE): Move their definition to...
19104 * src/system.h: here.
19105
8963a27b
AD
191062000-10-02 Akim Demaille <akim@epita.fr>
19107
19108 * src/files.c: Formatting changes.
19109 (tryopen, tryclose, openfiles): Rename as...
19110 (xfopen, xfclose, open_files): this.
19111 (stringappend): static.
19112 * src/files.h: Complete the list of exported symbols.
19113 Propagate its use.
19114
a70083a3
AD
191152000-10-02 Akim Demaille <akim@epita.fr>
19116
19117 * src/reader.h: New file.
19118 Propagate its use instead of tedious list of `extern' and
19119 prototypes.
19120 * src/reader.c: Formatting changes, topological sort,
19121 s/register//.
19122
abadc117
AD
191232000-10-02 Akim Demaille <akim@epita.fr>
19124
19125 * src/lex.h: Prototype `lex.c' exported functions.
19126 * src/reader.c: Adjust.
19127 * src/lex.c: Formatting changes.
19128 (safegetc): Rename as...
19129 (xgetc): this.
19130
720d742f
AD
191312000-10-02 Akim Demaille <akim@epita.fr>
19132
19133 * src/lalr.h: New file.
19134 Propagate its inclusion instead of prototypes and `extern'.
19135 * src/lalr.c: Formatting changes, topological sorting etc.
19136
f2acea59
AD
191372000-10-02 Akim Demaille <akim@epita.fr>
19138
19139 * src/output.c (token_actions): Introduce a temporary array,
19140 YYDEFACT, that makes it possible for this function to use
19141 output_short_table.
19142
d019d655
AD
191432000-10-02 Akim Demaille <akim@epita.fr>
19144
19145 `user_toknums' is output as a `short[]' in `output.c', while it is
19146 defined as a `int[]' in `reader.c'. For consistency with the
19147 other output tables, `user_toknums' is now defined as a table of
19148 shorts.
19149
19150 * src/reader.c (user_toknums): Be a short table instead of an int
19151 table.
19152 Adjust dependencies.
19153
19154 Factor the short table outputs.
19155
19156 * src/output.c (output_short_table): New function.
19157 * src/output.c (output_gram, output_stos, output_rule_data)
19158 (output_base, output_table, output_check): Use it.
19159
6c89f1c1
AD
191602000-10-02 Akim Demaille <akim@epita.fr>
19161
19162 * src/output.c (output): Topological sort of the functions, in
19163 order to get rid of the `static' prototypes.
19164 No longer use `register'.
19165 * src/output.h: New file.
19166 Propagate its inclusion in files explicitly prototyping functions
19167 from output.c.
19168
d9efd181
AD
191692000-09-21 Akim Demaille <akim@epita.fr>
19170
19171 * src/atgeneral.m4: Update from Autoconf.
19172
c29240e7 191732000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
19174
19175 * src/closure.h: New file.
19176 * src/closure.c: Formatting changes, topological sort over the
19177 functions, use of closure.h.
19178 (initialize_closure, finalize_closure): Rename as...
19179 (new_closure, free_closure): these. Adjust dependencies.
19180 * src/LR0.c: Formatting changes, topological sort, use of
19181 cloture.h.
19182 (initialize_states): Rename as...
19183 (new_states): this.
19184 * src/Makefile.am (noinst_HEADERS): Adjust.
19185
499daa50
AD
191862000-09-20 Akim Demaille <akim@epita.fr>
19187
19188 * src/acconfig.h: Don't protect config.h against multiple
19189 inclusion.
19190 Don't define PARAMS.
19191 * src/system.h: Define PARAMS.
19192 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19193 purpose of config.h. system.h must not try to fix wrong
19194 definitions in config.h.
19195
cc84fd5d
AD
191962000-09-20 Akim Demaille <akim@epita.fr>
19197
19198 * src/derives.h: New file.
19199 * src/main.c, src/derives.h: Use it.
19200 Formatting changes.
19201 * src/Makefile.am (noinst_HEADERS): Adjust.
19202
db5b3a89
AD
192032000-09-20 Akim Demaille <akim@epita.fr>
19204
19205 * tests/atgeneral.m4: Update from Autoconf.
19206 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19207 (AT_CHECK_CALC): New macros.
19208 Use these macros to test bison with options `', `--raw',
19209 `--debug', `--yacc', `--yacc --debug'.
19210
ceed8467
AD
192112000-09-19 Akim Demaille <akim@epita.fr>
19212
19213 * src/output.c: Formatting changes.
19214 * src/machine.h: Remove, leaving its contents in...
19215 * src/system.h: here.
19216 Include stdio.h.
19217 Adjust all dependencies on stdio.h and machine.h.
19218 * src/getargs.h: New file.
19219 Let all `extern' declarations about getargs.c be replaced with
19220 inclusion of `getargs.h'.
19221 * src/Makefile.am (noinst_HEADERS): Adjust.
19222
19223 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19224 scope.
19225 (yyerror): Returns void, not int.
19226 * doc/bison.texinfo: Formatting changes.
19227
05a1d24b
AD
192282000-09-19 Akim Demaille <akim@epita.fr>
19229
19230 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19231 portable.
19232
cbd25751
AD
192332000-09-18 Akim Demaille <akim@epita.fr>
19234
19235 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19236 * src/Makefile.am (INCLUDES): Don't.
19237 Be ready to fetch headers in lib/.
19238
13863333
AD
192392000-09-18 Akim Demaille <akim@epita.fr>
19240
19241 * doc/bison.texinfo: Update the copyright.
19242 ANSIfy and GNUify the examples.
19243 Remove the old menu.
19244
0d533154
AD
192452000-09-18 Akim Demaille <akim@epita.fr>
19246
19247 First set of tests: use the `calc' example from the documentation.
19248
19249 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19250 is defined only when YYDEBUG is.
19251 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19252 * src/files.c (tryopen, tryclose): Formatting changes.
19253 Move to the top and be static.
19254 * src/reader.c (read_signed_integer): Likewise.
19255 * tests/calc.m4: New file.
19256 * Makefile.am, suite.m4: Adjust.
19257 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19258
e79137ac
AD
192592000-09-18 Akim Demaille <akim@epita.fr>
19260
19261 Add support for an Autotest test suite for Bison.
19262
19263 * m4/m4.m4, m4/atconfig.m4: New files.
19264 * m4/Makefile.am (EXTRA_DIST): Adjust.
19265 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19266 files.
19267 * src/getargs.c: Display a more standard --version message.
19268 * src/reader.c (reader): Formatting changes.
19269 No longer depend upon VERSION_STRING.
19270 * configure.in: No longer use `dnl'.
19271 Set up the test suite and the new directory `tests/.
19272 (VERSION_STRING): Remove.
19273
27821bff
AD
192742000-04-14 Akim Demaille <akim@epita.fr>
19275
19276 * src/reader.c (copy_comment2): New function, same as former
19277 `copy_comment', but outputs into two FILE *.
19278 (copy_comment): Use it.
19279 (parse_union_decl): Use it.
19280 (get_type, parse_start_decl): Use the same `invalid' message.
19281 (parse_start_decl, parse_union_decl): Use the same `multiple'
19282 message.
19283 (parse_union_decl, copy_guard, copy_action): Use the same
19284 `unmatched' message.
19285 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19286
cfe5fbc0
AD
192872000-03-31 Akim Demaille <akim@epita.fr>
19288
19289 * src/files.c (tryopen, tryclose): Move to the top.
19290 Be static.
19291
cb7db13e
AD
192922000-03-31 Akim Demaille <akim@epita.fr>
19293
19294 * src/main.c (main): Don't call `done', exit does it.
19295
a0f6b076
AD
192962000-03-31 Akim Demaille <akim@epita.fr>
19297
36281465
AD
19298 * allocate.c: s/return (foo)/return foo/.
19299 * lalr.c: Likewise.
19300 * LR0.c: Likewise.
19301 * output.c: Likewise.
19302 * reader.c: Likewise.
19303 * symtab.c: Likewise.
19304 * vmsgetargs.c: Likewise.
19305
193062000-03-31 Akim Demaille <akim@epita.fr>
19307
19308 Clean up the error reporting functions.
a0f6b076
AD
19309
19310 * src/report.c: New file.
19311 * src/report.h: Likewise.
19312 * src/Makefile.am: Adjust.
19313 * m4/error.m4: New file.
19314 * m4/Makefile.am: Adjust.
19315 * configure.in (jm_PREREQ_ERROR): Call it.
19316 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19317 Remove.
19318 (fatal, fatals): Remove. All callers use complain.c::fatal.
19319 (warn, warni, warns, warnss, warnss): Remove. All callers use
19320 complain.c::complain.
19321 (toomany): Remove, use fatal instead.
19322 * src/files.c (done): No argument, use complain_message_count.
19323 * src/main.c (main): Register `done' to `atexit'.
19324
19325 * src/getargs.c (usage): More `fputs', less `fprintf'.
19326
18539825
AD
193272000-03-28 Akim Demaille <akim@epita.fr>
19328
19329 * lib/: New directory.
19330 * Makefile.am (SUBDIRS): Adjust.
19331 * configure.in: Adjust.
19332 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19333 useless.
19334 * src/alloca.c: Moved to lib/.
19335 * src/getopt.c: Likewise.
19336 * src/getopt1.c: Likewise.
19337 * src/getopt.h: Likewise.
19338 * src/ansi2knr.c: Likewise.
19339 * src/ansi2knr.1: Likewise.
19340 * src/Makefile.am: Adjust.
19341 * lib/Makefile.am: New file.
19342
9f306f2a
AD
193432000-03-28 Akim Demaille <akim@epita.fr>
19344
19345 * src/getargs.c (usage): Refresh the help message.
19346
0ba347b6
AD
193472000-03-17 Akim Demaille <akim@epita.fr>
19348
19349 * src/getopt1.c: Updated from textutils 2.0e
19350 * src/getopt.c: Likewise.
19351 * src/getopt.h: Likewise.
19352
dbe7f271
AD
193532000-03-17 Akim Demaille <akim@epita.fr>
19354
19355 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19356 the file name, not the whole `#line LINE FILE'.
19357
75bbe78d
AD
193582000-03-17 Akim Demaille <akim@epita.fr>
19359
19360 On syntax errors, report the token on which we choked.
19361
aa5fd0ee
AD
19362 * src/bison.s1 (yyparse): In the label yyerrlab, when
19363 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 19364
7b306f52
AD
193652000-03-17 Akim Demaille <akim@epita.fr>
19366
aa5fd0ee 19367 * src/reader.c (copy_at): New function.
7b306f52
AD
19368 (copy_guard): Use it.
19369 (copy_action): Use it.
19370
e87b5700
AD
193712000-03-17 Akim Demaille <akim@epita.fr>
19372
19373 Be kind to translators, save some useless translations.
19374
aa5fd0ee 19375 * src/main.c (banner): New function.
e87b5700
AD
19376 (fatal_banner): Use it.
19377 (warn_banner): Use it.
19378
ae3c3164
AD
193792000-03-17 Akim Demaille <akim@epita.fr>
19380
aa5fd0ee
AD
19381 * src/reader.c (copy_definition): Use copy_string and
19382 copy_comment. Removed now unused `match', `ended',
19383 `cplus_comment'.
ae3c3164
AD
19384 (copy_comment, copy_string): Moved, to be visible from
19385 copy_definition.
19386
4dc58e7c
AD
193872000-03-17 Akim Demaille <akim@epita.fr>
19388
aa5fd0ee
AD
19389 * src/reader.c (copy_string): Declare `static inline'. No
19390 problems with inline, since it is checked by configure.
4dc58e7c
AD
19391 (copy_comment): Likewise.
19392
0a6384c4
AD
193932000-03-17 Akim Demaille <akim@epita.fr>
19394
aa5fd0ee 19395 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 19396
3cef001a
AD
193972000-03-17 Akim Demaille <akim@epita.fr>
19398
aa5fd0ee 19399 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
19400 (copy_action): Use it. Removed now unused `match', `ended',
19401 `cplus_comment'.
19402 (copy_guard): Likewise.
19403
ca36d2ef
AD
194042000-03-17 Akim Demaille <akim@epita.fr>
19405
aa5fd0ee 19406 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
19407 (copy_action): Use it.
19408 (copy_guard): Likewise.
19409
6666f98f
AD
194102000-03-17 Akim Demaille <akim@epita.fr>
19411
19412 Change the handling of @s so that they behave exactly like $s.
19413 There is now a pseudo variable @$ (readble and writable), location
19414 of the lhs of the rule (by default ranging from the location of
19415 the first symbol of the rhs, to the location of the last symbol,
19416 or, if the rhs is empty, YYLLOC).
19417
19418 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19419 yyval.
19420 (yyparse): When providing a default semantic action, provide a
19421 default location action.
19422 (after the $): No longer change `*YYLSP', just stack YYLOC the
19423 same way you stack YYVAL.
19424 * src/reader.c (read_declarations): Use warns.
19425 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19426 (copy_action, case '@'): Likewise.
19427 Use a standard error message, to save useless work from
19428 translators.
19429
41aca2e0
AD
194302000-03-17 Akim Demaille <akim@epita.fr>
19431
aa5fd0ee
AD
19432 * src/bison.s1: Formatting and cosmetics changes.
19433 * src/reader.c: Likewise.
41aca2e0
AD
19434 Update the Copyright notice.
19435
dc08c1d5
AD
194362000-03-17 Akim Demaille <akim@epita.fr>
19437
aa5fd0ee
AD
19438 * src/bison.s1 (#line): All set to `#line' only, since the
19439 Makefile now handles them.
dc08c1d5 19440
9ee3c97b
AD
194412000-03-16 Akim Demaille <akim@epita.fr>
19442
19443 * src/output.c (output_rule_data): Output the documentation of
19444 some of the tables.
19445 (Copyright notice): Update.
19446 Formatting changes.
19447
0de741ca
AD
194482000-03-16 Akim Demaille <akim@epita.fr>
19449
19450 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19451 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19452 One `#if YYDEBUG' remains, since it uses variables which are
19453 defined only if `YYDEBUG != 0'.
19454
bb10be54
AD
194552000-03-16 Akim Demaille <akim@epita.fr>
19456
19457 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19458 and related variables so that the similarities are highlighted.
19459
b07b484a
AD
194602000-03-16 Akim Demaille <akim@epita.fr>
19461
19462 * src/bison.s1: Properly indent CPP directives.
19463
361f60b3
AD
194642000-03-16 Akim Demaille <akim@epita.fr>
19465
19466 * src/bison.s1: Properly indent the `alloca' CPP section.
19467
8c44d3ec
AD
194682000-03-16 Akim Demaille <akim@epita.fr>
19469
19470 Do not hard code values of directories in `configure.in'.
19471 Update the `configure' tool chain.
19472
19473 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19474 src/makefile.am.
19475 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19476 (AC_OUTPUT): Add m4/Makefile.
19477 Bump to bison 1.28a, 1.29 has never been released.
19478 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19479 handled via src/Makefile.am.
19480 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19481 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19482 autoheader.
19483 * Makefile.am (SUBDIRS): Add m4.
19484 (ACLOCAL_AM_FLAGS): New variable.
19485 (AUTOMAKE_OPTIONS): Add check-news.
19486 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19487 the proper line number and file name.
19488 (DEFS): Propagate the location of bison library files and of the
19489 locale files.
19490 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19491 builddir.
19492 * acinclude.m4: Remove, replaced by the directory m4.
19493 * m4/Makefile.am (EXTRA_DIST): New variable.
19494 * m4/gettext.m4: New file, from the fileutils.
19495 * m4/lcmessage.m4: Likewise
19496 * m4/progtest.m4: Likewise.
19497 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19498
f95997e7
AD
194992000-03-10 Akim Demaille <akim@epita.fr>
19500
19501 * src/closure.c:
19502 Formatting changes of various comments.
19503 Respect the GNU coding standards at various places.
19504 Don't use `_()' when no translation is needed.
19505
195061999-12-13 Jesse Thilo <jthilo@gnu.org>
19507
19508 * src/files.c:
19509 OS/2 honors TMPDIR environment variable.
19510
195111999-12-13 Jesse Thilo <jthilo@gnu.org>
19512
19513 * doc/bison.texinfo: Tweaked spelling and grammar.
19514 Updated ISBN.
19515 Removed reference to price of printed copy.
19516 Mention BISON_SIMPLE and BISON_HAIRY.
19517
195181999-12-13 Jesse Thilo <jthilo@gnu.org>
19519
19520 * configure.in, NEWS:
19521 Bison 1.29 released.
19522
195231999-10-27 Jesse Thilo <jthilo@gnu.org>
19524
19525 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19526 Added reference card.
19527
195281999-07-26 Jesse Thilo <jthilo@gnu.org>
19529
19530 * po/ru.po: Added Russian translation.
19531
195321999-07-26 Jesse Thilo <jthilo@gnu.org>
19533
19534 * configure.in: Added Russian translation.
19535
195361999-07-06 Jesse Thilo <jthilo@gnu.org>
19537
19538 * configure.in, NEWS, README:
19539 Released version 1.28.
19540
195411999-06-14 Jesse Thilo <jthilo@gnu.org>
19542
19543 * src/system.h:
19544 Squashed redefinition warning on some systems.
19545
19546 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19547 Have configure build version string instead of relying on ANSI string
19548 concatentation.
19549
195501999-06-14 Jesse Thilo <jthilo@gnu.org>
19551
19552 * po/POTFILES.in: Got rid of version.c.
19553
195541999-06-14 Jesse Thilo <jthilo@gnu.org>
19555
19556 * acconfig.h, configure.in:
19557 Have configure build version string instead of relying on ANSI string
19558 concatentation.
19559
195601999-06-08 Jesse Thilo <jthilo@gnu.org>
19561
19562 * doc/bison.1:
19563 Dropped mention of `+' for long-named options.
19564
195651999-05-30 Jesse Thilo <jthilo@gnu.org>
19566
19567 * src/files.c: Added <unistd.h> for unlink().
19568
19569 * src/Makefile.am, src/system.h:
19570 I18n fixes.
19571
195721999-05-30 Jesse Thilo <jthilo@gnu.org>
19573
19574 * README: Added a FAQ list.
19575
19576 * configure.in, acconfig.h:
19577 I18n fixes.
19578
195791999-05-30 Jesse Thilo <jthilo@gnu.org>
19580
19581 * doc/FAQ, doc/Makefile.am:
19582 Added a FAQ list.
19583
195841999-05-19 Jesse Thilo <jthilo@gnu.org>
19585
19586 * src/alloc.h, src/symtab.h, src/version.c:
19587 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19588
195891999-04-18 Jesse Thilo <jthilo@gnu.org>
19590
19591 * src/.cvsignore, src/Makefile.am:
19592 Reorganized: sources in `src', documentation in `doc'.
19593
19594 * src/lex.c (literalchar):
19595 fixed the code for escaping double quotes (thanks
19596 Jonathan Czisny.)
19597
195981999-04-18 Jesse Thilo <jthilo@gnu.org>
19599
19600 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19601 Adjusted paths to reflect directory reorganization.
19602
196031999-04-18 Jesse Thilo <jthilo@gnu.org>
19604
19605 * doc/.cvsignore, doc/Makefile.am:
19606 Reorganized: sources in `src', documentation in `doc'.
19607
196081999-04-18 Jesse Thilo <jthilo@gnu.org>
19609
19610 * configure.in:
19611 Updated AC_INIT file to reflect directory reorganization.
19612
19613 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19614 Reorganized: sources in `src', documentation in `doc'.
19615
196161999-04-13 Jesse Thilo <jthilo@gnu.org>
19617
19618 * src/allocate.c:
19619 Don't declare calloc() and realloc() if not necessary.
19620
196211999-04-13 Jesse Thilo <jthilo@gnu.org>
19622
19623 * configure.in, acconfig.h, acinclude.m4:
19624 Don't declare calloc() and realloc() if not necessary.
19625
196261999-03-23 Jesse Thilo <jthilo@gnu.org>
19627
19628 * po/.cvsignore: Added i18n support.
19629
196301999-03-23 Jesse Thilo <jthilo@gnu.org>
19631
19632 * acconfig.h, configure.in, Makefile.am:
19633 Added i18n support.
19634
196351999-03-22 Jesse Thilo <jthilo@gnu.org>
19636
19637 * src/bison.s1: Fixed #line numbers.
19638
196391999-03-15 Jesse Thilo <jthilo@gnu.org>
19640
19641 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19642 Added PO files from Translation Project.
19643
196441999-03-03 Jesse Thilo <jthilo@gnu.org>
19645
19646 * Makefile.am:
19647 Added support for non-ANSI compilers (ansi2knr).
19648
196491999-02-16 Jesse Thilo <jthilo@gnu.org>
19650
19651 * configure.in: Bumped version number to 1.27.
19652
19653 * Makefile.am:
19654 Added `bison.simple' to list of files removed by `make distclean'.
19655
196561999-02-12 Jesse Thilo <jthilo@gnu.org>
19657
19658 * src/files.c, src/files.h:
19659 Defined locations of parser files in config.h instead of Makefile.
19660
196611999-02-12 Jesse Thilo <jthilo@gnu.org>
19662
19663 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19664 Defined locations of parser files in config.h instead of Makefile.
19665
196661999-02-09 Jesse Thilo <jthilo@gnu.org>
19667
19668 * Makefile.am:
19669 Removed inappropriate use of $< macro.
19670
196711999-02-05 Jesse Thilo <jthilo@gnu.org>
19672
19673 * po/Makefile.in.in, po/POTFILES.in:
19674 Add `po' directory skeleton.
19675
196761999-01-27 Jesse Thilo <jthilo@gnu.org>
19677
19678 * README: Document help-bison list.
19679
19680 * configure.in: Add check for mkstemp().
19681
196821999-01-20 Jesse Thilo <jthilo@gnu.org>
19683
19684 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19685 Hush a few compiler warnings.
19686
19687 * src/files.c:
19688 Add tryclose(), which verifies that fclose was successful.
19689 Hush a couple of compiler warnings.
19690
196911999-01-20 Jesse Thilo <jthilo@gnu.org>
19692
19693 * Makefile.am, OChangeLog:
19694 ChangeLog is now automatically generated. Include the old version as
19695 OChangeLog.
19696
196971999-01-14 Jesse Thilo <jthilo@gnu.org>
19698
19699 * 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:
19700 Update FSF address.
19701
197021999-01-14 Jesse Thilo <jthilo@gnu.org>
19703
19704 * doc/bison.texinfo: Fix formatting glitch.
19705
19706 * doc/bison.texinfo: Update FSF address.
19707
197081999-01-14 Jesse Thilo <jthilo@gnu.org>
19709
19710 * acconfig.h: Update FSF address.
19711
197121999-01-08 Jesse Thilo <jthilo@gnu.org>
19713
19714 * src/system.h:
19715 Don't define PACKAGE here, since config.h defines it.
19716
197171998-12-30 Jesse Thilo <jthilo@gnu.org>
19718
19719 * src/reader.c: Update copyright date.
19720
19721 * src/main.c:
19722 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19723 favor of output directly to stderr (avoids buffer overruns).
19724
19725 * src/reader.c: Some checks for premature EOF.
19726
19727 * 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:
19728 Use prototypes if the compiler understands them.
19729
19730 * src/files.c: Honor TMPDIR on Unix hosts.
19731 Use prototypes if the compiler understands them.
19732
19733 * src/reader.c:
19734 Fix a couple of buffer overrun bugs.
19735 Use prototypes if the compiler understands them.
19736
19737 * src/system.h: Include unistd.h and ctype.h.
19738 Use #ifdef instead of #if for NLS symbols.
19739
197401998-12-30 Jesse Thilo <jthilo@gnu.org>
19741
19742 * doc/bison.texinfo:
19743 Delete comment "consider using @set for edition number, etc..." since
19744 we now are doing so.
19745
197461998-12-30 Jesse Thilo <jthilo@gnu.org>
19747
19748 * configure.in:
19749 Use prototypes if the compiler understands them.
19750
19751 * NEWS: Document 1.26 highlights.
19752
19753 * Makefile.am: Require Automake 1.3 or later.
19754
19755 * acconfig.h:
19756 Use prototypes if the compiler understands them.
19757
197581998-12-29 Jesse Thilo <jthilo@gnu.org>
19759
19760 * src/version.c:
19761 Use VERSION symbol from automake for version number.
19762
197631998-12-29 Jesse Thilo <jthilo@gnu.org>
19764
19765 * acconfig.h, configure.in, version.cin:
19766 Use VERSION symbol from automake for version number.
19767
197681998-11-28 Jesse Thilo <jthilo@gnu.org>
19769
19770 * Makefile.am:
19771 Distribute original version of simple parser (bison.s1), not built
19772 version (bison.simple).
19773
197741998-11-28 Jesse Thilo <jthilo@gnu.org>
19775
19776 * doc/bison.texinfo: Add info dir entry.
19777
19778 * doc/bison.texinfo:
19779 Let automake put version number into documentation.
19780
197811998-11-26 Jesse Thilo <jthilo@gnu.org>
19782
19783 * src/bison.cld, src/build.com, src/vmshlp.mar:
19784 Add non-RCS files from /gd/gnu/bison.
19785
197861998-11-26 Jesse Thilo <jthilo@gnu.org>
19787
19788 * doc/bison.1:
19789 Document the BISON_HAIRY and BISON_SIMPLE variables.
19790
197911998-11-25 Jesse Thilo <jthilo@gnu.org>
19792
19793 * src/version.c: Build version.c automatically.
19794
19795 * src/reader.c:
19796 Fix token numbering (used to start at 258, not 257).
19797
19798 * src/system.h: Include config.h.
19799
19800 * src/getargs.c: Update bug report address.
19801
19802 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19803 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19804
198051998-11-25 Jesse Thilo <jthilo@gnu.org>
19806
19807 * Makefile.am:
19808 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19809
19810 * configure.in, version.cin:
19811 Build version.c automatically.
19812
19813 * AUTHORS: Add AUTHORS file.
19814
19815 * README: Update bug report address.
19816
19817 * bison.simple:
19818 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19819
19820 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19821 Add automake stuff.
19822
198231998-11-25 Jesse Thilo <jthilo@gnu.org>
19824
19825 * doc/bison.texinfo: Clean up some formatting.
19826
198271998-05-05 Richard Stallman <rms@gnu.org>
19828
19829 * doc/bison.texinfo:
19830 Explain better why to make a pure parser.
19831
198321998-01-05 Richard Stallman <rms@gnu.org>
19833
19834 * src/files.c (openfiles):
19835 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19836 find a temporary directory, if possible. Do not unlink files while
19837 they are open.
19838
198391997-08-25 Richard Stallman <rms@gnu.org>
19840
19841 * src/reader.c (stack_offset;):
19842 Change some warni to warns.
19843
19844 * src/lex.c (literalchar): Use warns, not warni.
19845
198461997-06-28 Richard Stallman <rms@gnu.org>
19847
19848 * src/bison.s1: Add a Bison version comment.
19849
19850 * src/main.c (fatal, warn, berror):
19851 Use program_name.
19852
198531997-06-28 Richard Stallman <rms@gnu.org>
19854
19855 * Makefile.in (bison_version): New variable.
19856 (dist): Use that variable.
19857 (bison.s1): Substitute the Bison version into bison.simple.
19858
19859 * bison.simple: Add a Bison version comment.
19860
198611997-06-18 Richard Stallman <rms@gnu.org>
19862
19863 * src/main.c (fatal, warn, berror):
19864 Make error messages standard.
19865 (toomany): Improve error message text.
19866
19867 * 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:
19868 new.h renamed to alloc.h.
19869
198701997-06-18 Richard Stallman <rms@gnu.org>
19871
19872 * Makefile.in: new.h renamed to alloc.h.
19873
198741997-05-24 Richard Stallman <rms@gnu.org>
19875
19876 * src/lex.c (literalchar):
19877 Fix the code for escaping \, " and '.
19878
19879 (lex): Avoid trouble when there are many chars
19880 to discard in a char literal with just several chars in it.
19881
198821997-05-17 Richard Stallman <rms@gnu.org>
19883
19884 * src/bison.s1:
19885 Use malloc, if using alloca is troublesome.
19886 (YYSTACK_USE_ALLOCA): New flag macro.
19887 Define it for some systems and compilers.
19888 (YYSTACK_ALLOC): New macro.
19889 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19890 If it was malloc'd, free it.
19891
198921997-05-17 Richard Stallman <rms@gnu.org>
19893
19894 * bison.simple:
19895 Use malloc, if using alloca is troublesome.
19896 (YYSTACK_USE_ALLOCA): New flag macro.
19897 Define it for some systems and compilers.
19898 (YYSTACK_ALLOC): New macro.
19899 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19900 If it was malloc'd, free it.
19901
199021997-04-23 Richard Stallman <rms@gnu.org>
19903
19904 * src/bison.s1:
19905 (alloca) [__hpux]: Always define as __builtin_alloca.
19906
199071997-04-23 Richard Stallman <rms@gnu.org>
19908
19909 * bison.simple:
19910 (alloca) [__hpux]: Always define as __builtin_alloca.
19911
199121997-04-22 Richard Stallman <rms@gnu.org>
19913
19914 * src/bison.s1:
19915 [__hpux]: Include alloca.h (right for HPUX 10)
19916 instead of declaring alloca (right for HPUX 9).
19917
19918 * src/bison.s1 (__yy_memcpy):
19919 Declare arg `count' as unsigned int.
19920 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19921
199221997-04-22 Richard Stallman <rms@gnu.org>
19923
19924 * bison.simple:
19925 [__hpux]: Include alloca.h (right for HPUX 10)
19926 instead of declaring alloca (right for HPUX 9).
19927
19928 * bison.simple (__yy_memcpy):
19929 Declare arg `count' as unsigned int.
19930 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19931
199321997-01-03 Richard Stallman <rms@gnu.org>
19933
19934 * src/allocate.c: [__STDC__ or _MSC_VER]:
19935 Declare calloc and realloc to return void *.
19936
199371997-01-02 Richard Stallman <rms@gnu.org>
19938
19939 * src/system.h:
19940 [_MSC_VER]: Include stdlib.h and process.h.
19941 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19942
19943 * src/main.c (main): Return FAILURE as a value.
19944 (printable_version): Declare arg as int, not char.
19945
199461997-01-02 Richard Stallman <rms@gnu.org>
19947
19948 * Makefile.in (dist):
19949 Explicitly check for symlinks, and copy them.
19950
199511996-12-19 Richard Stallman <rms@gnu.org>
19952
19953 * src/files.c:
19954 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19955
199561996-12-18 Paul Eggert <eggert@gnu.org>
19957
19958 * src/bison.s1 (yyparse):
19959 If __GNUC__ and YYPARSE_PARAM are both defined,
19960 declare yyparse to have a void * argument.
19961
199621996-12-18 Paul Eggert <eggert@gnu.org>
19963
19964 * bison.simple (yyparse):
19965 If __GNUC__ and YYPARSE_PARAM are both defined,
19966 declare yyparse to have a void * argument.
19967
199681996-12-17 Richard Stallman <rms@gnu.org>
19969
19970 * src/reduce.c (nbits): Add some casts.
19971
199721996-08-12 Richard Stallman <rms@gnu.org>
19973
19974 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19975
199761996-08-12 Richard Stallman <rms@gnu.org>
19977
19978 * bison.simple: Test _MSDOS as well as _MSDOS_.
19979
199801996-07-31 Richard Stallman <rms@gnu.org>
19981
19982 * src/bison.s1:
19983 [__sun && __i386]: Include alloca.h.
19984
199851996-07-31 Richard Stallman <rms@gnu.org>
19986
19987 * bison.simple:
19988 [__sun && __i386]: Include alloca.h.
19989
199901996-07-30 Richard Stallman <rms@gnu.org>
19991
19992 * src/bison.s1: Comment change.
19993
19994 * src/bison.s1: Test _MSDOS_, not MSDOS.
19995
199961996-07-30 Richard Stallman <rms@gnu.org>
19997
19998 * bison.simple: Comment change.
19999
20000 * bison.simple: Test _MSDOS_, not MSDOS.
20001
200021996-06-01 Richard Stallman <rms@gnu.org>
20003
20004 * 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:
20005 Insert `_' macro around many string constants.
20006
20007 * src/main.c:
20008 Insert `_' macro around many string constants.
20009
20010 (main): Call setlocale, bindtextdomain and textdomain.
20011
20012 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20013 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20014 [ENABLE_NLS]: Include libintl.h.
20015 [ENABLE_NLS] (gettext): Define.
20016 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20017 (N_, PACKAGE, LOCALEDIR): New macros.
20018
200191996-06-01 Richard Stallman <rms@gnu.org>
20020
20021 * POTFILES.in: New file.
20022
20023 * Makefile.in (allocate.o):
20024 Define target explicitly.
20025
20026 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20027 (LDFLAGS): Set to @LDFLAGS@.
20028 (configure): Run autoconf only if preceding `cd' succeeds.
20029 (bison.s1): Redirect output to temporary file then move the
20030 temporary to the target, rather than redirecting directly to bison.s1.
20031 (clean): Remove config.status and config.log.
20032 (distclean): Don't remove config.status here.
20033
200341996-05-12 Richard Stallman <rms@gnu.org>
20035
20036 * src/bison.s1:
20037 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20038
200391996-05-12 Richard Stallman <rms@gnu.org>
20040
20041 * bison.simple:
20042 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20043
200441996-05-11 Richard Stallman <rms@gnu.org>
20045
20046 * src/bison.s1 (__yy_memcpy):
20047 Really reorder the args, as was supposedly done on Feb 14 1995.
20048 (yyparse): Calls changed accordingly.
20049
200501996-05-11 Richard Stallman <rms@gnu.org>
20051
20052 * Makefile.in (dist): Don't use $(srcdir).
20053
20054 * bison.simple (__yy_memcpy):
20055 Really reorder the args, as was supposedly done on Feb 14 1995.
20056 (yyparse): Calls changed accordingly.
20057
200581996-01-27 Richard Stallman <rms@gnu.org>
20059
20060 * src/output.c (output_rule_data):
20061 Test YYERROR_VERBOSE in the conditional
20062 around the definition of ttyname.
20063
200641995-12-29 Richard Stallman <rms@gnu.org>
20065
20066 * src/bison.s1:
20067 Fix line numbers in #line commands.
20068
200691995-12-29 Richard Stallman <rms@gnu.org>
20070
20071 * bison.simple:
20072 Fix line numbers in #line commands.
20073
200741995-12-27 Richard Stallman <rms@gnu.org>
20075
20076 * src/bison.s1 (YYPARSE_PARAM_DECL):
20077 In C++, make it always null.
20078 (YYPARSE_PARAM_ARG): New macro.
20079 (yyparse): Use YYPARSE_PARAM_ARG.
20080
200811995-12-27 Richard Stallman <rms@gnu.org>
20082
20083 * bison.simple (YYPARSE_PARAM_DECL):
20084 In C++, make it always null.
20085 (YYPARSE_PARAM_ARG): New macro.
20086 (yyparse): Use YYPARSE_PARAM_ARG.
20087
200881995-11-29 Richard Stallman <rms@gnu.org>
20089
20090 * doc/bison.texinfo:
20091 Describe literal string tokens, %raw, %no_lines, %token_table.
20092
200931995-11-29 Daniel Hagerty <hag@gnu.org>
20094
20095 * doc/bison.texinfo: Fixed update date
20096
200971995-10-16 Richard Stallman <rms@gnu.org>
20098
20099 * src/version.c: Version 1.25.
20100
201011995-10-16 Richard Stallman <rms@gnu.org>
20102
20103 * NEWS: *** empty log message ***
20104
201051995-10-16 Richard Stallman <rms@gnu.org>
20106
20107 * doc/bison.1, doc/bison.rnh:
20108 Add new options.
20109
201101995-10-15 Richard Stallman <rms@gnu.org>
20111
20112 * src/vmsgetargs.c, src/getargs.c:
20113 Added -n, -k, and -raw switches.
20114 (noparserflag, toknumflag, rawtoknumflag): New variables.
20115
20116 * src/symtab.h (SALIAS):
20117 New #define for adding aliases to %token.
20118 (struct bucket): Added `alias' field.
20119
20120 * src/reduce.c (reduce_grammar):
20121 Revise error message.
20122 (print_notices): Remove final `.' from error message.
20123
20124 * src/reader.c (reader_output_yylsp):
20125 New function.
20126 (readgram): Use `#if 0' around code that accepted %command
20127 inside grammar rules: The documentation doesn't allow it,
20128 and it will fail since the %command processors scan for the next %.
20129 (parse_token_decl): Extended the %token
20130 declaration to allow a multi-character symbol as an alias.
20131 (parse_thong_decl): New function.
20132 (read_declarations): Added %thong declarations.
20133 (read_declarations): Handle NOOP to deal with allowing
20134 % declarations as another means to specify the flags.
20135 (readgram): Allow %prec prior to semantics embedded in a rule.
20136 (skip_to_char, read_declarations, copy_definition)
20137 (parse_token_decl, parse_start_decl, parse_type_decl)
20138 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20139 (get_type_name, copy_guard, copy_action, readgram)
20140 (get_type, packsymbols): Revised most error messages.
20141 Changed `fatal' to `warnxxx' to avoid aborting for error.
20142 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20143 (read_declarations): Improve the error message for
20144 an invalid character. Do not abort.
20145 (read_declarations, copy_guard, copy_action): Use
20146 printable_version to avoid unprintable characters in printed output.
20147 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20148 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20149 Allow the type of a non-terminal can be given
20150 more than once, as long as all specifications give the same type.
20151
20152 * src/output.c:
20153 (output_headers, output_trailers, output, output_gram)
20154 (output_rule_data): Implement noparserflag variable.
20155 Implement toknumflag variable.
20156 (output): Call reader_output_yylsp to output LTYPESTR.
20157
20158 * src/main.c (main):
20159 If reader sees an error, don't process the grammar.
20160 (fatals): Updated to not use VARARGS1.
20161 (printable_version, int_to_string, warn, warni, warns, warnss)
20162 (warnsss): New error reporting functions. Avoid abort for error.
20163
20164 * src/lex.h:
20165 Added THONG and NOOP for alias processing.
20166 Added SETOPT for the new code that allows setting options with %flags.
20167
20168 * src/lex.c:
20169 Include getopt.h. Add some extern decls.
20170 (safegetc): New function to deal with EOF gracefully.
20171 (literalchar); new function to deal with reading \ escapes.
20172 (lex): Use literalchar.
20173 (lex): Implemented "..." tokens.
20174 (literalchar, lex, parse_percent_token): Made tokenbuffer
20175 always contain the token. This includes growing the token
20176 buffer while reading an integer.
20177 (parse_percent_token): Replaced if-else statement with percent_table.
20178 (parse_percent_token): Added % declarations as another
20179 way to specify the flags -n, -l, and -r. Also added hooks for
20180 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20181 major changes to files.c.
20182 (lex) Retain in the incoming stream a character following
20183 an incorrect '/'.
20184 (skip_white_space, lex): Revised most error messages
20185 and changed fatal to warn to avoid aborting.
20186 (percent_table): Added %thong declarations.
20187
20188 * src/gram.h: Comment changes.
20189
20190 * src/files.c (openfiles, open_extra_files, done):
20191 Add faction flag
20192 and actfile file. Handle noparserflag. Both for -n switch.
20193
20194 * src/conflicts.c (resolve_sr_conflict):
20195 Remove use of alloca.
20196
201971995-06-01 Jim Meyering <meyering@gnu.org>
20198
20199 * doc/bison.texinfo: *** empty log message ***
20200
202011995-05-06 Richard Stallman <rms@gnu.org>
20202
20203 * src/bison.s1: Comment change.
20204
202051995-05-06 Richard Stallman <rms@gnu.org>
20206
20207 * bison.simple: Comment change.
20208
202091995-05-03 Richard Stallman <rms@gnu.org>
20210
20211 * src/version.c: Version now 1.24.
20212
20213 * src/bison.s1: Change distribution terms.
20214
20215 * src/version.c: Version now 1.23.
20216
202171995-05-03 Richard Stallman <rms@gnu.org>
20218
20219 * doc/bison.texinfo:
20220 Rewrite "Conditions for Using Bison".
20221 Update version to 1.24.
20222
202231995-05-03 Richard Stallman <rms@gnu.org>
20224
20225 * bison.simple: Change distribution terms.
20226
202271995-02-23 Richard Stallman <rms@gnu.org>
20228
20229 * src/files.c: Test __VMS_POSIX as well as VMS.
20230
202311995-02-14 Jim Meyering <meyering@gnu.org>
20232
20233 * src/bison.s1 (__yy_memcpy):
20234 Renamed from __yy_bcopy to avoid
20235 confusion. Reverse FROM and TO arguments to be consistent with
20236 those of memcpy.
20237
202381995-02-14 Jim Meyering <meyering@gnu.org>
20239
20240 * bison.simple (__yy_memcpy):
20241 Renamed from __yy_bcopy to avoid
20242 confusion. Reverse FROM and TO arguments to be consistent with
20243 those of memcpy.
20244
202451994-11-10 David J. MacKenzie <djm@gnu.org>
20246
20247 * NEWS: reformat
20248
20249 * NEWS: New file.
20250
20251 * Makefile.in (DISTFILES): Include NEWS.
20252
20253 * Makefile.in (DISTFILES):
20254 Include install-sh, not install.sh.
20255
20256 * configure.in: Update to Autoconf v2 macro names.
20257
202581994-10-05 David J. MacKenzie <djm@gnu.org>
20259
20260 * Makefile.in: fix typo
20261
20262 * Makefile.in (prefix, exec_prefix):
20263 Let configure set them.
20264
202651994-09-28 David J. MacKenzie <djm@gnu.org>
20266
20267 * Makefile.in: Set datadir to $(prefix)/share.
20268
202691994-09-15 Richard Stallman <rms@gnu.org>
20270
20271 * src/bison.s1:
20272 Update copyright notice and GPL version.
20273
202741994-09-15 Richard Stallman <rms@gnu.org>
20275
20276 * bison.simple:
20277 Update copyright notice and GPL version.
20278
202791994-07-12 Richard Stallman <rms@gnu.org>
20280
20281 * src/reduce.c, src/reader.c:
20282 entered into RCS
20283
202841994-05-05 David J. MacKenzie <djm@gnu.org>
20285
20286 * Makefile.in: entered into RCS
20287
202881994-03-26 Richard Stallman <rms@gnu.org>
20289
20290 * src/bison.s1: entered into RCS
20291
202921994-03-26 Richard Stallman <rms@gnu.org>
20293
20294 * bison.simple: entered into RCS
20295
202961994-03-25 Richard Stallman <rms@gnu.org>
20297
20298 * src/main.c: entered into RCS
20299
203001994-03-24 Richard Stallman <rms@gnu.org>
20301
20302 * src/conflicts.c: entered into RCS
20303
203041994-01-02 Richard Stallman <rms@gnu.org>
20305
20306 * Makefile.in: *** empty log message ***
20307
203081993-11-21 Richard Stallman <rms@gnu.org>
20309
20310 * src/bison.s1: *** empty log message ***
20311
203121993-11-21 Richard Stallman <rms@gnu.org>
20313
20314 * doc/bison.texinfo: entered into RCS
20315
20316 * doc/bison.texinfo: *** empty log message ***
20317
203181993-11-21 Richard Stallman <rms@gnu.org>
20319
20320 * bison.simple: *** empty log message ***
20321
203221993-10-25 David J. MacKenzie <djm@gnu.org>
20323
20324 * doc/bison.texinfo: *** empty log message ***
20325
203261993-10-19 Richard Stallman <rms@gnu.org>
20327
20328 * src/bison.s1: *** empty log message ***
20329
203301993-10-19 Richard Stallman <rms@gnu.org>
20331
20332 * bison.simple: *** empty log message ***
20333
203341993-10-14 Richard Stallman <rms@gnu.org>
20335
20336 * src/bison.s1: *** empty log message ***
20337
203381993-10-14 Richard Stallman <rms@gnu.org>
20339
20340 * bison.simple: *** empty log message ***
20341
203421993-09-14 David J. MacKenzie <djm@gnu.org>
20343
20344 * doc/bison.texinfo: *** empty log message ***
20345
203461993-09-13 Noah Friedman <friedman@gnu.org>
20347
20348 * Makefile.in: *** empty log message ***
20349
203501993-09-10 Richard Stallman <rms@gnu.org>
20351
20352 * src/conflicts.c: *** empty log message ***
20353
20354 * src/system.h: entered into RCS
20355
203561993-09-10 Richard Stallman <rms@gnu.org>
20357
20358 * doc/bison.1: entered into RCS
20359
203601993-09-06 Noah Friedman <friedman@gnu.org>
20361
20362 * src/version.c: entered into RCS
20363
203641993-09-06 Noah Friedman <friedman@gnu.org>
20365
20366 * Makefile.in: *** empty log message ***
20367
203681993-07-30 David J. MacKenzie <djm@gnu.org>
20369
20370 * Makefile.in: *** empty log message ***
20371
203721993-07-24 Richard Stallman <rms@gnu.org>
20373
20374 * src/bison.s1: *** empty log message ***
20375
203761993-07-24 Richard Stallman <rms@gnu.org>
20377
20378 * bison.simple: *** empty log message ***
20379
203801993-07-08 David J. MacKenzie <djm@gnu.org>
20381
20382 * Makefile.in: *** empty log message ***
20383
203841993-07-04 Richard Stallman <rms@gnu.org>
20385
20386 * src/bison.s1: *** empty log message ***
20387
203881993-07-04 Richard Stallman <rms@gnu.org>
20389
20390 * bison.simple: *** empty log message ***
20391
203921993-06-26 David J. MacKenzie <djm@gnu.org>
20393
20394 * src/getargs.c: entered into RCS
20395
203961993-06-26 David J. MacKenzie <djm@gnu.org>
20397
20398 * doc/bison.texinfo: *** empty log message ***
20399
20400 * doc/bison.1: New file.
20401
204021993-06-25 Richard Stallman <rms@gnu.org>
20403
20404 * src/getargs.c: New file.
20405
204061993-06-16 Richard Stallman <rms@gnu.org>
20407
20408 * src/bison.s1: *** empty log message ***
20409
204101993-06-16 Richard Stallman <rms@gnu.org>
20411
20412 * bison.simple: *** empty log message ***
20413
204141993-06-03 Richard Stallman <rms@gnu.org>
20415
20416 * src/bison.s1: New file.
20417
204181993-06-03 Richard Stallman <rms@gnu.org>
20419
20420 * doc/bison.texinfo: *** empty log message ***
20421
204221993-06-03 Richard Stallman <rms@gnu.org>
20423
20424 * bison.simple: New file.
20425
204261993-05-19 Richard Stallman <rms@gnu.org>
20427
20428 * doc/bison.texinfo: New file.
20429
204301993-05-07 Noah Friedman <friedman@gnu.org>
20431
20432 * Makefile.in: *** empty log message ***
20433
204341993-04-28 Noah Friedman <friedman@gnu.org>
20435
20436 * src/reader.c: *** empty log message ***
20437
204381993-04-23 Noah Friedman <friedman@gnu.org>
20439
20440 * src/alloc.h: entered into RCS
20441
204421993-04-20 David J. MacKenzie <djm@gnu.org>
20443
20444 * src/version.c: *** empty log message ***
20445
20446 * src/files.c, src/allocate.c:
20447 entered into RCS
20448
20449 * src/reader.c: *** empty log message ***
20450
20451 * src/lex.c: entered into RCS
20452
20453 * src/conflicts.c: New file.
20454
20455 * src/symtab.c: entered into RCS
20456
20457 * src/alloc.h: New file.
20458
20459 * src/LR0.c: entered into RCS
20460
204611993-04-18 Noah Friedman <friedman@gnu.org>
20462
20463 * src/reader.c: New file.
20464
20465 * src/version.c: *** empty log message ***
20466
204671993-04-18 Noah Friedman <friedman@gnu.org>
20468
20469 * Makefile.in: *** empty log message ***
20470
204711993-04-17 Noah Friedman <friedman@gnu.org>
20472
20473 * Makefile.in: *** empty log message ***
20474
204751993-04-15 Richard Stallman <rms@gnu.org>
20476
20477 * src/main.c, src/files.c:
20478 New file.
20479
204801993-04-15 Noah Friedman <friedman@gnu.org>
20481
20482 * configure.in: entered into RCS
20483
20484 * configure.in: *** empty log message ***
20485
20486 * configure.in: New file.
20487
204881993-04-14 Richard Stallman <rms@gnu.org>
20489
20490 * Makefile.in: New file.
20491
204921993-04-13 Richard Stallman <rms@gnu.org>
20493
20494 * src/version.c: New file.
20495
204961993-03-25 Richard Stallman <rms@gnu.org>
20497
20498 * src/output.c: entered into RCS
20499
205001992-09-25 Richard Stallman <rms@gnu.org>
20501
20502 * configure.bat: entered into RCS
20503
205041992-06-22 Richard Stallman <rms@gnu.org>
20505
20506 * src/vmsgetargs.c: entered into RCS
20507
205081992-06-22 Richard Stallman <rms@gnu.org>
20509
20510 * doc/bison.rnh: entered into RCS
20511
205121992-04-20 David J. MacKenzie <djm@gnu.org>
20513
20514 * README: entered into RCS
20515
205161992-01-22 Richard Stallman <rms@gnu.org>
20517
20518 * src/machine.h: entered into RCS
20519
205201991-12-21 Richard Stallman <rms@gnu.org>
20521
20522 * src/lalr.c, src/closure.c:
20523 entered into RCS
20524
205251991-12-20 Richard Stallman <rms@gnu.org>
20526
20527 * src/state.h: entered into RCS
20528
205291991-12-18 Richard Stallman <rms@gnu.org>
20530
20531 * src/print.c, src/nullable.c, src/derives.c:
20532 entered into RCS
20533
205341991-11-03 David J. MacKenzie <djm@gnu.org>
20535
20536 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20537 entered into RCS
20538
205391988-09-09 Richard Stallman <rms@gnu.org>
20540
20541 * src/bison.hairy: entered into RCS
20542
205431987-12-16 Richard Stallman <rms@gnu.org>
20544
20545 * REFERENCES: entered into RCS
dc546b0f 20546
f294a2c2 20547
04098407 20548 -----
f294a2c2 20549
04098407 20550 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
9126263e 20551 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
95021767 20552 Free Software Foundation, Inc.
f294a2c2 20553
04098407
PE
20554 Copying and distribution of this file, with or without
20555 modification, are permitted provided the copyright notice and this
20556 notice are preserved.
e9071366
AD
20557
20558$Id$