]> git.saurik.com Git - bison.git/blame - ChangeLog
* THANKS: Add Eric Blake.
[bison.git] / ChangeLog
CommitLineData
8f7e2e1f
JD
12008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * THANKS: Add Eric Blake.
4
f55efa38
JD
52008-04-23 Eric Blake <ebb9@byu.net>
6
7 Revert prior patch, by working around autoconf regression.
8 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
9 ("Output file name: ("): Uncomment test.
10 ("Output file name: )"): Likewise.
11 Based on an idea from Noah Misch.
12
096c9f9d
JD
132008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
14
15 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
16 2.61. Reported by Juan Manuel Guerrero at
17 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
18 * tests/output.at ("Output file name: ("): Comment out test case for
19 now.
20 ("Output file name: )"): Likewise.
21
0f664b89
JD
222008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
23
24 * GNUmakefile: Update git-version-gen invocation so make dist
25 succeeds.
26
1cfe6375
JD
272008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
28
29 Update to the current gnulib CVS repository, and fix trigraph handling
30 in Bison.
31 * bootstrap: Update gnulib CVS repository URL.
32 (symlink_to_dir): Encapsulate the code that guarantees the destination
33 directory exists into...
34 (check_dst_dir): ... this new function, and...
35 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
36 fail when copying files into lib/uniwidth/.
37 * src/output.c (prepare_symbols): When writing yytname muscles, where
38 symbol names will be encoded in C-string literals, tell quotearg to
39 escape trigraphs. This used to be the default in gnulib.
40 * tests/regression.at (Token definitions): Because of the change in
41 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
42 escapes trigraphs in symbol names. Thus, yytname no longer has
43 trigraphs unnecessarily doubly escaped. Update test case output.
44 Extend test case to be sure Bison's own error messages will no longer
45 have trigraphs in symbol names unnecessarily escaped once.
46
74c52fc8
JD
472008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
48
49 Fix make dist infinite loop reported by Juan Manuel Guerrero at
50 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
51 * .cvsignore: Add .version.
52 * .version.in: New.
53 * bootstrap.conf (gnulib_modules): Add git-version-gen.
54 * configure.ac (AC_CONFIG_FILES): Add .version.
55 * build-aux/.cvsignore: Add git-version-gen.
56
8e55b3aa
JD
572008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
58
59 * NEWS (2.3a+): Mention that -g now takes an argument.
60 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
61 consistency. Update the -g and -x entries now that they take
62 arguments. Use brackets to indicate optional arguments.
63 * src/getargs.c (usage): Explain the relationship between arguments of
64 long and short options more completely. Document --defines and -d
65 separately since the former takes an argument but, for POSIX Yacc, the
66 latter does not.
67 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 68 (getargs): Sort cases.
8e55b3aa 69
59c5ac72
AD
702008-02-28 Akim Demaille <demaille@gostai.com>
71
72 * doc/bison.texinfo: Fix a few typos.
73
118d4978
AD
742008-02-28 Akim Demaille <akim@epita.fr>
75
76 * doc/bison.texinfo (Bison Options): Document -W.
77 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
78
7020f1e9
AD
792008-02-28 Akim Demaille <akim@epita.fr>
80
81 * src/getargs.c (short_options): Split and sort for readability.
82 -g and -x take optional arguments, just like their long options.
83 * build-aux/cross-options.pl: Use /x to make the regexp easier to
84 understand.
85 Fix the handling of $opt which resulted in all the argument to be
86 considered as optional.
87
59da312b
JD
882008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
89
90 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
91 say its interface is experimental.
92 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
93 Java.
94 (Bison Options): In the -L and --language entry, mention Java.
95 (Java Bison Interface): Say the interface is experimental.
96 * src/getargs.c (usage): Mention -L and --language.
97
98 * NEWS (2.3a+): Say the push parsing interface is experimental.
99 * doc/bison.texinfo (Push Decl): Likewise.
100 (Decl Summary): Likewise in the "%define api.push_pull" entry.
101 (Push Parser Function): Likewise.
102 (Pull Parser Function): Likewise.
103 (Parser Create Function): Likewise.
104 (Parser Delete Function): Likewise.
105 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
106 yypull_parse, and yypush_parse entries.
107
108 * NEWS (2.3a+): Mention XML support, and say the schema is
109 experimental.
110 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
111 * src/getargs.c (usage): Say the XML schema is experimental.
112
113 * NEWS (2.3a+): Say option instead of flag.
114
2bb3ebec
WP
1152008-02-21 Wojciech Polak <polak@gnu.org>
116
117 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
118 text.
119
333e670c
JD
1202008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
121
122 Fix impure push parser compile error reported by Bob Rossi at
123 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
124 * data/yacc.c: Clean up whitespace in the output a little.
125 (yypstate_allocated): Define for impure push parsers regardless of
126 whether the pull interface is also requested.
127 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
128 check impure push parsers without the pull interface.
129
130 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
131 yyerror takes arguments specified by %parse-param while yypstate_new
132 does not.
133 * doc/bison.texinfo (Parser Create Function): Document that
134 yypstate_new returns 0 for multiple impure parser instances.
135 * tests/push.at (Push Parsing: Multiple impure instances): Update
136 expected stderr output.
137
798096e1
JD
1382008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
139
140 * runtime-po/POTFILES.in (push.c): Remove.
141
9ca7f077
JD
1422008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
143
144 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
145 * data/push.c: Rename to...
146 * data/yacc.c: ... this, overwriting it.
147 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
148 `%push-pull-parser' -> `%define api.push_pull "both"'.
149 Remove old yacc.c tests, and update push.c tests to yacc.c.
150
42ee26bb
JD
1512008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
152
153 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
154 `"%code top" blocks' instead of `%code "top" blocks'.
155 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
156 Clean up whitespace in the output a little.
157
b1cc23c4
JD
1582008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
159
160 Fix documentation problems reported by Tim Josling at
161 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
162 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
163 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
164 integers. Explain the effect of literal string aliases on error
165 messages. Copy token 0 documentation from the C++ skeleton
166 documentation.
167
ab7f29f8
JD
1682008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
169
170 Accept a token number in a %left, %right, or %nonassoc for POSIX
171 conformance. Reported by Tim Josling at
172 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
173 * NEWS (2.3a+): Mention.
174 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
175 and code numbers are treated by precedence declarations.
176 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
177 of symbols.1.
178 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
179 of symbol.
180 (symbol.prec): New, just like symbol but allows INT.
181 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
182 longer holds.
183 * tests/regression.at (Token number in precedence declaration): New
184 test case.
185
a924ef36
JMG
1862008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
187
188 DJGPP specific issues.
189 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
190 be changed. Copyright timestamp adjusted.
191 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
192 be changed. Copyright timestamp adjusted.
193 * djgpp/config.site: Copyright timestamp adjusted.
194 * djgpp/config_h.sed: Copyright timestamp adjusted.
195 * djgpp/djunpack.bat: Copyright timestamp adjusted.
196 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
197 filename translation list.
198 * djgpp/subpipe.c (init_subpipe): Check the environment variables
199 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
200 files shall be created. Before trying to use the temp dir where the
201 environment variable points to check that the dir really exists. If
202 not default to the cwd as temp dir. Copyright timestamp adjusted.
203 * djgpp/subpipe.h: Copyright timestamp adjusted.
204 * djgpp/testsuite.sed: Copyright timestamp adjusted.
205
389c8cfd
PE
2062008-01-30 Paul Eggert <eggert@cs.ucla.edu>
207
208 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
209
5d1cfef4
PE
2102008-01-09 Paul Eggert <eggert@cs.ucla.edu>
211
212 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
213 Problem reported by Claudio Saavedra in
214 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
215
e2dcf996
WP
2162008-01-05 Wojciech Polak <polak@gnu.org>
217
218 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
219 document's title with the input grammar file name.
220
da730230
JD
2212007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
222
223 Automate regression testing of the XML/XSLT implementation. Discussed
224 starting at
225 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
226 * configure.ac (XSLTPROC): New substitution.
227 * Makefile.am (maintainer-xml-check): New phony target invoking...
228 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
229 invoking make maintainer-check with BISON_TEST_XML=1.
230 * tests/atlocal.in (XSLTPROC): New.
231 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
232 not to report reachable memory when Bison is expected to have a
233 non-zero exit status and (2) to compare XML/XSLT output with --graph
234 and --report=all output for every working grammar when
235 BISON_TEST_XML=1.
236 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
237 (AT_BISON_CHECK_XML): New.
238 (AT_QUELL_VALGRIND): New.
239 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
240 (AT_CHECK): ... don't redefine this since this was the old way to
241 quell Valgrind.
242 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
243 AT_BISON_CHECK invocations.
244 * tests/c++.at: Likewise.
245 * tests/calc.at: Likewise.
246 * tests/conflicts.at: Likewise.
247 * tests/cxx-type.at: Likewise.
248 * tests/existing.at: Likewise.
249 * tests/glr-regression.at: Likewise.
250 * tests/headers.at: Likewise.
251 * tests/input.at: Likewise.
252 * tests/java.at: Likewise.
253 * tests/output.at: Likewise.
254 * tests/push.at: Likewise.
255 * tests/reduce.at: Likewise.
256 * tests/regression.at: Likewise.
257 * tests/sets.at: Likewise.
258 * tests/skeletons.at: Likewise.
259 * tests/synclines.at: Likewise.
260 * tests/torture.at: Likewise.
261 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
262 tends to hang xsltproc.
263 (Big horizontal): Likewise.
264
408476bc
JD
2652007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
266
267 In XML output, remove redundant class attribute on symbol element.
268 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
269 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
270 look up a symbol to determine whether it's a nonterminal or terminal.
271 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
272 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
273
274 Add prec/assoc information to XML output.
275 * src/gram.c (grammar_rules_print_xml): For each rule that has a
276 %prec, add a percent_prec attribute.
277 * src/print-xml.c (print_grammar): For each terminal that has a
278 precedence or associativity, add a prec or assoc attribute.
279 (xml_indent): New.
280 (xml_puts): Use xml_indent.
281 (xml_printf): Use xml_indent.
282 * src/print-xml.h (xml_indent): Prototype.
283
284 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
285 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
286
d4a26c48
JD
2872007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
288
289 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
290 (bison:ruleByNumber): ... this for clarity.
291 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
292 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
293 (xsl:template match="reduction"): Update.
294 (xsl:template match="item"): Update.
295 (xsl:template match="reduction"): Update.
296
297 In the XML output, don't print the list of rules where symbols appear.
298 Compute it in XSLT instead. Discussed at
299 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
300 * data/xslt/bison.xsl (bison:ruleByLhs): New.
301 (bison:ruleByRhs): New.
302 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
303 bison:ruleByRhs.
304 (xsl:template match="terminal/rule"): Remove.
305 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
306 bison:ruleByRhs.
307 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
308 Remove.
309 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
310 bison:ruleByRhs and mode="number-link" for rule template.
311 (xsl:template match="terminal/rule"): Remove.
312 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
313 bison:ruleByRhs and mode="number-link" for rule template.
314 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
315 Rewrite as...
316 (xsl:template match="rule" mode="number-link"): ... this.
317 * src/print-xml.c (print_grammar): Don't print the list of rules.
318
ef1b4273
JD
3192007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
320
321 Don't let --report affect XML output; always print all information.
322 Discussed at
323 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
324 * src/conflicts.c (log_resolution): Implement.
325 * src/print-xml.c (print_core): Implement.
326 (print_state): Implement.
327 (print_xml): Implement.
328
329 * NEWS (2.3a+): Fix quotes.
330 * src/parse-gram.y (prologue_declaration): For consistency with -v,
331 don't let %verbose clear the list specified by --report.
332
0f6cd9e3
AD
3332007-11-26 Akim Demaille <akim@epita.fr>
334
335 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
336
d80fb37a
JD
3372007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
338
339 In the XML output, list useless and unused symbols and rules with the
340 useful ones and add a "usefulness" attribute. Discussed starting at
341 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
342 * src/gram.c (grammar_rules_partial_print_xml): Remove.
343 (grammar_rules_print_xml): Print all rules instead of just those
344 useful in the grammar, and add a "usefulness" attribute.
345 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
346 * src/print-xml.c (print_rules_useless_in_parser): Remove.
347 (print_grammar): Print all nonterminals instead of just useful ones,
348 and add a "usefulness" attribute to nonterminals and terminals.
349 (print_xml): Don't print a separate "reductions" or
350 "rules-useless-in-parser" element.
351 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
352 (reduce_xml): Remove.
353 (reduce_token_unused_in_grammar): New.
354 (reduce_nonterminal_useless_in_grammar): New.
355 * src/reduce.h (reduce_xml): Remove prototype.
356 (reduce_token_unused_in_grammar): Add prototype.
357 (reduce_nonterminal_useless_in_grammar): Add prototype.
358 * data/xslt/xml2text.xsl: Update for XML changes.
359 * data/xslt/xml2xhtml.xsl: Update for XML changes.
360 * tests/reduce.at (Useless Terminals): Update output.
361 (Useless Rules): Update output.
362 (Reduced Automaton): Update output.
363
364 Say "Terminals unused in grammar" instead of "Unused terminals".
365 * NEWS (2.3a+): Update.
366 * doc/bison.texinfo (Understanding): Update example output.
367 * src/reduce.c (reduce_output): Implement.
368 * data/xslt/xml2text.xsl: Implement.
369 * data/xslt/xml2xhtml.xsl: Implement.
370
1bb2bd75
JD
3712007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
372
373 Accept --report-file=FILE to override the default `.output' filename.
374 * NEWS (2.3a+): Mention.
375 * doc/bison.texinfo (Bison Options): Add an entry.
376 * src/files.c (compute_output_file_names): Don't override
377 spec_verbose_file if already set.
378 * src/getargs.c (usage): Document --report-file.
379 (REPORT_FILE_OPTION): New anonymous enum member.
380 (long_options): Add entry for it.
381 (getargs): Add case for it setting spec_verbose_file.
382
383 * build-aux/cross-options.pl: Don't record a short option just because
384 there's an arg.
385 * doc/.cvsignore: Add yacc.1.
386
a005a9c4
AD
3872007-11-14 Akim Demaille <akim@epita.fr>
388
389 * doc/yacc.1.in: New.
390 * configure.ac, doc/Makefile.am: Adjust.
391 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
392 config.h symbol.
393 Use AC_SUBST for assignments too.
394 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
395
cff03fb2
JD
3962007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
397
398 * src/gram.c: Remove comments that duplicate comments in gram.h.
399
400 When reporting useless rules and nonterminals, say "useless in grammar"
401 instead of "useless", and say "useless in parser" instead of "never
402 reduced". Discussed starting at
403 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
404 * NEWS (2.3a+): Mention this change.
405 * data/xslt/xml2text.xsl: Update output text and expected input XML
406 element names to match changes below.
407 * data/xslt/xml2xhtml.xsl: Likewise.
408 (xsl:template match="bison-xml-report"): Add missing entry in Table of
409 Contents: "Rules useless in parser due to conflicts".
410 * doc/bison.texinfo (Decl Summary): Reword a little.
411 (Understanding): Update example output for changes below.
412 * src/gram.c: (rule_useful_p): Rename to...
413 (rule_useful_in_grammar_p): ... this.
414 (rule_useless_p): Rename to...
415 (rule_useless_in_grammar_p): ... this.
416 (rule_never_reduced_p): Rename to...
417 (rule_useless_in_parser_p): ... this.
418 (grammar_rules_print): Update for renames.
419 (grammar_rules_print_xml): Update for renames.
420 (grammar_rules_never_reduced_report): Rename to...
421 (grammar_rules_useless_report): ... this since it is used for either
422 kind of useless rule.
423 * src/gram.h: Reword comments and update function names in prototypes.
424 * src/main.c (main): Say "rule useless in parser due to conflicts".
425 * src/print-xml.c (print_rules_never_reduced): Rename to...
426 (print_rules_useless_in_parser): ... this, and rename output XML
427 element "rules-never-reduced" to "rules-useless-in-parser".
428 (print_xml): Update for rename.
429 * src/print.c (print_results): Say "Rules useless in parser due to
430 conflicts".
431 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
432 (nonterminals_reduce): Say "nonterminal useless in grammar".
433 (reduce_output): Say "Nonterminals useless in grammar".
434 Say "Rules useless in grammar".
435 (reduce_xml): Rename output XML element "useless" to
436 "useless-in-grammar".
437 (reduce_print): Don't report the count of grammatically useless rules
438 as "rules never reduced" just because %yacc is specified.
439 In the correct report of this count, say nonterminal(s) and rule(s)
440 "useless in grammar".
441 * tests/conflicts.at (S/R in initial): Update expected output.
442 (Defaulted Conflicted Reduction): Likewise.
443 (Unreachable States After Conflict Resolution): Likewise.
444 * tests/existing.at (GNU pic Grammar): Likewise.
445 * tests/reduce.at (Useless Nonterminals): Likewise.
446 (Useless Rules): Likewise.
447 (Reduced Automaton): Likewise.
448 (Underivable Rules): Likewise.
449 (Empty Language): Likewise.
450
66f0441d
JD
4512007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
452
453 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
454 here document and before the EOF so that BSD's implementation of Bourne
455 shell doesn't parse the delimiter as part of the here document.
456 * doc/.cvsignore: Add cross-options.texi.
457 * src/getargs.c (usage): Add a blank line after the warning categories.
458
d0ee4105
PB
4592007-11-08 Paolo Bonzini <bonzini@gnu.org>
460
461 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
462
e8b1fb9b
AD
4632007-11-05 Akim Demaille <akim@epita.fr>
464
465 Remove Id: from bison.1.
466 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
467 (perl -0777 -pi -e 's/\.PP\nId): New.
468 (.x.1): Use it to ignore the version control revision.
469
2f7a96b5
AD
4702007-11-05 Akim Demaille <demaille@gostai.com>
471
472 * build-aux/Makefile.am: Ship cross-options.pl.
473 * doc/Makefile.am: Always refer to cross-options.texi with
474 $(srcdir).
475 (MAINTAINERCLEANFILES): Add it.
476
f4101aa6
AD
4772007-11-04 Akim Demaille <demaille@gostai.com>
478
479 Generate the long/short option cross-table.
480 * build-aux/cross-options.pl: New.
481 * doc/Makefile.am (cross-options.texi): New.
482 * doc/bison.texinfo: Use it.
483
727a1401
AD
4842007-11-04 Akim Demaille <demaille@gostai.com>
485
486 Generate bison.1 using help2man.
487 * doc/common.x, doc/bison.x: New.
488 * doc/Makefile.am (bison.1, .x.1): New.
489 The code is taken from autoconf-2.61/man/Makefile.am.
490 * configure.ac: Look for help2man.
491
6aeb9c57
AD
4922007-11-04 Akim Demaille <demaille@gostai.com>
493
494 Complete --help.
495 * src/getargs.c (usage): Document -W, make it clear that -d,
496 -g and -x have optional arguments.
497
d7be4085
AD
4982007-11-04 Akim Demaille <demaille@gostai.com>
499
500 Find sha1sum when named gsha1sum.
501 * bootstrap (find_tool): New.
502 ($SHA1SUM): New.
503
d9df47b6
JD
5042007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
505
506 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
507 at
508 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
509 * NEWS (2.3a+): Mention.
510 * data/bison.m4 (b4_pure_if): Don't define it here.
511 * data/c.m4 (b4_identification): Depend on individual skeletons to
512 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
513 values of the %define variables api.pure or api.push_pull. Define
514 YYPURE, YYPUSH, and YYPULL accordingly.
515 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
516 glr.cc has already defined b4_pure_flag.
517 * data/push.c: Define b4_pure_if based on `%define api.pure'.
518 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 519 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
520 * doc/bison.texinfo (Pure Decl): Update.
521 (Push Decl): Update.
522 (Decl Summary): Add api.pure to %define entry.
523 In %pure-parser entry, say it's deprecated and reference %define.
524 (Pure Calling): Update.
525 (Error Reporting): Update.
526 (C++ Scanner Interface): Update.
527 (How Can I Reset the Parser): Update.
528 (Table of Symbols): In %pure-parser entry, say it's deprecated and
529 reference %define.
530 * src/getargs.c (pure_parser): Remove global variable.
531 * src/getargs.h (pure_parser): Remove extern.
532 * src/output.c (prepare): Don't define pure_flag muscle.
533 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
534 wrapper around `%define api.pure'.
535 * tests/calc.at (Simple LALR Calculator): Update.
536 (Simple GLR Calculator): Update.
537 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
538 Update.
539 (GLR: Resolve ambiguity, pure, locations): Update.
540 (GLR: Merge conflicting parses, pure, no locations): Update.
541 (GLR: Merge conflicting parses, pure, locations): Update.
542 * tests/glr-regression.at (Uninitialized location when reporting
543 ambiguity): Update
544 * tests/input.at (Unused %define api.pure): New test case.
545 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
546 AT_PURE_IF and AT_PURE_AND_LOC_IF.
547 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
548
c373bf8b
JD
5492007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
550
551 %define push_pull -> %define api.push_pull. Discussed starting at
552 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
553 * data/push.c: Expect the new name.
554 * data/yacc.c: Likewise.
555 * doc/bison.texinfo (Push Decl): Update.
556 (Decl Summary): Update %define entry.
557 (Push Parser Function): Update.
558 (Pull Parser Function): Update.
559 (Parser Create Function): Update.
560 (Parser Delete Function): Update.
561 * tests/calc.at (Simple LALR Calculator): Update.
562 * tests/input.at (%define enum variables): Update.
563 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
564 (Push Parsing: Multiple impure instances): Update.
565 (Push Parsing: Unsupported Skeletons): Update.
566 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
567 (Exploding the Stack Size with Malloc): Update.
568
569 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
570 other entries some.
571
32f19b6b
JD
5722007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
573
574 For the XML output's terminal element, rename @number to @token-number,
575 and add @symbol-number. In the nonterminal element, rename @number to
576 @symbol-number. Discussed starting at
577 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
578 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
579 renames.
580 (xsl:template match="nonterminal"): Likewise.
581 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
582 (xsl:template match="nonterminal"): Likewise.
583 * src/print-xml.c (print_grammar): Implement.
584
255a6b90
JD
5852007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
586
587 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
588 2007-10-11 change, the child elements here are items not rules.
408476bc 589 (xsl:template match="item"): New.
255a6b90
JD
590 (xsl:template match="rule"): Update for new reduced itemset.
591 (xsl:template match="point"): Remove.
592 (xsl:template match="empty"): For consistency with --graph, don't
593 output "/* empty */".
594 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
595 line-wrap, don't pass a negative value as first-line-length since this
596 won't work with the following changes.
597 (xsl:template name="line-wrap"): Simplify slightly.
598 (xsl:template name="ws-search"): Eliminate recursion.
599 * src/print_graph.c (print_core): Don't print a reduction's lookahead
600 set next to an item whose dot is not at the end of the RHS even if it
601 happens to be associated with the same rule.
602
88c78747
JD
6032007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
604
31984206
JD
605 Add %define lr.keep_unreachable_states.
606 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
607 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
608 * src/main.c (main): Implement it.
609 * tests/conflicts.at (Unreachable States After Conflict Resolution):
610 Extend to test it, and fix a typo.
611
6122007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
613
614 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
615 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
616 the example .output text.
617 * tests/regression.at (Extra lookahead sets in report): Improve wording
618 of comments.
619
b7a70162
WP
6202007-10-17 Wojciech Polak <polak@gnu.org>
621
622 * src/print-xml.c (print_grammar): Renamed
623 <terminal> and <nonterminal> attributes:
624 "type" to "number" and "symbol" to "name".
625 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
626 Use new attribute names.
627 (xsl:template match="nonterminal"): Likewise.
628 * data/xslt/xml2xhtml.xsl: Likewise.
629
a0de5091
JD
6302007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
631
632 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
633 (Option Cross Key): Likewise.
634
635 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
636 next to an item whose dot is not at the end of the RHS even if it
637 happens to be associated with the same rule.
638 * src/print.c (print_core): Likewise.
639 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
640 (Resolved SR Conflicts): Update output.
641 * tests/regression.at (Extra lookahead sets in report): New test case.
642
4c20d18d
WP
6432007-10-11 Wojciech Polak <polak@gnu.org>
644
645 * src/print-xml.c (print_core): Remove item set
646 redundancy.
647 * data/xslt/bison.xsl (bison:ruleNumber): New key.
648 Improve processing time. Suggested by Joel E. Denny.
649 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
650 Write xsl:param "required" attribute as comment.
651 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
652 (xsl:template match="rule"): Support new reduced itemset.
653 (xsl:template match="point"): Remove.
654 * data/xslt/xml2xhtml.xsl: Likewise.
655
f506ad1c
JD
6562007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
657
658 * src/getargs.c (version): Update copyright year.
659
21f1b063
JD
6602007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
661
662 Make xml2dot.xsl and --graph produce the same output.
663 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
664 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
665 escaped later.
666 (xsl:template name="output-node"): Use the new escape template instead
667 of the string-replace template directly.
668 (xsl:template name="output-edge"): Likewise.
669 (xsl:template name="escape"): New, escapes backslashes and newlines in
670 addition to quotation marks.
671 * src/graphviz.c (start_graph, output_node, output_edge): Add
672 whitespace to output for legibility.
673
674 Make xml2text.xsl and --report produce the same output, and remove the
675 XML "conflicts" element since a conflict summary is easily extracted
676 from the automaton.
677 * data/xslt/bison.xsl: New.
678 (xsl:template match="state" mode="bison:count-conflicts): New.
679 * data/xslt/xml2text.xsl: Import bison.xsl.
680 (xsl:template match="bison-xml-report"): Instead of styling the
681 "conflicts" element, style the "automaton" element with mode
682 "conflicts". Unlike the former, the latter lists S/R and R/R
683 conflicts for a state on the same line.
684 (xsl:template match="conflicts"): Remove.
685 (xsl:template match="conflict"): Remove.
686 (xsl:template match="terminal"): Line-wrap the list of rules in which
687 the terminal is used.
688 (xsl:template match="nonterminal"): Likewise for nonterminals.
689 (xsl:template match="automaton" mode="conflicts"): New.
690 (xsl:template match="state" mode="conflicts"): New.
691 (xsl:template name="line-wrap"): New.
692 (xsl:template name="ws-search"): New.
693 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
694 (xsl:template match="bison-xml-report"): Instead of styling the
695 "conflicts" element, style the "automaton" element with mode
696 "conflicts."
697 (xsl:template match="conflicts"): Remove.
698 (xsl:template match="conflict"): Remove.
699 (xsl:template match="automaton" mode="conflicts"): New.
700 (xsl:template match="state" mode="conflicts): New.
701 * src/conflicts.c (conflicts_output_xml): Remove.
702 * src/conflicts.h (conflicts_output_xml): Remove prototype.
703 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
704 * src/print.c (print_grammar): Consistently wrap at the 66th column so
705 the corresponding XSLT is easier. Also, never wrap between a word and
706 the comma that follows it.
707
793fbca5
JD
7082007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
709
710 Improve C++ namespace support. Discussed starting at
711 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
712 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
713 b4_namespace_close): New macros that interpret the %define variable
714 "namespace" so its value can contain "::" to indicate nested
715 namespaces.
716 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
717 the above macros.
718 * data/lalr1.cc (b4_namespace): Likewise.
719 * data/location.cc (b4_namespace): Likewise.
720 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
721 inside a new table in the general %define entry. Document `%define
722 namespace' there as well. Point the %name-prefix entry to it since it
723 explains it more completely in the case of C++.
724 (C++ Bison Interface): Mention `%define namespace' instead of
725 %name-prefix.
726 (Table of Symbols): Remove the `%define push_pull' entry. The %define
727 entry suffices.
728 * tests/c++.at (Relative namespace references): New test case.
729 (Absolute namespace references): New test case.
730 (Syntactically invalid namespace references): New test case.
731 * tests/input.at (C++ namespace reference errors): New test case.
732
35b8730d
JD
7332007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
734
735 Add syncline support and location accessor to internal %define
736 interfaces.
737 * data/bison.m4 (b4_percent_define_get_loc): New.
738 (b4_percent_define_get_syncline): New.
739 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
740 (b4_percent_define_default): Record defining location as line 1 rather
741 than 0 for the sake of synchronizing #line's, and define
742 b4_percent_define_syncline(VARIABLE).
743 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
744 * src/muscle_tab.c (muscle_syncline_grow): New.
745 (muscle_code_grow): Use muscle_syncline_grow.
746 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
747 define b4_percent_define_syncline(VARIABLE).
748 (muscle_percent_define_get_loc): New.
749 (muscle_percent_define_get_syncline): New.
750 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
751 remove some unused variables.
752 (muscle_percent_define_default): Record defining location as line 1
753 rather than 0 for the sake of synchronizing #line's, and define
754 b4_percent_define_syncline(VARIABLE).
755 (muscle_percent_define_check_values): Use
756 muscle_percent_define_get_loc.
757 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
758 (muscle_percent_define_get_syncline): Prototype.
759 * tests/skeletons.at (%define Boolean variables: invalid skeleton
760 defaults): Update output for location change.
761 (Complaining during macro argument expansion): Extend to test
762 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
763
7dc4a694
JD
7642007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
765
766 Fix some error-reporting macro bugs.
767 * data/bison.m4 (b4_cat): New.
768 (b4_error, b4_error_at): Use b4_cat to send error directives directly
769 to stdout so they don't become arguments to other macros. Update
770 comments and add examples.
771 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
772 add examples.
773 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
774 after printing the error directive so that M4 doesn't report subsequent
775 problems that are induced by this problem.
776 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
777 instead of just in them. Recognize @\n in both places. Both expand to
778 the empty string. Needed by b4_cat.
779 * tests/skeletons.at (Complaining during macro argument expansion):
780 New test case.
781 (Fatal errors make M4 exit immediately): New test case.
782
d4bd2295
JD
7832007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
784
785 Implement --print-datadir.
786 * src/getargs.c (usage): Mention.
787 (PRINT_DATADIR_OPTION): New anonymous enum member.
788 (long_options): Add entry for it.
789 (getargs): Add case for it calling compute_pkgdatadir.
790 * src/output.c (output_skeleton): Encapsulate data directory
791 computation from here...
792 (prepare): ... and from here...
793 (compute_pkgdatadir): ... into this new function.
794 * src/output.h (compute_pkgdatadir): Prototype.
795
34cdeddf
JD
7962007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
797
798 * src/print-xml.c (escape_bufs): New static global variable
799 replacing...
800 (xml_escape_n): ... the static local variable buf here.
801 (print_xml): Free memory for escape_bufs.
802 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
803
d782395d
JD
8042007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
805
806 Replace `%push-parser' and `%push-pull-parser' with
807 `%define push_pull "push"' and `%define push_pull "both"'.
808 `%define push_pull "pull"' is the default.
809 * doc/bison.texinfo (Push Decl, Push Parser Function,
810 Pull Parser Function, Parser Create Function, Parser Delete Function):
811 Update declarations.
812 (Decl Summary, Table of Symbols): Replace %push-parser and
813 %push-pull-parser entries with a %define push_pull entry.
814 * data/bison.m4 (b4_percent_define_check_values): New macro.
815 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
816 definitions...
817 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
818 definitions...
819 * data/push.c: ... to here and compute them from the value of the
820 %define variable push_pull.
821 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
822 parsing requests here...
823 * data/yacc.c: ... hack this to switch to push.c any time
824 b4_use_push_pull_flag or the %define variable push_pull is set. This
825 will go away when we mv push.c yacc.c.
826 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
827 push parsing is not supported since unused %define variables are
828 reported anyway.
829 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
830 * src/muscle_tab.h (muscle_percent_define_check_values): Update
831 comments for consistency with b4_percent_define_check_values.
832 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
833 muscles.
834 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
835 Remove.
836 (prologue_declaration): Remove %push-parser and %push-pull-parser
837 rules.
838 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
839 * tests/calc.at: Update declarations.
840 * tests/input.at (%define enum variables): New test case.
841 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
842 declaration.
843 (Push Parsing: Multiple impure instances): Update declaration.
844 (Push Parsing: Unsupported Skeletons): New test case.
845 * tests/torture.at (Exploding the Stack Size with Alloca): Update
846 declaration.
847 (Exploding the Stack Size with Malloc): Update declaration.
848
3f999f78
WP
8492007-09-24 Wojciech Polak <polak@gnu.org>
850
851 Add XSLT transformations.
852
853 * data/xslt/xml2dot.xsl: Transform XML into DOT.
854 * data/xslt/xml2text.xsl: Transform XML into plain text.
855 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
856 * data/Makefile.am (xsltdir): New variable.
857 (dist_xslt_DATA): Add xslt/*.xsl files.
858
a4f75309
PE
8592007-09-23 Paul Eggert <eggert@cs.ucla.edu>
860
861 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
862 Problem reported by Wojciech Polak.
863 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
864 (xml_printf): Undo change I made on 21 September; that is,
865 indent 2 spaces, not 1.
866
ad5feac4
JD
8672007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
868
869 Pacify ./configure --enable-gcc-warnings.
870 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
871 `char const *' instead of `char *'.
872 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
873 local variable `sep'.
874
41d7a5f2
PE
8752007-09-21 Paul Eggert <eggert@cs.ucla.edu>
876
877 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
878 elsewhere.
879 * src/print-xml.c: Prefer "const" after types; that's more consistent.
880 (xml_printf): Indent just 1 space for level.
881 (e_char, xlate_char): Remove.
882 (xml_escape_string): Rewrite to avoid undefined behavior (used
883 storage that was freed from the stack).
884 (xml_escape_n): Don't bother checking for subscript error.
885
3f999f78
WP
8862007-09-21 Wojciech Polak <polak@gnu.org>
887
888 Add Bison XML Automaton Report.
41d7a5f2
PE
889
890 Add support for an -x option to generate an XML report.
891 It is not documented yet.
892 * src/print-xml.c: New file.
893 * src/print-xml.h: Likewise.
894 * lib/timevar.def (TV_XML): New var.
895 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
896 * src/conflicts.c: Include print-xml.h.
897 (solved_conflicts_xml_obstack): New var.
898 (log_resolution, conflicts_solve, conflicts_free):
899 Add support for XML report.
900 (conflicts_output_val): New function.
901 * src/conflicts.h (conflicts_output_val): New decl.
902 * src/files.c (spec_xml_file): New var.
903 (compute_output_file_names, output_file_names_free): Add XML support.
904 * src/files.h (spec_xml_file): New decl.
905 * src/getargs.c (xml_flag): New var.
906 (usage, short_options, long_options, getargs): Add XML support.
907 * src/getargs.h (xml_flag): New decl.
908 * src/gram.c: Include print-xml.h.
909 (rule_lhs_print_xml, rule_rhs_print_xml):
910 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
911 New functions.
912 * src/gram.h: Declare external ones.
913 * src/main.c: Include print-xml.h.
914 (main): Add XML support.
915 * src/reduce.c: Include print-xml.h.
916 (reduce_xml): New function.
917 * src/reduce.h: Declare it.
918 * src/state.c: Include print-xml.h.
919 (state_new): Add XML support.
920 (state_rule_lookahead_tokens_print_xml): New function.
921 * src/state.h: Declare it.
922 (struct state): New member solved_conflicts_xml.
923 * src/symtab.c (symbol_class_get_string): New function.
924 * src/symtab.h: Declare it.
925
6d8e724d
PE
9262007-09-21 Paul Eggert <eggert@cs.ucla.edu>
927
928 * GNUmakefile: Switch to coreutils's version.
929 * bootstrap: Likewise.
930 * Makefile.cfg: Adjust to new GNUmakefile.
931 * README-hacking: Likewise.
932
933 Import from gnulib:
934
935 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
936 Bruno Haible <bruno@clisp.org>
937
938 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
939 and is a script that invokes bison. Tighten the code. Add comments.
940
922bdd7f
JD
9412007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
942
943 Spell "boolean" as "Boolean". Reported by Akim Demaille.
944 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
945 * doc/bison.texinfo (Decl Summary): Fix.
946 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
947 * tests/input.at (Boolean %define variables): Update output.
948 * tests/skeletons.at (%define boolean variables: invalid skeleton
949 defaults): Rename to...
950 (%define Boolean variables: invalid skeleton defaults): ... this and
951 update output.
952
1b17b01d
JD
9532007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
954
955 In impure push mode, don't allow more than one yypstate to be allocated
956 since multiple impure parsers would corrupt yynerrs.
957 * data/push.c (yypstate_allocated): New static global variable
958 initialized to 0.
959 (yypull_parse): If yypstate_new returns 0, don't report it as memory
960 exhaustion if yypstate_allocated is 1, but still return 2.
961 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
962 already 1. Otherwise, set it to 1.
963 (yypstate_delete): Set it to 0.
964 * tests/push.at (Push Parsing: Multiple impure instances): New test
965 case.
966
9987d1b3
JD
9672007-08-17 Bob Rossi <bob@brasko.net>
968
969 * doc/bison.texinfo (Push Decl): Document the push parser.
970 (Table of Symbols): Ditto.
971 (Pure Decl): Ditto.
972 (Decl Summary): Ditto.
973 (Multiple Parsers, Push Parser Function, Pull Parser Function,
974 Parser Create Function, Parser Delete Function):
975 Add new push parser symbols.
976 (Table of Symbols): Document push-parser, push-pull-parser,
977 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
978
f16b0819
PE
9792007-08-15 Paul Eggert <eggert@cs.ucla.edu>
980
981 Update to GPLv3.
982 * doc/gpl-3.0.texi: New file.
983 * doc/gpl.texi: Remove.
984 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
985 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
986 * README-hacking, TODO, bootstrap, bootstrap.conf:
987 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
988 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
989 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
990 * data/lalr1.cc, data/lalr1.java, data/location.cc:
991 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
992 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
993 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
994 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
995 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
996 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
997 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
998 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
999 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1000 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1001 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1002 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1003 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1004 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1005 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1006 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1007 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1008 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1009 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1010 * src/complain.c, src/complain.h, src/conflicts.c:
1011 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1012 * src/files.h, src/flex-scanner.h, src/getargs.c:
1013 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1014 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1015 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1016 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1017 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1018 * src/print.c, src/print.h, src/print_graph.c:
1019 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1020 * src/reduce.h, src/relation.c, src/relation.h:
1021 * src/revision.h, src/scan-code.h, src/scan-code.l:
1022 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1023 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1024 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1025 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1026 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1027 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1028 * tests/existing.at, tests/glr-regression.at:
1029 * tests/headers.at, tests/input.at, tests/java.at:
1030 * tests/local.at, tests/output.at, tests/push.at:
1031 * tests/reduce.at, tests/regression.at, tests/sets.at:
1032 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1033 * tests/torture.at:
1034 Update to GPLv3.
1035
728c4be2
JD
10362007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1037
1038 Get rid of broken %no-parser, -n, and --no-parser implementation and
1039 documentation.
1040 * TODO: Don't mention them.
1041 * doc/bison.1: Likewise.
1042 * doc/bison.texinfo (Decl Summary): Likewise.
1043 (Bison Options): Likewise.
1044 (Option Cross Key): Likewise.
1045 * src/getargs.c (no_parser_flag): Remove global variable.
1046 (usage): Don't print description of -n and --no-parser.
1047 (long_options): Remove --no-parser entry here.
1048 (getargs): Remove -n case in the switch here.
1049 * src/getargs.h (no_parser_flag): Remove extern.
1050 * tests/regression.at (Web2c Actions): Remove comment that mentions
1051 --no-parser.
1052
5d31a216
JD
10532007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1054
1055 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1056 name user variables starting with `yy'. Just pass NULL instead of a
1057 dummy local &yylval to yypush_parse.
1058 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1059 starting with `yy'.
1060
a2ea208d
JD
10612007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1062
1063 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1064 true since it's then always used regardless of whether yyoverflow is
1065 defined. Reported by Christian Burger at
1066 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1067 * THANKS: Add Christian Burger.
1068
91661ebb
JD
1069 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1070 node names: say "Decl Summary" not "Bison Declaration Summary".
1071
cbd50549
JD
10722007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1073
1074 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1075 determine whether this function has already complained about an invalid
1076 value for a %define boolean variable, don't check whether Bison has
1077 ever examined the value. As written, the check was a tautology.
1078 Instead, record and check for this complaint using a separate muscle.
1079
eb1b0740
JD
10802007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1081
1082 Fix push parsing memory leak reported by Brandon Lucia at
1083 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1084 * THANKS: Add Brandon Lucia.
1085 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1086 but the parse never completed and thus freed it.
1087 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1088 * tests/testsuite.at: Include push.at.
1089 * test/push.at: New.
1090 (Push Parsing: Memory Leak for Early Deletion): New test case.
1091
9d774aff
JD
10922007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1093
1094 Improve handling of multiple S/R conflicts in the same state and of S/R
1095 conflicts involving multiple reductions.
1096 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1097 set for a state here or Bison will abort if it is reassigned on a
1098 later conflicted reduction in the same state.
1099 Similarly, don't finalize and assign the solved conflicts report here
1100 or it will be lost if it is reassigned on a later conflicted reduction
1101 in the same state.
1102 (set_conflicts): Instead, assign them both here after all S/R conflicts
1103 in the state have been fully examined.
1104 * src/print.c (shift_set): Rename to...
1105 (no_reduce_set): ... this.
1106 (print_reductions): Update for rename, and add %nonassoc error action
1107 tokens to no_reduce_set so that, when printing the first remaining
1108 reduction on an error action token, the reduction is enclosed in
1109 brackets.
1110 (print_results): Update for rename.
1111 * tests/conflicts.at (Solved conflicts report for multiple reductions
1112 in a state): New test case.
1113 (%nonassoc error actions for multiple reductions in a state): New test
1114 case.
1115
1116 * src/main.c (main): Don't depend on C99 features.
1117
10159d2a
JD
11182007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1119
1120 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
1121 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1122 uniwidth.
10159d2a 1123
953b3935
JD
11242007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1125
1126 * bootstrap (slurp): Create target directories that don't exist.
1127 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1128
6ce2d93a
JD
11292007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1130
1131 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1132 than item number.
1133 * closure.c (closure): Likewise.
1134 * state.h (reductions): Comment sorting of rules.
1135 (state): Comment sorting of items.
1136
ce3448d5
JD
11372007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1138
1139 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1140 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1141 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1142 definition in order to avoid Gnulib headers since we don't use config.h
1143 here.
1144 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1145 rather than AT_DATA so that config.h is included.
1146
8a86eef0
JD
11472007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1148
1149 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1150 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1151 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1152 and so that YYFPRINTF is guaranteed to be defined here.
1153
b1a81613
JD
11542007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1155
1156 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1157 with...
1158 (muscle_percent_define_check_values): ... this more helpful function.
1159 Again, it's not used yet, but it will be.
1160 * src/muscle_tab.h: Likewise.
1161
71b61d4d
JD
1162 Improve some comments in parser table construction.
1163 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1164 (generate_states): Don't mention ruleset, which is internal to closure.
1165 * src/closure.c (closure): Explain sorting of core and itemset, which
1166 is required for this function to behave correctly.
1167 * src/closure.h (closure): Mention sorting.
1168
2a6b783d
JD
11692007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1170
1171 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1172 move the check for disabled transitions to an aver since conflict
1173 resolution hasn't happened yet.
1174
1175 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1176 labels a state as inconsistent just because it has error transitions.
1177 The original form of this check appeared in revision 1.1 of lalr.c,
1178 which was committed on 1991-12-21. Now (at least), changing the
1179 consistency label on such a state appears to have no useful effect in
1180 any of the places it is examined, which I enumerate below. The key
1181 point to understanding each item in this enumeration is that a state
1182 with an error transition is labelled consistent in the first place only
1183 if it has no rules, so the check cannot matter for states that have
1184 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1185 to try to identify its conflicts, and a state must have *rules* to have
1186 conflicts. (2) Labelling a state as inconsistent will affect how
1187 action_row sets the default *rule* for the state. (3) Labelling a
1188 state as inconsistent will cause build_relations to add lookback edges
1189 to *rules* in that state.
1190 * src/state.h (struct state): Word the comment for member consistent
1191 more carefully.
1192
14462c2b
JD
11932007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1194
1195 Don't depend on C99 features.
1196 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1197 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1198 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1199 * src/state.c (state_mark_reachable_states): Fix for-loop.
1200 (state_remove_unreachable_states): Fix for-loop.
1201
1202 Don't widen struct state with member reachable just to temporarily
1203 record reachability. Instead, use a local bitset.
1204 * src/state.h (struct state): Remove member.
1205 * src/state.c (state_new): Don't initialize it.
1206 (state_mark_reachable_states): Rename to...
1207 (state_record_reachable_states): ... this, and use bitset.
1208 (state_remove_unreachable_states): Use bitset.
1209
5a43d418
JD
12102007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 * src/Makefile.am (yacc): Quote target action commands properly so
1213 that the yacc script isn't corrupt. Reported by Hans Aberg at
1214 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1215
0c650a20
JD
1216 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1217 the case of pure parsers. Reported by Frans Englich at
1218 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1219 * THANKS: Add Frans Englich.
1220
61fee93e
JD
1221 * NEWS (2.3a+): In the %code entry, reference section `Bison
1222 Declaration Summary' from the manual now since the %code summary has
1223 moved there.
1224 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1225 in the rules section must be terminated by semicolons.
1226
f124d423
JD
12272007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1228
1229 Extend the front-end API for %define variables to more completely
1230 mirror the back-end. This will be useful in the future.
1231 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1232 Update comments to mention the new front-end counterparts of these
1233 macros.
1234 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1235 for muscle_string_decode and muscle_location_decode.
1236 (muscle_string_decode): New static function.
1237 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1238 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1239 functions.
1240 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1241 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1242 implementation more closely.
1243 (muscle_percent_define_invalid_value): New function.
1244 * src/muscle_tab.h (muscle_percent_define_get,
1245 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1246 Prototype.
1247
75ad86ee
JD
12482007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1249
1250 * NEWS (2.3a+): Mention yesterday's state-removal change.
1251 (2.3a): Remove the %language entry, which was added after 2.3a.
1252 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1253 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1254 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1255 tests/existing.at: Update copyright date.
1256
5967f0cf
JD
12572007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1258
1259 If conflict resolution makes states unreachable, remove those states,
1260 report rules that are then unused, and don't report conflicts in those
1261 states.
1262 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1263 New global function.
1264 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1265 function.
1266 * src/main.c (main): After conflict resolution, remove the unreachable
1267 states and update all data structures that reference states by number.
1268 * src/state.c (state_new): Initialize each state's reachable member to
1269 false.
1270 (state_mark_reachable_states): New static function.
1271 (state_remove_unreachable_states): New global function.
1272 * src/state.h (struct state): Add member bool reachable.
1273 (state_remove_unreachable_states): Prototype.
1274 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1275 New test case.
1276 * tests/existing.at (GNU pic Grammar): Update test case output now that
1277 an unused rule is discovered.
1278
b09f4f48
JD
12792007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1280
1281 Minor code cleanup in parser table construction.
1282 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1283 (new_itemsets, save_reductions): Update for rename to nitemset.
1284 * src/closure.c (nritemset): Rename to...
1285 (nitemset): ... this since the "r" appears to meaningless and isn't
1286 used in the comments.
1287 (closure): Update for rename.
1288 * src/closure.h (nritemset): Update extern to...
1289 (nitemset): ... this.
1290 * src/lalr.c (LA): Fix a typo in comments.
1291 * src/print.c (print_core): Update for rename to nitemset.
1292 * src/print_graph.c (print_graph): Likewise.
1293 * src/state.h: Fix some typos in header comments.
1294
bbb44d83
PE
12952007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1296
9b33de72
PE
1297 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1298 still sticks to ASCII. Sorry!
1299
bbb44d83
PE
1300 * README-hacking: New file, taken mostly from coreutils, with changes
1301 for Bison. Contains much of the contents of:
1302 * README-cvs: Remove.
1303 * bootstrap: Sync from gnulib.
1304 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1305 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1306
29553547
JD
13072007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1308
1309 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1310 Setzer.
1311 (Java Differences): Fix some typos.
1312 * THANKS: Add Sebastian Setzer.
1313
01b477c6
PB
13142007-03-07 Paolo Bonzini <bonzini@gnu.org>
1315
730739e4
AD
1316 * data/java.m4 (b4_single_class_if): Remove.
1317 (b4_abstract_if): Look at "%define abstract".
1318 (b4_lexer_if): New.
1319 (b4_union_name): Rename...
1320 (b4_yystype): ... to this. Map to "%define stype".
1321 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1322 b4_maybe_throws): Fix quoting.
1323 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1324 * data/lalr1.java (Lexer interface): Always define.
1325 (Lexer interface within parser class): Remove.
1326 (YYLexer class): New, used when "%code lexer" is present.
1327 (constructor): When "%code lexer" is used, pass %lex-param
1328 to the lexer constructor.
1329 (yylex, yyparse): Remove %lex-param from method invocations
1330 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1331
1332 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1333 abstract". Rename "%define union_name" to "%define stype".
1334 Rename method names according to previous patch.
1335 (Java Scanner Interface): Describe "%code lexer" instead of
1336 "%pure-parser" and "%define single_class".
1337 (Java Differences): Mention "%code lexer".
1338
1339 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1340 Include scanner here, using macros from tests/local.at.
1341 (AT_DATA_CALC_Y): Remove final argument.
1342 (_AT_CHECK_JAVA_CALC): Likewise.
1343 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1344 of %locations and %error-verbose.
1345 (main): Test with and without %lex-param.
1346 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1347 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 1348
122bea3a
JMG
13492007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1350
1351 DJGPP spefic issue. Inhibit the use of disallowed characters for
1352 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1353 and concern testsuite case 46.
1354 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1355 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1356 * djgpp/config.bat: Inhibit the use of disallowed characters.
1357
9611cfa2
JD
13582007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1359
1360 Miscellaneous %define and %code cleanup.
1361 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1362 values are interpreted.
1363 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1364 documentation a little more.
1365 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1366 muscle_percent_define_insert, muscle_percent_code_grow): New
1367 functions/macros.
1368 * src/muscle_tab.h (muscle_percent_define_insert,
1369 muscle_percent_code_grow): Prototype.
1370 * src/parse-gram.y (prologue_declaration): Use
1371 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1372 %define and %code directives.
1373
1374 Make it easy to share %define boolean variables between the front-end
1375 and back-end. Though not used yet, this will be useful in the future.
1376 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1377 Bison uses of names rather than just skeleton uses of names.
1378 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1379 b4_percent_define_skeleton_variables(VARIABLE) to
1380 b4_percent_define_bison_variables(VARIABLE).
1381 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1382 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1383 b4_percent_code_bison_qualifiers(QUALIFIER).
1384 (b4_check_user_names_wrap): Update for renames.
1385 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1386 muscle_percent_define_default): New functions mimicking
1387 b4_percent_define_flag_if and b4_percent_define_default.
1388
1389 For %define variables, report locations for invalid values and
bbb44d83 1390 redefinitions.
9611cfa2
JD
1391 * data/bison.m4 (b4_percent_define_flag_if): Read
1392 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1393 value for VARIABLE.
1394 (b4_percent_define_default): Save a special location in
1395 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1396 must later be reported as invalid.
1397 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1398 functions.
1399 (muscle_percent_define_insert): Record the location of VARIABLE in
1400 muscle percent_define_loc(VARIABLE), and use it to report the previous
1401 location for a redefinition.
1402 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1403 (muscle_percent_define_default): Update like b4_percent_define_default.
1404 (muscle_grow_user_name_list): Rename to...
1405 (muscle_user_name_list_grow): ... this for consistency and use
1406 muscle_location_grow.
1407 * src/muscle_tab.h (muscle_location_grow): Prototype.
1408 * tests/input.at (%define errors): Update expected output.
1409 * tests/skeletons.at (%define boolean variables: invalid skeleton
1410 defaults): New test case.
1411
0bf92491
JD
14122007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1413
1414 * src/print.c (lookahead_set, state_default_rule): Remove.
1415 (print_reductions): Replace state_default_rule invocation with
1416 equivalent use of yydefact, which was computed in token_actions in
1417 tables.c.
1418 (print_results): Don't allocate lookahead_set.
1419
d3b12988
PB
14202007-02-27 Paolo Bonzini <bonzini@gnu.org>
1421
1422 * data/lalr1.java: Prefix all private members with yy.
1423
f57a7536
JD
14242007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1425
1426 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 1427 Sebastien Fricker at
f57a7536 1428 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 1429 * THANKS: Add Sebastien Fricker.
f57a7536
JD
1430 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1431 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1432 accept a variable number of arguments.
1433
6404a5bf
JD
14342007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1435
1436 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1437
e4e09639
JMG
14382007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1439
1440 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1441 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1442 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1443
d7e0a1a7
PE
14442007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1445
1446 Undo my 2007-02-07 change, switching back to the c-strcase module
1447 introduced in the 2007-02-03 change. Bruno Haible reported that
1448 the 2007-02-07 change would be dangerous in Turkish if we add a
1449 language whose name contains "i", since "i" is not lowercase "I"
1450 in Turkish.
1451 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1452 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1453 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1454 * m4/.cvsignore: Remove strcase.m4.
1455 * src/getargs.c: Revert 2007-02-07 change, as follows.
1456 Include c-strcase.h.
1457 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1458
deee93a1
JD
14592007-02-11 Bruno Haible <bruno@clisp.org>
1460
1461 Enable the Java related testsuite tests when the only Java compiler
1462 found is a gcj < 4.3. Discussed at
1463 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1464 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1465
574add85
JD
14662007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1467
1468 * data/Makefile.am: Update copyright date.
1469 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1470 yypstate_new returns NULL.
1471 (yypstate_new): Return NULL if malloc does.
1472 * src/reader.c (packgram): Move translation of rule actions from the
1473 beginning of packgram to...
1474 (check_and_convert_grammar): ... here right before packgram is invoked
1475 so it's easier to write more complete comments, and remove redundant
1476 code.
1477
e785ccf7
JD
14782007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1479
1480 As in semantic actions, make @$ in %initial-action, %destructor, and
1481 %printer imply %locations.
1482 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1483 scanning @$.
1484 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1485 (@$ in %initial-action implies %locations,
1486 @$ in %destructor implies %locations,
1487 @$ in %printer implies %locations): ... these new test cases.
1488
1cfe1ed7
PE
14892007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1490
1491 Undo most of the 2007-02-03 change, switching to the strcase module
1492 now that gnulib strcase has been fixed.
1493 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1494 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1495 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1496 * m4/.cvsignore: Add strcase.m4.
1497 * src/getargs.c: Revert 2007-02-03 change, as follows.
1498 Don't include c-strcase.h.
1499 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1500 strcasecmp has "unspecified behavior" outside the POSIX locale,
1501 but it works fine in practice if at least one argument is ASCII,
1502 as is the case in Bison.
1503
0049ec86
PB
15042007-02-07 Paolo Bonzini <bonzini@gnu.org>
1505
1506 * tests/java.at: Skip tests if only one of javac/java is present.
1507 Reported by Joel E. Denny.
1508 * tests/atlocal.in: Adjust copyright years.
1509
15102007-02-05 Paolo Bonzini <bonzini@gnu.org>
1511
1512 * data/lalr1.java (Stack): Work around old verifiers that disallow
1513 access to the private fields of an inner class, from the outer class.
1514 We can make Stack's fields public because user code doesn't have access
1515 to the instance of Stack used by parse(). Reported by Paul Eggert.
1516
2c2b7220
PE
15172007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1518
1519 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1520 the right spot for these files?
1521 * bootstrap.conf (gnulib_modules): Add c-strcase.
1522 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1523 c-strncasecmp.c.
1524 * src/getargs.c: Include c-strcase.h.
1525 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1526 to avoid unspecified behavior.
1527
b2b81dae
JD
15282007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1529
1530 * doc/bison.texinfo (Decl Summary): Correct typo.
1531
c1d19e10
PB
15322007-01-30 Paolo Bonzini <bonzini@gnu.org>
1533
1534 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1535 Complain if the value does not match empty, "true" or "false".
1536 * data/c++.m4: Adjust default definitions of %define variables.
1537 * data/java.m4: Adjust default definitions of %define variables.
1538 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1539 to above behavior.
1540 * tests/input.at (Boolean %define variables): Test new behavior.
1541
8405b70c
PB
15422007-01-29 Paolo Bonzini <bonzini@gnu.org>
1543
1544 * NEWS: Mention java.
1545 * TODO: Remove things that are done.
1546 * bootstrap.conf: Add javacomp-script and javaexec-script.
1547 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1548
1549 * data/Makefile.am: Add new files.
1550 * data/java-skel.m4: New.
1551 * data/java.m4: New.
1552 * data/lalr1.java: New.
1553
1554 * doc/bison.texinfo: Put "A Complete C++ Example" under
1555 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1556 under Other Languages.
1557
1558 * src/getargs.c (valid_languages): Add Java.
1559 * src/getargs.h (struct bison_language): Update size of string fields.
1560
1561 * tests/Makefile.am: Add java.at.
1562 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1563 * tests/java.at: New.
1564 * tests/testsuite.at: Include it.
1565
3eb82471
JD
15662007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1567
1568 Clean up.
1569 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1570 at_directive_argv arguments so these no longer have to be global
1571 variables. Also, update the implementation for the following changes.
1572 (fail_for_at_directive_too_many_args,
1573 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1574 (at_directive_name): Remove as at_directive_argv[0] will be used for
1575 this now.
1576 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1577 for the directive name.
1578 (at_directive_argc, at_directive_argv): Make these local within
1579 skel_lex instead of global.
1580 (INITIAL): Update directive start action for above changes.
1581 (SC_AT_DIRECTIVE_ARG): Rename to...
1582 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1583 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1584 (scan_skel): Move yylex_destroy to...
1585 (skel_scanner_free): ... here.
1586 * tests/skeletons.at (installed skeleton file name): Rename to...
1587 (installed skeleton file names): ... this.
1588
148d66d8
JD
15892007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1590
1591 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1592 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1593 Summary" not "Directives".
1594 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1595 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1596 since the former is now the more complete one.
1597 (Prologue Alternatives): Likewise and do the same for %defines.
1598 (Table of Symbols): Add summary of %code, add summary of %define, and
1599 move full %code documentation to...
1600 (Decl Summary): ... here for consistency with other entries in these
1601 sections.
1602 Move %define entry in order to keep this list alphabetized.
1603 Reword %define entry a little to put less emphasis on the skeleton
1604 concept, which most users shouldn't have to think about.
1605
665f0c24
PE
16062007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1607
1608 Adjust to recent gnulib changes.
1609 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1610 Add string.h, string_.h, unistd_.h, wchar_.h.
1611 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1612 * src/system.h: Don't include <stpcpy.h>; this is now done by
1613 <string.h>.
1614
592d0b1e
PB
16152007-01-23 Paolo Bonzini <bonzini@gnu.org>
1616
1617 Simplify implementation of unqualified %code, implement macros for
1618 uniform treatment of boolean %define flags. Document %define.
1619 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1620 b4_percent_code_ifdef): New.
1621 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1622 * data/c++.m4: Define default value for global_tokens_and_yystype.
1623 * data/glr.cc: Likewise.
1624 * data/location.cc: Use b4_percent_define_flag_if.
1625
148d66d8 1626 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
1627
1628 * src/parse-gram.y (Unqualified %code): Change muscle name to
1629 b4_percent_code().
1630 (content.opt): Default to empty.
1631
a7867f53
JD
16322007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1633
1634 Implement support for relative and absolute skeleton file names.
1635 Discussed starting at
1636 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1637 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1638 (Bison Options): Document in --skeleton entry.
1639 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1640 full_skeleton can't necessarily hold all of pkgdatadir.
1641 If the specified skeleton file name contains a `/', don't prepend
1642 pkgdatadir.
1643 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1644 file name contains a `/', prepend the grammar file directory.
1645 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1646 * skeletons.at: New file.
1647 (relative skeleton file names): New test case.
1648 (installed skeleton file names): New test case.
1649 * tests/testsuite.at: Include skeletons.at.
1650
1651 * bootstrap: Update copyright to 2007.
1652
830c9b18
PB
16532007-01-17 Paolo Bonzini <bonzini@gnu.org>
1654
1655 * bootstrap: Remove occurrences of .#bootmp from the files.
1656
a8c2e813
AD
16572007-01-17 Akim Demaille <akim@epita.fr>
1658
1659 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1660 nonterminals.
1661 Use per-type %printer.
1662
279cabb6
JD
16632007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1664
1665 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1666 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1667 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1668 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1669 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1670 tests/glr-regression.at, tests/input.at, tests/local.at,
1671 tests/output.at, tests/torture.at: Update copyright to 2007.
1672
bb32f4f2
AD
16732007-01-16 Akim Demaille <akim@epita.fr>
1674
1675 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1676 error code.
1677 (Calc++ Scanner): Exit with failure if we can't open the input
1678 file.
1679 Accept "-" standing for stdin.
1680 (Calc++ Top Level): Print the result only if the parsing was
1681 successful.
1682
7cff04b5
AD
16832007-01-16 Akim Demaille <akim@epita.fr>
1684
1685 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1686
a4e25e1d
JD
16872007-01-15 Paolo Bonzini <bonzini@gnu.org>
1688 and Joel E. Denny <jdenny@ces.clemson.edu>
1689
1690 Clean up %define and %code implementation in M4 some. Most
1691 importantly, rename all related macros to be in the b4_percent_define
1692 and b4_percent_code namespaces. Also, complete support for `.' in
1693 %define variable names and %code qualifiers.
1694 * data/bison.m4 (b4_check_user_names): Check for special
1695 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1696 m4_foreach loops.
1697 (b4_get_percent_define, b4_get_percent_code): Rename to...
1698 (b4_percent_define_get, b4_percent_code_get): ... these.
1699 Extend documentation with examples.
1700 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1701 b4_percent_define_skeleton_variables and
1702 b4_percent_code_skeleton_qualifiers.
1703 Expect any value for the %define variable `foo' to be stored in the
1704 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1705 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1706 expect any unqualified %code blocks to be stored in a macro named
1707 `b4_percent_code_unqualified'.
1708 Use m4_indir so that %define variable names and %code qualifiers can
1709 contain `.', which is allowed by the grammar parser.
1710 (b4_percent_define_default): New macro to set a default value for a
1711 %define variable.
1712 (m4_wrap): Update wrapped code, and fix some underquoting.
1713 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1714 Expect grammar uses of %define variables and %code qualifiers to be
1715 defined in b4_percent_define_user_variables and
1716 b4_percent_code_user_qualifiers.
1717 * data/c++.m4: Use b4_percent_define_default rather than
1718 m4_define_default. Fix some underquoting. Skeleton usage of %define
1719 variable define_location_comparison now implies skeleton usage of
1720 %define variable filename_type.
1721 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1722 data/push.c, data/yacc.c: Update macro names.
1723 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1724 muscle names.
1725
e37c665c
JMG
17262007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1727
1728 DJGPP specific issues.
1729
1730 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1731 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1732
7d2d521f
JD
17332007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1734
1735 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1736 run parsers in all tests so that Valgrind is invoked during
1737 maintainer-check-valgrind.
1738 (Duplicate representation of merged trees): Free all semantic values.
1739 (Duplicated user destructor for lookahead): Likewise.
1740
e0ac9b4b
JD
17412007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1742
1743 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1744 command-line prefix.
1745 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1746 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1747 miss Valgrind messages.
1748 (Exploding the Stack Size with Malloc): Likewise.
1749
78143faa
JD
17502007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1751
1752 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1753 locals. Reported by Juan Manuel Guerrero at
1754 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1755 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1756 Fix some indentation also.
1757 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1758 explaining this issue.
1759
7ecec4dd
JD
17602007-01-09 Paolo Bonzini <bonzini@gnu.org>
1761 and Joel E. Denny <jdenny@ces.clemson.edu>
1762
1763 Simplify union and prologue handling, and escape union and lex/parse
1764 params with digraphs.
1765 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1766 values to the empty string since these are no longer guaranteed
1767 initialized by the front-end.
1768 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1769 braces around b4_user_stype since this is no longer done by the
1770 front-end.
1771 * src/files.c, src/files.h (pre_prologue_obstack,
1772 post_prologue_obstack): Remove.
1773 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1774 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1775 with digraphs. This fixes lex params and parse params.
1776 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1777 * src/output.c (prepare): Remove muscle insertion of the prologues.
1778 (output): Remove freeing of pre_prologue_obstack and
1779 post_prologue_obstack.
1780 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1781 than prologue_augment for prologue parsing so you don't need prologue
1782 obstacks.
5c80250c
JD
1783 (grammar_declaration): For %union RHS, use `braceless' instead of
1784 "{...}" so that braces are already stripped and code is escaped with
1785 digraphs.
7ecec4dd
JD
1786 * src/reader.c (prologue_augment): Remove.
1787 (reader): Remove initialization of pre_prologue_obstack and
1788 post_prologue_obstack.
1789 * src/reader.h (prologue_augment): Remove.
1790
1791 * data/c.m4: Remove stray parenthesis.
1792
16dc6a9e
JD
17932007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1794
1795 Remove quotes from variables names in %define directives and from
1796 qualifiers in %code directives, and restrict the characters that are
1797 allowed in them to M4-friendly ones. For %define, continue to support
1798 the quoted form as a deprecated feature. Discussed starting at
1799 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1800 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1801 %code.
1802 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
1803 (Decl Summary): In %defines entry, update mention of `%code requires'
1804 and `%code provides'.
16dc6a9e
JD
1805 (C++ Location Values): Update %define uses.
1806 (Calc++ Parser Interface): Likewise.
1807 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 1808 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
1809 * src/parse-gram.y (prologue_declaration): For %define variables, use
1810 `variable' instead of `STRING'.
1811 (grammar_declaration): For %code qualifiers, use `ID' instead of
1812 `STRING'.
1813 (variable): New nonterminal that takes an `ID' or a `STRING'.
1814 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1815 and %define uses.
1816 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1817 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1818 (%define errors): Update %define uses.
1819
e9813cd4
JD
18202007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1821
1822 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1823 instead of muscle_insert for %define values so that M4-special
1824 characters are replaced with digraphs.
1825 * tests/input.at (%define errors): Extend to check weird values.
1826
6afc30cc
JD
18272007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1828
1829 Instead of having skeletons declare all valid %define variables and
1830 %code qualifiers, provide macros that retrieve the associated values
1831 and build these lists automatically. Thus Bison will now warn when a
1832 variable or qualifier is not used by the skeleton in the current
1833 invocation regardless of whether it might sometimes be used by that
1834 skeleton in other invocations. Also, move all %define value macros to
1835 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1836 form, which is replaced by %code.
1837 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1838 (b4_check_user_names): ... this, and change the series of valid name
1839 arguments to a single list argument for names used in the skeleton
1840 similar to the existing list argument for names used in the grammar.
1841 Warn instead of complaining.
1842 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1843 values and %code code, to format %code code properly, and to build
1844 lists of all %define variables and %code qualifiers used in the
1845 skeleton: b4_skeleton_percent_define_variables and
1846 b4_skeleton_percent_code_qualifiers.
1847 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1848 Remove, and...
1849 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1850 the skeleton names lists can finish building first. In place of
1851 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1852 expect the lists b4_user_percent_define_variables and
1853 b4_user_percent_code_qualifiers.
1854 * data/c++.m4: Where setting default values for b4_parser_class_name,
1855 b4_location_type, b4_filename_type, b4_namespace, and
1856 b4_define_location_comparison, update their names to the
1857 b4_percent_define_ namespace.
1858 * data/glr.c: Don't use b4_check_percent_define_variables and
1859 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1860 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1861 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 1862 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
1863 * data/location.cc: Use b4_get_percent_define.
1864 * data/push.c: Don't use b4_check_percent_define_variables and
1865 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1866 * data/yacc.c: Likewise, and don't call m4_exit in
1867 b4_use_push_for_pull_if or m4_wrap code will never execute.
1868 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1869 Rename to...
1870 (muscle_grow_user_name_list): ... this for consistency with the
1871 terminology used in bison.m4.
1872 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1873 %define variable names, and rename muscle used_percent_define_variables
1874 to user_percent_define_variables.
1875 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1876 user_percent_code_qualifiers.
1877 (content): Remove.
1878 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1879 {CODE} form is no longer accepted.
1880 * tests/input.at (Reject bad %code qualifiers): Rename to...
1881 (Reject unused %code qualifiers): ... this, and update test output.
1882 (%define error): Update test output.
1883
7eb8a0bc
JD
18842007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1885
1886 Check for unrecognized %define variables similar to checking for
1887 unrecognized %code qualifiers. Check for redefined %define variables.
1888 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1889 generalizes...
1890 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1891 (b4_check_percent_define_variables): New, also wraps it.
1892 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1893 variables using b4_check_percent_define_variables.
1894 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1895 all those exercised in the test suite and all those listed in the
1896 `Default values' section of c++.m4. Are there others?
1897 * data/push.c, data/yacc.c: Declare no valid %define variables.
1898 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1899 similar to muscle_find, but it works even when the muscle stores a
1900 const value.
1901 (muscle_grow_used_name_list): New function for constructing the used
1902 name list muscles that b4_check_for_unrecognized_names requires.
1903 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1904 %define'd more than once. Define the b4_used_percent_define_variables
1905 muscle with muscle_grow_used_name_list.
1906 (grammar_declaration): Abbreviate %code code with
1907 muscle_grow_used_name_list.
1908 * tests/input.at (%define errors): New.
1909
3fc65ead
JD
19102007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1911
1912 Provide warn_at, complain_at, and fatal_at function callbacks to the
1913 skeletons, and use this for %code qualifier complaints.
1914 * data/bison.m4 (b4_error_at): New, invoked by...
1915 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1916 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1917 @fatal_at(...@) directives.
1918 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1919 qualifiers in b4_used_percent_code_qualifiers and to use
1920 b4_complain_at.
1921 * src/location.c, src/location.h (boundary_set_from_string): New global
1922 function.
1923 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1924 function.
1925 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1926 to b4_used_percent_code_qualifiers.
1927 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1928 function.
1929 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1930 (lineno): Rename to...
1931 (out_lineno): ... this so I don't misunderstand it again.
1932 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1933 here; these newlines are in the input but not the output file.
1934 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1935 (at_directive_perform): ... this new static function, and add handling
1936 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1937 directives.
1938 * tests/input.at (Reject bad %code qualifiers): Update test output with
1939 locations and extend.
1940
1941 * tests/output.at (Output file name: [, Output file name: ]): Remove
1942 bogus comment about these tests failing.
1943
1c7b7e1d
JD
19442007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1945
1946 Clean up b4_check_percent_code_qualifiers a little.
1947 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1948 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1949 documentation and add examples.
1950 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1951 qualifiers here.
1952
08af01c2
JD
19532007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1954
1955 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1956 unreliable -- especially when they're hidden inside another macro.
1957 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1958 data/c.m4: Remove m4_divert(-1).
1959 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1960 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1961 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 1962 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
1963 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1964 pushed and popped by m4sugar, should be first on the stack.
1965
1966 Provide warn, complain, and fatal function callbacks to the skeletons.
1967 This provides more flexibility than m4_fatal, improves the error
1968 message format, and captures messages for translation. Discussed
1969 starting at
1970 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1971 * data/bison.m4 (b4_error): New, invoked by...
1972 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1973 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1974 directives. Because these M4 macros might be called when the current
1975 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1976 the previous removal of uses of m4_divert, which caused trouble.
1977 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1978 m4_fatal to report unrecognized %code qualifiers.
1979 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1980 push parser requests.
1981 * data/glr.c: Use b4_complain instead of m4_fatal to report
1982 non-deterministic push parser requests.
1983 Update @output usage to @output(...@) form.
1984 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1985 report missing %defines. Update @output usage to @output(...@) form.
1986 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1987 @output(...@) form.
1988 * src/main.c (main): Invoke skel_scanner_free.
1989 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1990 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1991 obstack_for_string from flex-scanner.h.
1992 (YY_DECL): Use to declare skel_lex static.
1993 (decode_at_digraphs): Remove; now handled in the new
1994 SC_AT_DIRECTIVE_ARG start condition.
1995 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1996 functions.
1997 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1998 at_directive_argv): New static globals.
1999 (INITIAL): Use fail_for_invalid_at.
2000 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2001 recognize the start of a generalized `@directive(...@)' form and
2002 start...
2003 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2004 directive args (using the new obstack_for_string), to decode the
2005 contained @ diagraphs, and to perform the directive. It recognizes
2006 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2007 @output(...@).
2008 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2009 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2010 `@,'.
2011 (scan_skel): Initialize obstack_for_string on the first call.
2012 (skel_scanner_free): New function to free obstack_for_string.
2013 * tests/input.at (Reject bad %code qualifiers): Update test output.
2014
8e0a5e9e
JD
20152007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2016
2017 Consolidate the 4 prologue alternative directives (%code, %requires,
2018 %provides, and %code-top) into a single %code directive with an
2019 optional qualifier field. Discussed at
2020 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2021 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2022 alternatives.
2023 * doc/bison.texinfo (Prologue Alternatives): Update.
2024 (Decl Summary): Update to %code "requires" and %code "provides".
2025 (Calc++ Parser): Update to %code "requires".
148d66d8 2026 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
2027 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2028 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2029 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2030 which are skeleton-specific.
2031 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2032 declare what %code qualifiers it supports and to complain if any other
2033 qualifiers were used in the grammar.
2034 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2035 and b4_user_code([b4_percent_code_provides]) in place of
2036 b4_user_requires and b4_user_provides.
2037 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2038 Add b4_user_code([b4_percent_code_top]) and
2039 b4_user_code([b4_percent_code]).
2040 Invoke b4_check_percent_code_qualifiers.
2041 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2042 PERCENT_REQUIRES): Remove.
2043 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2044 %requires. Rewrite the %code RHS as the unqualified form defining the
2045 muscle b4_percent_code. Add another RHS for the qualified %code form,
2046 which defines muscles of the form b4_percent_code_QUALIFIER and the
2047 b4_used_percent_code_qualifiers muscle.
2048 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2049 PERCENT_REQUIRES): Remove.
2050 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2051 %code "requires" and %code "provides".
2052 * tests/input.at (Reject bad %code qualifiers): New.
2053
95021767
JD
20542007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2055
2056 Use the new code_props interface for destructors and printers.
2057 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2058 printer_location members, and change the type of the destructor and
2059 printer members to code_props.
2060 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2061 symbol_printer_get, semantic_type_destructor_set,
2062 semantic_type_printer_set, default_tagged_destructor_set,
2063 default_tagless_destructor_set, default_tagged_printer_set,
2064 default_tagless_printer_set): Use code_props in arguments and return
2065 types in place of char const * and location.
2066 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2067 since the locations are now contained in the return of
2068 symbol_destructor_get and symbol_printer_get.
2069 * src/output.c (symbol_destructors_output, symbol_printers_output):
2070 Replace with...
2071 (symbol_code_props_output): ... this to eliminate duplicate code.
2072 (output_skeleton): Update to use symbol_code_props_output.
2073 * src/reader.c (symbol_should_be_used): Update use of
2074 symbol_destructor_get.
2075 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2076 Update uses of the various _destructor_set and _printer_set functions.
2077 * src/symtab.c: (default_tagged_destructor_location,
2078 default_tagless_destructor_location, default_tagged_printer_location,
2079 default_tagless_printer_location): Remove since we...
2080 (default_tagged_destructor, default_tagless_destructor,
2081 default_tagged_printer, default_tagless_printer): ... change the type
2082 of these to code_props.
2083 (symbol_new, semantic_type_new, symbol_destructor_set,
2084 semantic_type_destructor_set, symbol_destructor_get,
2085 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2086 symbol_check_alias_consistency, default_tagged_destructor_set,
2087 default_tagless_destructor_set, default_tagged_printer_set,
2088 default_tagless_printer_set): Update.
2089 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2090 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2091 code_props members.
2092 (symbol_print): Use SYMBOL_CODE_PRINT.
2093
f6857bbf
JD
20942007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2095
2096 Use the new code_props interface for rule actions.
2097 * src/symlist.h (symbol_list): Replace action, action_location, and
2098 used members with a code_props action_props member.
2099 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2100 grammar_midrule_action, grammar_current_rule_merge_set,
2101 grammar_current_rule_symbol_append, packgram): Update.
2102 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2103 * src/scan-code.l (handle_action_dollar): Update.
2104 (translate_rule_action): Remove, no longer used.
2105 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2106
7c0c6181
JD
21072007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2108
2109 Use the new code_props interface in parse-gram.y.
2110 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2111 Update all uses of translate_* functions to use the new code_props
2112 interface and to use gram_scanner_last_string_free and
2113 code_scanner_last_string_free where possible.
2114 (grammar_declaration): symbol_list_destructor_set and
2115 symbol_list_printer_set now perform the translation, so don't do it
2116 here. Use gram_scanner_last_string_free where possible.
2117 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2118 translate_code): Remove, no longer used.
2119 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2120 symbol_list_printer_set): Perform code translation here rather than
2121 depending on the caller to do so.
2122
2123 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2124 * src/scan-gram.h (gram_last_string): Remove declaration.
2125 * src/scan-gram.l (last_string): Declare it static.
2126
28e52c0d
JD
21272007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2128
2129 Encapsulate code properties and related functionality for the various
2130 destructors, printers, and actions into a code_props structure and
2131 interface. This patch merely implements code_props in scan-code.h and
2132 scan-code.l. Future patches will rewrite other modules to use it.
2133 Discussed starting at
2134 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2135 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2136 consistently initialize const structs that have an empty location
2137 field.
2138 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2139 to ensure consistency.
2140 * src/scan-code.h (code_props): New structure.
2141 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2142 function, macro, and const global variable for initializing a
2143 code_props with no code.
2144 (code_props_plain_init, code_props_symbol_action_init,
2145 code_props_rule_action_init, code_props_translate_code): The rest of
2146 the new code_props functional interface. Among other things, the init
2147 functions set the code_props kind field so that
2148 code_props_translate_code will know whether to behave like
2149 translate_symbol_action, translate_rule_action, or translate_code.
2150 These old translate functions must remain until all other modules are
2151 updated to use the new code_props interface.
2152 (code_scanner_last_string_free): New function similar to
2153 gram_scanner_last_string_free.
2154 (code_scanner_free): Add documentation.
2155 * src/scan-code.l: Implement the new interface.
2156 (code_lex): Make it static, add a code_props* argument, and remove the
2157 rule argument.
2158 (last_string): New static global similar to the one in scan-gram.l.
2159 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2160 instead of rule.
2161 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2162 code_props since Bison may one day use this information for destructors
2163 and printers.
2164 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2165 (handle_action_dollar): Use symbol_list_n_get and set used flag
2166 directly since symbol_list_n_used_set is removed.
2167 (translate_action): Add a code_props* argument and remove the rule,
2168 action, and location arguments. Pass the code_props* on to code_lex.
2169 (translate_rule_action, translate_symbol_action, translate_code):
2170 Rewrite as wrappers around the new code_props interface.
2171 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2172 it would eventually need to break the encapsulation of code_props.
2173
96034983
JD
21742007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2175
2176 * etc/.cvsignore: New.
2177
945e396c
JD
21782007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2179
2180 Add maintainer-push-check to run maintainer-check using push parsing in
2181 place of pull parsing where available.
2182 * Makefile.am (maintainer-push-check): New.
2183 * data/bison.m4 (b4_use_push_for_pull_if): New.
2184 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2185 appropriately based on their existing values.
2186 (yypush_parse): Don't print push-parser-specific diagnostics if push
2187 parsing is being used in place of pull parsing.
2188 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2189 push.c.
2190 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2191 variable, and insert b4_use_push_for_pull_flag into muscles.
2192 * tests/Makefile.am (maintainer-push-check): New.
2193
7d596384
JD
21942006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2195
2196 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2197 (whether successful or failed) so that yypush_parse can be invoked
2198 again to start a new parse using the same yypstate.
2199 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2200 check multiple yypull_parse invocations on the same yypstate. For pull
2201 mode, extend to check multiple yyparse invocations.
2202 (Exploding the Stack Size with Alloca): Extend to try with
2203 %push-pull-parser.
2204 (Exploding the Stack Size with Malloc): Likewise.
2205
2206 * tests/calc.at (Simple LALR Calculator): Don't specify
2207 %skeleton "push.c" since %push-pull-parser implies that now.
2208 * tests/headers.at (export YYLTYPE): Don't check for the push
2209 declarations. Otherwise, this test case can't be used to see if push
2210 mode can truly emulate pull mode.
2211 * tests/input.at (Torturing the Scanner): Likewise.
2212 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2213 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2214 AT_YACC_IF, which now includes the case of push mode since %skeleton
2215 need not be used for push mode. This will be more intuitive once
2216 push.c is renamed to yacc.c.
2217
7172e23e
JD
22182006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2219
2220 For push mode, convert yyparse from a macro to a function, invoke yylex
2221 instead of passing a yylexp argument to yypull_parse, and don't
2222 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2223 Discussed starting at
2224 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2225 * data/bison.m4 (b4_pull_if): New.
2226 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2227 * data/push.c: Improve M4 quoting a little.
2228 (b4_generate_macro_args, b4_parenthesize): Remove.
2229 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2230 any time a pull parser is requested.
2231 Don't #define this as a wrapper around yypull_parse. Instead, when
2232 both push and pull are requested, make it a function that does that
2233 same thing.
2234 (yypull_parse): If there's a b4_prefix, #define this to
2235 b4_prefix[pull_parse] when both push and pull are requested.
2236 Don't define this as a function unless both push and pull are
2237 requested.
2238 Remove the yylexp argument and hard-code yylex invocation instead.
2239 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2240 %push-parser.
2241 * src/getargs.c (pull_parser): New global initialized to true.
2242 * getargs.h (pull_parser): extern it.
2243 * src/output.c (prepare): Insert pull_flag muscle.
2244 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2245 (prologue_declaration): Set both push_parser and pull_parser = true for
2246 %push-pull-parser. Set push_parser = true and pull_parser = false for
2247 %push-parser.
2248 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2249 %push-parser since there's no backward-compatibility concern here.
2250 Scan %push-pull-parser.
2251 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2252 instead of %push-parser.
2253 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2254 prototype it in the module that calls yyparse.
2255 * tests/input.at (Torturing the Scanner): Likewise.
2256 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2257
2e7944cb
JD
22582006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2259
2260 Update etc/bench.pl. Optimize push mode a little (the yyn change
2261 deserves most of the credit).
2262 * Makefile.am (SUBDIRS): Add etc subdirectory.
2263 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2264 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2265 yytoken, yyval, and yyloc declarations to...
2266 (yyparse or yypush_parse): ... here to improve performance. For
2267 yypush_parse invocations after the first, be sure to assign yyn its old
2268 value again.
2269 (yypstate_new): Don't bother initializing the yyresult field since the
2270 initial value isn't used.
2271 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2272 remove the #define that, in push mode, set it to yyps->NAME.
2273 * etc/Makefile.am: New.
2274 * etc/bench.pl: Remove and build it instead from...
2275 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2276 "tests/bison" from the build directory by default rather than just
2277 invoking "bison" from $PATH.
2278 (calc_grammar): Update push parser code: don't declare yylval globally,
2279 don't define yyparse_wrapper, and don't #define yyparse.
2280 (bench_grammar): Update to check all working combinations of yacc.c,
2281 push.c, impure, pure, pull, and push.
2282
c3d50342
JD
22832006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2284
2285 For push mode, add pull wrappers around yypush_parse.
2286 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2287 (yypull_parse): New function wrapping yypush_parse.
2288 (yyparse): New #define wrapping yypull_parse.
2289 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2290 is declared.
2291 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2292 prototype yylex in the module that calls yyparse, and don't prototype
2293 yyparse there. Otherwise, the yyparse expansion won't compile.
2294 * tests/input.at (Torturing the Scanner): Likewise.
2295
94ebeba5
JD
22962006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2297
2298 Enable push parsers to operate in impure mode. Thus, %push-parser no
2299 longer implies %pure-parser. The point of this change is to move
2300 towards being able to test the push parser code by running the entire
2301 test suite as if %push-parser had been declared.
2302 * data/push.c (yypush_parse): For impure mode, remove the
2303 yypushed_char, yypushed_val, and yypushed_loc arguments.
2304 Instead, declare these as local variables initialized to the global
2305 yychar, yylval, and yylloc.
2306 For the first yypush_parse invocation only, restore the initial values
2307 of these global variables when it's time to read a token since they
2308 have been overwritten.
2309 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2310 %push-parser.
2311 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2312 %pure-parser along with %push-parser since this test case was designed
2313 for pure push parsers.
2314 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2315 (AT_YACC_OR_PUSH_IF): New.
2316 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2317 add a note that it's still wrong for some cases (as it has been for a
2318 while).
2319 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2320 %push-parser no longer implies %pure-parser.
2321
a0633178
JD
23222006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2323
2324 Remove some unnecessary differences between the pull parser code and
2325 the push parser code. This patch enables yynerrs in push mode.
2326 * data/push.c: Reformat M4 a little.
2327 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2328 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2329 because push mode is on. Instead, if pure mode is on, move yynerrs
2330 to...
2331 (b4_declare_parser_state_variables): ... here.
2332 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2333 to yyps->NAME so it can be used in yypush_parse.
2334 (yypush_parse): Don't omit uses of yynerrs in push mode.
2335
8646b6a3
JD
23362006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2337
2338 Fix bug such that the first pushed token's value and location are
2339 sometimes overwritten (sometimes by %initial-action) before being used.
2340 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2341 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2342 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2343 more closely mimic the pull parser logic.
2344 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2345 time to read a token, which is after any initialization of yylval and
2346 yylloc.
2347 (gottoken): Rename label to...
2348 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2349 user namespace.
2350
9baf4d74
JD
23512006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2352
2353 Rearrange initialization of the parser state variables so that the
2354 skeleton doesn't have to have a copy for pull mode and another for push
2355 mode. This patch also fixes at least a bug such that yylloc was not
2356 initialized (with b4_location_initial_line and
2357 b4_location_initial_column) upon calling yypush_parse. However, that
2358 initialization now overwrites the first token's location;
2359 %initial-action assigning @$ already did the same thing, and both bugs
2360 will be fixed in a later patch.
2361 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2362 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2363 yyss, yyvs, yyls, and yystacksize.
2364 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2365 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2366 yylsp.
2367 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2368 yyps->NAME so it can be used in yypush_parse.
2369 (yyparse or yypush_parse): For yypush_parse, don't print the
2370 "Starting parse" diagnostic for invocations after the first.
2371 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2372 yypush_parse, only do it for the first invocation.
2373 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2374 initialization to occur in yypush_parse but only on the first
2375 invocation.
2376
23522164
JD
23772006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2378
2379 * data/push.c: Add CPP guards around push parser declarations in both
2380 the header and the code file.
2381 In the code file, move the push parser declarations to the same place
2382 they appear in the header file.
2383 Clean up the M4 some, especially the inconsistent underquoting in
2384 some b4_c_function_def and b4_c_function_decl uses.
2385
bb010fe5
JD
23862006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2387
2388 Encapsulate the push parser state variables into an M4 macro so the
2389 push skeleton doesn't have to list them again for pull mode's yyparse.
2390 For push mode, remove yypush_parse's local equivalents of these
2391 variables to eliminate unnecessary copying between the two sets at
2392 run-time. This patch also fixes at least a bug related to multiple
2393 %initial-action invocations in push mode.
2394 * data/push.c (b4_declare_parser_variables): Rename to...
2395 (b4_declare_scanner_communication_variables): ... this for clarity and
2396 update both uses.
2397 (b4_declare_yyparse_variables): Remove and move its contents to the one
2398 spot where it was invoked.
2399 (b4_declare_parser_state_variables): New macro containing the parser
2400 state variables required by push mode.
2401 (struct yypstate): Replace all fields but yynew with
2402 b4_declare_parser_state_variables.
2403 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2404 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2405 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2406 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2407 parser state variable declarations with
2408 b4_declare_parser_state_variables.
2409 Don't initialize parser state variables when calling yypush_parse since
2410 yypstate_new already does that.
2411 Invoke the user's initial action only upon the first yypush_parse
2412 invocation.
2413 Remove all code that copies between the local parser state variables
2414 and the yypstate.
2415
2d212f8c
JD
24162006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2417
2418 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2419 prevent a name collision in a future patch where these names will
2420 sometimes be #define'd.
2421 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2422 since it no longer has the same name as the existing argument.
2423 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2424
e6e704dc
JD
24252006-12-19 Paolo Bonzini <bonzini@gnu.org>
2426 and Joel E. Denny <jdenny@ces.clemson.edu>
2427
2428 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2429 that the argument is case-insensitive, and there's no `=' here.
2430 For the %skeleton entry, mention that %language is better.
2431 (Bison Options): Likewise for --language and --skeleton. Move the
2432 --skeleton entry so that the `Tuning the parser' section is sorted
2433 alphabetically on long options.
2434 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2435 %language directive in detail here; cross-reference the %language
2436 documentation instead.
2437 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2438 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 2439 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
2440 * examples/extexi (normalize): Instead of replacing every %require
2441 argument with the current Bison version, just substitute for
2442 `@value{VERSION}'. This guarantees that we're testing what actually
2443 appears in the documentation.
2444 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2445 rather than `@VERSION@'.
2446
0e021770
PE
24472006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2448
fd575f05
PE
2449 * NEWS: Reword the %language news a bit, and put it earlier.
2450
0e021770
PE
2451 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2452 Rewrite to simplify the logic.
2453 (language_argmatch): Likewise.
fd575f05
PE
2454 (program_name): We now own this var.
2455 * src/getargs.h (struct bison_language): Use char[] rather than
2456 const char *.
0e021770
PE
2457
2458 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2459 Java is supported.
2460 * src/complain.c (program_name): Remove decl; no longer needed.
2461 * src/main.c (program_name): Remove; now belongs to getargs.
2462
24632006-12-18 Paolo Bonzini <bonzini@gnu.org>
2464
2465 * NEWS: Document %language.
2466
2467 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2468
2469 * data/c-skel.m4, data/c++-skel.m4: New files.
2470 * data/glr.c: Complain on push parsers.
2471
2472 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2473 over %skeleton.
148d66d8 2474 (Decl Summary): Document %language and %skeleton.
0e021770
PE
2475 (Command line): Document -L.
2476
2477 * examples/extexi: Rewrite %require directive.
2478 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2479
2480 * src/files.c (compute_exts_from_gc): Look in language structure
2481 for .y extension.
2482 (compute_file_name_parts): Check whether .tab should be added.
2483 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2484 (language, skeleton_arg, language_argmatch): New.
2485 (long_options): Add --language.
2486 (getargs): Use skeleton_arg, add -L/--language.
2487 * src/getargs.h: Include location.h.
2488 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2489 * src/output.c (prepare): Pick default skeleton from struct language.
2490 Don't dispatch C skeletons here.
2491 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2492 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2493 * src/scan-gram.l ("%language"): New rule.
2494
2495 * tests/calc.at: Test %skeleton and %language.
2496 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2497 (AT_GLR_IF): Look for %skeleton "glr.cc".
2498 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2499 (AT_YACC_IF): Reject %language.
2500
5691bf57
PE
25012006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2502
db06f0ce
PE
2503 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2504 since it wasn't used; only the typedef name 'semantic_type' is needed.
2505 Also, omit trailing white space.
2506
5691bf57
PE
2507 * bootstrap: Sync from coreutils.
2508 (gnulib_extra_files): Add build-aux/announce.gen.
2509 (slurp): Adjust .gitignore files like .cvsignore files.
2510 * build-aux/announce-gen: Remove from CVS, since bootstrap
2511 now creates this.
2512
791934e4
JD
25132006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2514
2515 Make %push-parser imply %pure-parser. This fixes several bugs; see
2516 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2517 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2518 pure_parser = true.
2519 * data/push.c: Don't bother testing b4_push_if when deciding whether
2520 to expand b4_declare_parser_variables globally.
2521 (yypush_parse): Likewise in here.
2522
2523 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2524 (yy_reduce_print): Reformat M4 for readability.
2525
ee5abb37
JD
25262006-12-15 Bob Rossi <bob@brasko.net>
2527 and Joel Denny <jdenny@ces.clemson.edu>
2528
2529 * data/push.c (yypstate): Add typedef, and update all uses of
2530 struct yypstate to just yypstate.
2531 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2532
16ca01f9
JD
25332006-12-14 Bob Rossi <bob@brasko.net>
2534
2535 * data/push.c (yypush_parse): Declare prototype regardless of
2536 %locations option.
2537
ab8e7e1a
JD
25382006-12-14 Bob Rossi <bob@brasko.net>
2539
2540 * data/push.c (yyparse): Remove the prototype and the #define when in
2541 push-parser mode.
2542
9bf32be3
JD
25432006-12-13 Bob Rossi <bob@brasko.net>
2544
2545 * data/push.c (yypstate_init): Rename to...
2546 (yypstate_new): ... this and use b4_c_function_def.
2547 (yypstate_delete): New.
2548 (yypush_parse): Change parameters yynval and yynlloc to be const.
2549 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2550 yypstate_delete functions.
2551
f02e2948
JD
25522006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2553
2554 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2555 strange test case titles. Reported by Bob Rossi.
2556
38eb7751
PE
25572006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2558
2559 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2560 of potential ambiguities in GLR grammers.
2561
bd9d212b
JD
25622006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2563
2564 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2565 `bison ', use m4_index instead of m4_substr since chopping up a string
2566 containing M4-special characters causes problems here.
2567
2568 Fix a couple of bugs related to special characters in user-specified
2569 file names, and make it easier for skeletons to compute output file
2570 names with the same file name prefix as Bison-computed output file
2571 names.
2572 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2573 b4_parser_file_name and b4_spec_defines_file instead of
2574 @output_parser_name@ and @output_header_name@, which are now redundant.
2575 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2576 b4_parser_file_name, b4_spec_defines_file, and the new
2577 @basename(FILENAME@) instead of @output_parser_name@ and
2578 @output_header_name@, which inappropriately escaped the file names as
2579 C string literals.
2580 * src/files.c (all_but_ext): Remove static qualifier.
2581 (compute_output_file_names): Move `free (all_but_ext)' to...
2582 (output_file_names_free): ... here since all_but_ext is needed later.
2583 * src/files.h (all_but_ext): Extern.
2584 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2585 exactly what MUSCLE_INSERT_STRING used to do.
2586 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2587 characters are escaped properly.
2588 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2589 all_but_ext.
2590 For pkgdatadir muscle, maintain previous functionality by using
2591 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2592 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2593 digraphs would never be expanded. Hopefully no one has M4-special
2594 characters in his Bison installation path.
2595 * src/scan-skel.l: Don't parse @output_header_name@ and
2596 @output_parser_name@ anymore since they're now redundant.
2597 In @output, use decode_at_digraphs.
2598 Parse a new @basename command that invokes last_component.
2599 (decode_at_digraphs): New.
2600 (BASE_QPUTS): Remove unused.
2601 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2602 (Output file name): New tests.
2603
3f7ca628
JD
26042006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2605
2606 Warn about output files that are generated by the skeletons and that
2607 conflict with other output files.
2608 * data/glr.c: Don't generate the header file here when glr.cc does.
2609 * src/files.c (file_names, file_names_count): New static globals.
2610 (compute_output_file_names): Invoke output_file_name_check for files
2611 not generated by the skeletons and remove existing checks.
2612 (output_file_name_check): New function that warns about conflicting
2613 output file names.
2614 (output_file_names_free): Free file_names.
2615 * src/files.h (output_file_name_check): Declare.
2616 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2617 the skeletons.
2618 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2619 (Conflicting output files): New tests.
2620
178e123e
PE
26212006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2622
2623 * doc/bison.texinfo: Fix a couple of typos.
2624
26252006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
2626
2627 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2628 Rename to...
2629 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2630 update all uses.
2631 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2632 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2633 local pv.
2634 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2635 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2636
ea17f233
JD
26372006-12-07 Bob Rossi <bob@brasko.net>
2638 and Joel Denny <jdenny@ces.clemson.edu>
2639
2640 * data/push.c (yypvarsinit): Change return type from void* to struct
2641 yypvars*. No longer cast to void* on return.
2642 (struct yypvars): Remove yylen since it need not be remembered between
2643 yypushparse invocations.
2644 (yypushparse): Don't copy between yylen and pv->yylen.
2645
55a30bda
JD
26462006-12-05 Bob Rossi <bob@brasko.net>
2647
2648 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2649 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2650 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2651 (struct yypvars): Remove b4_declare_parser_variables.
2652 (yypvarsinit): Remove init code for removed variables.
2653 (global scope): Do not declare b4_declare_parser_variables if
2654 push or pure mode.
2655 (yypushparse): Add b4_declare_parser_variables.
2656 Init new local variables, and remove init code for removed
2657 yypvars variables.
2658 (yyparse): Delete.
2659 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2660 and yyparse for other modes.
2661 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2662 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2663 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2664 (AT_PURE_LEX_IF): True if pure or push parser.
2665
85894313
JD
26662006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2667
2668 Document Yacc prologue alternatives and default %destructor's and
2669 %printer's as experimental. Don't mention Java yet. Discussed at
2670 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2671 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2672 (2.3a): Annotate this entry to say the old forms of these features were
2673 also experimental.
2674 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 2675 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
2676 of Java (we'll want this back eventually).
2677
02975b9a
JD
26782006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2679
2680 Support a file name argument to %defines. Deprecate `=' in
2681 %file-prefix, %name-prefix, and %output. Discussed at
2682 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2683 * NEWS (2.3a+): Mention.
148d66d8 2684 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
2685 form of %defines, and remove `=' from entries for %file-prefix,
2686 %name-prefix, and %output.
2687 * src/parse-gram.y (prologue_declaration): Implement.
2688 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2689 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2690 all but one occurrence of %name-prefix.
2691 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2692 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2693 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2694 occurrence of each of %file-prefix and %output. Add check for %defines
2695 with argument.
2696 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2697 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2698 Remove the `=' from %output.
2699
287b314e
JD
27002006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2701
2702 Don't escape $ in test case titles since Autoconf 2.61 now does that
2703 correctly.
2704 * tests/actions.at (Default %printer and %destructor are not for error
2705 or $undefined): Here.
2706 (Default %printer and %destructor are not for $accept): Here.
2707 * tests/input.at (Invalid $n and @n): Here.
2708
3ebecc24
JD
27092006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2710
2711 Rename <!> to <>. Discussed starting at
2712 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2713 * NEWS (2.3a+): Update.
148d66d8 2714 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
2715 Update.
2716 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2717 * src/scan-gram.l (INITIAL): Implement.
2718 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2719 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2720 comment.
2721 * tests/actions.at (Default tagless %printer and %destructor,
2722 Default tagged and per-type %printer and %destructor,
2723 Default %printer and %destructor are not for error or $undefined,
2724 Default %printer and %destructor are not for $accept,
2725 Default %printer and %destructor for mid-rule values): Update.
2726 * tests/input.at (Default %printer and %destructor redeclared,
2727 Unused values with default %destructor): Update.
2728
26b8a438
JD
27292006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2730
2731 Don't let %prec take a nonterminal.
2732 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2733 token.
2734 * tests/input.at (%prec takes a token): New test checking that %prec
2735 won't take a nonterminal.
2736
07c39ae9
JD
27372006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2738
405d53b7
JD
2739 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2740 it was double-quoted.
07c39ae9
JD
2741 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2742 grammar is maintained with Bison's highest standards.
2743 * src/getargs.c: Fix some typos in Doxygen comments.
2744
580b8926
JD
27452006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2746
2747 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2748 later. Reported by Paul Eggert in
2749 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2750 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2751 * src/scan-code.l (translate_action): Don't bother invoking
2752 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2753 (code_scanner_free): Instead of invoking
2754 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2755 which frees more.
2756 * src/scan-gram.l (gram_scanner_free): Likewise.
2757 * src/scan-skel.l (scan_skel): Likewise.
2758
4502eadc
JD
27592006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2760
2761 * src/files.c (tr): Change return type to void.
2762 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2763 has been called previously for the same key.
2764 (muscle_find): Return storage instead of value so that
2765 --enable-gcc-warnings doesn't produce warnings that the return discards
2766 const. aver that the value and storage are the same since storage
2767 could potentially be NULL when value is not.
2768 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2769 same as 0.
2770
7746c8f6
PE
27712006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2772
2773 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2774 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2775 us a slightly cleaner distribution, and also works.
2776 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2777 gnulib changes.
2778
eb095650
PE
27792006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2780 and Paul Eggert <eggert@cs.ucla.edu>
2781
2782 Don't let Bison leak memory except when it complains.
2783 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2784 (spec_defines_file, dir_prefix): Now char *, not const char *,
2785 since they are freed.
2786 * src/files.c: Likewise.
2787 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2788 Likewise.
2789 (tr): Now operates in-place. All uses changed.
2790 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2791 values.
2792 (compute_file_name_parts, compute_output_file_names): Don't store
2793 read-only data in variables that will be freed.
2794 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2795 src_extension, and header_extension.
2796 (output_file_names_free): New public function to free
2797 spec_verbose_file, spec_graph_file, spec_defines_file,
2798 parser_file_name, and dir_prefix.
2799 * src/getargs.c (getargs): Don't store read-only data in variables that
2800 will be freed.
2801 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2802 (which previously existed but was unused), and quotearg_free.
2803 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2804 * src/muscle_tab.c: Likewise.
2805 (muscle_entry): Make the value char const *,
2806 and add a new storage member that is char * and can be freed.
2807 (muscle_entry_free): New private function.
2808 (muscle_init): Use it instead of free.
2809 (muscle_insert, muscle_grow): Update and use new storage member.
2810 (muscle_code_grow): Free the string passed to muscle_grow
2811 since it's not needed anymore.
2812 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2813 add a new `char *code' member.
2814 ("{...}"): Declare semantic type as code.
2815 * src/scan-code.h (translate_rule_action):
2816 (translate_symbol_action, translate_code, translate_action): Return
2817 `char const *' rather than `char *' since external code should not free
2818 these strings.
2819 * src/scan-code.l: Likewise.
2820 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2821 which is "{...}" in the parser.
2822 * tests/Makefile.am (maintainer-check-valgrind): Set
2823 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2824 Valgrind.
2825 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2826 complain.
2827 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2828 expecting a non-zero exit status sets --leak-check=summary and
2829 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2830 this case, and we don't want to hear about it.
2831
ac564be4
PE
28322006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2833
2834 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2835 instead of from the template, to simplify configuration a bit.
2836 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2837 and m4/wint_t.m4, as they are needed with the latest gnulib.
2838
17bd8a73
JD
28392006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2840
2841 Disable unset/unused mid-rule value warnings by default, and recognize
2842 --warnings=midrule-values to enable them. Discussed starting at
2843 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2844 * NEWS (2.3a+): Mention.
2845 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2846 warnings): Add entry for midrule-values subargument.
2847 * src/reader.c (symbol_should_be_used): Don't return true just because
2848 the value is a set/used mid-rule value unless
2849 --warnings=midrule-values was specified.
2850 * tests/input.at (Unused values, Unused values before symbol
2851 declarations): Run tests with and without --warnings=midrule-values.
2852
2853 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2854 than LIST_FREE directly.
2855
89eb3c76
JD
28562006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2857
2858 Finish implementing --warnings=error, which should not be implied by
2859 --warnings=all (or by its synonyms -W and --warnings without
2860 subarguments).
2861 * src/complain.c (set_warning_issued): New function to report that
2862 warnings are being treated as errors and to record an error if so.
2863 Invoke...
2864 (warn_at, warn): ... here.
2865 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2866 "error - warnings are errors" does not appear above "all - all of the
2867 above".
2868 (getargs): For -W and --warnings without subarguments, don't let
2869 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2870 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2871
ba7560e2
JD
28722006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2873
2874 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2875 empty subargument list. For example: `bison --warnings= parser.y'.
2876
31283fc3
JD
28772006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2878
2879 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2880 the parser header file so that gcc doesn't warn.
2881
12e35840
JD
28822006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2883
2884 Split the default %destructor/%printer into two kinds: <*> and <!>.
2885 Discussed starting at
2886 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2887 * NEWS (2.3a+): Mention.
2888 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2889 previous change today related to mid-rules.
148d66d8 2890 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 2891 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
2892 (TYPE_TAG_ANY): Add as <*>.
2893 (TYPE_TAG_NONE): Add as <!>.
2894 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2895 for <*> and <!>.
2896 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2897 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2898 * src/symlist.c (symbol_list_default_new): Split into tagged and
2899 tagless versions.
2900 (symbol_list_destructor_set, symbol_list_printer_set): Split
2901 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2902 SYMLIST_DEFAULT_TAGLESS.
2903 * src/symlist.h: Update symbol_list_default*_new prototypes.
2904 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2905 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2906 * src/symtab.c (default_destructor, default_destructor_location,
2907 default_printer, default_printer_location): Split each into tagged and
2908 tagless versions.
2909 (symbol_destructor_get, symbol_destructor_location_get,
2910 symbol_printer_get, symbol_printer_location_get): Implement tagged
2911 default and tagless default cases.
2912 (default_destructor_set, default_printer_set): Split each into tagged
2913 and tagless versions.
2914 * src/symtab.h: Update prototypes.
2915 * tests/actions.at (Default %printer and %destructor): Rename to...
2916 (Default tagless %printer and %destructor): ... this, and extend.
2917 (Per-type %printer and %destructor): Rename to...
2918 (Default tagged and per-type %printer and %destructor): ... this, and
2919 extend.
2920 (Default %printer and %destructor for user-defined end token): Extend.
2921 (Default %printer and %destructor are not for error or $undefined):
2922 Update.
2923 (Default %printer and %destructor are not for $accept): Update.
2924 (Default %printer and %destructor for mid-rule values): Extend.
2925 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2926 (Unused values with default %destructor): Extend.
2927
f91b1629
JD
29282006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2929
2930 Don't apply the default %destructor/%printer to an unreferenced midrule
2931 value. Mentioned at
2932 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2933 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2934 like $@n instead of just @n so that the default %destructor/%printer
2935 logic doesn't see them as user-defined symbols.
2936 (symbol_is_dummy): Check for both forms of the name.
2937 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2938 name for which the midrule value is referenced in any action.
2939 * tests/actions.at (Default %printer and %destructor for mid-rule
2940 values): New test.
2941 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2942 for change to dummy symbol names.
2943
519d0004
JD
29442006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2945
2946 Warn about unset midrule $$ if the corresponding $n is used.
2947 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2948 $n usage.
2949 (packgram): Before invoking grammar_rule_check on any rule, make sure
2950 all actions have already been scanned in order to set `used' flags.
2951 Otherwise, checking that a midrule's $$ is set will not always work
2952 properly because the midrule check must forward-reference the midrule's
2953 parent rule.
2954 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2955 warning.
2956
a501eca9
JD
29572006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2958
2959 More improvements to the documentation of the prologue alternatives:
2960 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2961 Bison manual.
2962 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2963 some text to clarify the relative importance of the new directives and
2964 to show how these directives may be viewed as code labels.
2965
2cbe6b7f
JD
29662006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2967
2968 Similar to the recently removed %before-header, add %code-top as the
2969 alternative to the pre-prologue. Mentioned at
2970 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2971 Also, let the prologue alternatives appear in the grammar section.
2972 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2973 (prologue_declaration): Move the existing prologue alternatives to...
2974 (grammar_declaration): ... here and add %code-top.
2975 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2976
2977 Clean up and extend documentation for the prologue alternatives.
2978 * NEWS (2.3a+): Describe prologue alternatives.
2979 * doc/bison.texinfo (Prologue): Move discussion of prologue
2980 alternatives to...
2981 (Prologue Alternatives): ... this new section, and extend it to discuss
2982 all 4 directives in detail.
148d66d8
JD
2983 (Table of Symbols): Clean up discussion of prologue alternatives and
2984 add %code-top.
2cbe6b7f 2985
e557d3ea
JMG
29862006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2987
2988 DJGPP specific issues.
2989
2990 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2991 config.bat accordingly.
2992 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2993 * djgpp/config.site: Likewise.
2994
136a0f76
PB
29952006-10-16 Paolo Bonzini <bonzini@gnu.org>
2996
27bd5d67
PB
2997 Replace %*-header with %provides, %requires, %code. See discussion at
2998 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2999
136a0f76
PB
3000 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3001 (b4_user_start_header): Remove.
3002 * data/glr.c: Use new macros instead of b4_*start_header
3003 and b4_*end_header.
3004 * data/glr.cc: Likewise.
3005 * data/lalr1.cc: Likewise.
3006 * data/push.c: Likewise.
3007 * data/yacc.c: Likewise.
3008
3009 * doc/bison.texinfo: Remove %before-header, rename
3010 %{start,end,after}-header to %requires, %provides, %code.
3011
3012 * src/parse-gram.y: Likewise (also rename token names accordingly).
3013 * src/scan-gram.l: Likewise.
3014 * tests/actions.at: Likewise.
3015
10f429ef
PE
30162006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3017
3018 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3019 Problem reported by Joel E. Denny.
3020
30212006-10-14 Jim Meyering <jim@meyering.net>
3022
3023 (Sync from coreutils.)
3024 Work also when the working directory (with e.g. coreutils sources)
3025 is version controlled with git, rather than CVS.
3026 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3027 rather than CVS.
3028 In messages and comments, say e.g., "checked-out sources",
3029 rather than "CVS sources".
3030 (version_controlled_file): New function. Work for git as well as
3031 for CVS. Don't use grep's -q option.
3032 (slurp): Call it here, in place of CVS-specific code.
3033
c4bd5bf7
JD
30342006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3035
3036 Fix testsuite for ./configure --enable-gcc-warnings:
3037 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3038 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3039 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3040 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3041 * test/regression.at (Diagnostic that expects two alternatives):
3042 Likewise.
3043
46356ea4
PE
30442006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3045
231ed89a
PE
3046 * bootstrap.conf (gnulib_modules): Add config-h.
3047 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3048 worry about HAVE_CONFIG_H.
3049 * lib/abitset.c: Likewise.
3050 * lib/bitset.c: Likewise.
3051 * lib/bitset_stats.c: Likewise.
3052 * lib/bitsetv-print.c: Likewise.
3053 * lib/bitsetv.c: Likewise.
3054 * lib/ebitset.c: Likewise.
3055 * lib/get-errno.c: Likewise.
3056 * lib/lbitset.c: Likewise.
3057 * lib/subpipe.c: Likewise.
3058 * lib/timevar.c: Likewise.
3059 * lib/vbitset.c: Likewise.
3060 * lib/bitset.c: Include "bitset.h" first, to test interface.
3061 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3062 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3063 * lib/bitsetv.c: Include "bitsetv.h" first.
3064 * lib/get-errno.c: Include "get-errno.h" first.
3065 * m4/.cvsignore: Add config-h.m4.
3066 * tests/actions.at (Default %printer and %destructor for ...):
3067 Adjust expected line numbers in output to reflect removal of #if
3068 HAVE_CONFIG_H lines.
3069 * tests/glr-regression.at (Missed %merge type warnings when ...):
3070 Likewise.
3071 * tests/regression.at (Braced code in declaration in rules section):
3072 Likewise.
3073 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3074 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3075 Include <config.h> unconditionally.
3076
46356ea4
PE
3077 * bootstrap: Sync from coreutils, as follows:
3078
3079 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3080
3081 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3082 variable was sometimes used without being initialized. This
3083 messed up the installation of the INSTALL file in some cases.
3084
3085 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3086
3087 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3088 --copy. Inspired by a suggestion from Bruno Haible.
3089
3090 2006-10-03 Jim Meyering <jim@meyering.net>
3091
3092 * bootstrap: Undo last change to this file, since now gnulib-tool
3093 sticks with the automake default in generating dependencies.
3094
dd4bf078
PE
30952006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3096
cf2a5f7c
PE
3097 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3098 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3099
3100 * doc/bison.1: Add copyright notice.
3101
3102 * data/glr.c: Don't include <stdarg.h>; not used.
3103
35fe0834
PE
3104 * NEWS: The -g and --graph options now output graphs in Graphviz
3105 DOT format, not VCG format.
3106 * doc/bison.1: Likewise.
3107 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
3108 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3109 of this change in
3110 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
3111 * TODO: Remove Graphviz entry.
3112 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3113 remove vcg.c, vcg.h, vcg_defaults.h.
3114 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3115 * src/graphviz.c, src/graphviz.h: New files.
3116 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3117 * src/files.h: Make comment more generic.
3118 * src/main.c (main): Likewise.
3119 * src/print_graph.h: Likewise.
3120 * src/getargs.c (usage): Make usage description more generic.
3121 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3122 (static_graph, fgraph): Remove. All uses changed to pass
3123 arguments instead of sharing a static var.
3124 (print_core, print_actions, print_state, print_graph):
3125 Output graphviz format rather than VCG format.
3126 * tests/.cvsignore: Remove *.vcg; add *.dot.
3127 * tests/output.at: Expect *.dot files, not *.vcg files.
3128
dd4bf078
PE
3129 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3130 accommodates the 2006-10-08 change.
3131
efdd7421
PE
31322006-10-11 Bob Rossi <bob@brasko.net>
3133
3134 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3135 (b4_yyssa, b4_yyerror_range): New macros.
3136 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3137 (yypvarsinit): Remove init of removed fields.
3138 (yypushparse): Remove use of removed fields; use new macros instead.
3139
96a1981a
PE
31402006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3141
3142 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3143 in a push parser. Reindent slightly to match yacc.c better.
3144
31452006-10-11 Bob Rossi <bob@brasko.net>
3146
46356ea4
PE
3147 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3148 yymsg_alloc fields.
3149 (yypvarsinit, yypushparse): Remove init of removed fields.
3150 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 3151
c1630a8b
PE
31522006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3153
3154 * THANKS: Add Paolo Bonzini and Bob Rossi.
3155
90b9908d
PB
31562006-10-08 Paolo Bonzini <bonzini@gnu.org>
3157
3158 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3159 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3160 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3161 b4_define_user_cde and uses): Remove.
3162 (b4_comment, b4_prefix, b4_sync_start): New.
3163 * data/bison.m4: New file, with most of the content removed from c.m4.
3164 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3165 * src/output.c (output_skeleton): Pass bison.m4.
3166 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3167 only if specified.
3168
cf806753
PE
31692006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3170
3171 Fix test failure reported by Tom Lane in
3172 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3173 and try to make such failures easier to catch in the future.
3174 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3175 that's now the caller's responsibility.
3176 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3177 Set yychar = YYEOF if it's negative.
3178 * tests/actions.at (yylex): Abort if asked to read past EOF.
3179 * tests/conflicts.at (yylex): Likewise.
3180 * tests/cxx-type.at (yylex): Likewise.
3181 * tests/glr-regression.at (yylex): Likewise.
3182 * tests/input.at (yylex): Likewise.
3183 * tests/regression.at (yylex): Likewise.
3184 * tests/torture.at (yylex): Likewise.
3185
0e2f006a
PE
31862006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3187
3188 Fix problems with translating English-language diagnostics.
3189 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3190 respect to bison-runtime pot generation. The YY_ stuff
3191 wasn't being captured.
3192 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3193 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3194 * runtime-po/POTFILES.in: Add data/push.c.
3195
e3ddc1e3
PE
31962006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3197
3198 Merge bootstrap changes from coreutils.
3199
3200 2006-09-28 Jim Meyering <jim@meyering.net>
3201
3202 Automatically generated dependencies are important even
3203 when all of the sources in a directory come from gnulib.
3204 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3205 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3206
3207 2006-09-23 Jim Meyering <jim@meyering.net>
3208
3209 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3210
3211 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3212
3213 * bootstrap: Add support for --force.
3214 (usage): New function. Describe usage less tersely.
3215 (CVS_only_file): New var.
3216
01e972b3
PE
32172006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3218
3219 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3220 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3221 Adjust white space and comments to match GNU style better.
3222
c63d3e90
PE
32232006-09-20 Bob Rossi <bob@brasko.net>
3224
3225 * data/push.c (yyresult_get): Remove function.
3226 (YYPUSH_MORE): Add #define.
3227 (yypushparse): Modify return value.
3228
e70f46d1
PE
32292006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3230
3231 * stamp-h.in: Remove; no longer needed.
3232 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3233 Remove config.h, config.hin, intl (no longer created).
3234 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3235 stamp-h1.
3236
3237 Sync bootstrap from coreutils, as follows:
3238
3239 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3240
3241 * bootstrap (symlink_to_gnulib): New function.
3242 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3243 to copies-of-gnulib.
3244 (cp_mark_as_generated, slurp, gnulib_files):
3245 Avoid making a copy if it's the same as the old version.
3246 (gnulib_files): Add support for this variable (used by Bison).
3247
a92be413
PE
32482006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3249
3250 * src/getargs.c (usage): Rework to use conventions similar to
3251 coreutils, to make translation a bit easier and the code a bit
3252 smaller. Problem reported by Tim Van Holder.
3253
4f82b42a
PE
32542006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3255
3b2942e6
PE
3256 Use some of gnulib's new modules, taken from coreutils.
3257
3258 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3259 * bootstrap.conf: New file.
3260 (gnulib_modules): Add configmake, inttypes, unistd.
3261 (XGETTEXT_OPTIONS): Add complain, complain_at,
3262 fatal, fatal_at, warn, warn_at, unexpected_end.
3263 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3264 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3265 (gl_EARLY): Add.
3266 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3267 (gl_INIT): Add
3268 (GNULIB_AUTOCONF_SNIPPET): Remove.
3269 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3270 the pickiest.
3271 * lib/.cvsignore: Add inttypes_.h.
3272 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3273 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3274 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3275 no-longer-necessary initializations.
3276 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3277 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3278 use the unistd module.
3279 * src/system.h: Likewise.
3280 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3281 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3282 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3283 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3284 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3285 * src/system.h: Include inttypes.h unconditionally, now that we
3286 use the inttypes module. Don't bother to include stdint.h, since
3287 inttypes.h now does that for us.
3288 (LOCALEDIR): Remove, now that we use the configmake module.
3289 * src/getargs.c: Include configmake.h.
3290 * src/main.c: Likewise.
3291 * src/output.c: Likewise.
3292 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3293 not from $abs_top_builddir, since config.h moved.
3294
3295
4f82b42a
PE
3296 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3297 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3298
3299 * src/parse-gram.y (symbol_declaration): Don't put statements
3300 before declarations; it's not portable to C89.
3301 * src/scan-code.l (handle_action_at): Likewise.
3302
3303 * src/scan-code.l: Always initialize braces_level; the old code
3304 left it uninitialized and therefore had undefined behavior.
3305
3306 Don't attempt to redefine 'assert', since it runs afoul of
3307 systems where standard headers (mistakenly) include <assert.h>.
3308 Instead, define and use our own alternative, called 'aver'.
3309 * src/reader.c: Don't include assert.h, since we no longer
3310 use assert.
3311 * src/scan-code.l: Likewise.
3312 * src/system.h (assert): Remove, replacing with....
3313 (aver): New function, taking a bool arg. All uses changed.
3314 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3315 not merely an integer.
3316
31c10e38
PE
33172006-09-15 Bob Rossi <bob@brasko.net>
3318
3319 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3320 * data/c.m4 (YYPUSH): New.
3321 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3322 * src/getargs.c (push_parser): New var.
3323 * src/getargs.h (push_parser): New declaration.
3324 * src/output.c (prepare): Add macro insertion of `push_flag'.
3325 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3326 (prologue_declaration): Parse %push-parser.
3327 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3328 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3329 list of removed lines from the traces observed.
3330 (AT_CHECK_CALC_LALR): Added push parser tests.
3331
fa7b79c0
PE
33322006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3333
21fe08ca
PE
3334 * NEWS: Version 2.3a.
3335 * configure.ac (AC_INIT): Likewise.
3336
e8ec4d9b
PE
3337 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3338 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3339 due to header ordering dependencies. I don't know why the #define
3340 was there.
3341
fa7b79c0
PE
3342 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3343 runtime cost when YYDEBUG is not defined, and so that some tests
3344 that used to fail now work. Problem and initial suggestion by
3345 Paolo Bonzini.
3346 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3347 * data/glr.cc (b4_parser_class_name):
3348 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3349 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3350 (yydebug_) [YYDEBUG]: New member.
3351 (yycdebug_): Now defined only if YYDEBUG.
3352 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3353 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3354 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3355 if YYYDEBUG.
3356 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3357 Define only if YYDEBUG.
3358 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3359 set_debug_level.
3360 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3361 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3362 AT_CHECK_CALC_GLR_CC that are working now.
3363
4ec13d60
PE
33642006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3365
3366 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3367 We don't need them in glr.cc, and glr.c defines them.
3368 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3369 assumes that defining it to anything is the same as defining
3370 it to 1. Problem reported by Paolo Bonzini.
3371
8e1687ae
PE
33722006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3373
3374 * data/c.m4 (b4_null, b4_case): Define.
3375 * src/output.c (prepare_symbols): Use b4_null.
3376 (user_actions_output): Use b4_case.
3377
3dc5e96b
PE
33782006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3379
aef3da86
PE
3380 * data/glr.c (b4_shared_declarations): Put start-header first,
3381 before any #includes that we generate, so that feature-test
3382 macros work. Problem reported by Michael Deutschmann in
3383 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3384 * data/lalr1.cc: Likewise.
3385 * doc/bison.texinfo (Prologue): Document that feature-test macros
3386 should be defined before any Bison declarations.
3387 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3388 that depend on location.hh after, not before, Bison decls, since
3389 we now include location.hh after the first user prologue.
3390
3dc5e96b
PE
3391 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3392 Sander Brandenburg in
3393 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3394 Also, fix minor white space and comment issues.
aef3da86
PE
3395 (Prologue): Mention that it's better to define feature-test macros
3396 before Bison declarations. Problem reported by Michael Deutschmann.
3397
3398 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3399 by Jim Meyering.
3400 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3401 This adjusts to recent gnulib changes.
3dc5e96b 3402
b2a0b7ca
JD
34032006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3404
3405 Finish implementation of per-type %destructor/%printer. Discussed
3406 starting at
3407 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3408 and
3409 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3410 * NEWS (2.3+): Add a description of this feature to the default
3411 %destructor/%printer description.
3412 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3413 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3414 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3415 list node contains a semantic type.
3416 * src/symtab.c, src/symtab.h: Extend with a table that associates
3417 semantic types with their %destructor's and %printer's.
3418 (semantic_type_from_uniqstr, semantic_type_get,
3419 semantic_type_destructor_set, semantic_type_printer_set): New functions
3420 composing the public interface of that table.
3421 (symbol_destructor_get, symbol_destructor_location_get,
3422 symbol_printer_get, symbol_printer_location_get): If there's no
3423 per-symbol %destructor/%printer, look up the per-type before trying
3424 the default.
3425 * tests/actions.at (Per-type %printer and %destructor): New test case.
3426 * tests/input.at (Default %printer and %destructor redeclared):
3427 Extend to check that multiple occurrences of %symbol-default in a
3428 single %destructor/%printer declaration is an error.
3429 (Per-type %printer and %destructor redeclared, Unused values with
3430 per-type %destructor): New test cases.
3431
3be03b13
JD
34322006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3433
3434 Require default %destructor/%printer to be declared using
3435 %symbol-default instead of an empty symbol list, and start working on
3436 new per-type %destructor/%printer. Discussed at
3437 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3438 * NEWS (2.3+): Add %symbol-default to example.
3439 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 3440 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
3441 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3442 (generic_symlist, generic_symlist_item): New nonterminals for creating
3443 a list in which each item is a symbol, semantic type, or
3444 %symbol-default.
3445 (grammar_declaration): Use generic_symlist in %destructor and %printer
3446 declarations instead of symbols.1 or an empty list.
3447 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3448 for changes to symbol_list.
3449 * src/reader.c: Update for changes to symbol_list.
3450 * src/scan-code.l: Likewise.
3451 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3452 * src/symlist.c, src/symlist.h: Extend such that a list node may
3453 represent a semantic type or a %symbol-default in addition to just an
3454 ordinary symbol. Add switched functions for setting %destructor's and
3455 %printer's.
3456 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3457 %destructor/%printer declarations.
3458
3508ce36
JD
34592006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3460
3461 Whether the default %destructor/%printer applies to a particular symbol
3462 isn't a question of whether the user *declares* that symbol (in %token,
3463 for example). It's a question of whether the user by any means
3464 *defines* the symbol at all (by simply using a char token, for
3465 example). $end is defined by Bison whereas any other token with token
3466 number 0 is defined by the user. The error token is always defined by
3467 Bison regardless of whether the user declares it with %token, but we
3468 may one day let the user define error as a nonterminal instead.
3469 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3470 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3471 the meaning of "user-defined".
3472 * tests/actions.at (Default %printer and %destructor for user-declared
3473 end token): Rename to...
3474 (Default %printer and %destructor for user-defined end token): ...
3475 this.
3476
3477 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3478 computation of whether to apply the default, don't maintain a list of
3479 every Bison-defined symbol. Instead, just check for a first character
3480 of '$', which a user symbol cannot have, and check for the error token.
3481
9350499c
JD
34822006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3483
3484 Don't apply the default %destructor or %printer to the error token,
3485 $undefined, or $accept. This change fits the general rule that the
3486 default %destructor and %printer are only for user-declared symbols,
3487 and it solves several difficulties that are described in the new test
3488 cases listed below.
3489 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3490 * tests/actions.at (Default %printer and %destructor are not for error
3491 or $undefined, Default %printer and %destructor are not for $accept):
3492 New test cases.
3493
4d7370cb
JD
34942006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3495
3496 Allow %start after the first rule.
3497 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3498 when parsing the first rule.
3499 (check_and_convert_grammar): Search for it here after all grammar
3500 declarations have been parsed. Skip midrules, which have dummy LHS
3501 nonterminals.
3502 * src/symtab.c (symbol_is_dummy): New function.
3503 * src/symtab.h (symbol_is_dummy): Declare it.
3504 * tests/input.at (%start after first rule): New test.
3505
6d0ef4ec
JD
35062006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3507
3508 Redo some of the previous commit: add back the ability to use
3509 non-aliased/undeclared string literals since it might be useful to
3510 those declaring %token-table.
3511 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3512 commit: don't worry about complaints from symbols_pack.
3513 * src/symtab.c (symbol_new, symbol_class_set,
3514 symbol_check_alias_consistency): Undo changes in previous commit: count
3515 each string literal as a new symbol and token, assign it a symbol
3516 number, and don't complain about non-aliased string literals.
3517 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3518 and token counts but does still set aliased tokens to the same number,
3519 symbol_pack_processor now leaves empty slots in the symbols array.
3520 Remove those slots.
3521 * tests/regression.at (Undeclared string literal): Remove test case
3522 added in previous commit since non-aliased string literals are allowed
3523 again.
3524 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3525 remove unnecessary string literal declarations.
3526 * tests/sets.at (Firsts): Likewise.
3527
965537bc
JD
35282006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3529
3530 Don't allow an undeclared string literal, but allow a string literal to
3531 be used before its declaration.
3532 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3533 symbols_pack complained.
3534 * src/symtab.c (symbol_new): Don't count a string literal as a new
3535 symbol.
3536 (symbol_class_set): Don't count a string literal as a new token, and
3537 don't assign it a symbol number since symbol_make_alias does that.
3538 (symbol_make_alias): It's not necessary to decrement the symbol and
3539 token counts anymore. Don't assume that an alias declaration occurs
3540 before any uses of the identifier or string, and thus don't assert that
3541 one of them has the highest symbol number so far.
3542 (symbol_check_alias_consistency): Complain if there's a string literal
3543 that wasn't declared as an alias.
3544 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3545 symbol_pack asserts that every token has been assigned a symbol number
3546 although undeclared string literals have not.
3547 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 3548 string literal): New test cases.
965537bc
JD
3549 (Characters Escapes, Web2c Actions): Declare string literals as
3550 aliases.
3551 * tests/sets.at (Firsts): Likewise.
3552
47aee066
JD
35532006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3554
3555 In the grammar scanner, STRING_FINISH unclosed constructs and return
3556 them to the parser in order to improve error messages.
3557 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3558 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3559 * tests/input.at (Unclosed constructs): New test case.
3560 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3561 seen.
3562
3563 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3564 unused global.
3565
1f6b3679
JD
35662006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3567
3568 Handle string aliases for character tokens correctly.
3569 * src/symtab.c (symbol_user_token_number_set): If the token has an
3570 alias, check and set its alias's user token number instead of its own,
3571 which is set to indicate the alias. Previously, every occurrence of
3572 the character token in the grammar overwrote that alias indicator with
3573 the character code.
3574 * tests/input.at (String aliases for character tokens): New test.
3575
219741d8
JD
35762006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3577
3578 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3579
11daa4e7
PE
35802006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3581
3582 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3583 to prevent failures when building on older platforms.
3584 Check for autopoint failure.
3585 Set XGETTEXT_OPTIONS to values that check for C format strings,
3586 so that translators are warned about them (this also helps
3587 prevent core dumps).
3588
3589 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3590 function, since it simplifies our code a bit.
3591
3592 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3593 rather than -W, so we don't get bogus warnings about sign comparisons.
3594 Add -Wpointer-arith, since that warning is useful (it reports code
3595 that does not conform to C89 and that some compilers reject).
3596 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3597 since it's no longer needed.
3598
f9bfc42a
JD
35992006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3600
3601 Clean up scanners a bit.
3602 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3603 definitions so gcc won't warn when obstack_for_string is unused.
3604 * src/scan-code.l: config.h and system.h are already #include'd by
3605 scan-code-c.c, so get rid of them here.
3606 * src/scan-gram.l: Likewise.
3607 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3608 definitions rather than duplicating the rest of it.
3609 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3610
06e8700a
JD
36112006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3612
3613 Suppress signed/unsigned comparison warnings for yycheck.
3614 * data/c.m4 (b4_safest_int_type): New macro.
3615 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3616 a signed int type, cast it to b4_safest_int_type first.
3617 * data/yacc.c: Likewise.
3618 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3619 also overwritten.
3620
9c437126
PE
36212006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3622
3623 * doc/bison.texinfo: Fix some typos.
3624
284d8a13
PE
36252006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3626
3627 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3628 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3629
3630 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3631 the latest gnulib does this a different way.
3632 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3633 translation was patched, so stop omitting it.
3634
ec5479ce
JD
36352006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3636
3637 Enable declaration of default %printer/%destructor. Make the parser
3638 use these for all user-declared grammar symbols for which the user does
3639 not declare a specific %printer/%destructor. Thus, the parser uses it
3640 for token 0 if the user declares it but not if Bison generates it as
3641 $end. Discussed starting at
3642 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3643 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3644 and
3645 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3646 * NEWS (2.3+): Mention.
3647 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3648 declare a %destructor for a mid-rule's semantic value. It's just
3649 impossible to declare one specific to it.
3650 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3651 code. Describe default %destructor form.
3652 * src/parse-gram.y (grammar_declaration): Parse default
3653 %printer/%destructor declarations.
3654 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3655 and symbol_destructor_location_get rather than accessing the destructor
3656 and destructor_location members of struct symbol.
3657 (symbol_printers_output): Likewise but for %printer's.
3658 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3659 again.
3660 * src/symtab.c (default_destructor, default_destructor_location,
3661 default_printer, default_printer_location): New static global
3662 variables to record the default %destructor and %printer.
3663 (symbol_destructor_get, symbol_destructor_location_get,
3664 symbol_printer_get, symbol_printer_location_get): New functions to
3665 compute the appropriate %destructor and %printer for a symbol.
3666 (default_destructor_set, default_printer_set): New functions to set the
3667 default %destructor and %printer.
3668 * src/symtab.h: Prototype all those new functions.
3669 * tests/actions.at (Default %printer and %destructor): New test to
3670 check that the right %printer and %destructor are called, that they're
3671 not called for $end, and that $$ and @$ work correctly.
3672 (Default %printer and %destructor for user-declared end token): New
3673 test to check that the default %printer and %destructor are called for
3674 a user-declared end token.
3675 * tests/input.at (Default %printer and %destructor redeclared, Unused
3676 values with default %destructor): New tests to check related grammar
3677 warnings and errors.
3678
868d2d96
JD
36792006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3680
3681 Clean up handling of %destructor for the end token (token 0).
3682 Discussed starting at
3683 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3684 and
3685 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3686
3687 Make the skeletons consistent in how they pop the end token and invoke
3688 its %destructor.
3689 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3690 state, which has token number 0, since this would invoke the
3691 %destructor for the end token.
3692 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3693 until after shifting the end token, or else it won't be popped.
3694 * data/yacc.c (yyparse): Likewise.
3695
3696 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3697 it's the end token. Upon termination, destroy an unshifted lookahead
3698 even when it's the end token.
3699 * data/lalr1.cc (yy::parser::parse): Likewise.
3700 * data/yacc.c (yyparse): Likewise.
3701
3702 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3703 value warnings for the end token when the user gives the end token a
3704 %destructor.
3705
3706 * tests/actions.at (Printers and Destructors): Test all the above.
3707
62a9592d
PE
37082006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3709
3710 Update to latest gnulib and gettext versions.
3711 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3712 Add fopen-safer.
3713 (gnulib_files): Add m4/warning.m4. Don't worry about files
3714 overwritten by autopoint.
3715 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3716 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3717 rejects them.
3718 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3719 so that we can remove the intl files at a better time.
3720 (intl_files_to_remove): Remove aclocal.m4, since it gets
3721 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3722 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3723 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3724 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3725 Remove datarootdir hack; no longer needed.
3726 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3727 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3728 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3729 strdup.h.
3730 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3731 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3732
10d6970f
PE
37332006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3734
3735 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3736 it with --assume-autoconf='latest-stable'.
3737
50a33993
JD
37382006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3739
3740 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3741 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3742 YYSTYPE' and `{'.
3743 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3744 those from muscle_tab.c since the old ones are misleading.
3745
2ce4ed68
AD
37462006-07-13 Akim Demaille <akim@epita.fr>
3747
3748 Support %define "KEY" {VALUE}.
3749 * src/scan-code.h, src/scan-code.l (translate_action)
3750 (translate_rule_action, translate_symbol_action, translate_code):
3751 Return char *, not const char *.
3752 * src/parse-gram.y (declaration): Rename as...
3753 (prologue_declaration): this.
3754 (string_content): Remove this nonterminal, use STRING.
3755 (braceless, content, content.opt): New nonterminal.
3756 Use them.
3757 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3758 as value.
3759 * src/scan-gram.l (getargs.h): Don't include it.
3760
db7e5eb5
PE
37612006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3762
3763 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3764 rather than a for-loop that declares a local bool variable. This
3765 should work around a compatibility problem with a Cray x1e C++
3766 compiler reported by Hung Nguyen in
3767 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3768 The for-loop was introduced in the 2004-11-17 change but I don't
3769 know why it was needed.
3770
a5d80ba5
AD
37712006-07-12 Akim Demaille <akim@epita.fr>
3772
3773 * data/c.m4: Comment changes.
3774
23eb2a69
AD
37752006-07-10 Akim Demaille <akim@lrde.epita.fr>
3776
3777 * src/complain.c (error_message, ERROR_MESSAGE): New.
3778 To factor...
3779 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3780 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3781
ddc8ede1
PE
37822006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3783
3784 * NEWS: Instead of %union, you can define and use your own union type
3785 YYSTYPE if your grammar contains at least one <type> tag.
3786 Your YYSTYPE need not be a macro; it can be a typedef.
3787 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3788 (Union Decl, Decl Summary): Document this.
3789 * data/glr.c (YYSTYPE): Implement this.
3790 * data/glr.cc (YYSTYPE): Likewise.
3791 * data/lalr1.cc (YYSTYPE): Likewise.
3792 * data/yacc.c (YYSTYPE): Likewise.
3793 * src/output.c (prepare): Output tag_seen_flag.
3794 * src/parse-gram.y (declaration, grammar_declaration):
3795 Use 'union_seen' rather than 'typed' to determine whether
3796 %union has been seen, since grammars can now be typed without
3797 %union.
3798 (symbol_declaration, type.opt, symbol_def):
3799 Keep track of whether a tag has been seen.
3800 * src/reader.c (union_seen, tag_seen): New vars.
3801 (typed): remove.
3802 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3803 * src/scan-code.l (untyped_var_seen): New variable.
3804 (handle_action_dollar): Adjust to above changes.
3805 (handle_action_dollar, handle_action_at):
3806 Improve overflow checking for outlandish numbers.
3807 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3808 avoid new diagnostics generated by above changes.
3809 * tests/regression.at (YYSTYPE typedef): Add test to check
3810 for type tags without %union.
3811
3812 * src/symlist.c (symbol_list_length): Return int, not unsigned
3813 int, since callers expect int. This may need to get revisited
3814 once we have proper integer overflow checking.
3815
3816 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3817 object is now static.
3818
3819 * src/getargs.c (flags_argmatch): Return void, not int,
3820 to pacify ./configure --enable-gcc-warnings.
3821
3822 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3823 since last_string is already defined to FLEX_PREFIX (last_string).
3824
7b42569e
AD
38252006-07-09 Akim Demaille <akim@lrde.epita.fr>
3826
3827 Implement --warnings/-W.
3828 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3829 replaced by...
3830 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3831 Adjust callers.
3832 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3833 (warnings_args, warnings_types): New.
3834 (getargs, short_options, long_options): Accept -W/--warnings.
3835 Sort the options by alphabetical order, upper case letter right
3836 before its lower case.
3837
3b452f4e
JD
38382006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3839
3840 Change %merge result type clash warnings to errors. Discussed at
3841 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3842 * src/reader.c (record_merge_function_type): Use complain_at.
3843 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3844 declared later): Update test case results.
3845
b8a41559
AD
38462006-07-09 Akim Demaille <akim@lrde.epita.fr>
3847
3848 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3849 to be in alphabetical order.
3850 (trace_args): Spelling fixes.
3851
cd9e1ba2
PE
38522006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3853
3854 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3855 so they don't collide with user-defined macros.
3856 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3857 this was never guaranteed, and now that we're using gnulib stdint,
3858 which defines int_fast16_t to long int, the problem is exposed.
3859
cb48f191
PE
38602006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3861
b8445a15
PE
3862 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3863 need the full POSIX semantics (and weren't implementing them
3864 anyway).
3865
cb48f191
PE
3866 Adjust to Autoconf 2.60 and today's gnulib.
3867 * bootstrap (gnulib_modules): Add stdint.
3868 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3869 no longer copies it.
3870 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3871 since stdint needs the former and wcwidth (which is now required
3872 by mbswidth) needs the latter.
3873 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3874 work around a compatibility glitch between gettext 0.14.6 and
3875 Autoconf 2.60.
3876 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3877 Do not check for uintptr_t, since new stdint module does the right
3878 thing.
3879 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3880 Add stdint.h, stdint_.h, wcwidth.h.
3881 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3882 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3883 stdint.m4, wchar_t.m4, wcwidth.m4.
3884 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3885 usual order for ../lib/*.h files.
3886 (file_name_split): Use last_component, not base_name, to adjust
3887 to gnulib changes.
3888 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3889 for ../lib/*.h files.
3890 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3891 Define unconditionally, since we now assume the stdint module.
3892 * src/scan-skel.l: Include <dirname.h>.
3893 (BASE_QPUTS): Use last_component, not base_name.
3894 * src/system.h: Include <unlocked-io.h> in the usual order
3895 for ../lib/*.h files. Include <stdint.h> unconditionally,
3896 since we now use the stdint module.
3897 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3898 HAVE_UINTPTR_T, since we now use the stdint module.
3899 (base_name): Remove decl, since files now include <dirname.h>
3900 to get the decl.
3901
cd48d21d
AD
39022006-07-08 Akim Demaille <akim@lrde.epita.fr>
3903
3904 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3905 New, default to 1.
3906 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3907 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3908 default.
3909 * tests/calc.at: Adjust.
3910
8ec0a172
AD
39112006-07-08 Akim Demaille <akim@lrde.epita.fr>
3912
b8445a15 3913 * data/c.m4 (b4_basename): New.
8ec0a172
AD
3914 (b4_syncline): Also output the location of its invocation (from
3915 the skeleton).
3916 (b4_user_action, b4_define_user_action, b4_user_actions)
3917 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3918 (b4_user_stype): New.
3919 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3920
4a678af8
JD
39212006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3922
3923 In the grammar file, the first column is 1 not 0 on the first line as
3924 on every other line.
3925 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3926 * tests/input.at (Torturing the Scanner): Update output.
3927
3928 * src/scan-gram.l (scanner_cursor): Declare it static.
3929
dd60572a
JD
39302006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3931
3932 In warnings, say "previous declaration" rather than "first
3933 declaration".
3934 * src/symtab.c (redeclaration): Do that here.
3935 * src/reader.c (record_merge_function_type): In the case of a result
3936 type clash, report the previous declaration rather than the very first
3937 one in the grammar file.
3938 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3939 declared later): Add a third declaration to check this behavior.
3940 * tests/input.at (Incompatible Aliases): Update output.
3941
2073e1b6
AD
39422006-06-27 Akim Demaille <akim@epita.fr>
3943
3944 * doc/Doxyfile.in: New.
3945 * doc/Makefile.am: Use it.
3946 * src/lalr.h, src/symtab.h: Initial doxygenation.
3947
8ee5b538
JD
39482006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3949
3950 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
3951 declared after the %merge. This continues the effort of the previous
3952 patch.
8ee5b538
JD
3953 * src/reader.c (get_merge_function): Don't set the merger type yet.
3954 (record_merge_function_type): New function for setting the merger type
3955 and checking for clashes.
3956 (grammar_current_rule_merge_set): Set the location of the %merge for
3957 the current rule.
3958 (packgram): Invoke record_merge_function_type for each rule now that
3959 all symbol type declarations have been parsed.
3960 * src/reader.h (merger_list.type_declaration_location): New member
3961 storing the location of the first %merge from which the type for this
3962 merging function was derived.
3963 * src/symlist.h (symbol_list.merger_declaration_location): New member
3964 storing the location of a rule's %merge, if any.
3965 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3966 declared later): New test to catch the error fixed by the above patch.
3967
ffa4ba3a
JD
39682006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3969
3970 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
3971 declarations appear after the rules. Discussed at
3972 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3973 and
3974 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3975 Don't mistake the type of $$ in a midrule to be that of its parent
3976 rule's $$.
ffa4ba3a
JD
3977 * src/reader.c (grammar_current_rule_end): Don't invoke
3978 grammar_rule_check yet since not all symbol declarations may have been
3979 parsed yet.
3980 (grammar_midrule_action): Likewise.
3981 Don't record whether the midrule's $$ has been used yet since actions
3982 haven't been translated yet.
3983 Record the midrule's parent rule and its RHS index within the parent
3984 rule.
3985 (grammar_current_rule_action_append): Don't translate the action yet
3986 since not all symbol declarations may have been parsed yet and, thus,
3987 warnings about types for $$, $n, @$, and @n can't be reported yet.
3988 (packgram): Translate the action and invoke grammar_rule_check now that
3989 all symbol declarations have been parsed.
3990 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3991 after parsing the entire grammar file, the symbol list here in the case
3992 of a midrule is actually the midrule's empty RHS, so reference its
3993 parent rule's RHS where necessary.
3994 On the other hand, now that you can already know it's a midrule, you
3995 aren't forced to think $$ has the same type as its parent rule's $$.
3996 (handle_action_at): In the case of a midrule, reference the parent rule
3997 where necessary.
3998 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3999 members.
4000 (symbol_list_length): Now that this is invoked after all rules have
4001 been parsed, a NULL symbol (rather than a NULL symbol list node)
4002 terminates a rule. symbol_list_print already does this correctly.
4003 * src/symlist.h (symbol_list.midrule_parent_rule,
4004 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4005 remember their relationships with their parents.
4006 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4007 fixed by the above patch.
4008 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4009 implementing...
4010 (Unused values): ... this old test case and...
4011 (Unused values before symbol declarations): ... this new test case.
4012 This one is the same as `Unused values' except that all symbol
4013 declarations appear after the rules in order to catch the rest of the
4014 errors fixed by the above patch.
4015
e256e17f
JD
40162006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4017
300a1930
JD
4018 More cleanup.
4019 * src/reader.c (current_rule): Declare it static since it's no longer
4020 used outside this file.
4021 (grammar_current_rule_action_append): Remove redundant arguments from
4022 translate_rule_action invocation.
4023 * src/reader.h (current_rule): Remove this unused extern.
4024 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4025 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 4026
381ecb06
JD
40272006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4028
4029 Clean up yesterday's patch.
4030 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4031 to...
4032 * src/reader.c (grammar_current_rule_action_append): ... here for
4033 consistency with grammar_current_rule_symbol_append.
4034 * tests/regression.at (Braced code in declaration in rules section):
4035 Make yyerror and yylex static as usual.
4036
4210cd0b
JD
40372006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4038
4039 Fix bug that mistakes braced code in a declaration in the rules section
4040 to be a rule action. Mentioned at
4041 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4042 * src/scan-gram.l: Move midrule action detection from the start of the
4043 scanning of any braced code to...
4044 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4045 action. For readability, use $2 and @2 rather than the equivalent
4046 global variables.
4047 * tests/regression.at (Braced code in declaration in rules section):
4048 New test to catch the error fixed by the above patch.
4049
4050 Work on code readability some.
4051 * src/scan-code.l (current_rule): Get rid of this misleading and
4052 redundant declaration: it's actually extern'ed in reader.h.
4053 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4054 translate_action): Add a rule argument and use it instead of the global
4055 current_rule.
4056 (translate_rule_action): This already receives current_rule through an
4057 argument, so pass it on to translate_action instead of assigning
4058 current_rule to current_rule.
4059 (translate_symbol_action, translate_code): Pass rule = NULL to
4060 translate_action.
4061
34f98f46
JD
40622006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4063
4064 Rename %before-definitions to %start-header and %after-definitions to
4065 %end-header. Don't use these declarations to separate pre-prologue
4066 blocks from post-prologue blocks. Add new order-independent
4067 declarations %before-header and %after-header as alternatives to the
4068 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4069 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4070 * NEWS (2.3+): Update for these changes.
4071 * data/glr.c (b4_before_definitions): Update to...
4072 (b4_start_header): ... this.
4073 (b4_after_definitions): Update to...
4074 (b4_end_header): ... this.
4075 * data/glr.cc: Likewise.
4076 * data/lalr1.cc: Likewise.
4077 * data/yacc.c: Likewise.
4078 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4079 prologue blocks with %*-header declarations.
4080 (Calc++ Parser): Likewise.
91661ebb 4081 (Decl Summary): Update names.
148d66d8 4082 (Table of Symbols): Update description.
34f98f46
JD
4083 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4084 (PERCENT_END_HEADER): ... this.
4085 (PERCENT_BEFORE_DEFINITIONS): Update to...
4086 (PERCENT_START_HEADER): ... this.
4087 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4088 (declaration): Update token names and m4 macro names.
4089 When parsing %end-header and %start-header, invoke translate_code
4090 before muscle_code_grow, and no longer set global booleans to remember
4091 whether these declarations have been seen.
4092 Parse new %after-header and %before-header.
4093 * src/reader.c (before_definitions, after_definitions): Remove.
4094 (prologue_augment): Accept a new bool argument to specify whether to
4095 augment the pre-prologue or post-prologue.
4096 * src/reader.h (before_definitions, after_definitions): Remove these
4097 extern's.
4098 (prologue_augment): Add new bool argument.
4099 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4100 (PERCENT_END_HEADER): ... this.
4101 (PERCENT_BEFORE_DEFINITIONS): Update to...
4102 (PERCENT_START_HEADER): ... this.
4103 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4104 * tests/actions.at (Printers and Destructors): Update names.
4105
31b2b07e
JD
41062006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4107
4108 Add comparison operators for C++ location classes. Discussed at
4109 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4110 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4111 declaration indicating whether filename_type has an operator==. If
4112 filename_type is `std::string', it defaults to `1', `0' otherwise.
4113 * data/location.cc: Iff b4_define_location_comparison is `1', add
4114 operator== and operator!= for class position and for class location.
4115
4116 Some minor fixes.
4117 * src/scan-action.l: Remove unused file.
4118 * src/symtab.c (symbol_printer_set): Use printer_location not
4119 destructor_location.
4120 * src/symtab.h (struct symbol): Replace incorrect source comment for
4121 printer members.
4122 * tests/input.at (Incompatible Aliases): Update output with correct
4123 printer location.
4124
9bc0dd67
JD
41252006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4126
4127 Don't put the pre-prologue in the header file. For the yacc.c code
4128 file and the glr.c header and code files, move the pre-prologue before
4129 the token definitions. Add new %before-definitions and
4130 %after-definitions to declare code that will go in both the header file
4131 and code file. Discussed at
4132 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4133 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4134 and
4135 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4136 * NEWS (2.3+): Describe these changes.
4137 * data/glr.c (b4_pre_prologue): Move from within to before...
4138 (b4_shared_declarations): ... this.
4139 Add new b4_before_definitions before b4_token_enums.
4140 Add new b4_after_definitions at the end.
4141 * data/glr.cc (b4_pre_prologue): Replace with...
4142 (b4_before_definitions): ... this in the header file.
4143 (b4_after_definitions): New near the end of the header file.
4144 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4145 code file right before including the header file.
4146 (b4_before_definitions): New in the previous position of
4147 b4_pre_prologue in the header file.
4148 (b4_after_definitions): New near the end of the header file.
4149 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4150 (b4_token_enums_defines): In the code file, move to right before
4151 YYSTYPE for consistency with the header file.
4152 (b4_before_definitions): New right before b4_token_enums_defines in
4153 both the header and code file.
4154 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4155 header and code file.
4156 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4157 of prologues for %union dependencies.
91661ebb
JD
4158 (Decl Summary): In %defines description, mention the effect of
4159 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
4160 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4161 than in the pre-prologue so that make check succeeds.
148d66d8 4162 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
4163 %after-definitions.
4164 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4165 %before-definitions.
4166 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4167 (declaration): Parse those declarations and append to
4168 b4_before_definitions and b4_after_definitions, respectively.
4169 * src/reader.c (before_definitions, after_definitions): New bools to
4170 track whether those declarations have been seen.
4171 (prologue_augment): Add to the post-prologue if %union,
4172 %before-definitions, or %after-definitions has been seen.
4173 * src/reader.h (before_definitions, after_definitions): New extern's.
4174 * src/scan-gram.l: Scan the new declarations.
4175 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4176 prologue block in a %before-definitions or a %after-definitions based
4177 on whether the %union is declared.
4178 * tests/regression.at (Early token definitions with --yacc, Early token
4179 definitions without --yacc): Move tests for token definitions into the
4180 post-prologue since token names are no longer defined in the
4181 pre-prologue.
4182
203b9274
AD
41832006-06-20 Akim Demaille <akim@epita.fr>
4184
4185 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4186 (symbol_get): Use it.
4187 * src/parse-gram.y: Use it.
4188
a7ee59cf
JD
41892006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4190
4191 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4192 build succeeds when configured with --enable-gcc-warnings.
4193
5a2baae7
PE
41942006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4195
33ad1a9c
PE
4196 * src/parse-gram.y (char_name): New function.
4197 (CHAR, STRING, string_content): For %printer, properly escape.
4198 (ID): Prefer fputs to fprintf.
4199 (id): Reindent to be consistent with other rules.
4200 Properly quote char.
4201
5a2baae7
PE
4202 The Translation Project changed its way of publishing translations
4203 to maintainers. I haven't received any responses to my request
4204 for supporting the old way, or for documenting the new way. I
4205 have modified 'bootstrap' to use screen scraping
4206 (in this case, HTML scraping). This is unreliable and inelegant,
4207 but I don't see any better way. Yuck.
4208 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4209 (get_translations): New function, which uses HTML scraping to
4210 deduce locations of latest translations.
4211 Use this function to grab both bison and bison-runtime .po files.
4212 Don't bother priming the pump for the runtime-po domain any more,
4213 as it's now translated better than bison is.
4214
58d7a1a1
AD
42152006-06-19 Akim Demaille <akim@epita.fr>
4216
4217 * src/scan-gram.l: No longer "parse" things after `%union' until
4218 `{'. Rather, return a single "%union" token.
4219 No longer make symbols: return strings, and leave the conversion
4220 to symbols to the parser.
4221 (SC_PRE_CODE, token_type): Remove.
4222 * src/parse-gram.y (%union): New field `character'.
4223 Sort tokens.
4224 (CHAR): New token.
4225 (ID, ID_COLON): Now that the scanner no longer makes them
4226 identifiers, adjust all uses to invoke symbol_get.
4227 (id_colon): New, wraps the conversion from string to symbol.
4228 (%union): Accept a possible union_name.
4229 (symbol): Now can be a char.
4230 * data/c.m4 (b4_union_name): Leave a default value.
4231 * data/glr.c, data/yacc.c: Use it.
4232
b931235e
JD
42332006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4234
4235 For associating token numbers with token names for "yacc.c", don't use
4236 #define statements unless `--yacc' is specified; always use enum
4237 yytokentype. Most important discussions start at:
4238 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4239 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4240 and
4241 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4242 * NEWS (2.3+): Mention.
4243 * data/c.m4 (b4_yacc_if): New.
4244 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4245 token #define's.
4246 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4247 on token name definitions.
4248 * src/getargs.c (usage): Capitalize `Yacc' in English.
4249 * src/output.c (prepare): Define b4_yacc_flag.
4250 * tests/regression.at (Early token definitions): Test that tokens names
4251 are defined before the pre-prologue not just before the post-prologue.
4252 Remove this test case and copy to...
4253 (Early token definitions with --yacc): ... this to test #define's.
4254 (Early token definitions without --yacc): ... and this to test enums.
4255
9e6e7ed2
PE
42562006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4257
4258 * NEWS: Reword the post-2.3 change to not be so optimistic about
4259 removing the old "look-ahead" spelling.
4260 Update previous look-ahead/lookahead change reports.
4261 * REFERENCES: look-ahead -> lookahead (since that's
4262 what he actually wrote).
4263 * doc/refcard.tex: look ahead -> lookahead,
4264 look-ahead -> lookahead
4265
742e4900
JD
42662006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4267
4268 For consistency, use `lookahead' instead of `look-ahead' or
4269 `look_ahead'. Discussed starting at
4270 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4271 and then at
4272 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4273 * NEWS: For the next release, note the change to `--report'.
4274 * TODO, doc/bison.1: Update English.
4275 * doc/bison.texinfo: Update English.
4276 (Understanding Your Parser, Bison Options): Document as
4277 `--report=lookahead' rather than `--report=look-ahead'.
4278 * src/conflicts.c: Update English in comments.
4279 (lookahead_set): Rename from look_ahead_set.
4280 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4281 (resolve_sr_conflict): Rename local look_ahead_tokens to
4282 lookahead_tokens, and update other uses.
4283 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4284 count_rr_conflicts, conflicts_free): Update uses.
4285 * src/getargs.c (report_args): Move "lookahead" before alternate
4286 spellings.
4287 (report_types): Update uses.
4288 (usage): For `--report' usage description, state `lookahead' spelling
4289 rather than `look-ahead'.
4290 * src/getargs.h (report.report_lookahead_tokens): Rename from
4291 report_look_ahead_tokens.
4292 * src/lalr.c: Update English in comments.
4293 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4294 (state_lookahead_tokens_count): Rename from
4295 state_look_ahead_tokens_count.
4296 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4297 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4298 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4299 Update other uses.
4300 Update English in output.
4301 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4302 * src/print.c: Update English in comments.
4303 (lookahead_set): Rename from look_ahead_set.
4304 (print_reduction): Rename argument lookahead_token from
4305 look_ahead_token.
4306 (print_core, state_default_rule, print_reductions, print_results):
4307 Update uses.
4308 * src/print_graph.c: Update English in comments.
4309 (print_core): Update uses.
4310 * src/state.c: Update English in comments.
4311 (reductions_new): Update uses.
4312 (state_rule_lookahead_tokens_print): Rename from
4313 state_rule_look_ahead_tokens_print, and update other uses.
4314 * src/state.h: Update English in comments.
4315 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4316 (state_rule_lookahead_tokens_print): Rename from
4317 state_rule_look_ahead_tokens_print.
4318 * src/tables.c: Update English in comments.
4319 (conflict_row, action_row): Update uses.
4320 * tests/glr-regression.at
4321 (Incorrect lookahead during deterministic GLR,
4322 Incorrect lookahead during nondeterministic GLR): Rename
4323 print_look_ahead to print_lookahead.
4324 * tests/torture.at: Update English in comments.
4325 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4326 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4327 (Many lookahead tokens): Update uses.
4328 * data/glr.c: Update English in comments.
4329 * lalr1.cc: Likewise.
4330 * yacc.c: Likewise.
4331 * src/conflicts.h: Likewise.
4332 * src/lalr.h: Likewise.
4333 * src/main.c: Likewise.
4334 * src/output.c: Likewise.
4335 * src/parse-gram.c: Likewise.
4336 * src/tables.h: Likewise.
4337 * tests/calc.at: Likewise.
4338
3c40d0b5
JD
43392006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4340
4341 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4342
5d278082
PE
43432006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4344
4345 * TODO: Add request from Nelson H. F. Beebe to be able to install
4346 Bison without installing the yacc script.
4347
9e668899
JD
43482006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4349
4350 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4351 and yytext if they're already #define'd.
4352 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4353 * src/scan-code-c.c: ... here.
4354 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4355 <config.h>.
4356
0c8e079f
JD
43572006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4358
4359 Get Bison to build again when configured with --enable-gcc-warnings.
4360 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4361 missing #include's.
4362 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4363 loc argument as it shadows a global.
4364 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4365 invocation.
4366
4367 * src/.cvsignore: Add scan-code.c.
4368
2346344a
AD
43692006-06-07 Akim Demaille <akim@epita.fr>
4370
4371 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4372 to...
4373 * src/scan-code.l: here.
4374 * tests/input.at (Torturing the Scanner): Fix another location
4375 error.
4376
4862bdfd
AD
43772006-06-07 Akim Demaille <akim@epita.fr>
4378
4379 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4380
e9071366
AD
43812006-06-06 Akim Demaille <akim@epita.fr>
4382
4383 Extract the parsing of user actions from the grammar scanner.
4384 As a consequence, the relation between the grammar scanner and
4385 parser is much simpler. We can also split "composite tokens" back
4386 into simple tokens.
4387 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4388 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4389 rename as...
4390 * src/location.h, src/location.c (add_column_width)
4391 (location_compute): these.
4392 Fix the column count: the initial column is 0.
4393 (location_print): Be robust to ending column being 0.
4394 * src/location.h (boundary_set): New.
4395 * src/main.c: Adjust to scanner_free being renamed as
4396 gram_scanner_free.
4397 * src/output.c: Include scan-code.h.
4398 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4399 Use boundary_set.
4400 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4401 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4402 which is now, again, a separate token.
4403 Adjust all dependencies.
4404 Whereever actions with $ and @ are used, use translate_code.
4405 (action): Remove this nonterminal which is now useless.
4406 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4407 (grammar_current_rule_action_append): Use translate_code.
4408 (packgram): Bound check ruleno, itemno, and rule_length.
4409 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4410 (last_string, last_braced_code_loc, max_left_semantic_context)
4411 (scanner_initialize, scanner_free, scanner_last_string_free)
4412 (gram_out, gram_lineno, YY_DECL_): Move to...
4413 * src/scan-gram.h: this new file.
4414 (YY_DECL): Rename as...
4415 (GRAM_DECL): this.
4416 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4417 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4418 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4419 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4420 Move these declarations, and...
4421 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4422 these to...
4423 * src/flex-scanner.h: this new file.
4424 * src/scan-gram.l (rule_length, rule_length_overflow)
4425 (increment_rule_length): Remove.
4426 (last_braced_code_loc): Rename as...
4427 (gram_last_braced_code_loc): this.
4428 Adjust to the changes of the parser.
4429 Move all the handling of $ and @ into...
4430 * src/scan-code.l: here.
4431 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4432 (handle_action_dollar, handle_action_at): Move to...
4433 * src/scan-code.l: here.
4434 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4435 scan-code.h, scan-code-c.c, scan-gram.h.
4436 (EXTRA_bison_SOURCES): Add scan-code.l.
4437 (BUILT_SOURCES): Add scan-code.c.
4438 (yacc): Be robust to white spaces.
4439
4440 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4441 * tests/regression.at: Adjust the column numbers.
4442 * tests/regression.at: Adjust the error message.
7891a7c4 4443
184e42f0
JD
44442006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4445
4446 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4447 Use Akim's wording from
4448 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4449
7891a7c4
JD
44502006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4451
4452 Between Bison releases, manually append `+' to the previous Bison
4453 release number, and use that as a signal to automatically print the
4454 ChangeLog's CVS Id keyword from --version. Discussed starting at
4455 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4456 * ChangeLog: Add Id header.
4457 * configure.ac (AC_INIT): Append `+' to `2.3'.
4458 * src/.cvsignore: Add revision.c.
4459 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4460 (BUILT_SOURCES): Add revision.c.
4461 (revision.c): New target rule. This file defines a new global variable
4462 named revision. It initializes it with either the Id from ChangeLog
4463 or, if VERSION doesn't contain `+', with the empty string.
4464 * src/getargs.c (version): Print the value of revision.
4465 * src/revision.h: Extern revision.
4466
4ad3ed84
PE
44672006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4468
4469 * NEWS: Version 2.3.
4470 * configure.ac (AC_INIT): Likewise.
4471
02103984
PE
44722006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4473
4474 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4475 with no arguments, not as an object-like macro. This is for
4476 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4477 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4478 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4479 Document this.
4480
2c08afa5
JD
44812006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4482
4483 * src/getargs.c (usage): Back out yesterday's modification of the
4484 --help output so that we don't have to wait for translation before
4485 releasing 2.3.
4486
6077da58
PE
44872006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4488
4489 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4490 Problem reported by Akim Demaille.
4491
2a26b6c2
JD
44922006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4493
4494 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4495
aefef0d6
PE
44962006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4497
4498 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4499 generated source code. Problem reported by Frans Englich in
4500 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4501
fcd8e201
PE
45022006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4503
4504 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4505 shell, not within 'make', so that 'make' by an ordinary builder
4506 (using GNU make) does not worry about configuring gzip. This also
4507 works around a bug reported independently by Keith Thompson and by
4508 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4509 stderr rather than stdout, messing up the build logs.
4510
7b5cdcbd
JD
45112006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4512
4513 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4514 to make sure that YYID will never be unused. This fixes a 'make
4515 maintainer-check' failure caused by the recent changes to the 'Trivial
4516 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4517 not used.
4518 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4519
5ad0a449
JD
45202006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4521
4522 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4523 state before an empty RHS is always resolved here. Only the location
4524 of that state is guaranteed to be resolved, and that's enough. This
4525 fixes the remaining bug reported by Derek M. Jones in
4526 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4527 * tests/glr-regression.at (Uninitialized location when reporting
4528 ambiguity): Test the above case.
4529 Also, the embedded comments in this test case claim it checks the case
4530 of an empty RHS that has inherited the initial location. However, the
4531 corresponding LHS was already resolved, so yyresolveLocations didn't
4532 actually have reason to modify it. Fix this by forcing
4533 nondeterministic operation at the beginning of the parse.
4534
50cce58e
PE
45352006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4536
4537 * data/c.m4 (b4_yy_symbol_print_generate):
4538 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4539 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4540 of the bugs reported today by Derek M Jones in
4541 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4542 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4543 defined to be a type name without parens or brackets.
4544 (Location Type): Similarly for YYLTYPE.
4545 * tests/regression.at (Trivial grammars): Put in a test for this
4546 bug that will be caught by 'make maintainer-check' (though not,
4547 alas, by 'make check' unless your compiler is picky).
4548
ab8d9dc5
PE
45492006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4550
0d2c8934 4551 * NEWS: Version 2.2.
ab8d9dc5
PE
4552 * configure.ac (AC_INIT): Likewise.
4553
9138c575
JD
45542006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4555
4556 * data/glr.c (yyreportTree): Make room in yystates for the state
4557 preceding the RHS. This fixes the segmentation fault reported by Derek
4558 M. Jones in
4559 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4560 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4561 to the user. Reported for yyreportTree by Derek M. Jones later in the
4562 same thread.
4563 * THANKS: Add Derek M. Jones.
4564 Update my email address.
4565 Fix typo in Steve Murphy's name.
4566
276f48df
PE
45672006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4568
d6645148
PE
4569 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4570 checking against YYLAST that caused the parser to miss a potential
4571 alternative in its diagnostic.
4572 Problem reported by Maria Jose Moron Fernandez in
4573 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4574 * data/lalr1.cc (yysyntax_error_): Likewise.
4575 * data/yacc.c (yysyntax_error): Likewise.
4576 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4577 tokens, in case we run into an older C compiler.
4578 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4579 Use them to check for the off-by-one error fixed above.
4580
276f48df
PE
4581 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4582 YYSIZE_T, not size_t.
4583 * tests/regression.at (Trivial grammars): New test, to catch
4584 the error fixed by the above patch.
4585
cd8b5791
AD
45862006-05-14 Akim Demaille <akim@lrde.epita.fr>
4587
4588 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4589 scheme.
4590 Reported by Steve Murphy.
4591
34376418
AD
45922006-05-14 Akim Demaille <akim@lrde.epita.fr>
4593
4594 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4595 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4596
327afc7c
AD
45972006-05-14 Akim Demaille <akim@lrde.epita.fr>
4598
4599 Implement --trace=m4.
4600 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4601 * src/output.c (output_skeleton): When set, pass -dV to m4.
4602
4603 Factor the handling of flags in m4.
4604 * src/output.c (prepare): Rename the muscle names debug, defines,
4605 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4606 * data/c.m4: Adjust.
4607 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4608 Use b4_define_flag_if to define other b4_FLAG_if macros.
4609 (b4_location_if): As a consequence, rename as...
4610 (b4_locations_if): this, for consistency.
4611 Adjust all the skeletons.
4612
ba9ecd19
AD
46132006-05-14 Akim Demaille <akim@lrde.epita.fr>
4614
4615 * etc/bench.pm: Shorten bench names.
4616
4e83ea15
AD
46172006-05-14 Akim Demaille <akim@lrde.epita.fr>
4618
4619 * src/output.h, src/output.c (error_verbose): Move to...
4620 * src/getargs.h, src/getargs.c: here.
4621 Sort the flags.
4622 Adjust dependencies.
4623
6e93d810
PE
46242006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4625
4626 * data/c.m4 (b4_copyright): Put the special exception for Bison
4627 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
4628 uses changed. Suggested by Akim Demaille. Also, wrap the
4629 copyright notice, in case it is longer than 80 columns. Replace
4630 comma by newline after title.
6e93d810 4631
eaea13f5
PE
46322006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4633
4634 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4635 incompatibility, not a bug. Mention that it wasn't fixed as of
4636 flex 2.5.33.
4637
3cf084ec
AD
46382006-05-11 Akim Demaille <akim@lrde.epita.fr>
4639
4640 * examples/extexi: Enforce the precedence of concatenation over
4641 >>.
0a9f1c7d 4642 Reported by Tommy Nordgren.
3cf084ec 4643
32c96bd7
AD
46442006-05-11 Akim Demaille <akim@lrde.epita.fr>
4645
4646 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4647 with the member "token".
f94705b2 4648 Reported by Martin Nylin.
32c96bd7 4649
eaea13f5
PE
46502006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4651
4652 * data/glr.c: Switch to Bison 2.2 special-exception language in
4653 the copyright notice. Use more-regular format for titles and
4654 copyright notices.
4655 * data/glr.cc: Likewise.
4656 * data/location.cc: Likewise.
4657 * data/yacc.cc: Likewise.
4658 * doc/bison.texinfo (Conditions): Document this.
4659 * NEWS: likewise. Upgrade version to 2.2.
4660
6e2d1146
AD
46612006-04-27 Akim Demaille <akim@lrde.epita.fr>
4662
4663 * data/glr.cc: Remove dead code.
4664
47671055
PE
46652006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4666
4667 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4668 that variable and the line breaks the bootstrap. Problem reported
4669 by Juan M. Guerrero.
4670
ed2e6384
AD
46712006-04-24 Akim Demaille <akim@lrde.epita.fr>
4672
4673 * doc/bison.texinfo (Multiple start-symbols): New.
4674
3cedc2dc
AD
46752006-04-24 Akim Demaille <akim@lrde.epita.fr>
4676
4677 * etc/README, etc/bench.pl: New.
4678
b2ddc3f3
AD
46792006-04-03 Akim Demaille <akim@lrde.epita.fr>
4680
4681 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4682 rule.
4683 Reported by Mickael Labau.
4684 * tests/input.at (Torturing the Scanner): Test it.
4685
91e3ac9a
PE
46862006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4687
4688 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4689 Problem reported by Bob Rossi.
4690
46912006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4692
4693 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4694 and didn't really work.
4695 For the index, use @ifnotinfo, not @iftex.
4696 Minor cleanups of spacing and terminology.
4697
5cf61e93
AD
46982006-03-12 Akim Demaille <akim@lrde.epita.fr>
4699
4700 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4701 of AT_NAME_PREFIX when %name-prefix is not used.
4702
aa08666d
AD
47032006-03-12 Akim Demaille <akim@lrde.epita.fr>
4704
4705 Apply --prefix to C++ skeletons too: they change the namespace.
4706 The test suite already exercize these cases.
4707 * data/c++.m4 (b4_namespace): New.
4708 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4709 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4710 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4711 * doc/bison.texinfo: Document it.
4712 (Option Cross Key): Use @multitable in all formats. It looks
4713 nicer, even in TeX outputs.
4714 (Rules): Use the same code whatever the output type is.
4715 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4716 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4717 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 4718
45567173
AD
47192006-03-10 Akim Demaille <akim@lrde.epita.fr>
4720
4721 * TODO: Remove dead items.
4722
e9d8f881 47232006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
4724
4725 * doc/FAQ: Remove, merged into...
4726 * doc/bison.texinfo (FAQ): this.
4727 * doc/Makefile.am (EXTRA_DIST): Adjust.
4728
c095d689
AD
47292006-03-10 Akim Demaille <akim@lrde.epita.fr>
4730
4731 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4732 even if empty.
4733 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4734 * doc/bison.texinfo (Calc++ Scanner): Use it.
4735
6e0f8287
PE
47362006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4737
4738 Fix two nits reported by twlevo, plus one more that I discovered.
4739
4740 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4741 this is the usual Bison style.
4742 * src/location.h (location_print): Likewise.
4743
4744 * src/reader.h (token_name): Likewise.
4745
d6b771c3
PE
47462006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4747
4748 Fix some nits reported by twlevo.
4749 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4750 and "POSIX". Use more-modern syntax for URLs. Mention C++
4751 and ask for Java. Don't hardwire OS version numbers. Add
4752 copyright notice.
4753 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4754 * src/conflicts.c (solved_conflicts_obstack): Now static.
4755
1e137b71
JD
47562006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4757
4758 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4759 page. Say "you can use it" not "you may use it" as on the web page;
4760 we're describing capabilities not granting permission.
4761
73f2e47e
PE
47622006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4763
6d05403d
PE
4764 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4765 shadowing warnings. Use usual patter for iterating through RHS.
4766 * tests/glr-regression.at
4767 (Uninitialized location when reporting ambiguity):
4768 Modify yylex so that it uses its argument, rather than trying
4769 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4770 const char -> char const.
4771
73f2e47e
PE
4772 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4773 Don't use tabs inside commands; it messes up 'ps'.
4774 Problem reported by twlevo.
4775
8710fc41
JD
47762006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4777
4778 * tests/glr-regression.at (Uninitialized location when reporting
4779 ambiguity): New test case.
4780 * data/glr.c (yyresolveLocations): New function, which uses
4781 YYLLOC_DEFAULT.
4782 (yyresolveValue): Invoke yyresolveLocations before reporting an
4783 ambiguity.
4784 * doc/bison.texinfo (Default Action for Locations): Note
4785 YYLLOC_DEFAULT's usage for ambiguity locations.
4786 (GLR Semantic Actions): Cross-reference those notes.
4787
ae952af2
JD
47882006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4789
4790 * tests/glr-regression.at (Leaked semantic values when reporting
4791 ambiguity): Remove unnecessary union and type declarations.
4792 (Leaked lookahead after nondeterministic parse syntax error): New test
4793 case.
4794 * data/glr.c (yyparse): Check for zero stacks remaining before
4795 attempting to shift the lookahead so that you don't lose it.
4796
35ee866a
JD
47972006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4798
4799 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4800 * tests/glr-regression.at (Leaked semantic values when reporting
4801 ambiguity): New test case.
4802 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4803 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4804 now unnecessary yystackp parameter.
4805 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4806 destructors can be called.
4807
4808 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4809 in existing testcases.
4810
520181ab
JD
48112006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4812
4813 Don't leak semantic values for parent RHS when a user action cuts the
4814 parser, and clean up related code a bit.
4815 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
4816 cuts parse): Rename to...
4817 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
4818 for leaked parent RHS values.
4819 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4820 between an unresolved state (non-empty chain of semantic options) and
4821 an incomplete one (signaled by an empty chain).
ae952af2 4822 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
4823 successfully or unsuccessfully resolved yyGLRState to...
4824 (yyresolveValue): ... here so that yyresolveValue always leaves a
4825 yyGLRState with consistent data and thus is easier to understand.
4826 Remove the yyvalp and yylocp parameters since they are always just
4827 taken from the yys parameter. When reporting a discarded merged value
4828 in debugging output, note that it is incompletely merged. Document the
4829 interface.
4830 (yyresolveAction): If resolving any of the RHS states fails, destroy
4831 them all rather than leaking them. Thus, as long as user actions are
4832 written to clean up the RHS correctly, yyresolveAction always cleans up
4833 the RHS of a semantic option. Document the interface.
4834
18d9185c
PE
48352006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4836
4837 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4838 led to a segmentation fault in GNU Pascal. Problem reported
4839 by Waldek Hebisch.
4840
841a7737
JD
48412006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4842
4843 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4844 mid-rule action inside a nonterminal symbol in order to declare a
4845 destructor for its semantic value.
4846
fc3f467f
PE
48472006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4848
4849 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4850 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4851 __cplusplus && ! defined _STDLIB_H && !
4852 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4853 defined free))]: Include <stdlib.h> rather than rolling our own
4854 declarations of malloc and free, to avoid problems with
4855 incompatible declarations (using 'throw') C++'s stdlib.h. This
4856 should fix Debian bug 340012
4857 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4858 reported by Guillaume Melquiond.
4859
a3af26dd
PE
48602006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4861
4d7bc38c
PE
4862 * NEWS: Clarify symbols versus types in unused-value warnings.
4863
a3af26dd
PE
4864 * configure.ac (AC_INIT): Bump version number.
4865
4e26c69e
PE
48662006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4867
4868 * NEWS: Version 2.1a.
4869 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4870 since C99 requires this.
4871
498e897c
PE
48722006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4873
4874 * m4/c-working.m4: New file.
4875 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4876
57bb17ca
PE
48772006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4878
4879 * Makefile.maint: Merge from coreutils.
4880
0be105dc
PE
48812006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4882
4883 More portability fixes for problems summarized by Nelson H. F. Beebe.
4884
4885 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4886 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4887 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4888 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4889 messes up because C++ code is compiled in 32-bit mode but linked
4890 in 64-bit mode.
4891
6fc0c024
PE
48922006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4893
4894 More portability fixes for problems summarized by Nelson H. F. Beebe.
4895
7870f699
PE
4896 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4897 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4898
6fc0c024
PE
4899 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4900 nodist_PROGRAMS, since we don't need to actually compile the
4901 example if we're just doing a plain 'make'. This avoids bothering
4902 the installer unnecessarily about problems due to weird C++
4903 compilers.
4904
fe6c2fde
PE
49052006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4906
4907 More portability fixes for problems summarized by Nelson H. F. Beebe.
4908
4909 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4910 than #include "...", and compile with -I'.'. The old method was
4911 not portable, according to Posix and the C standard, and it does
4912 not work with Sun C 5.7, where previous #line directives affect
4913 the working directory used in later #include "..." directives.
4914
927b425b
JMG
49152006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4916
4917 Various DJGGP specific issues in /djgpp
4918
d9735e9e
PE
49192006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4920
4921 More portability fixes for problems summarized by Nelson H. F. Beebe.
4922
4923 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4924 '#include <map>' works and that you can apply ++ to iterators.
4925
5a6755af
PE
49262006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4927
67a0dc4f
PE
4928 Work around portability problems summarized by Nelson H. F. Beebe in
4929 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4930
8c86f0ef
PE
4931 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4932 that '#include <string>' works.
4933
de35dd59
PE
4934 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4935 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4936 "warning: sorry: semantics of inline function static data `const
4937 unsigned char translate_table[262]' are wrong (you'll wind up with
4938 multiple copies)".
4939
67a0dc4f
PE
4940 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4941 or, xor to not_, and_, or_, and xor_, respectively. This works
4942 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4943 random system header somewhere that includes the equivalent of
4944 <iso646.h>.
4945
5a6755af
PE
4946 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4947 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 4948 Suite Version 2.0.
5a6755af 4949
3f001415
JD
49502006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4951
4952 During deterministic GLR operation, user actions should be able to
4953 influence the parse by changing yychar. To make this easier to fix and
4954 to make glr.c easier to evolve in general, don't maintain yytoken in
4955 parallel with yychar; just compute yytoken when needed.
4956 * tests/glr-regression.at (Incorrect lookahead during deterministic
4957 GLR): Check that setting yychar in a user action has the intended
4958 effect.
4959 * data/glr.c (yyGLRStack): Remove yytokenp member.
4960 (yyclearin): Don't set *yytokenp.
4961 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4962 yychar rather than *yytokenp to determine the current lookahead.
4963 Compute yytoken locally when needed.
4964 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4965 point to.
4966
4967 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4968 after `--report' documentation.
4969
e2a8c0f5
PE
49702006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4971
4972 * src/parse-gram.y (grammar_declaration): Location of printer
4973 symbol is @1, not list->location. Bug reported by twlevo.
4974 * tests/input.at (Incompatible Aliases): Adjust to above change.
4975
6b702268
PE
49762006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4977
27622431
PE
4978 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4979 all the test at once. This makes the output easier to read in the
4980 normal case.
4981
6b702268
PE
4982 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4983 got from <http://bro-ids.org/download.html>. The bug is that
4984 when two actions appeared in succession, the second one was
4985 scanned before the first one was added to the grammar rule
4986 as a midrule action. Bison then output the incorrect warning
4987 "parse.y:905.17-906.36: warning: unused value: $3".
4988 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4989 associated with a value.
4990 (rhs): Don't invoke grammar_current_rule_action_append.
4991 (action): Invoke it here instead.
4992 * src/reader.c (grammar_midrule_action): Now extern.
4993 (grammar_current_rule_action_append): Don't invoke
4994 grammar_midrule_action; that is now the scanner's job.
4995 * src/reader.h (last_string, last_braced_code_loc):
4996 (grammar_midrule_action): New decls.
4997 * src/scan-gram.l (last_string): Now extern, sigh.
4998 (last_braced_code_loc): New extern variable.
4999 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5000 rule already has an action.
5001 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5002 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5003 Add some tests to check that the above changes fixed the bug.
5004
d40ba6c2
PE
50052006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5006
5007 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5008 All used changed. Check whether the symbol has a destructor,
5009 not whether it is typed.
5010 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5011 that the values are still reported as unused. All line numbers
5012 adjusted.
5013
401aace6
PE
50142006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5015
5016 Work around a bug in bro 0.8, which underparenthesizes its
5017 definition of YYLLOC_DEFAULT.
5018 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5019 their arguments.
5020 * data/lalr1.cc: Likewise.
5021 * data/yacc.cc: Likewise.
5022
06f01bc4
PE
50232006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5024
401aace6
PE
5025 Work around a bug in Pike 7.0, and give the Pike folks a
5026 better way to override the usual int widths.
5027 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5028 user can override the types.
5029 (short): #undef, to work around a bug in Pike 7.0.
5030 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5031 (union yyalloc.yyss): Use yytype_int16 rather than short.
5032 All uses changed.
5033 (yysigned_char): Remove.
5034 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5035 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5036 * tests/regression.at (Web2c Actions): Adjust to above changes.
5037
5038 * src/reader.c (check_and_convert_grammar): New function.
5039 (reader): Close the input file even if something went wrong during
5040 parsing. Minor file descriptor leak reported by twlevo.
5041
06f01bc4
PE
5042 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5043 to pacify gcc -Wswitch-default.
5044 * src/scan-gram.l (adjust_location): Use a default: break; case
5045 to pacify gcc -Wswitch-default.
5046 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5047 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5048 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5049 Move these decls to scan-skel.l, since they don't need to be
5050 visible elsewhere.
5051 * src/scan-skel.l: Accept the above decls.
5052 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5053 is used.
5054
02650b7f
PE
50552006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5056
5057 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5058 since we don't want to insist on a version number at the start
5059 of the changelog every time.
5060 * Makefile.maint: Sync from coreutils a bit better.
5061 (sc_trailing_blank): Renamed from sc_trailing_space.
5062 All uses changed.
5063 (sc_no_if_have_config_h, sc_require_config_h):
5064 (sc_prohibit_assert_without_use): New rules.
5065 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5066 (sc_dd_max_sym_length): Fix leading spaces in rule.
5067 (sc_system_h_headers): Prefix with @.
5068 (sc_useless_cpp_parens, m4-check): Output line numbers.
5069 (changelog-check): Allow version only in head.
5070 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5071 satisfy new Makefile.maint rule.
5072 * data/glr.c: Likewise.
5073 * data/glr.cc: Likewise.
5074 * data/lalr1.cc: Likewise.
5075 * data/yacc.c: Likewise.
5076 * lib/ebitsetv.c: Likewise.
5077 * lib/lbitset.c: Likewise.
5078 * lib/subpipe.c: Likewise.
5079 * lib/timevar.c: Likewise.
5080 * src/system.h: Likewise.
5081 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5082 * djgpp/Makefile.maint: Add copyright notice.
5083 * djgpp/README.in: Likewise.
5084 * djgpp/config.bat: Likewise.
5085 * djgpp/config.site: Likewise.
5086 * djgpp/config_h.sed: Likewise.
5087 * djgpp/djunpack.bat: Likewise.
5088 * djgpp/config.sed: Fix copyright notice to match standard format.
5089 * djgpp/subpipe.h: Likewise.
5090 * lib/bitsetv-print.c: Likewise.
5091 * lib/bitsetv.c: Likewise.
5092 * lib/subpipe.h: Likewise.
5093 * lib/timevar.c: Likewise.
5094 * lib/timevar.h: Likewise.
5095 * djgpp/subpipe.c: Use standard recipe for config.h.
5096 * lib/abitset.c: Likewise.
5097 * lib/bitset.c: Likewise.
5098 * lib/bitset_stats.c: Likewise.
5099 * lib/bitsetv-print.c: Likewise.
5100 * lib/bitsetv.c: Likewise.
5101 * lib/ebitsetv.c: Likewise.
5102 * lib/get-errno.c: Likewise.
5103 * lib/lbitset.c: Likewise.
5104 * lib/subpipe.c: Likewise.
5105 * lib/timevar.c: Likewise.
5106 * lib/vbitset.c: Likewise.
5107 * tests/local.at: Likewise.
5108 * src/scan-gram.l: Don't include verify.h, since system.h does
5109 that for us.
5110 * .x-sc_require_config_h: New file.
5111 * .x-sc_unmarked_diagnostics: New file.
5112
287c78f6
PE
51132006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5114
287c78f6
PE
5115 Be a bit more systematic about using 'abort'.
5116 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5117 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5118 Put 'default: abort ();' before some other case, to satisfy older
5119 pedantic compilers.
5120 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5121 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5122 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5123 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
5124 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5125 (get_decision_str, get_orientation_str, get_node_alignment_str):
5126 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5127 (get_linestyle_str, get_arrowstyle_str): Likewise.
5128 * src/conflicts.c (resolve_sr_conflict):
5129 Use a default case rather than one for the one remaining enum
5130 value, to catch invalid enum values as well.
5131 * src/lalr.c (set_goto_map, map_goto):
5132 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5133 * src/nullable.c (nullable_compute, token_definitions_output):
5134 Likewise.
5135 * src/reader.c (packgram, reader): Likewise.
5136 * src/state.c (transitions_to, state_new, state_reduction_find):
5137 Likewise.
5138 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5139 (symbol_pack): Likewise.
5140 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
5141 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5142 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
5143 * src/system.h: Don't include <assert.h>.
5144 (assert): New macro.
5145
5146 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5147 (Destructor Decl, Parser Function, Pure Calling):
5148 Describe rules for braces inside C code more carefully.
287c78f6 5149
c66dfadd
PE
51502006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5151
c21493b8
PE
5152 Fix some porting glitches found by Nelson H. F. Beebe.
5153 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5154 compilers that don't understand that abort () does not return.
5155 * src/state.c (transitions_to): Likewise.
5156 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5157 that '#include <cstdlib>' works.
5158 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5159 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5160 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5161 for the benefit of some pre-C99 compilers.
5162
b6e3facf
PE
5163 * bootstrap: Undo changes to gnulib files that autoreconf made.
5164
c66dfadd
PE
5165 Minor fixups to get 'make maintainer-check' to work.
5166 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5167 with the new verify.h implementation.
5168 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5169 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5170 * data/yacc.c (YYUSE): Likewise.
5171 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5172 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5173 * src/parse-gram.y (declaration): Don't pass a string constant
5174 to a function that expects char *, since GCC might complain
5175 about the constant value.
5176 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5177 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5178 before #defining them.
5179 * tests/glr-regression.at
5180 (Incorrectly initialized location for empty right-hand side in GLR):
5181 In yyerror, use the msg arg.
5182 (Corrupted semantic options if user action cuts parse):
5183 (Incorrect lookahead during deterministic GLR):
5184 (Incorrect lookahead during nondeterministic GLR):
5185 Don't name a local var 'index'; it shadows string.h's 'index'.
5186
ed94ef2a
AD
51872006-01-19 Akim Demaille <akim@epita.fr>
5188
5189 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5190 location, not just parts of it.
5191
e9ad4aec
PE
51922006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5193
d6ca7905
PE
5194 * NEWS: Document the fact that multiple %unions are now allowed.
5195 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
5196 * TODO: This feature is now implemented, so remove it from
5197 the wishlist.
d6ca7905 5198
ef1b70e0
PE
5199 * Makefile.maint: Merge with coreutils Makefile.maint.
5200 (CVS_LIST): Use build-aux version if available.
5201 (VERSION_REGEXP): New macro.
5202 (syntax-check-rules): Add sc_no_if_have_config_h,
5203 sc_prohibit_assert_without_use, sc_require_config_h,
5204 sc_useless_cpp_parens.
5205 (sc_obsolete_symbols): Check for O_NDELAY.
5206 (sc_dd_max_sym_length): Track coreutils.
5207 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5208 (sc_useless_cpp_parens): New rule.
5209 (news-date-check): Look for version or today's date.
5210 (changelog-check): Don't require version number near head.
5211 (copyright-check): Use current year instead of hardwiring 2005.
5212 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5213 (announcement): Add --gpg-key-ID.
5214
5215 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5216 with "file system".
5217
2073ce56 5218 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
5219 array. Problem reported by twlevo.
5220 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5221 * src/lalr.c (build_relations): Rely on new sentinel.
5222 * src/gram.c (gram_free): Adjust to new sentinel.
5223
b7691f15
JD
52242006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5225
5226 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5227 yylookaheadNeeds. All uses updated.
5228 (yysplitStack): Rename local yynewLookaheadStatuses to
5229 yynewLookaheadNeeds.
5230 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5231 GLR): In comments, change `lookahead status' to `lookahead need'.
5232
ddee1b06
PH
52332006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5234
5235 * data/glr.c (yysplitStack): A little stylistic rewrite.
5236
12f4614d
PH
52372006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5238
5239 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5240
32c29292
JD
52412006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5242
5243 * doc/bison.texinfo: Fix some typos.
5244 (GLR Semantic Actions): New subsection discussing special
5245 considerations because GLR semantic actions might be deferred.
5246 (Actions): Mention look-ahead usage of yylval.
5247 (Actions and Locations): Mention look-ahead usage of yylloc.
5248 (Special Features for Use in Actions): Add YYEOF entry and mention it
5249 in the yychar entry.
5250 In the yychar entry, remove mention of the local yychar case (pure
5251 parser) since this is irrelevant information when writing semantic
148d66d8 5252 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
5253 yychar is otherwise described as an external variable.
5254 In the yychar entry, don't call it the `current' look-ahead since it
5255 isn't when semantic actions are deferred.
5256 In the yychar and yyclearin entries, add note about deferred semantic
5257 actions.
5258 Add yylloc and yylval entries discussing look-ahead usage.
5259 (Look-Ahead Tokens): When discussing yychar, don't call it the
5260 `current' look-ahead, and do mention yylval and yylloc.
5261 (Error Recovery): Cross-reference `Action Features' when mentioning
5262 yyclearin.
148d66d8 5263 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
5264 look-ahead.
5265 In the yylloc and yylval entries, mention look-ahead usage.
5266
de366a2f 52672006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
5268
5269 * tests/glr-regression.at: Update copyright year to 2006.
5270
bf70fa87
JD
52712006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5272
5273 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5274 use during nondeterministic operation to track which stacks have
5275 actually needed the current lookahead.
5276 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5277 Allocate, deallocate, resize, and otherwise shuffle space for
5278 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5279 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5280 appropriately during nondeterministic operation.
5281 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5282 members to store the current lookahead to be used by the deferred
5283 user action.
5284 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5285 from which the RHS is taken. Set the lookahead members of the new
5286 yySemanticOption according to the lookahead status for stack yyk.
5287 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5288 yyaddDeferredAction.
5289 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5290 members of yySemanticOption before invoking yyuserAction, and then set
5291 them back to their current values afterward.
5292 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5293 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5294 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5295 titles for consistency.
5296 (Leaked merged semantic value if user action cuts parse): In order to
5297 suppress lint warnings, use arguments in merge function, and assign
5298 char value < 128 in main.
5299 (Incorrect lookahead during deterministic GLR): New test case.
5300 (Incorrect lookahead during nondeterministic GLR): New test case.
5301
05449a2c
JD
53022006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5303
de366a2f 5304 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
5305 !yyvaluep as signal that no semantic value is available to print.
5306 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5307 to print a semantic value.
5308
4158e0a1 53092006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 5310
4158e0a1
JD
5311 * tests/glr-regression.at: For consistency with my newer test cases,
5312 don't thank myself.
5313
d659304d
JD
53142006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5315
5316 * data/glr.c (yyresolveValue): When merging semantic options, if at
5317 least one user action succeeds but a later one cuts the parse, then
5318 destroy the semantic value before returning rather than leaking it.
5319 (yyresolveStates): If a user action cuts the parse and thus
5320 yyresolveValue fails, ignore the (unset) semantic value rather than
5321 corrupting the yyGLRState, and empty the semantic options list since
5322 the user actions should have called all necessary destructors.
5323 Simplify code with YYCHK.
5324 * tests/glr-regression.at (Corrupted semantic options if user action
5325 cuts parse): New test case.
5326 (Undesirable destructors if user action cuts parse): New test case.
5327 Before applying any of this patch, this test case never actually failed
5328 for me... but only because the corrupted semantic options usually
5329 masked this bug.
5330 (Leaked merged semantic value if user action cuts parse): New test
5331 case.
5332
6ec2c0f2
AD
53332006-01-05 Akim Demaille <akim@epita.fr>
5334
5335 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5336
1b9c21fb
PE
53372006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5338
5339 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5340 _MSC_VER. Problem reported by Cenzato Marco.
5341 (b4_c_function_def): Use it.
5342 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5343 b4_c_modern.
5344 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5345 than rolling our own.
5346
84866159
AD
53472006-01-04 Akim Demaille <akim@epita.fr>
5348
5349 Also warn about non-used mid-rule values.
5350 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5351 member.
5352 (symbol_list_new): Adjust.
5353 * src/reader.c (symbol_typed_p): New.
5354 (grammar_rule_check): Use it.
5355 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5356 Check its rule.
5357 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5358 Use it.
5359 * tests/actions.at (Exotic Dollars): Adjust.
5360
378f4bd8
AD
53612006-01-04 Akim Demaille <akim@epita.fr>
5362
5363 * src/reader.c (grammar_midrule_action): If $$ is set in a
5364 mid-rule, move the `used' bit to its lhs.
5365 * tests/input.at (Unused values): New.
5366 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5367
e2a21b6f
PE
53682006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5369
54662697
PE
5370 * doc/bison.texinfo (Bison Options): Say more accurately what
5371 --yacc does.
5372 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5373 about declarations in the grammar when in Yacc mode, as POSIX does
5374 not require a diagnostic when the grammar uses extensions.
5375
5376 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5377
073f9288
PE
5378 Warn about dubious constructions like "%token T T".
5379 Reported by twlevo.
5380 * src/symtab.h (struct symbol.declared): New member.
5381 * src/symtab.c (symbol_new): Initialize it to false.
5382 (symbol_class_set): New arg DECLARING, specifying whether
5383 this is a declaration that we want to warn about, if there
5384 is more than one of them. All uses changed.
5385
1221b78a
PE
5386 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5387 Allow multiple %union directives, whose contents concatenate.
5388 * src/parse-gram.y (grammar_declaration): Likewise.
5389 Use muscle_code_grow, so that we don't need stype_line any more.
5390 All uses changed.
5391
5392 * src/muscle_tab.c (muscle_grow): Fix comment.
5393
e2a21b6f
PE
5394 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5395 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5396 Update copyright year to 2006.
5397
8f7e3cf9
AD
53982006-01-03 Akim Demaille <akim@epita.fr>
5399
5400 Have glr.cc pass (some of) the calc.at tests.
5401 * data/glr.cc (b4_parse_param_orig): New.
5402 (b4_parse_param): Improve its definition, and bound it more
5403 clearly in the skeleton.
5404 (b4_epilogue): Append, instead of prepending, in order to keep
5405 #line consistency.
5406 Simplify the generation of auxiliary functions: locations and
5407 purity are mandated.
5408 (b4_global_tokens_and_yystype): Honor it.
5409 * data/location.cc (c++.m4): Don't include it.
5410 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5411 and AT_SKEL_CC_IF.
5412 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5413 AT_LALR1_CC_IF.
5414 Be sure to initialize the first position's filename.
5415 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5416 mandated anyway.
5417 (AT_CHECK_CALC_GLR_CC): New.
5418 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5419
3953ed88
AD
54202006-01-02 Akim Demaille <akim@epita.fr>
5421
5422 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5423 c.m4.
0a96ba81 5424 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
5425 * data/glr.cc: Do not include stack.hh.
5426
9ecafbbf
AD
54272006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5428
5429 * data/glr.c: Reformat whitespace with tabs.
5430 (b4_lpure_formals): Remove this unused m4 macro.
5431 * tests/cxx-type.at: Reformat whitespace with tabs.
5432 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5433 since it's a member. Rename type to isNterm for clarity.
5434
c4d497a0
AD
54352005-12-29 Akim <akim@sulaco.local>
5436
5437 Let glr.cc catch up with symbol_value_print.
5438 * data/glr.cc (b4_yysymprint_generate): Replace by...
5439 (b4_yy_symbol_print_generate): this.
5440 (yy_symbol_print, yy_symbol_value_print): Declare them.
5441
4517da37
PE
54422005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5443
5444 * src/location.h (boundary): Note that a line or column equal
5445 to INT_MAX indicates an overflow.
5446 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5447 (rule_length_overflow, increment_rule_length, add_column_width):
5448 New functions.
5449 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5450 (<SC_BRACED_CODE>"}"):
5451 Use increment_rule_length rather than incrementing it by hand.
5452 (adjust_location, handle_syncline): Diagnose overflow.
5453 (handle_action_dollar, handle_action_at):
5454 Fix bug with monstrosities like $-2147483648.
5455 Remove now-unnecessary checks.
5456 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5457 (convert_ucn_to_byte): Verify assumptions.
5458 (handle_syncline): New arg LOC. All callers changed.
5459 Don't store through a value derived from char const * pointer.
5460
5461 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5462 GCC warnings.
5463
e3233bf6
PE
54642005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5465
5466 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5467 Remove unnecessary forward static decls.
5468
8f3596a6
AD
54692005-12-27 Akim Demaille <akim@epita.fr>
5470
5471 * src/reader.c (grammar_current_rule_check): Also check that $$
5472 is used.
5473 Take the rule to check as argument, hence rename as...
5474 (grammar_rule_check): this.
5475 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5476 Rename as...
5477 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5478 (grammar_midrule_action, grammar_symbol_append): Now static.
5479 * tests/torture.at (input): Don't rely on the default action
5480 being always performed.
5481 * tests/calc.at: "Set" $$ even when the action is "cut" with
5482 YYERROR or other.
5483 * tests/actions.at (Exotic Dollars): Instead of using unused
5484 values, check that the warning is issued.
5485
721be13c
PE
54862005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5487
5488 * NEWS: Improve wording for unused-value warnings.
5489
a0af42fc
AD
54902005-12-22 Akim Demaille <akim@epita.fr>
5491
5492 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5493 (b4_yysymprint_generate): Rename as...
5494 (b4_yy_symbol_print_generate): this.
5495 Generate yy_symbol_print instead of yysymprint.
5496 Generate also yy_symbol_value_print, and use it.
5497
affac613
AD
54982005-12-22 Akim Demaille <akim@epita.fr>
5499
721be13c 5500 * NEWS: Warn about unused values.
affac613
AD
5501 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5502 a `used' member.
5503 (symbol_list_n_get, symbol_list_n_used_set): New.
5504 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5505 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5506 * src/reader.c (grammar_current_rule_check): Check that values are
5507 used.
5508 * src/symtab.c (symbol_print): Accept 0.
5509 * tests/existing.at: Remove the type information.
5510 Empty the actions.
5511 Remove useless actions (beware of mid-rule actions: perl -000
5512 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5513 * tests/actions.at (Exotic Dollars): Use unused values.
5514 * tests/calc.at: Likewise.
5515 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5516 Likewise.
5517
5518 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5519 rule_useful_p.
5520
9d9b8b70
PE
55212005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5522
8bb4c753
PE
5523 Undo 2005-12-01 tentative license wording change. The wording is
5524 still being reviewed by the lawyers, and we don't want to wait for
5525 them before publishing a test release. For now, revert to the
5526 previous wording.
5527 * NEWS: Undo 2005-12-01 change.
5528 * data/glr.c: Revert to previous license wording.
5529 * data/glr.cc: Likewise.
5530 * data/lalr1.cc: Likewise.
5531 * data/location.cc: Likewise.
5532 * data/yacc.c: Likewise.
5533
9d9b8b70
PE
5534 * NEWS: Reword %destructor vs YYABORT etc.
5535 * data/glr.c: Use American spacing, for consistency.
5536 * data/glr.cc: Likewise.
5537 * data/lalr1.cc: Likewise.
5538 * data/yacc.c: Likewise.
5539 * data/yacc.c: Reformat comments slightly.
5540 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5541 for consistency. Fix some spelling errors and reword recently-included
5542 text slightly.
5543 * tests/cxx-type.at: Cast results of malloc, for C++.
5544
2c3b392a
AD
55452005-12-21 Joel E. Denny <address@hidden>
5546
5547 * tests/cxx-type.at: Construct a tree, count the parents of shared
5548 nodes, and free each node once and only once. Previously, the memory
5549 for semantic values was leaked instead.
5550
d6cff4dc
AD
55512005-12-21 Joel E. Denny <address@hidden>
5552
5553 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5554 (yylval, yylloc): If pure, #define to yystackp->yyval and
5555 yystackp->yyloc similar to yychar and yynerrs.
5556 (yyparse): If pure, remove local yylval and yylloc. Add local
5557 yystackp to accommodate pure definitions of yylval and yylloc.
5558 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5559 yylvalp and yyllocp to &yylval and &yylloc.
5560 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5561 namespace. Previously, nerrs and char were missing, but lval and lloc
5562 weren't necessary.
5563 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5564 yylvalp and yyllocp parameters since, if pure, these are now always
5565 accessible through yystackp. If not pure, they are still accessible
5566 globally.
5567 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5568 `if (YYID (N))' to pacify lint.
5569
a85284cf
AD
55702005-12-21 Akim Demaille <akim@epita.fr>
5571
5572 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5573 destroy the RHS symbols of a rule.
5574 * data/yacc.c (yylen): Initialize to 0.
5575 Keep its value to the number of items to possibly shift.
5576 In particular, a regular successful parse that ends on YYFINAL by
5577 a (internal) YYACCEPT must not have yylen != 0.
5578 (yyerrorlab, yyreturn): Pop the RHS.
5579 Reorder a bit to emphasize the `shifting' bits of code.
5580 (YYPOPSTACK): Now accept a number of items to pop.
5581 * data/lalr1.cc: Likewise.
5582 * data/glr.c: Formatting changes.
5583 Use goto instead of fall through.
5584 * doc/bison.texinfo (Destructor Decl): Complete.
5585
d508c281
JMG
55862005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5587
5588 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5589 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5590 * djgpp/config.bat: Replace every occurence of the file name
5591 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5592 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5593 * djgpp/config.sed: Replace every occurence of the file name
5594 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5595 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5596 * djgpp/djunpack.bat: DJGPP specific file.
5597 * djgpp/fnchange.lst: DJGPP specific file.
5598 * djgpp/README.in: Add new information about how to unpack the bison
5599 source on MSDOS and other systems which have 8.3 file name restrictions
5600 using djunpack.bat and fnchange.lst.
5601
3e7a2cd9
PE
56022005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5603
5604 * bootstrap (build_cvs_prefix): Remove; unused.
5605 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5606 when getting gnulib.
5607
56082005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5609
5610 * data/glr.c: Reorder typedef declarations for structs to match order
5611 of struct declarations.
5612 Rename yystack everywhere to yystackp except in yyparse where it's not
5613 a pointer.
5614 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5615 consistency.
5616 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5617 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5618 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5619 lint.
5620
877519f8
PE
56212005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5622
0eca5a39
PE
5623 * tests/sets.at (Accept): Fix typos in regular expression used to
5624 sed out the final state number.
5625
2cec9080
PE
5626 Work around portability problem on Solaris 10: flex-generated
5627 files include <stdio.h> before <config.h>, which messes up
5628 because the latter defines __EXTENSIONS__. Address the problem
5629 by creating two new little files that include <config.h> first,
5630 then include the flex-generated files. Rewrite everyone else
5631 to include <config.h> first, as well.
5632 * lib/timevar.c: Always include "config.h".
5633 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5634 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5635 (EXTRA_bison_SOURCES): New macro.
5636 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5637 * src/system.h: Don't include config.h.
5638 * src/LR0.c: Include <config.h> first.
5639 * src/assoc.c: Likewise.
5640 * src/closure.c: Likewise.
5641 * src/complain.c: Likewise.
5642 * src/conflicts.c: Likewise.
5643 * src/derives.c: Likewise.
5644 * src/files.c: Likewise.
5645 * src/getargs.c: Likewise.
5646 * src/gram.c: Likewise.
5647 * src/lalr.c: Likewise.
5648 * src/location.c: Likewise.
5649 * src/main.c: Likewise.
5650 * src/muscle_tab.c: Likewise.
5651 * src/nullable.c: Likewise.
5652 * src/output.c: Likewise.
5653 * src/parse-gram.y: Likewise.
5654 * src/print.c: Likewise.
5655 * src/print_graph.c: Likewise.
5656 * src/reader.c: Likewise.
5657 * src/reduce.c: Likewise.
5658 * src/relation.c: Likewise.
5659 * src/state.c: Likewise.
5660 * src/symlist.c: Likewise.
5661 * src/symtab.c: Likewise.
5662 * src/tables.c: Likewise.
5663 * src/uniqstr.c: Likewise.
5664 * src/vcg.c: Likewise.
5665
877519f8
PE
5666 * src/parse-gram.y: Fix minor problems uncovered by lint.
5667 (current_lhs, current_lhs_location): Now static.
5668 (current_assoc): Remove unused variable.
5669
5670 Cleanups so that Bison-generated parsers have less lint.
5671 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5672 Prepend /*ARGSUSED*/, for lint's sake.
5673 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5674 definition if 'lint' is defined.
5675 (YYID): New macro (or function, if lint).
5676 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5677 * data/yacc.c: Likewise.
5678 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5679 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5680 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5681 is C++ only.
5682 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5683 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5684 Use YYID(0) rather than 0, for lint.
5685 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5686 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5687
f5228370
PE
56882005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5689
5690 * tests/glr-regression.at
5691 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5692 Close memory leak reported by twlevo.
5693
69ce078b
PE
56942005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5695
6ff99711
PE
5696 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5697 all stacks.
5698 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
5699 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5700 New test case.
5701 (Duplicated user destructor for lookahead): This test now is expected
5702 to succeed.
5703
af3412cd
PE
57042005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5705
32b5b719 5706 * NEWS: Document the following change.
af3412cd
PE
5707 * data/yacc.c: Say "parser skeleton" rather than "file", since
5708 it's no longer just a file.
5709 * data/glr.c: Grant a special exception for C GLR parsers, that
5710 reads like the already-existing exception for C LALR(1) parsers.
5711 * data/glr.cc: Likewise.
5712 * data/lalr1.cc: Likewise.
5713 * data/location.cc: Likewise.
5714 * data/yacc.c: Reword the "written by" statement to clarify that
5715 it was the parser skeleton, not the entire output file.
5716 * data/glr.c: Written by Paul Hilfinger.
5717 * data/glr.cc: Written by Akim Demaille.
5718 * data/lalr1.cc: Likewise.
5719
035aa4a0
PE
57202005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5721
d9963c85
PE
5722 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5723 Fix typos in previous change that broke 'make check'.
5724 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5725 supported in C.
5726 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5727 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5728 We can revert this once things settle down.
5729
035aa4a0
PE
5730 * src/conflicts.c (conflicts_print): Don't print file name twice
5731 when %expect fails because there were no conflicts.
5732 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5733 change.
5734 * tests/conflicts.at (%expect not enough, %expect too much):
5735 (%expect with reduce conflicts): Adjust to new behavior.
5736
57372005-11-18 Akim Demaille <akim@epita.fr>
5738
5739 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5740 errors.
5741 * NEWS: Document this.
5742 * doc/bison.texinfo (Expect Decl): Likewise.
5743
d1ff7a7c
AD
57442005-11-16 Akim Demaille <akim@epita.fr>
5745
5746 Generalize the display of semantic values and locations in traces.
5747 * data/glr.c (yy_reduce_print): Fix indices (again).
5748 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5749 literal integers.
5750 * data/lalr1.cc (yyreduce_print): Rename as...
5751 (yy_reduce_print): this.
5752 Display values and locations.
5753 * data/yacc.c (yy_reduce_print): Likewise.
5754 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5755 (yysymprint): Move higher to be visible from yy_reduce_print).
5756 (yyparse): Adjust.
5757 * tests/calc.at: Adjust the expected length of the traces.
5758
6de5398d
AD
57592005-11-14 Akim Demaille <akim@epita.fr>
5760
5761 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5762 from 1 to N, while values and location start at 0.
5763 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5764
a1373f55
AD
57652005-11-14 Akim Demaille <akim@epita.fr>
5766
5767 * data/glr.c (yy_reduce_print): Fix the $ number.
5768
613d8952
AD
57692005-11-14 Akim Demaille <akim@epita.fr>
5770
5771 "Use" parse parameters.
5772 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5773 * data/glr.c, data/glr.cc: Use them.
5774 * data/glr.c (YYUSE): Have a C++ definition that supports
5775 non-pointer types.
5776
b2741627
AD
57772005-11-14 Akim Demaille <akim@epita.fr>
5778
5779 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5780
5059b5c8
AD
57812005-11-14 Akim Demaille <akim@epita.fr>
5782
42249483
AD
5783 * data/glr.cc: New.
5784 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 5785
4626a15d
AD
57862005-11-12 Akim Demaille <akim@epita.fr>
5787
5788 Let position and location be PODs.
5789 * data/location.cc (position::initialize, location::initialize): New.
5790 (position::position, location::location): Define only if
5791 b4_location_constructors is defined.
5792 * data/lalr1.cc (b4_location_constructors): Define it for backward
5793 compatibility.
5794 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5795
57962005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
5797
5798 * data/lalr1.cc: Move the body of the ctor and dtor into the
5799 parser file (instead of the header).
5800 Wrap the implementations in a "namespace yy".
5801
58022005-11-12 Akim Demaille <akim@epita.fr>
5803
5804 Have glr.c include its header file when created.
5805 * data/glr.c (b4_shared_declarations): New.
5806 Output them verbatim in the parser if !%defines, otherwise
5807 output then in the header file, and include it instead.
5808
1989d947
AD
58092005-11-11 Akim Demaille <akim@epita.fr>
5810
5811 * data/glr.c: Comment changes.
5812
58132005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
5814
5815 When yydebug, report semantic and location values for reductions.
5816 * data/glr.c (yy_reduce_print): Report the semantic values and the
5817 locations.
5818 (YY_REDUCE_PRINT): Adjust.
5819 (yyglrReduce): Use them.
5820 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5821 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5822 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5823 traces.
5824
02998094
AD
58252005-11-10 Akim Demaille <akim@epita.fr>
5826
5827 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5828 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5829 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5830
5210672f
PE
58312005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5832
5833 * m4/cxx.m4, examples/Makefile.am: Don't build
5834 examples/calc++ if no C++ compiler is available. (trivial change)
5835
a8991a1d
AD
58362005-11-09 Akim Demaille <akim@epita.fr>
5837
5838 * src/scan-skel.l: Use a couple of asserts.
5839
36b5e963
AD
58402005-11-03 Akim Demaille <akim@epita.fr>
5841
5842 In some (weird) cases, the final state number is incorrect.
5843 Reported by Alexandre Duret-Lutz.
5844 * src/LR0.c (state_list_append): Remove the computation of
5845 final_state.
5846 (save_reductions): Do it here.
5847 (get_state): Alpha conversion.
5848 (generate_states): Use a for loop.
5849 * src/gram.h (item_number_is_rule_number)
5850 (item_number_is_symbol_number): New.
5851 * src/state.c: Use assert.
5852 * src/system.h: Include assert.h.
5853 * tests/sets.at (Accept): New.
5854
44e7ead1
PH
58552005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5856
5857 * data/glr.c (yyfill): Adjust comment.
36b5e963 5858 (yyresolveAction): Initialize default location properly
44e7ead1
PH
5859 for empty right-hand sides.
5860 (yydoAction): Ditto.
5861 Add comment explaining apparently dead code.
36b5e963
AD
5862 * tests/glr-regression.at
5863 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 5864 New test.
36b5e963 5865
e10a80ee
PE
58662005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5867
5868 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5869 gnulib when interrupted. This fixes some race conditions and
5870 works around some portability problems (one noted by Paul
5871 Hilfinger).
5872
067b32ee
AD
58732005-10-22 Akim <akim@epita.fr>
5874
5875 * Makefile.cfg: Adjust to config -> build-aux.
5876 Reported by twledo.
5877
4b367315
AD
58782005-10-21 Akim Demaille <akim@epita.fr>
5879
5880 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5881 the %parse-params.
5882 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5883 * data/yacc.c (b4_Pure_if): Rename as...
5884 (b4_yacc_pure_if): this.
5885 (YY_SYMBOL_PRINT, yyparse): Adjust.
5886 * doc/bison.texinfo: Formatting changes.
5887
24cc23d9
AD
58882005-10-21 Akim Demaille <akim@epita.fr>
5889
5890 Finish the transition config -> build-aux.
5891 * configure.ac, Makefile.am: Use build-aux.
5892 * config/prev-version, config/announce-gen, config/Makefile.am:
5893 Move to...
5894 * build-aux/prev-version, build-aux/announce-gen,
5895 * build-aux/Makefile.am: here.
5896
d4476375
AD
58972005-10-14 Akim Demaille <akim@epita.fr>
5898
5899 * examples/calc++/test: Use set -x only when VERBOSE.
5900
302c0aee
PE
59012005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5902
5903 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5904 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5905
7625ec2c
AD
59062005-10-13 Akim Demaille <akim@epita.fr>
5907
5908 * src/scan-skel.l: Output the base name parts of the parser and
5909 header file names.
302c0aee 5910 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
5911 additional checks.
5912 Use this to exercise C++ outputs in subdirs.
5913 Reported by Oleg Smolsky.
5914
ba0fe3c7
PE
59152005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5916
5917 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5918 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5919 Problem reported by John P. Hartmann.
5920 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5921 already defined it.
5922
9b8a5ce0
AD
59232005-10-12 Akim Demaille <akim@epita.fr>
5924
5925 * src/parse-gram.y (version_check): Exit 63 to please missing
5926 (stands for "version mismatch).
5927 * tests/input.at, doc/bison.texinfo: Adjust.
5928
4f6e011e
PE
59292005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5930
5931 Work around portability problems with Visual Age C compiler
5932 (xlc and xlC_r) reported by John P. Hartmann.
5933 * data/location.cc (initial_column, initial_line): Remove.
5934 All uses replaced by 0 and 1.
5935 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5936 that xlc complains about.
5937 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 5938 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 5939 as __STDC__.
4d7aa45e
PE
5940 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5941 __STDC_VERSION__. Use it everywhere instead of looking at
5942 __STDC__ and __cplusplus.
4f6e011e 5943
a1b3bf8c
AD
59442005-10-10 Akim Demaille <akim@epita.fr>
5945
5946 * examples/calc++/test: Be quiet unless VERBOSE.
5947
412e44aa
PE
59482005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5949
2a4647a3
PE
5950 * data/c.m4 (yydestruct, yysymprint):
5951 Use YYUSE instead of casting to void.
5952 * data/glr.c (YYUSE): New macro.
5953 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5954 Use it instead of rolling our own.
5955 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5956 (YYCHK1):
5957 Use /*CONSTCOND*/ to suppress lint warnings.
5958 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5959 (YY_STACK_PRINT): Use 'false' not '0'.
5960 (YYUSE): New macro.
5961 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5962 * data/yacc.c (YYUSE): New macro.
5963 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5964 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5965 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5966
5967
412e44aa
PE
5968 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5969 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5970
88c6637f
PE
59712005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5972
2f4f028d
PE
5973 Undo the parts of the unlocked-I/O change that substituted
5974 putc or puts for printf. This might hurt performance a bit,
5975 but some people prefer the printf style.
5976 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5977 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5978 All uses replaced by YYFPRINTF and YYDPRINTF.
5979 * data/yacc.c: Likewise.
5980 * lib/bitset.c (bitset_print): Likewise.
5981 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5982 putc and puts.
5983 * lib/lbitset.c (debug_lbitset): Likewise.
5984 * src/closure.c (print_firsts, print_fderives): Likewise.
5985 * src/gram.c (grammar_dump): Likewise.
5986 * src/lalr.c (look_ahead_tokens_print): Likewise.
5987 * src/output.c (escaped_output): Likewise.
5988 (user_actions_output): Break apart two printfs.
5989 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5990 * src/reduce.c (reduce_print): Likewise.
5991 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5992 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5993
88c6637f
PE
5994 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5995 Use assignments rather than casts-to-void to suppress
5996 unused-variable warnings. This pacifies 'lint'.
5997 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5998 unused-variable warnings.
5999
fb32e373
JMG
60002005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6001
6002 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6003
edb8f44f
PE
60042005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6005
fb9c0b33
PE
6006 Use unlocked I/O for a minor performance improvement on hosts like
6007 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6008 is to use the gnlib unlocked-io module, and to prefer putc and
6009 puts to printf when either will work (since the latter doesn't
6010 come in an unlocked flavor).
6011 * bootstrap (gnulib_modules): Add unlocked-io.
6012 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6013 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6014 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6015 and similarly for puts and putc and printf.
6016 * data/yacc.c: Likewise.
6017 * lib/bitset.c (bitset_print): Likewise.
6018 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6019 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6020 to printf.
6021 * lib/lbitset.c (debug_lbitset): Likewise.
6022 * src/closure.c (print_firsts, print_fderives): Likewise.
6023 * src/gram.c (grammar_dump): Likewise.
6024 * src/lalr.c (look_ahead_tokens_print): Likewise.
6025 * src/output.c (escaped_output): Likewise.
6026 (user_actions_output): Coalesce two printfs.
2f4f028d 6027 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
6028 * src/reduce.c (reduce_print): Likewise.
6029 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 6030 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 6031
edb8f44f
PE
6032 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6033 this confuses xgettext.
6034
b50d2359
AD
60352005-10-02 Akim Demaille <akim@epita.fr>
6036
6037 * bootstrap (gnulib_modules): Add strverscmp.
6038 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6039 * m4/.cvsignore: Add strverscmp.m4.
6040 * src/parse-gram.y (%require): New token, new rule.
6041 (version_check): New.
6042 * src/scan-gram.l (%require): Adjust.
6043 * tests/input.at (AT_REQUIRE): New.
6044 Use it.
6045 * doc/bison.texinfo (Require Decl): New.
6046 (Calc++ Parser): Use %require.
6047
21667f64
AD
60482005-10-02 Akim Demaille <akim@epita.fr>
6049
6050 * data/location.cc: New.
6051
2b81e969
AD
60522005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6053 Akim Demaille <akim@epita.fr>
6054
6055 Make sure -odir/foo.cc creates dir/location.hh etc.
6056 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6057 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6058 (spec_defines_file): Now const.
6059 (dir_prefix): New.
6060 (short_base_name): Remove.
6061 * src/files.c: Adjust.
6062 (dirname.h): Include.
6063 (base_name): Don't prototype it.
6064 (finput): Remove, duplicates gram_in.
6065 (full_base_name, short_base_name): Replace by...
6066 (all_but_ext, all_but_tab_ext): these.
6067 (compute_base_names): Rename as...
6068 (compute_file_name_parts): this.
6069 Update to compute the new variables, including dir_prefix.
6070 Adjust dependencies.
6071 * src/output.c (prepare): Output them.
6072 * src/reader.c: Adjust to use gram_in, not finput.
6073 * src/scan-skel.l (@dir_prefix@): New.
6074
ad6a9b97
JMG
60752005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6076
6077 * lib/subpipe.c: New function end_of_output_subpipe() added
6078 to allow support for non-posix systems. This is a no-op function
6079 for posix systems.
6080
6081 * lib/subpipe.h: New function end_of_output_subpipe() added
6082 to allow support for non-posix systems. This is a no-op function
6083 for posix systems.
6084
6085 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6086 handle the lack of pipe/fork functionality on non-posix systems.
6087
6088 * djgpp/Makefile.maint: DJGPP specific file.
6089
6090 * djgpp/README.in: DJGPP specific file.
6091
6092 * djgpp/config.bat: DJGPP specific configuration file.
6093
6094 * djgpp/config.sed: DJGPP specific configuration file.
6095
6096 * djgpp/config.site: DJGPP specific configuration file.
6097
6098 * djgpp/config_h.sed: DJGPP specific configuration file.
6099
6100 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6101
6102 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6103
fc695704
AD
61042005-10-02 Akim Demaille <akim@epita.fr>
6105
6106 * data/location.cc: New, extract from...
6107 * data/lalr1.cc: here.
6108 (location.hh): Include it after the user prologue, in case the
6109 filename type is defined by the user.
6110 Forward declation location and position before the pre-prologue.
6111 (yyresult_): Rename as...
6112 (yyresult): this, it's a local variable, not an attribute.
6113 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6114
61152005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
6116
6117 * examples/extexi: Restore the #line generation.
6118
fb9712a9
AD
61192005-09-30 Akim Demaille <akim@epita.fr>,
6120 Alexandre Duret-Lutz <adl@gnu.org>
6121
6122 Move the token type and YYSTYPE in the parser class.
6123 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6124 (parser::token): New, from the moved free definition of tokens.
6125 (parser::semantic_value): Now a full definition instead of an
6126 indirection to YYSTYPE.
6127 (b4_post_prologue): No longer included in the header file, but
6128 in the implementation file.
6129 * doc/bison.texi (C+ Language Interface): Update.
6130 * src/parse-gram.y: Support unary %define.
6131 * tests/actions.at: Define global_tokens_and_yystype for backward
6132 compatibility until we update the tests.
6133 * tests/calc.at: Idem.
6134 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6135 to simplify the code.
6136
55f0c7b1
PE
61372005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6138
6139 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6140 Ah, the good old days! Problem reported by Peter Klein.
6141 * bootstrap (gnulib_modules): Add strerror, strtoul.
6142 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6143 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6144
fb9712a9 61452005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
6146
6147 * data/c.m4 (b4_error_verbose_if): New.
6148 * data/lalr1.cc: Use it.
6149 (YYERROR_VERBOSE_IF): Remove.
6150 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6151 parser members, replaced by...
6152 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6153 local variables.
6154 (yysyntax_error_): Takes the state number as argument.
6155 (yyreduce_print_): Use the argument yyrule, not the former
6156 attribute yyn_.
6157
8a6f72f3
PE
61582005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6159
6160 * bootstrap (gnulib_modules): Add verify.
6161 * lib/.cvsignore: Add verify.h.
6162 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6163 * src/system.h (verify): Remove.
6164 Include verify.h instead.
6165 * src/tables.c (tables_generate): Use new API for 'verify'.
6166
0d50976f
PE
61672005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6168
ebc3737e
PE
6169 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6170 local variables whose names begin with 'yy'.
6171 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6172 Trivial changes from Joel E. Denny.
6173
0d50976f
PE
6174 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6175 it itself.
6176 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6177 don't use alloca any more.
6178
6179 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6180 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 6181 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
6182 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6183 to match yacc.c, to test more hosts.
6184
a05b79df
PE
61852005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6186
55289366
PE
6187 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6188 doesn't affect behavior.
6189 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6190 Solaris, AIX, MSC.
6191 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6192 This works a bit better with glibc, if user code has already included
6193 stdlib.h.
6194 * doc/bison.texinfo (Bison Parser): Document that users can't
6195 arbitrarily use malloc and free for other purposes. Document
6196 that <alloca.h> and <malloc.h> might be included.
6197 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6198 user must declare alloca.
6199
a05b79df
PE
6200 * HACKING (release): Forwarn the Translation Project about
6201 stable releses.
6202
3ab2ca22
AD
62032005-09-20 Akim Demaille <akim@epita.fr>
6204
6205 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6206
a9739e7c
PE
62072005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6208
a702593e
PE
6209 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6210 (YYSTACK_ALLOC_MAXIMUM): Use it.
6211 (yysyntax_error): New function.
6212 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6213 multiple syntax errors are reported, and alloca is being used.
6214 Instead, reallocate buffers twice as big each time, so that
6215 we waste at most half the allocated memory. Start with a small
6216 (128-byte) buffer that will suffice in most cases anyway.
6217 Use yysyntax_error to do most of the work.
6218
6219 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6220 yynerrs is the number of errors reported, not the number of
6221 errors encountered.
6222
a9739e7c
PE
6223 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6224 Mark it as expected to fail.
6225 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6226 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6227 Don't start user-code symbols with "yy", to avoid name space problems.
6228
f479c6c6
AD
62292005-09-19 Akim Demaille <akim@epita.fr>
6230
6231 Remove the traits, failed experiment.
6232 It never proved useful, and anyway because of the current
6233 definition, it was not possible to have several specialization of
6234 this traits, making it useless.
6235 * data/lalr1.cc (yy:traits): Remove.
6236 Inline its definitions in the parser class.
6237
e2586f82
AD
62382005-09-19 Akim Demaille <akim@epita.fr>
6239
6240 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6241 least Mac OSX with a /usr/local install of gettext.
6242
2e8cf949
AD
62432005-09-19 Akim Demaille <akim@epita.fr>
6244
6245 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6246 and yytoken for similarity with the other skeletons.
6247
c7fb0b90
AD
62482005-09-19 Akim Demaille <akim@epita.fr>
6249
4e26c69e 6250 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 6251
1bd0deda
PE
62522005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6253
6254 * NEWS: Version 2.1.
6255
6256 * NEWS: Remove notice of yytname change, since it was never in an
6257 official release.
6258 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6259 diagnostic.
6260 * src/output.c (prepare): Likewise.
6261 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6262 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6263 is not defined. This is an awful hack, but it's enough for now.
6264 All callers changed.
6265 * tests/glr-regression-at (make_value): Args are const pointers now,
6266 to avoid GCC warning.
6267 (Duplicated user destructor for lookahead): New test. Currently
6268 skipped. It fails on my host but I'm not sure it'll always fail.
6269
62702005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
6271
6272 * src/symtab.h (struct symbol): Declare the printer and destructor
6273 as const, to avoid accidental calls to free.
6274 (symbol_destructor_set, symbol_printer_set): Adjust.
6275 * src/symtab.c: Adjust.
6276
1bd0deda 62772005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
6278
6279 * data/c.m4 (b4_token_enums): New.
6280 (b4_token_defines): Rename as...
6281 (b4_token_enums_defines): this.
6282 (b4_token_defines): New, output only the #defines.
6283 * data/yacc.c, data/glr.c: Adjust.
6284 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6285 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6286 as default values.
6287
dbcdae2d
AD
62882005-09-16 Akim Demaille <akim@epita.fr>
6289
6290 * data/lalr1.cc (yylex_): Remove, inline its code.
6291 (yyreport_syntax_error_): Remove, replaced by...
6292 (yysyntax_error_): this which returns a string and leaves to the
6293 caller the call to the users' error function.
6294 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6295 Move from members of the parser object...
6296 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6297 to local variables of the parse function.
6298
70d8f291
AD
62992005-09-16 Akim Demaille <akim@epita.fr>
6300
6301 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6302 since it's in Bison's name space.
6303
b47dbebe
PE
63042005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6305
ae199bf1
PE
6306 * data/glr.c (yyresolveValue): Add default case to pacify
6307 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6308
b47dbebe
PE
6309 * NEWS: Document when yyparse started to return 2.
6310 * doc/bison.texinfo (Parser Function): Document when yyparse
6311 returns 2.
6312
6313 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6314 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6315 changed.
6316 (class position): file_name -> filename (reverting). All uses changed.
6317
63182005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6319
6320 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6321 do anything if $@ exists. This reverts part of the 2005-07-07
6322 patch.
6323
00292f66
PE
63242005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6325
6326 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6327 contains obsolete information and isn't worth distributing as a
6328 separate file anyway.
6329 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6330 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6331 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6332 (yyparse): Abort if user code uses longjmp to throw an unexpected
6333 value.
6334
a420f962
PE
63352005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6336
00292f66
PE
6337 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6338 Suggested by twlevo@xs4all.nl.
6339
127287e9
PE
6340 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6341 This avoids a diagnostic from gcc -Wswitch-enum.
6342 Problem reported by twlevo@xs4all.nl.
6343
a420f962
PE
6344 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6345 standards. Use "file name" or "file" or "name", depending on
6346 the context.
6347 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6348 not to hack/foo.tab.c.
6349 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
6350 * data/glr.c: b4_filename -> b4_file_name.
6351 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6352 All uses changed.
6353 (class position): filename -> file_name. All uses changed.
6354 * data/yacc.c: b4_filename -> b4_file_name.
6355 * lib/bitset.h: filename -> file_name in local vars.
6356 * lib/bitset_stats.c: Likewise.
6357 * src/files.c: Likewise.
6358 * src/scan-skel.l ("@output ".*\n): Likewise.
6359 * src/files.c (file_name_split): Renamed from filename_split.
6360 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
6361
63622005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6363
6364 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6365 to accommodate latest gnulib.
6366
6367 * tests/glr-regression.at (Duplicate representation of merged trees):
6368 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6369
6370 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6371 needed.
6372
42a6501d
PE
63732005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6374
6375 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6376 All uses changed. Invoke user destructor after an error during a
6377 split parse (trivial change from Joel E. Denny).
6378
6379 * tests/glr-regression.at
6380 (User destructor after an error during a split parse): New test case.
6381 Problem reported by Joel E. Denny in:
6382 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6383
ef9a1faf
PE
63842005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6385
5b4aaf78
PE
6386 * README-cvs: Give URLs for recommended tools.
6387 Mention Gzip version problem, and bootstrapping issues.
6388 Remove troubleshooting section, as it's somewhat obsolete.
6389
b5240ba5
PE
6390 * bootstrap (no_cache): New var, to accommodate different wget
6391 variants. Use it instead of '-C off'. Problem reported by
6392 twlevo@xs4all.nl.
6393
ef9a1faf
PE
6394 * data/glr.c (yydestroyStackItem): New function.
6395 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6396 debugging information. Problem reported by Joel E. Denny.
6397
e6efa9da
AD
63982005-08-25 Akim Demaille <akim@epita.fr>
6399
6400 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6401
adc90f13
PE
64022005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6403
6404 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6405 Don't invoke destructor on unresolved entries.
6406 * tests/glr-regression.at
6407 (User destructor for unresolved GLR semantic value): New test case.
6408 Problem reported by Joel E. Denny in:
6409 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6410
f9315de5
PE
64112005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6412
15d29c1f
PE
6413 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6414 Add strnlen.c.
6415 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6416 lib-prefix.m4, po.m4.
6417
dd5f2af2
PE
6418 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6419 in yydestruct diagnostic, since it might not be an error.
6420 Problem reported by Joel Denny near end of
6421 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 6422 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
6423 * data/yacc.c (yyreturn): Likewise.
6424 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6425
6426 * src/files.c: Remove obsolete FIXME comment.
6427
6428 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6429 with the other templates, and to fix bogus run-on messages such
6430 as the one reported at the end of
6431 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6432 All callers changed to avoid the newline.
6433 (yyprocessOneStack): Output two lines rather than one, to accommodate
6434 the above change. This changes the debug output format slightly.
6435
f9315de5
PE
6436 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6437 reported by Joel E. Denny in
6438 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6439 (trivial change).
6440 * tests/glr-regression.at (Duplicate representation of merged trees):
6441 New test, from Joel E. Denny in:
6442 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6443 * THANKS: Add Joel E. Denny.
6444
6445 * configure.ac (AC_INIT): Bump to 2.0c.
6446
04098407
PE
64472005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6448
6449 * NEWS: Version 2.0b.
6450
ca5d2013
PE
6451 * Makefile.am (SUBDIRS): Put examples before tests, so that
6452 "make check" doesn't finish with "All 1 tests passed".
6453
3d54b576
PE
6454 * tests/regression.at (Token definitions): Don't rely on
6455 AT_PARSER_CHECK for data that contains backslashes. It currently
6456 uses 'echo', and 'echo' isn't portable if its argument contains
6457 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6458 that the byte '\0xff' is not printable in the C locale; it is,
6459 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6460 not printable, so use '\0x81' to test.
6461
d53ae497
PE
6462 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6463 version of GCC, since the macro is used with non-GCC compilers.
6464
fc01665e
PE
6465 Fix core dump reported by Pablo De Napoli in
6466 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6467 * tests/regression.at (Invalid inputs with {}): New test.
6468 * src/parse-gram.y (token_name): Translate type before using
6469 it as an index.
6470
04098407
PE
6471 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6472 the user's name space. All uses changed to __attribute__
6473 ((__unused__)).
6474 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6475 Add __attribute__ ((__noreturn__)).
6476
6477 * etc/clcommit: Remove. We weren't using it, and it failed
6478 "make maintainer-distcheck".
6479 * Makefile.maint: Merge from coreutils.
6480 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6481 (syntax-check-rules): Change list of rules as described below.
6482 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6483 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6484 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6485 (sc_trailing_space): New rules.
6486 (sc_xalloc_h_in_src): Remove.
6487 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6488 (sc_space_tab, sc_error_exit_success, sc_changelog):
6489 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6490 (makefile-check, po-check, author_mark_check):
6491 (makefile_path_separator_check, copyright-check):
6492 Use grep -n, to make it easier to find violations.
6493 Use CVS_LIST and CVS_LIST_EXCEPT.
6494 (header_regexp, h_re): Remove.
6495 (dd_c): New macro.
6496 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6497 (my-distcheck): Use more-modern GCC flags.
6498 (signatures, %.asc): Remove.
6499 (rel-files, announcement): Remove signatures.
6500 Restore old updating code, even though we don't use it, so
6501 that we're the same as coreutils.
6502 (alpha, beta, major): Depend on news-date-check.
6503 Make the upload commands.
6504
6505 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6506 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6507 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6508 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6509 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6510 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6511 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6512 * tests/sets.at: Likewise.
6513
6514 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6515 we comment out the Autoconf version number.
6516 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6517 it's error-prone and "make maintainer-distcheck" rejects it.
6518
6519 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6520 Indent calls to "error" to pacify "make maintainer-distcheck",
6521 when the calls are not intended to be translated.
6522 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6523
6524 * src/Makefile.am (DEFS): Use +=, to pacify
6525 "make maintainer-distcheck".
6526 (bison_SOURCES): Add scan-skel.h.
6527 (sc_tight_scope): New rule, from coreutils.
6528
6529 * src/files.c (src_extension, header_extension):
6530 Now static, not extern.
6531 * src/getargs.c (short_options): Likewise.
6532 * src/muscle_tab.c (muscle_table): Likewise.
6533 * src/parse-gram.y (current_class, current_type, current_prec):
6534 Likewise.
6535 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6536 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6537 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6538 void, to avoid warning when NLS is disabled.
6539 * src/output.c: Include scan-skel.h.
6540 (scan_skel): Remove decl, since scan-skel.h does this.
6541 (output_skeleton):
6542 Indent calls to "error" to pacify "make maintainer-distcheck".
6543 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6544 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6545 "make maintainer-distcheck".
6546 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6547 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6548 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6549 (skel_lex_destroy, scan_skel): Move these decls to...
6550 * src/scan-skel.h: New file.
6551 * src/uniqstr.c (uniqstr_assert):
6552 Indent calls to "error" to pacify "make maintainer-distcheck".
6553
6554 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6555 not @VAR@.
6556
6557 * tests/torture.at: Revamp to avoid misuse of atoi that
6558 "make maintainer-distcheck" complained about.
6559
6560 * examples/extexi (message): Don't print a message more than once,
6561 and omit line-number decoration that makes Emacs compile think
6562 that informative messages are worth worrying about.
6563
65642005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6565
6566 * configure.ac: Update version number.
6567
6568 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6569 accidentally.
6570 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6571 autogenerated by the maintainer.
6572 * examples/calc++/.cvsignore: Add *.yy.
6573
6574 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6575 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6576 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6577
6578 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6579
6580 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6581 from maintainer-distcheck about casting the argument of 'free'.
6582
6583 * NEWS: Mention recent yytname changes.
6584 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6585
6586 * bootstrap: For translations that have not yet been upgraded to
6587 the new runtime-po domain, prime the pump by extracting the
6588 relevant strings from the obsolete translations. This code can be
6589 removed once the bison-runtime domain has been translated by each
6590 team.
6591
6592 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6593 now that token names are already quoted.
6594
6595 Fix problem reported by Anthony Heading.
6596 * data/glr.c (YYTOKEN_TABLE): New macro.
6597 (yytname): Define if YYTOKEN_TABLE.
6598 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6599 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6600 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6601 * src/output.c (prepare_symbols): Output token_table_flag.
6602
0ffda363
PE
66032005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6604
6605 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6606 again if the first call fails.
6607
6608 * data/glr.c (yytnamerr): New function.
6609 (yyreportSyntaxError): Use it to dequote most string literals.
6610 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6611 with other skeletons. All uses changed.
6612 (yytnameerr_): New function.
6613 (yyreport_syntax_error): Use it to dequote most string literals.
6614 * data/yacc.c (yytnamerr): New function.
6615 (yyerrlab): Use it to decode most string literals.
6616 * doc/bison.texinfo (Decl Summary, Calling Convention):
6617 Clarify quoting convention of yytname.
6618 * src/output.c (prepare_symbols): Quote all names. This undoes
6619 the 2005-04-17 change, which is now accomplished (mostly) via
6620 changes in the parsers as described above.
6621 * tests/regression.at (Token definitions, Web2c Actions):
6622 Undo most 2005-04-17 change here, too.
6623
66242005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6625
6626 Fix more problems reported by twlevo@xs4all.nl.
6627 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6628 remove trailing spaces. This loses the exit status of ./types,
6629 and isn't needed since ./types shouldn't be emitting trailing
6630 spaces.
6631 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6632 as the stack isn't valid in that case.
6633
6634 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6635 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6636 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6637 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6638 is used.
6639 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6640 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6641 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6642 Likewise.
6643
6644 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6645 overly-picky compilers that reject 'char *foo = "bar";'.
6646
6647 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6648 to FILE * parameter, not to stderr. This fixes a typo introduced
6649 in the 2005-07-12 change.
6650
6651 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6652 warnings from GCC 4.
6653
6654 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6655 (yyglrShiftDefer, yysplitStack):
6656 Remove unused parameters b4_pure_formals. All uses changed.
6657 (yyglrShift): Remove unused parameters b4_user_formals.
6658 All uses changed.
6659 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6660
6100a9aa
PE
66612005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6662
258b75ca
PE
6663 Destructor cleanups and regularization among the three skeletons.
6664 * NEWS: Document the behavior changes.
6665 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6666 stack before failing, as the cleanup code will do it for us now.
6667 * data/lalr1.cc (yyerrlab): Likewise.
6668 * data/glr.c (yyparse): Pop everything off the stack before
6669 freeing it, so that destructors get called properly.
6670 * data/lalr1.cc (yyreturn): Likewise.
6671 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6672 This is more consistent.
6673 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6674 why destructors might be called. 1.875 -> 2.1.
6675 (Destructor Decl, Decl Summary, Table of Symbols):
6676 Some English-language cleanups for %destructor.
6677 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6678 Add output line for destructor of start symbol.
6679 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6680 because of that same extra output line.
6681
1a059451
PE
6682 * NEWS: Document minor wording changes in diagnostics of
6683 Bison-generated parsers.
6684 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6685 Remove unused formals. All uses changed.
6686 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6687 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6688 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6689 Rename yyoverflowab to yyexhaustedlab.
6690 When memory exhaustion occurs during syntax-error reporting,
6691 report it separately rather than in a single diagnostic; this
6692 eases translation.
6693 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6694 (Memory Exhausted): Renamed from Parser Stack Overflow.
6695 Revamp wording slightly to prefer "memory exhaustion".
6696 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6697
97460c78
PE
6698 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6699
30757c8c
PE
6700 Add i18n support to the GLR skeleton. Partially fix the C++
6701 skeleton; a C++ expert needs to finish this. Remove debugging
6702 msgids; there's little point to having them translated, since they
6703 can be understood only by someone who can read the
6704 (English-language) source code.
6705
6706 Generate runtime-po/bison-runtime.pot automatically, so that we
6707 don't have to worry about garbage getting in that file. We'll
6708 make sure after the next official release that old msgids don't
6709 get lost. See
6710 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6711
6712 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6713 Now auto-generated.
6714 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6715 Fix typos in explanations of the runtime file.
6716 * bootstrap: Change gettext keyword from YYI18N to YY_.
6717 Use standard Makefile.in.in in runtime-po, since we'll arrange
6718 for backward-compatible bison-runtime.po files in a different way.
6719 * data/glr.c (YY_): New macro, from yacc.c.
6720 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6721 Translate messages intended for users.
6722 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6723 the wording in the other skeletons. We don't know that the memory
6724 is virtual.
6725 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6726 Use same method that yacc.c uses.
6727 Don't translate debugging messages.
6728 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6729 it doesn't work (yet), and requires C++ expertise to fix.
6730 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6731 Move defn to a more logical place, to be consistent with other
6732 skeletons.
6733 Don't translate debugging messages.
6734 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6735 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6736 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6737 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6738
ac8c5689
PE
6739 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6740 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6741 void, not int.
6742 * tests/glr-regression.at (Badly Collapsed GLR States):
6743 Likewise.
6744 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6745 yylex should return 0 at EOF rather than aborting.
6746
6100a9aa
PE
6747 Improve tests for stack overflow in GLR parser.
6748 Problem reported by twlevo@xs4all.nl.
6749 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6750 All uses removed.
6751 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6752 can handle the problem.
6753 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6754 (yyparse): New local variable yyresult to record the result.
6755 Use result of setjmp to set it, rather than storing itinto
6756 struct.
6757 (yyDone): Remove label.
6758 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6759 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6760 if YYABORT is used).
6761 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6762 yyparse status; put status > 1 into diagnostic.
6763 Check that status==2 works.
6764 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6765 Use exit status 3 for failure to open (which shouldn't happen).
6766
15f40952
PE
67672005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6768
67fd79c4
PE
6769 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6770 1 on syntax error; just let yyparse do its thing.
6771 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6772 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6773 (Exploding the Stack Size with Alloca):
6774 (Exploding the Stack Size with Malloc):
6775 Expect exit status 2, not 1, since the parser is supposed to blow
6776 its stack. Problem reported by twlevo@xs4all.nl.
6777
15f40952
PE
6778 * data/glr.c (yyparse): Don't assume that the initial calls
6779 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6780 Print a stack-overflow message and fail instead.
6781 Initialize the line-number information before creating the stack,
6782 so that the stack-overflow message can report line zero safely.
6783
f32c66b5
PE
67842005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6785
a22ff96f 6786 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
6787 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6788 (yyuserMerge): Provide a default case if b4_mergers is empty.
6789 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6790 * tests/glr-regression.at
6791 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 6792 Add casts to pacify C++ compilers.
1beb0b24
PE
6793 * tests/glr-regression.at (Improper merging of GLR delayed action
6794 sets): Declare yylex before using it.
f32c66b5 6795 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
6796 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6797 test for valgrind; valgrind is independent of g++.
6798 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6799 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6800 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6801 Use a destructor, so that we can expand the stack. Change
6802 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 6803
d741bd1b
PE
68042005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6805
6806 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6807 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6808
0410a6e0
PE
68092005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6810
6811 * PACKAGING: New file, suggested by Bruno Haible and taken from
6812 similar wording in gettext's PACKAGING file.
6813 * NEWS: Mention PACKAGING.
6814 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6815
f7ab6a50
PE
68162005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6817
baf785db 6818 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
6819 * bootstrap: Get runtime translations into runtime-po.
6820 Create runtime-po files automatically, if possible.
6821 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6822 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6823 does not infringe on the user's name space.
6824 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6825 * doc/bison.texinfo (Internationalization): Revamp the English
6826 and Texinfo syntax a bit, to try to make it clearer.
6827 (Bison Options, Option Cross Key): Mention --print-localedir.
6828 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6829 YYENABLE_NLS. Quote a bit more.
6830 * runtime-po/.cvsignore: New file.
6831 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6832 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6833 * runtime-po/quot.sed: Likewise.
6834 * runtime-po/boldquot.sed: Likewise.
6835 * runtime-po/en@quot.header: Likewise.
6836 * runtime-po/en@boldquot.header: Likewise.
6837 * runtime-po/insert-header.sin: Likewise.
6838 * runtime-po/remove-potcdate.sin: Likewise.
6839 * runtime-po/Makevars: Likewise.
6840 * runtime-po/LINGUAS: Likewise.
6841 * runtime-po/de.po: Likewise; we will rely on the translation project
6842 to maintain this, so "bootstrap" should get it.
0410a6e0 6843 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
6844 its value.
6845 * src/main.c (main): Bind the bison-runtime domain, too.
6846
68472005-07-12 Bruno Haible <bruno@clisp.org>
6848
6849 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6850 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6851 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6852 * runtime-po: New directory.
6853 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6854 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6855 * runtime-po/Rules-quot: New file, copied from po/.
6856 * runtime-po/quot.sed: Likewise.
6857 * runtime-po/boldquot.sed: Likewise.
6858 * runtime-po/en@quot.header: Likewise.
6859 * runtime-po/en@boldquot.header: Likewise.
6860 * runtime-po/insert-header.sin: Likewise.
6861 * runtime-po/remove-potcdate.sin: Likewise.
6862 * runtime-po/Makevars: New file.
6863 * runtime-po/POTFILES.in: New file.
6864 * runtime-po/LINGUAS: New file.
6865 * runtime-po/bison-runtime.pot: New file.
6866 * runtime-po/de.po: New file.
6867 * m4/bison.m4: New file.
6868 * Makefile.am (SUBDIRS): Add runtime-po.
6869 (aclocaldir, aclocal_DATA): New variables.
6870 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6871 Define aclocaldir.
6872 * src/getargs.c (usage): Document --print-localedir option.
6873 (PRINT_LOCALEDIR_OPTION): New enum item.
6874 (long_options): Add --print-localedir option.
6875 (getargs): Handle --print-localedir option.
6876 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6877 (Internationalization): New section.
6878
22dda0f0
AD
68792005-07-12 Akim Demaille <akim@epita.fr>
6880
6881 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6882 for consistency with the rest of the code.
6883 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6884 Add separators.
6885
82b248ad
AD
68862005-07-12 Akim Demaille <akim@epita.fr>
6887
6888 * src/parse-gram.y: Use %printer instead of YYPRINT.
6889
fa0e9314
AD
68902005-07-12 Akim Demaille <akim@epita.fr>
6891
867a3e00
AD
6892 * src/symtab.h, src/symtab.c (symbol_print): New.
6893 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6894 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6895
68962005-07-12 Akim Demaille <akim@epita.fr>
6897
6898 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
6899 b4_at_dollar and b4_dollar_dollar.
6900
e054b190
PE
69012005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6902
6903 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6904 and Pennello's paper.
6905
34160ec4
PE
69062005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6907
407d4a75
PE
6908 * data/yacc.c (yyparse): Undo previous patch. Instead,
6909 set yylsp[0] and yyvsp[0] only if the initial action
6910 sets yylloc and yylval, respectively.
6911
34160ec4
PE
6912 * data/yacc.c (yyparse): In the initial action, set
6913 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6914 This avoids the use of undefined variables if the initial
6915 action does not set yylloc and/or yylval.
6916
c3d5a4a7
PE
69172005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6918
b34d96c1
PE
6919 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6920 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6921 Remove from CVS. These files are automatically generated.
6922 * examples/extexi: Clarify that this file is now part of Bison,
6923 not GNU M4, and that it works with any POSIX-compatible Awk.
6924 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6925 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6926 so that we also get calc++-parser.yy. Geneate it.
6927 Use $(AWK), not gawk, since any conforming Awk will do.
6928 Put comment before action, since older 'make' can't handle comment
6929 in action.
6930 $(BUILT_SOURCES): List all built sources, not just some of them.
6931 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6932 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6933 $($(calc_sources_generated)): Remove unnecessary test for existence
6934 of target. (This had a shell syntax error anyway; a stray "x".)
6935 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6936 calc++-parser.yy.
6937 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6938
c3d5a4a7
PE
6939 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6940 implied by the other modules.
6941
828c373b
AD
69422005-07-06 Akim Demaille <akim@epita.fr>
6943
6944 Bind examples/calc++ to the package.
6945 * examples/calc++/Makefile: Remove, replaced by...
6946 * examples/calc++/Makefile.am: ... this new file.
6947 * examples/calc++/test: Remove input.
6948 * examples/calc++/compile: Remove.
6949 * examples/Makefile.am: New.
6950 * configure.ac, Makefile.am: Adjust.
6951 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6952
63cb01d6
PE
69532005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6954
fd2df2ed
PE
6955 * data/glr.c (yyFail): Drastically simplify; since the format argument
6956 never had any % directives, we can simply pass it to yyerror.
6957 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6958 be modified later, as that is the usual style in glr.c.
6959 Problems reported by Paul Hilfinger.
6960
63cb01d6
PE
6961 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6962 and size overflow errors.
6963 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6964 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6965 (YYSIZEMAX): New macro.
6966 (yystpcpy): New function, taken from yacc.c.
6967 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6968 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6969 so that we don't have to maintain their signatures.
6970 (yyFail): Check for buffer overflow, by using vsnprintf rather
6971 than vsprintf. Allocate a bigger buffer if possible.
6972 Report an error if buffer allocation fails.
6973 (yyStackOverflow): New function.
6974 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6975 the initialization was successful. It might fail if storage was
6976 exhausted.
6977 (yyexpandGLRStack): Add more checks for storage allocation failure.
6978 Use yyStackOverflow to report failures.
6979 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6980 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6981 Don't assume stack number fits in int.
6982 (yysplitStack): Check for storage allocation failure.
6983 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6984 can print diagnostics on storage allocation failure. All callers
6985 changed.
6986 (yyresolveValue): Use yybool for boolean.
6987 (yyreportSyntaxError): Check for size-calculation overflow.
6988 This code is taken from yacc.c.
6989 (yyparse): Check for storage allocation errors when allocating
6990 the initial stack.
6991
1c59e0a1
AD
69922005-07-05 Akim Demaille <akim@epita.fr>
6993
6994 Extract calc++ from the documentation.
6995 * doc/bison.texinfo (Calc++): Add the extraction marks.
6996 * examples/extexi: New, from the aborted GNU Programming 2E.
6997 Separate the different paragraph of a file with empty lines.
6998 * examples/Makefile: Use it to extract the whole calc++ example.
6999
8a0adb01
AD
70002005-06-24 Akim Demaille <akim@epita.fr>
7001
7002 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7003 class typedefs.
7004
12545799
AD
70052005-06-22 Akim Demaille <akim@epita.fr>
7006
7007 * doc/bison.texinfo (C++ Language Interface): First stab.
7008 (C++ Parsers): Remove.
7009
99be0235
AD
70102005-06-22 Akim Demaille <akim@epita.fr>
7011
7012 * data/lalr1.cc (yylex_): Honor %lex-param.
7013
0ffd4fd1
AD
70142005-06-22 Akim Demaille <akim@epita.fr>
7015
7016 Start a set of simple examples.
7017 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7018 * examples/calc++/calc++-driver.hh,
7019 * examples/calc++/calc++-parser.yy,
7020 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7021 * examples/calc++/compile, examples/calc++/test: New.
7022
0925ebb4
PE
70232005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7024
7025 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7026 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7027 which stems from the 2005-05-27 patch.
7028
43d3b664
PH
70292005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7030
7031 * data/glr.c: Modify treatment of unused parameters to permit use
7032 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7033
3062864d
PE
70342005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7035
7036 Fix infringement on user name space reported by Janos Zoltan Szabo.
7037 * data/yacc.c (yyparse): strlen -> yystrlen.
7038
989b5b8e
AD
70392005-05-30 Akim Demaille <akim@epita.fr>
7040
7041 * data/lalr1.cc (_): New.
7042 Translate the various messages.
7043
bedf57f5
PE
70442005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7045
7046 Fix infringement on user name space reported by Bruno Haible.
7047 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7048 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7049 the user's name space.
7050 (alloca): Include <stdlib.h> to get it, if it's not built in.
7051 (YYMALLOC, YYFREE): Define only if needed.
7052 (malloc, free): Declare, but only if needed, as this infringes on
7053 the user name space.
7054
4d1801f1
PE
70552005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7056
7057 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7058 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7059 with %d format.
7060 * lib/ebitset.c (min, max): Undef before defining.
7061 * lib/vbitset.c (min, max): Likewise.
7062 * lib/subpipe.c (create_subpipe): Save local variables in case
7063 vfork clobbers them.
7064
70652005-05-24 Bruno Haible <bruno@clisp.org>
7066
7067 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7068 error message syntax used by gcc-4.0.
7069
b94a9e1e
PE
70702005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7071
85ac3861
PE
7072 * README: Mention m4 1.4.3. Remove obsolete advice about
7073 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7074
b94a9e1e
PE
7075 * bootstrap: Remove workaround for problem I encountered with
7076 gettext 0.14.1; it seems to be fixed now.
7077
51c30d21
PE
70782005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7079
009ce67d
PE
7080 * NEWS: Version 2.0a.
7081
f2a97c62
PE
7082 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7083 the previous change.
7084
c8775f93
PE
7085 Various maintainer cleanups.
7086 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7087 conftest*, for benefit of CVS commands run at the same time as
7088 "configure". Add build-aux, since "bootstrap" now creates it and
7089 its subfiles.
7090 * Makefile.cfg (move_if_change): Remove.
7091 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7092 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7093 (po_repo, do-po-update, po-update, wget_files, get-targets):
7094 (config.guess-url_prefix, config.sub-url_prefix):
7095 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7096 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7097 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7098 Remove.
7099 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7100 this is now the recommended name.
7101 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7102 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7103 ylwrap. These files now go into build-aux.
7104 * config/move-if-change: Remove.
7105 * config/prev-version.txt: Bump from 1.75 to 2.0.
7106
3ea5f0ec
PE
7107 * bootstrap: Add stdio-safer, unistd-safer modules.
7108 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7109 we don't need it).
7110 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7111 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7112 * lib/subpipe.c: Include "unistd-safer.h".
7113 (create_subpipe): Make sure all the newly-created
7114 file descriptors are > 2, so that diagnostics don't
7115 get sent down them (which might cause Bison to hang, in theory).
7116 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7117 * src/files.c (xfopen): Use fopen_safer, not fopen.
7118
51c30d21
PE
7119 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7120 yesterday's yacc.c fix.
7121
cea1469d
PE
71222005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7123
3ea5f0ec
PE
7124 * data/glr.c, data/lalr1.cc: Update copyright date.
7125
cea1469d
PE
7126 Fix a destructor bug reported by Wolfgang Spraul in
7127 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7128 * data/yacc.c (yyabortlab): Don't call destructor, and
7129 don't set yychar to EMPTY.
7130 (yyoverflowlab): Don't call destructor.
7131 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7132 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7133 since we no longer output the message "discarding lookahead token
7134 end of input ()".
7135
5e6f62f2
PH
71362005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7137
7138 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7139 fix a small glitch in debugging output.
7140 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7141 after YY_SYMBOL_PRINT where needed.
7142
7143 (struct yyGLRState): Add some comments.
7144 (struct yySemanticOption): Add some comments.
7145 (union yyGLRStackItem): Add comment.
7146
7147 (yymergeOptionSets): Correct this to properly perform the union,
7148 avoiding infinite reported by Michael Rosien.
7149 Update comment.
7150
7151 * tests/glr-regression.at: Add test for GLR merging error reported
7152 by M. Rosien.
cea1469d 7153
0fb669f9
PE
71542005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7155
7156 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7157 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7158 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7159 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7160 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7161 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7162 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7163 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7164 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7165 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7166 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7167 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7168 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7169 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7170 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7171 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7172 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7173 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7174 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7175 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7176 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7177 src/output.h, src/parse-gram.c, src/parse-gram.h,
7178 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7179 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7180 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7181 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7182 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7183 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7184 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7185 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7186 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7187 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7188 tests/reduce.at, tests/regression.at, tests/sets.at,
7189 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7190 Update FSF postal mail address.
7191
51f4735e
PE
71922005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7193
7194 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7195 Problem reported by Ralf Menzel.
7196
80ce3401
PE
71972005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7198
7199 * tests/actions.at: Test that stack overflow invokes destructors.
7200 From Marcus Holland-Moritz.
7201 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7202 from here....
7203 (yyreturn): to here. That way, destructors are called properly
7204 even if the stack overflows, or the user calls YYACCEPT or
7205 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7206 (yyoverflowlab): Destroy the lookahead.
7207
72082005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7209
7210 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7211
72f000b0
PE
72122005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7213
7214 * NEWS: Bison-generated C parsers no longer quote literal strings
7215 associated with tokens.
7216 * src/output.c (prepare_symbols): Don't escape strings,
7217 since users don't want to see C escapes.
7218 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7219 in diagnostics.
c19683bb 7220 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
7221 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7222
1094323f
PE
72232005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7224
7225 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7226 the data size is known to be too small and we can't increase it.
7227 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7228
ca407bdf
PE
72292005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7230
7231 * src/parse-gram.y: Include quotearg.h.
7232 (string_as_id): Quote $1 before using it as a key, since the
7233 lexer no longer quotes it for us.
7234 (string_content): Don't strip quotes, since lexer no longer
7235 quotes it for us.
7236 * src/scan-gram.l: Include quotearg.h.
7237 ("\""): Omit quote.
7238 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7239 a key, since the rest of the lexer doesn't quote it.
7240 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7241 * tests/regression.at (Token definitions): Check for backslashes
7242 in token strings.
7243
7244 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7245 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7246 (yyparse): Revamp code to generate long syntax error message, to
7247 make it easier to translate, and to avoid problems with arithmetic
7248 overflow. Change "virtual memory" to "memory" in diagnostic, since
7249 we don't know whether the memory is virtual.
7250
1ce59070
PE
72512005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7252
7253 * NEWS: Bison-generated C parsers now use the _ macro to
7254 translate strings.
7255 * data/yacc.c (_) [!defined _]: New macro.
7256 All English strings wrapped inside this macro.
7257 * doc/bison.texinfo (Bison Parser): Document _.
7258 * po/POTFILES.in: Include src/parse-gram.c, since it now
7259 includes translateable strings that parse-gram.y doesn't.
7260
a749a695
PE
72612005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7262
7263 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7264 reverting the 2004-10-11 change to this function.
7265 (symbol_check_alias_consistency): Don't call symbol_type_set
7266 if the type name is already correct.
7267 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7268
8fb1053b
PE
72692005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7270
7271 * tests/regression.at (Token definitions): Don't use a token named
7272 c, as that generates a "#define c ..." that runs afoul of buggy
7273 stdlib.h that uses the identifier c as a member of struct
7274 drand48_data. Problem reported by Horst Wente.
7275
ff498c4a
PE
72762005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7277
7278 * bootstrap: Change translation URL from
7279 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7280 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7281 redirection glitches. Problem reported by twlevo@xs4all.nl.
7282
65211d70
PE
72832005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7284
7285 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7286 after operands; POSIX says this isn't portable for the c99 command.
7287
9577fb1f
PE
72882005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7289
7290 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7291 immediately if a data overrun has occurred; this may help us track
7292 down what may be a spurious failure on MacOS.
7293
78b178f7
PE
72942005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7295
a2599d0f
PE
7296 Respond to problems reported by twlevo@xs4all.nl.
7297
7298 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7299
78b178f7
PE
7300 * src/vcg.h: Comment fix.
7301 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7302 (G_CMAX): Change to -1 instead of INT_MAX.
7303
7304 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 7305
7296e729
PE
73062005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7307
7308 * src/tables.c (state_number_to_vector_number): Put it inside an
7309 "#if 0", since it's not currently used. Problem reported by
7310 Roland McGrath.
7311
05ac60f3
PE
73122005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7313
7314 * src/output.c (escaped_output): Renamed from
7315 escaped_file_name_output, since we now use it for symbol tags as
7316 well. All uses changed.
7317 (symbol_destructors_output, symbol_printers_output):
7318 Escape symbol tags too.
7319 Problem reported by Matyas Forstner in
7320 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7321
7322 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7323 not needed.
7324 * src/output.c (user_actions_output, token_definitions_output,
7325 symbol_destructors_output, symbol_printers_output): Likewise.
7326 * src/reader.c (prologue_augment): Likewise.
7327 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7328
7329 * src/vcg.c (output_edge): Don't quote linestyle arg.
7330 Problem reported by twlevo@xs4all.nl.
7331
7eb453ac
PE
73322005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7333
7334 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7335 example, reported by Derek M Jones. Also, make the example even
7336 more outrageous, to better illustrate how bad the problem is.
7337
4c04c52a
PE
73382005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7339
7340 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7341 putsym. Typo reported by Sebastian Piping.
7342
a61e1620
PE
73432005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7344
7345 * doc/bison.texinfo (Language and Grammar): some -> same
7346 (Epilogue): int he -> in the
7347 Typos reported by Sebastian Piping via Justin Pence.
7348
9ec93868
PE
73492005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7350
7351 * tests/glr-regression.at (Improper handling of embedded actions
7352 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7353 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7354 with dollar signs in test names.
7355 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7356 for a similar reason.
7357
73ce7e7e
PE
73582005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7359
7360 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7361 wants to redefine G_VIEW.
7362
2e72b98e
PE
73632005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7364
7365 * src/vcg.c (get_view_str): Remove case for normal_view.
7366 Problem reported by twlevo@xs4all.nl.
7367
e0d634e5
PE
73682005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7369
ccf830a4
PE
7370 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7371 Problem reported by twlevo@xs4all.nl.
7372
e0d634e5
PE
7373 * doc/bison.texinfo: Change @dircategory from "GNU programming
7374 tools" to "Software development". Requested by Richard Stallman
7375 via Karl Berry.
7376
7bbc8cb0
PE
73772005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7378
7379 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7380 Problem reported by twlevo@xs4all.nl.
7381
08b770bc
PE
73822005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7383
7384 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7385 keyword; it's not needed with modern compilers, and it doesn't
7386 affect correctness with older compilers. Suggested by
7387 twlevo@xs4all.nl.
7388
95f22ad2
PE
73892005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7390
7391 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7392 gcc -Wswitch-default.
7393 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7394 * data/yacc.c (yyparse): Likewise.
7395
d229d15c
PE
73962005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7397
7398 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7399 already. Let config.h define any nonstandard values.
7400
ecadd90f
PE
74012005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7402
7403 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7404 for the benefit of slower hosts. Problem reported by
7405 Nelson H. F. Beebe.
7406
213744b5
PE
74072005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7408
7409 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7410 being defined and not used.
7411 * data/lalr1.cc (yyparse): Likewise.
7412 Use "if (false)" rather than "if (0)".
7413
249d3236
PE
74142005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7415
7416 * TODO: Mention that we should allow NUL bytes in tokens.
7417
987cc1fb
PE
74182005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7419
7420 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7421 Problem reported by Hans Aberg.
7422
08fe02d9
PE
74232005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7424
7425 * src/getargs.c (version): Happy new year; update overall
7426 program copyright date from 2004 to 2005.
7427
7428 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7429 Problem reported by Hans Aberg.
7430 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7431 (Output file names.): Add a test for the case when standard output
7432 is closed.
7433
010c0266
PE
74342004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7435
7436 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7437 to fix an oversight in the Bison 2.0 manual.
7438
da12206a
PE
74392004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7440
7441 * NEWS: Version 2.0. Reformat the existing news items since
7442 1.875, so that related items are grouped together.
3a4734aa 7443 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
7444 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7445
c935d934
PE
7446 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7447 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7448 otherwise, we're not testing alloca. Unfortunately there's no
7449 simple way to consult HAVE_ALLOCA here.
7450
da12206a
PE
7451 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7452 for yymsg, too.
7453
7454 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7455 hand. This avoids a warning about comparing int to size_t when
7456 GCC warnings are enabled.
7457
0a2c5137
PE
74582004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7459
d7e14fc0
PE
7460 * NEWS: Bison-generated parsers no longer default to using the
7461 alloca function (when available) to extend the parser stack, due
7462 to widespread problems in unchecked stack-overflow detection.
7463 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7464 responsibility to set it to a positive value. This lets the user
7465 specify a value that is not a preprocessor constant.
7466 * data/yacc.c (YYMAXDEPTH): Likewise.
7467 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7468 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7469 to be a compile-time constant. However, explain the constraints on it.
7470 Also, explain the constraints on YYINITDEPTH.
7471 (Table of Symbols): Explain that alloca is no longer the default.
7472 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7473 to 1.
7474
0a2c5137
PE
7475 * doc/bison.texinfo (Location Default Action): Mention that n must
7476 be zero when k is zero. Suggested by Frank Heckenbach.
7477
e019c247
AD
74782004-12-22 Akim Demaille <akim@epita.fr>
7479
7480 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7481 (parser::state_type, parser::semantic_type, parser::location_type):
7482 Private, not public.
7483 (parser::parse): Return ints, not bool.
7484 Returning a bool introduces a problem: 0 corresponds to false, and
7485 it seems weird to return false on success. Returning true changes
7486 the conventions for yyparse.
7487 Alternatively we could return void and send an exception.
7488 There is no clear consensus (yet?).
7489 (state_stack, semantic_stack, location_stack): Rename as...
7490 (state_stack_type, semantic_stack_type, location_stack_type): these.
7491 Private, not public.
7492 * tests/c++.at: New.
7493 * tests/testsuite.at, tests/Makefile.am: Adjust.
7494
72731bb7
AD
74952004-12-21 Akim Demaille <akim@epita.fr>
7496
7497 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7498
9a0d8bec
AD
74992004-12-21 Akim Demaille <akim@epita.fr>
7500
7501 Don't impose std::string for filenames.
7502
7503 * data/lalr1.cc (b4_filename_type): New.
7504 (position::filename): Use it.
7505 (parser.hh): Move the inclusion of stack.hh and location.hh below
7506 the user code, so that needed headers for the filename type can be
7507 included first.
72731bb7
AD
7508 Forward declare them before the user code.
7509 * tests/Makefile.am (check-local, installcheck-local): Pass
7510 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 7511
99880de5
AD
75122004-12-20 Akim Demaille <akim@epita.fr>
7513
7514 Use more STL like names: my_class instead of MyClass.
7515
7516 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7517 (SemanticStack, SemanticType, StateStack, StateType)
7518 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7519 (Parser::value): Rename as...
7520 (location_stack, location_type, rhs_number_type, semantic_stack)
7521 (semantic_type, state_stack, state_type, token_number_type, stack)
7522 (slice, traits, parser::yylloc, parser::yylval): these.
7523
7524 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7525
9bec482e
PE
75262004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7527
7528 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7529 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7530
f6fbd3da
PE
75312004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7532
7533 Remove uses of 'short int' and 'unsigned short int'. This raises
7534 some arbitrary limits. It uses more memory but nowadays that's
7535 not much of an issue.
7536
7537 This change does not affect the generated parsers; that's a different
7538 task, as some users will want to conserve memory there.
7539
7540 Ideally we should use size_t to represent all object counts, and
7541 something like ptrdiff_t to represent signed differences of object
7542 counts; but that will require more code-cleanup than I have the
7543 time to do right now.
7544
7545 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7546 Use size_t, not int or short int, to count objects.
7547 * src/closure.c (nritemset, closure): Likewise.
7548 * src/closure.h (nritemset, closure): Likewise.
7549 * src/nullable.c (nullable_compute): Likewise.
7550 * src/print.c (print_core): Likewise.
7551 * src/print_graph.c (print_core): Likewise.
7552 * src/state.c (state_compare, state_hash): Likewise.
7553 * src/state.h (struct state): Likewise.
7554 * src/tables.c (default_goto, goto_actions): Likewise.
7555
7556 * src/gram.h (rule_number, rule): Use int, not short int.
7557 * src/output.c (prepare_rules): Likewise.
7558 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7559 errs, reductions): Likewise.
7560 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7561 Likewise.
7562 * src/tables.c (vector_number, tally, action_number,
7563 ACTION_NUMBER_MINIMUM): Likewise.
7564 * src/output.c (muscle_insert_short_int_table): Remove.
7565
efeed023
AD
75662004-12-17 Akim Demaille <akim@epita.fr>
7567
7568 * data/lalr1.cc: Extensive Doxygenation.
7569 (error_): Rename as...
7570 (error): this, since it is visible to the user.
7571 Adjust callers.
7572 (Parser::message): Now an automatic variable from...
7573 (Parser::yyreport_syntax_error_): here.
7574 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7575 Parser::error.
7576 * tests/input.at: Escape $.
7577
bc82c5a5
PE
75782004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7579
7580 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7581 Parenthesize rhs to avoid obscure problems with mistakes like
7582 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7583 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7584 b4_rhs_location): Likewise.
7585 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7586 b4_rhs_location): Likewise.
7587
fd19f271
AD
75882004-12-16 Akim Demaille <akim@epita.fr>
7589
7590 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7591 yacc.c: be sure to stay within yycheck_.
7592 * tests/actions.at: Re-enable C++ tests.
7593
10454ea4
AD
75942004-12-16 Akim Demaille <akim@epita.fr>
7595
7596 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7597 real.
7598
c5b95ccf
AD
75992004-12-16 Akim Demaille <akim@epita.fr>
7600
7601 Use #define to handle the %name-prefix.
7602
7603 * data/glr.c, data/yacc.c: Comment changes.
7604 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7605 so that one can refer to yylex in the parser file, and have it
7606 renamed, as is the case with other skeletons.
7607
617a8f12
AD
76082004-12-16 Akim Demaille <akim@epita.fr>
7609
7610 Move lalr1.cc internals into yy*.
7611
7612 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7613 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7614 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7615 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7616 (empty_, final_, terror_, errcode_, ntokens_)
7617 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7618 (looka_, ilooka_, error_range_, nerrs_):
7619 Rename as...
7620 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7621 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7622 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7623 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7624 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7625 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7626 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7627 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7628 these.
7629
1e547e6e
PE
76302004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7631
7632 Fix some problems reported by twlevo at xs4all.
7633 * src/symtab.c (symbol_new): Report an error if the input grammar
7634 contains too many symbols. This is better than calling abort() later.
7635 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7636 (struct node, struct graph):
7637 Rename member expand to stretch. All uses changed.
7638 (struct graph): Remove member layoutalgorithm. All uses removed.
7639 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7640 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7641 All uses changed.
7642 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7643
735d6bd4
AD
76442004-12-15 Akim Demaille <akim@epita.fr>
7645
7646 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7647 Add more Doxygen comments.
7648 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7649 (report_syntax_error_, translate_): Rename as...
7650 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7651 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7652
2e1f5829
AD
76532004-12-15 Akim Demaille <akim@epita.fr>
7654
7655 * data/lalr1.cc (lex_): Rename as...
7656 (yylex_): this.
7657 Move the trace here.
7658 Take the %name-prefix into account.
7659 Reported by Alexandre Duret-Lutz.
7660
a3cb6248
AD
76612004-12-15 Akim Demaille <akim@epita.fr>
7662
7663 Simplify the C++ parser constructor.
7664
7665 * data/lalr1.cc (debug_): Rename as...
7666 (yydebug_): so that the parser's internals are always in the yy*
7667 pseudo namespace.
7668 Adjust uses.
7669 (b4_parse_param_decl): Remove the leading comma as it is now only
7670 called as unique argument list.
7671 (Parser::Parser): Remove the constructor accepting a location and
7672 an initial debugging level.
7673 Remove from the other ctor the argument for the debugging level.
7674 (debug_level_type, debug_level, set_debug_level): New.
7675
7676 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7677 constructor calls.
7678
07fed891
AD
76792004-12-15 Akim Demaille <akim@epita.fr>
7680
7681 Remove b4_root related material: failure experiment
a3cb6248 7682 (which goal was to allow to derive from a class).
07fed891
AD
7683
7684 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7685 definitions and uses.
7686
e603eaa5
PE
76872004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7688
7689 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7690 not 2, since it's not portable to subtract 1 from the start of an
7691 array. The new item 0 is never set or used. All uses changed.
7692
7693 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7694 the default definition of YYLLOC_DEFAULT. Problem reported
7695 by Frank Heckenbach.
7696
fafb007d
PE
76972004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7698
7699 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7700 the normal case and one for the error case. Just use the
7701 first one uniformly. Problem reported by Frank Heckenbach.
7702 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7703 use exactly the same macro in both places.
7704 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7705 so that the normal-case YYRHSLOC works for the error case too.
7706 All uses changed.
7707 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7708 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7709 * doc/bison.texinfo (Location Default Action): Don't claim that
7710 we have an array of locations. Use the same macro for both glr
7711 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7712 the index is 0.
7713
48814dcd
PE
77142004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7715
a4e1a53b
PE
7716 * HACKING: Update email addresses to send announcements to.
7717
48814dcd
PE
7718 * configure.ac (AC_INIT): Bump version to 1.875f.
7719
337116ba
PE
77202004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7721
7722 * NEWS: Version 1.875e.
7723 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7724
7725 * src/scan-skel.l: Include "complain.h", for "fatal".
7726
7727 * src/relation.h (relation_print, relation_digraph):
7728 Relation sizes are of type relation_node, not size_t (this is
7729 merely a doc fix, since the two types are equivalent).
7730 (relation_transpose): Relation sizes are of type relation_node,
7731 not int.
7732 * src/relation.c: Likewise.
7733 (top, infinity): Now of type relation_node, not int.
7734 (traverse, relation_transpose): Use relation_node, not int.
7735
7736 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7737 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7738 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7739
7740 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 7741 specifying whether the test should be skipped. Use it tp
337116ba 7742 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 7743 fail on some hosts, and should be skipped.
337116ba 7744
da2a7671
PE
77452004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7746
7747 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7748 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7749 unless otherwise specified below.
7750
7751 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7752 to allocate kernel_base, kernel_items, kernel_size, since
7753 they needn't be initialized to 0.
7754 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7755 * src/closure.c (new_closure): Likewise, for itemset.
7756 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7757 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7758 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7759 (build_relations): Likewise for edge, states1, includes.
7760 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7761 * src/reader.c (packgram): Likewise, for ritem, rules.
7762 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7763 * src/relation.c (relation_digraph): Likewise for VERTICES.
7764 (relation_transpose): Likewise for new_R, end_R.
7765 * src/symtab.c (symbols_token_translations_init): Likewise for
7766 token_translations.
7767 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7768 (token_actions): Likewise for yydefact, actrow, conflrow,
7769 conflict_list.
7770 (save_column): Likewise for froms[symno], tos[symno].
7771 (goto_actions): Likewise for state_count.
7772 (pack_table): Likewise for base, pos, check.
7773 (tables_generate): Likewise for width.
7774
7775 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7776 for initial core. Just have a separate core, so we needn't worry
7777 about whether kernel_size and kernel_base are initialized.
7778
7779 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7780 kernel_size, kernel_items): Remove unnecessary initialization.
7781 * src/conflicts.c (conflicts): Likewise.
7782 * src/derives.c (derives): Likewise.
7783 * src/muscle_tablc (muscle_insert): Likewise.
7784 * src/relation.c (relation_digraph): Likewise.
7785 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7786 conflrow, conflict_table, conflict_list, table, check):
7787 Likewise.
7788
7789 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7790 This is because all callers pass unsigned int.
7791 * src/closure.h (new_closure): Likewise.
7792
7793 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7794 (build_relations): Initialize includes[i] in all cases.
7795 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7796 and rules[ruleno].precsym. Initialize members in order.
7797 * src/relation.c (relation_transpose): Always initialize new_R[i]
7798 and end_R[i].
7799 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7800
7801 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7802 conflict_list[0] was always 0, but now it isn't initialized.
7803
7804 * src/table.c (table_grow): When conflict_table grew, the grown
7805 area wasn't cleared. Fix this.
7806
7807 * lib/.cvsignore: Add strdup.c, strdup.h.
7808 * m4/.cvsignore: Add strdup.m4.
7809
00baeeac
PE
78102004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7811
7812 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7813 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7814 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7815 ngotos + 1 without checking for overflow.
7816 (build_relations): Use END_NODE, not -1, to denote end of edges.
7817 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7818 build_relations): Use goto_number, not int, for goto numbers.
7819 * src/tables.c (save_column, default_goto): Likewise.
7820
be3d9d42
AD
78212004-11-23 Akim Demaille <akim@epita.fr>
7822
7823 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7824 of #defining from yystype.
7825 Don't typedef yystype, C++ does not need it.
7826 This lets it possible to forward declare it as union.
7827
78e526d5
PE
78282004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7829
7830 * bootstrap (gnulib_modules): Add extensions.
7831 Problem reported by Jim Meyering.
7832
afbb696d
PE
78332004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7834
7835 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7836 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7837 src/system.h, src/tables.c: XFREE -> free, to accommodate
7838 recent change to gnulib xalloc.h.
78e526d5 7839 Problem reported by Jim Meyering.
afbb696d 7840
c1f8f16a
AD
78412004-11-17 Akim Demaille <akim@epita.fr>
7842
7843 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7844
db7e5eb5 78452004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
7846 Alexandre Duret-Lutz <adl@gnu.org>
7847
7848 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7849 changes.
7850 (YYCDEBUG): Adjust.
7851 Use it instead of cdebug_.
7852 (Parser::debug_stream, Parser::set_debug_stream): New.
7853 (Parser::symprint_): Define cdebug_ for temporary backward
7854 compatibility.
7855 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7856 debug_stream ().
7857
68e11668
AD
78582004-11-17 Akim Demaille <akim@epita.fr>
7859
7860 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7861 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7862 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7863 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7864
97cbc73e
PE
78652004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7866
7867 * data/glr.c (yyloc_default): Remove; not used.
7868 Problem reported by Frank Heckenbach.
7869
e342c3be
AD
78702004-10-25 Akim Demaille <akim@epita.fr>
7871
7872 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7873 Introduce another definition to address simple location arrays.
7874 (yyGLRStack): New member: yyerror_range.
7875 (yyrecoverSyntaxError, yyparse): Update it.
7876 (yyrecoverSyntaxError): Use it when shifting the error token to
7877 have an accurate range, equivalent to the one computed by both
7878 yacc.c and lalr1.cc.
7879 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7880 that column numbers start at column 0, as per GNU Coding
7881 Standards, the others tests, and the doc.
7882 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7883 Adjust to the above change (first column is 0).
7884 And adjust the location of the "<error>", now covering the whole
7885 line.
7886
93602feb 78872004-10-22 Akim Demaille <akim@epita.fr>
04098407 7888 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
7889
7890 Remove some arbitrary limits on goto numbers and relations.
7891 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7892 initial values, since they're never used.
7893 (set_goto_map): ngotos is now unsigned, so test for overflow
7894 by seeing whether it wraps around to zero.
7895 * src/lalr.h (goto_number): Now size_t, not short int.
7896 (GOTO_NUMBER_MAXIMUM): Remove.
7897 * src/relation.c (relation_print, traverse, relation_transpose):
7898 Check for END_NODE rather than looking at sign.
7899 * src/relation.h (END_NODE): New macro.
7900 (relation_node): Now size_t, not short int.
7901
dba08b04
PE
79022004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7903
7904 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7905 keyword, not an identifier. Problem reported by Baron Schwartz in
7906 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7907
df09ef2e
AD
79082004-10-11 Akim Demaille <akim@epita.fr>
7909
7910 * src/symtab.c (symbol_check_alias_consistency): Also check
7911 type names, destructors, and printers.
7912 Reported by Alexandre Duret-Lutz.
7913 Recode the handling of associativity and precedence in terms
7914 of symbol_precedence_set.
7915 Accept no redeclaration at all, not even equal to the previous
7916 value.
7917 (redeclaration): New.
7918 Use it to factor redeclaration complaints.
7919 (symbol_make_alias): Don't set the type of the alias, let
7920 symbol_check_alias_consistency do it as for other features.
7921 * src/symtab.h (symbol): Add new member prec_location, and
7922 type_location.
7923 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7924 * tests/input.at (Incompatible Aliases): New.
7925
146bc99d
PE
79262004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7927
7928 .cvsignore fixes to accommodate gnulib changes,
7929 and the practice of naming build directories "_build".
7930 * .cvsignore: Add "_*". Sort.
7931 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7932 * m4/.cvsignore: Add "*_gl.m4".
7933
e503aa60
AD
79342004-10-06 Akim Demaille <akim@epita.fr>
7935
7936 * src/parse-gram.y (add_param): Fix the truncation of trailing
7937 spaces.
7938
b4a20338
AD
79392004-10-05 Akim Demaille <akim@epita.fr>
7940
7941 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7942 whether the reducion was empty or not. This leaves room to
7943 improve the use of YYLLOC_DEFAULT in such a case.
7944 lalr1.cc is still experimental, so changing this is acceptable.
7945 And finally, there are probably not many users who changed the
7946 handling of locations in GLR, so changing is admissible too.
7947
7948 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7949 empty reduction, set @$ to an empty location ending the previously
7950 stacked symbol.
7951 Adjust uses to make sure the code is triggered on empty
7952 reductions.
7953 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7954 expected output: empty reductions have empty locations.
7955
f85a5e6f
AD
79562004-09-29 Akim Demaille <akim@epita.fr>
7957
7958 * data/lalr1.cc: Move towards a more standard C++ coding style
7959 for templates: Class < T > -> Class<T>.
7960
b203fc2c
AD
79612004-09-29 Akim Demaille <akim@epita.fr>
7962
7963 * data/lalr1.cc: Reinstall the former ctor, for sake of
7964 compatibility, but warn it will be removed.
7965 Move towards a more standard C++ coding style (i.e., type *var ->
7966 type* var).
7967
5b7e1e73
PE
79682004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7969
3fee967f
PE
7970 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7971 since it's less likely to work if NULs are involved in the future.
5b7e1e73 7972
0dcca5c2
AD
79732004-09-27 Akim Demaille <akim@epita.fr>
7974
7975 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7976
6dde1c82
AD
79772004-09-27 Akim Demaille <akim@epita.fr>
7978
7979 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 7980 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
7981 and argument names.
7982 (b4_cc_constructor_call): Likewise.
7983
b233d555
AD
79842004-09-24 Akim Demaille <akim@epita.fr>
7985
7986 * src/parse-gram.y (add_param): Strip the leading and trailing
7987 blanks from a formal argument declaration.
7988 (YY_LOCATION_PRINT): New.
7989
619404e3
AD
79902004-09-24 Akim Demaille <akim@epita.fr>
7991
7992 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7993 after the location.
7994
dd8d9022
AD
79952004-09-24 Akim Demaille <akim@epita.fr>
7996
7997 * doc/bison.texinfo (Table of Symbols): Sort.
7998
0092f063
AD
79992004-09-21 Akim Demaille <akim@epita.fr>
8000
8001 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8002 the useless parentheses.
8003 Suggested by Paul Eggert.
8004
451364ed
AD
80052004-09-20 Akim Demaille <akim@epita.fr>
8006
8007 Let the initial-action act on the look-ahead, and use it for the
8008 "initial push" (corresponding to an hypothetical beginning-of-file).
8009 And let lalr1.cc honor %initial-action.
8010
8011 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8012 example.
8013 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8014 (Parser::Parser): Remove the ctor that used to initialize it.
8015 (Parser::parse): Like in the other skeletons, issue the "starting
8016 parse" message before any action.
8017 Honor %initial-action.
8018 Initialize the stacks with the lookahead.
8019 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8020 look-ahead.
8021 Push them in the stacks.
8022 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8023
18d192f0
AD
80242004-09-20 Akim Demaille <akim@epita.fr>
8025
8026 * doc/bison.texinfo (Initial Action Decl): New.
8027
b8458aa5
AD
80282004-09-20 Akim Demaille <akim@epita.fr>
8029
8030 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8031 clearer criterion to define it.
8032 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8033 When reducing on an empty RHS, use the latest stacked location as
8034 location.
8035 yylloc is not always available.
8036 * data/glr.c: Likewise.
8037 Also, honor initial-actions.
8038
3fc16193
AD
80392004-09-20 Akim Demaille <akim@epita.fr>
8040
8041 * data/yacc.c (YY_LOCATION_PRINT): New.
8042 Define when we know YYLTYPE's structure, i.e., when the default
8043 YYLLOC_DEFAULT is used.
8044 * data/c.m4 (b4_yysymprint_generate): Use it.
8045 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8046 value of the result.
8047 (error_start_): Replace with...
8048 (error_range_): this location array.
8049 This allows to replace code relying on the implementation of
8050 locations by portable code.
8051 * data/yacc.c (yylerrsp): Replace with...
8052 (yyerror_range): this.
8053 Every time a token is popped, update yyerror_range[0], to have an
8054 accurate location for the error token.
8055 * data/glr.c (YY_LOCATION_PRINT): New.
8056 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8057 deference a pointer.
8058 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8059 report the location in %printers.
8060
8061 * src/scan-skel.l: Instead of abort, report error messages to ease
8062 understanding skeleton scanning failures.
8063
ecfe33e7
AD
80642004-09-16 Akim Demaille <akim@epita.fr>
8065
8066 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8067 (iterator, const_iterator): these, to be more in the C++ spirit.
8068 Also, return reverse iterators so that when displaying the stack
8069 we display its bottom first.
8070 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8071 from yacc.c.
8072 We should probably use vector here though.
8073
1576d44d
AD
80742004-09-16 Akim Demaille <akim@epita.fr>
8075
8076 Have more complete shift traces.
8077
8078 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8079 to report Shifts instead of ad hoc YYDPRINTF invocations,
8080 including for the error token.
8081 * data/lalr1.cc (symprint_): Output the location.
8082 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8083 output the location within the %printer.
8084 Activate GLR tests, at least to make sure they compile properly.
8085 They still don't pass though.
8086 * tests/calc.at: Adjust expect verbose output, since now "Entering
8087 state..." is on a different line than the "Shifting" message.
8088
9c66f418
AD
80892004-09-08 Akim Demaille <akim@epita.fr>
8090
8091 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8092 Bison directive from the Bison file to the invocation of this
8093 macro, so that these directives are passed to
8094 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8095 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8096 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8097 the extra Bison directives instead of the whole series.
8098 Change the grammar so that there are recoverable errors, and
8099 unrecoverable errors. Now we can have the parser give up before
8100 consuming the whole input. As a result we now can observe that
8101 the lookahead is freed when needed.
8102 Change the parser source to parse argv[1] instead of a hard coded
8103 string.
8104 Simplify yylex, and give a value and location to EOF.
8105 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8106 passed directives already coded in the file.
8107 Add some tests to check the location of "error".
8108 For some tests, the C++ parser is correct, and not yacc.c.
8109 For other tests, they provide different, but unsatisfying, values,
8110 so keep the C++ value so that at least one parser is "correct"
8111 according to the test suite.
8112 (Actions after errors): Remove, this is subsumed by the
8113 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8114
52d5733f
AD
81152004-09-06 Akim Demaille <akim@epita.fr>
8116
8117 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 8118 (Parser::pop): New.
52d5733f
AD
8119 Use it.
8120
a0e68930
AD
81212004-09-06 Akim Demaille <akim@epita.fr>
8122
8123 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8124 argument, an informative message.
8125 Call YY_SYMBOL_PRINT.
8126 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8127 * data/lalr1.cc (destruct_): Likewise.
8128 In addition, no longer depend on b4_yysymprint_generate and
8129 b4_yydestruct_generate to generate these functions, do it "by
8130 hand".
8131
e757bb10
AD
81322004-09-03 Akim Demaille <akim@epita.fr>
8133
8134 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8135 invoked, yydestruct the lookahead.
8136 * tests/calc.at (Calculator $1): Update the expected lengths of
8137 traces: there is an added line for the discarded lookahead.
8138 * doc/bison.texinfo (Destructor Decl): Some rewording.
8139 Define "discarded" symbols.
8140
0fe1f06d
AD
81412004-09-02 Akim Demaille <akim@epita.fr>
8142
8143 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8144
284acc8b
AD
81452004-09-02 Akim Demaille <akim@epita.fr>
8146
8147 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8148 (YYDSYMPRINTF): Rename as...
8149 (YY_SYMBOL_PRINT): this.
8150 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8151 two.
8152 Use it instead of direct symprint_ calls.
8153 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8154 one.
8155
a5eb1ed2
AD
81562004-09-02 Akim Demaille <akim@epita.fr>
8157
b7c72fe1
AD
8158 * data/lalr1.cc (b4_yysymprint_generate): New.
8159 (symprint_): New member function, defined when YYDEBUG.
8160 Use it consistently instead of token/nterm debugging output by
8161 hand.
a5eb1ed2
AD
8162 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8163 %printer calls to use cdebug_ when using lalr1.cc.
8164
417141dd
AD
81652004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8166
8167 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8168 with #ifdef YYDEBUG.
8169
2fa09258
AD
81702004-08-26 Akim Demaille <akim@epita.fr>
8171
8172 * doc/bison.texinfo (Implementing Loops): Rename as...
8173 (Implementing Gotos/Loops): this.
8174
9378b508
PE
81752004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8176
8177 Adjust to latest gnulib.
8178 * bootstrap (gnulib_modules): Add xalloc-die.
8179 Set LC_ALL=C so that file names sort consistently.
8180 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8181 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8182 uintmax_t.m4, ulonglong.m4.
8183 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8184 po.m4 since we are now using _gl.m4 instead.
8185
87a8ad5c
PE
81862004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8187
8188 * src/scan-action.l: Remove. Scanning of semantic actions is
8189 handled in scan-gram.l.
8190
dca81a78
PE
81912004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8192
8193 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8194
8195 * src/location.h (struct): The file member is a uniqstr.
8196 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8197
c9cbf7c5
PE
81982004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8199
8200 Fix bug with non-%union parsers that have printers or destructors,
8201 which led to a Bison core dump. Reported by Peter Fales in
8202 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 8203
c9cbf7c5
PE
8204 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8205 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8206 not to our own type.
8207 * src/output.c (symbol_destructors_output, symbol_printers_output):
8208 Don't assume %union.
8209 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8210 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8211 UNION-FLAG. All callers changed.
8212 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8213 Use type char, not unsigned int, when declaring an array of char;
8214 this lets us remove a cast.
8215 (Printers and Destructors): Add non-%union test cases.
8216
fa7e68c3
PE
82172004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8218
8219 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8220 GLR writeups. E.g., avoid frenchspacing and the future tense,
8221 change "lookahead" to "look-ahead", and change "wrt" to "with
8222 respect to".
2fa09258 8223
fa7e68c3
PE
82242004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8225
8226 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8227 New sections, split off from the GLR Parsers section. Put the new
8228 Simple GLR Parser near the start of the GLR section, for clarity.
8229 Rewrite connective text.
8230
99a9344e
PE
82312004-06-21 Frank Heckenbach <frank@g-n-u.de>
8232
8233 * doc/bison.texinfo (Simple GLR Parsers): New section.
8234
8dd162d3
PE
82352004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8236
8237 * NEWS, TODO, doc/bison.texinfo:
8238 Use "look-ahead" instead of "lookahead", to be consistent.
8239 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8240 while we're fixing "look-ahead".
8241 * src/conflicts.c (shift_set): Renamed from shiftset.
8242 (look_ahead_set): Renamed from lookaheadset.
8243 * src/print.c: Likewise.
8244 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8245 name for "lookahead".
8246 (report_types, usage): Likewise.
8247 * src/getargs.h (report_look_ahead_tokens): Renamed from
8248 report_lookaheads.
8249 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8250 compute_lookaheads.
8251 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8252 (look_ahead_tokens_print): Renamed from lookaheads_print.
8253 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8254 state_rule_lookaheads_print.
8255 * src/state.h: Likewise.
8256 (reductions.look_ahead_tokens): Renamed from lookaheads.
8257 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8258 AT_DATA_LOOKAHEADS_GRAMMAR.
8259
57a90331
PE
82602004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8261
8262 * README: Update location of patched M4 distribution.
8263
8ed3234a
PE
82642004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8265
8266 Don't assume the C++ compiler takes the same arguments as the C compiler
8267 (trivial change).
8268 * configure.ac (O0CXXFLAGS): New var.
8269 * tests/atlocal.in (CXXFLAGS): Use it.
8270
07971983
PE
82712004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8272
8273 Fix some "make check" problems with C++ reported by
8274 Albert Chin-A-Young for Tru64 C++ in this thread:
8275 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8276
8277 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8278 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8279 Output to a .cc file for C++, not to a .c file.
8280 * tests/calc.at (AT_CHECK_CALC): Likewise.
8281 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8282 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8283
29058652
PE
82842004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8285
8286 * tests/calc.at, tests/actions.at: Workaround for SGI
8287 C++ compiler. (trivial change)
8288
62cb8a99
PE
82892004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8290
fd418816
PE
8291 Spent a few hours checking out which prerequisite versions the
8292 current sources actually require. I went all the way back to
8293 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8294 a seemingly endless set of combinations of versions more recent
8295 than that. The bottom line is that the current sources require
8296 fairly recent versions of the build tools, and it'll be some work
8297 to change this.
8298 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8299 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8300 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8301 Add comments explaining why those particular versions are
8302 currently needed.
2fa09258 8303
62cb8a99
PE
8304 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8305 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 8306 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
8307
8308 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8309 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8310
caa52c10
PE
83112004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8312
8313 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8314 0.11.5. Suggested by Bruno Haible.
8315 * bootstrap: Remove gettext version checking.
8316
8317 * doc/bison.texinfo (Decl Summary): Also mention that %union
8318 can depend on prerequisite types. Problem reported by Tim
8319 Van Holder.
8320
4bfd5e4e
PE
83212004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8322
2cef3017
PE
8323 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8324 * README-alpha: Don't tell people not to package this.
8325
b9c85d5c
PE
8326 * bootstrap: Don't assume $(...) works; use `...` instead.
8327 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8328 gettext better.
8329
4bfd5e4e
PE
8330 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8331 put into the -d output file, and mention what to do if YYSTYPE is
8332 defined as a macro.
8333
6a36ff94
PE
83342004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8335
6712933e
PE
8336 Undo change made earlier today: it caused autopoint to not bring
8337 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8338 autopoint's.
8339
8340 * bootstrap: Check that gettext version matches what's in
8341 configure.ac. Warn users to ignore robots.txt ERROR 404.
8342 * bootstrap: Undo today's earlier change (logged below).
8343 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 8344
6a36ff94
PE
8345 The gettext version checking is causing more trouble than it's
8346 curing; remove it. Problem reported by Paul Hilfinger.
8347
8348 * bootstrap: Issue a warning that one can expect a message
8349 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8350 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8351
209ea708
PE
83522004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8353
8354 Ensure that the C++ compiler used for testing actually works on a
8355 simple test program; if not, skip the C++-related tests. Problem
8356 reported by Vin Shelton in:
161a71f3 8357 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
8358
8359 * m4/cxx.m4: New file.
8360 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8361 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8362 * tests/local.at (AT_COMPILE_CXX): Use it.
8363
41ca2549
PE
83642004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8365
383e69dc
PE
8366 * data/glr.c (yylloc): Output this macro even if locations are not
8367 being generated, as the GLR parser needs it even in that case.
8368 Problem reported by Troy A. Johnson
8369 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8370
41ca2549
PE
8371 * configure.ac (AC_INIT): Update to 1.875e.
8372
e476c87d
PE
83732004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8374
8375 * NEWS: Version 1.875d.
8376 * configure.ac (AC_INIT): Likewise.
8377 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8378
8379 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8380 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8381 lalr1.cc runs afoul of the first, and the last two are no longer
8382 supported by GCC 3.4.0.
8383 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8384 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8385
233a88ad
PE
83862004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8387
8388 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8389 unsigned int, for compatibility with latest gnulib hash module.
8390 * src/state.c (state_hash, state_hasher): Likewise.
8391 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8392 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 8393
12ffdd28
PE
83942004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8395
8396 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8397
8398 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8399 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8400 character and string literals.
8401 (unexpected_end): New function.
8402 (unexpected_eof): Use it.
8403 (unexpected_newline): New function.
8404 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8405 actions.
e476c87d 8406
12ffdd28
PE
8407 * NEWS: Document %expect-rr.
8408
8409 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8410 Fix typo by replacing $1 with $option.
8411 Remove more 'intl'-related files.
9668e2be 8412 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
8413
8414 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8415 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8416 strtoul.c.
8417 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8418 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8419 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8420 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8421 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8422 * src/.cvsignore: Add *.output.
8423
8424 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8425 gets copied to the output file.
e476c87d 8426
1f65350a
PE
84272004-04-28 Paul Eggert <eggert@twinsun.com>
8428
8429 Get files from the gnulib and po repositories, instead of relying
8430 on them being in our CVS. Upgrade to latest versions of gnulib
8431 and Automake.
8432
8433 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8434 * bootstrap: Bootstrap from gnulib and po repositories.
8435 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8436 * README-cvs: Document these changes. Remove version numbers from
8437 mentions of build tools, since they change so often. Mention Flex.
8438
8439 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8440 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
8441 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8442 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 8443 does this for us.
12ffdd28
PE
8444 (AC_ISC_POSIX): Remove; we no longer support this
8445 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
8446 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8447 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8448 Do not check for C89 headers, except for locale.h which is used
8449 by the Yacc library and must port to K&R hosts.
8450 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8451 Do not check for C89 functions, except for setlocale which is
8452 used by the Yacc library.
8453 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8454 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8455 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8456 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8457 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8458 AM_GNU_GETTEXT): Remove; now done by:
8459 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8460 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8461 for us.
8462
8463 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8464 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8465 Define to empty, as gnulib.mk will do the rest for us.
8466 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8467 for us.
8468 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8469 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8470
8471 * src/files.c: Include gnulib's xstrndup.h.
8472
8473 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8474 (REALLOC): Use xnrealloc, for likewise.
8475 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8476 (strnlen, memrchr): Remove decls; functions no longer used.
8477 Include <stpcpy.h>.
8478
8479 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8480 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8481 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8482 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8483 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8484 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8485 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8486 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8487 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8488 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8489 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8490 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8491 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8492 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8493 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8494 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8495 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8496 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8497 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8498 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8499 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8500 Remove, as these files are now generated automatically
8501 by bootstrap or automake.
8502
8503 * po/ChangeLog: Remove: all but one entry was a duplicate
8504 of this file, and I moved that 2000-11-02 entry here.
8505
8506 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8507 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8508 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8509 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8510 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8511 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8512 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8513 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8514 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8515 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8516 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8517 xstrndup.h.
8518 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8519 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8520 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8521 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8522 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8523 * src/.cvsignore: Remove *_.c.
8524
8525
8526 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8527 support it. (The latest stable gzip doesn't.)
8528
85292004-04-27 Paul Eggert <eggert@twinsun.com>
8530
8531 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8532 case, as stos_ is now used by destructors due to the 2004-02-09
8533 change.
8534
8535 Remove more K&R C support.
8536 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8537 * lib/subpipe.c (errno): Remove decl.
8538 Include <stdlib.h> unconditionally.
8539 (EXIT_FAILURE): Remove macro.
8540 * src/complain.c (vfprintf, strerror): Remove.
8541 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8542 unconditionally.
8543 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8544 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8545 (strchr, strspn, memchr): Remove decls.
8546 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8547 unconditionally. Do not declare perror.
8548 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8549 unconditionally.
8550
8551 * src/complain.c (_): Remove useless defn, as system.h defines this.
8552
8553 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8554 with latest obstack.h.
8555 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8556 to procedure types, as obstack.h now does that for us.
8557 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8558
8559 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8560 so that this include file can stand alone.
8561 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8562 does this now. Include subpipe.h first after config.h, to
8563 test whether it can stand alone.
8564
8565 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8566 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8567 unused declaration.
8568
8569 * tests/synclines.at (%union synch line): Put a dummy member in
8570 the union, because empty unions aren't allowed in C. Caught
8571 by GCC 3.4.0.
8572
4f16766c
PE
85732004-04-13 Jim Meyering <jim@meyering.net>
8574
8575 * src/conflicts.c (conflicts_print): Correct format string typo:
8576 use `%%' to produce literal `%'. (trivial change)
8577
779e7ceb
PE
85782004-03-30 Paul Eggert <eggert@twinsun.com>
8579
8580 * src/getargs.c (version): Update copyright year to 2004.
8581
8582 * data/c.m4 (b4_int_type): Use 'short int' rather than
8583 'short', and similarly for 'long', 'unsigned', etc.
8584 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8585 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8586 yy_yypstack, yydumpstack): Likewise.
8587 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8588 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8589 Likewise.
8590 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8591 yy_stack_print, yyparse): Likewise.
8592 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8593 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8594 * lib/bitset.c (bitset_print): Likewise.
8595 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8596 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8597 * lib/bitsetv.c (bitsetv_dump): Likewise.
8598 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8599 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8600 Likewise.
8601 * src/LR0.c (allocate_itemsets): Likewise.
8602 * src/gram.h (rule_number, rule): Likewise.
8603 * src/lalr.h (goto_number): Likewise.
8604 * src/nullable.c (nullable_compute): Likewise.
8605 * src/output.c (prepare_rules): Likewise.
8606 * src/relation.c (relation_print, relation_digraph): Likewise.
8607 * src/relation.h (relation_node): Likewise.
8608 * src/state.h (state_number, transitions, errs, reductions,
8609 struct state): Likewise.
8610 * src/symtab.h (symbol_number, struct symbol): Likewise.
8611 * src/tables.c (vector_number, tally, action_number,
8612 default_goto, goto_actions): Likewise.
8613 * tests/existing.at (GNU Cim Grammar): Likewise.
8614 * tests/regression.at (Web2c Actions): Likewise.
8615
8616 * src/output.c (muscle_insert_short_int_table): Renamed from
8617 muscle_insert_short_table. All uses changed.
8618
d6328241
PH
86192004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8620
8621 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8622 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8623 Add %expect-rr rule.
4f16766c 8624
d6328241
PH
8625 * src/scan-gram.l: Recognize %expect-rr.
8626
4f16766c 8627 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 8628 expected_conflicts.
4f16766c 8629 (expected_rr_conflicts): Declare.
d6328241
PH
8630
8631 * src/conflicts.c (expected_sr_conflicts): Rename from
8632 expected_conflicts.
8633 (expected_rr_conflicts): Define.
8634 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8635 for GLR parsers.
8636 Use expected_sr_conflicts in place of expected_conflicts.
8637 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 8638
d6328241 8639 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 8640
1452af69
PE
86412004-03-08 Paul Eggert <eggert@gnu.org>
8642
8643 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 8644 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
8645
8646 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8647 in lalr1.cc.
8648 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8649 * src/scan-gram.l (scan_integer): New function.
8650 ({int}): Use it.
8651 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8652 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8653 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8654 Say "long int", not "long", for uniformity with GNU style.
8655
006d217d
PE
86562004-02-25 Paul Eggert <eggert@twinsun.com>
8657
8658 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8659 compilers. This fixes a problem with Intel's C++ compiler being
8660 chatty, reported by Guido Trentalancia in
161a71f3 8661 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 8662
c2729758
ADL
86632004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8664
8665 Support %destructor and merge error locations in lalr1.cc.
8666
8667 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8668 (Parser::stos_): Define unconditionally.
8669 (Parser::destruct_): New method. Generate its body with
8670 b4_yydestruct_generate.
8671 (Parser::error_start_): New attribute.
8672 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8673 token which are discarded.
8674 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8675 error_start_ when erroneous token are discarded.
8676 (Parser::parse) <yyerrlab1>: Compute the location of the error
8677 token so that it covers all the discarded tokens.
8678 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8679 it can be called with `%skeleton "lalr1.cc"', and do that.
8680
dd0e0635
PE
86812004-02-02 Paul Eggert <eggert@twinsun.com>
8682
8683 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8684 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8685 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8686 There's no need to mention top_builddir since Automake does that
8687 for us.
8688 (INCLUDES): Remove, as Automake says it's obsolescent.
8689 Contents migrated into AM_CPPFLAGS as described above.
8690 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8691
86922004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8693
8694 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8695 (yyreportSyntaxError): Handle case where lookahead token is
8696 YYEMPTY.
8697
be16239b
PH
86982004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8699
8700 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8701 resulting parsers are compilable with C++.
8702
5fa90832
PE
87032003-12-23 Paul Eggert <eggert@twinsun.com>
8704
8705 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8706 * src/output.c (output_skeleton): Rename local var.
8707 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8708 Bison tokens, as this runs afoul of the 2003-10-07 change that
8709 disallowed NUL bytes in character constants or string literals.
8710
8711 * tests/local.at: Require Autoconf 2.59's Autotest.
8712 * tests/testsuite.at: Don't include local.at, since we now assume
8713 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8714 including it.
8715 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8716 multiple inclusion warnings.
dd0e0635 8717
b165c324
AD
87182003-12-02 Akim Demaille <akim@epita.fr>
8719
8720 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8721 conditions.
8722 From Bruno Haible.
8723
26e06a21
ADL
87242003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8725
8726 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8727
92ac3705
PE
87282003-10-07 Paul Eggert <eggert@twinsun.com>
8729
6a5ecb38
PE
8730 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8731 if testsuite doesn't exist.
8732
92ac3705
PE
8733 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8734 literals, unfortunately.
8735 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8736 Complain about NUL bytes in character constants or string literals.
8737
91d2c560
PE
87382003-10-05 Paul Eggert <eggert@twinsun.com>
8739
8740 * NEWS: Don't document %no-default-prec, as it's still
8741 too experimental.
8742 * doc/bison.texinfo: Document %no-default-prec only if
8743 the defaultprec flag is set. Normally it's not.
8744
0cc3da3a
PE
87452003-10-04 Paul Eggert <eggert@twinsun.com>
8746
8747 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8748 non-modifiable lvalue, instead of a modifiable one.
8749 * doc/bison.texinfo (Actions): Document that $$ can
8750 be assigned to. Do not claim that $$ and $N are
8751 array element references: user code should not rely on this.
8752
22fccf95
PE
87532003-10-01 Paul Eggert <eggert@twinsun.com>
8754
8755 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8756 (grammar_declaration): Use it.
8757 * src/scan-gram.l: New token %no-default-prec.
8758 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8759 * NEWS, doc/bison.texinfo: Document the above.
8760
fc8f2965
AD
87612003-10-01 Akim Demaille <akim@epita.fr>
8762
8763 VCG no longer supports long_straight_phase.
8764
8765 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8766 * src/print_graph.c (print_graph): Adjust.
8767
39a06c25
PE
87682003-09-30 Frank Heckenbach <frank@g-n-u.de>
8769 and Paul Eggert <eggert@twinsun.com>
8770
8771 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8772 Table of Symbols): Document %default-prec.
8773 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8774 (grammar_declaration): Set default_prec on %default-prec.
8775 * src/scan-gram.l (%default-prec): New token.
8776 * src/reader.h (default_prec): New flag.
8777 * src/reader.c: Likewise.
8778 (packgram): Handle it.
8779 * tests/conflicts.at (%default-prec without %prec,
8780 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 8781
39a06c25
PE
87822003-09-30 Paul Eggert <eggert@twinsun.com>
8783
8784 * tests/testsuite.at: Include local.at, not input.at, fixing
8785 a typo in the 2003-08-25 patch.
8786
62b6aef9
AD
87872003-08-27 Akim Demaille <akim@epita.fr>
8788
8789 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8790 GCC warnings.
8791
89e1cc61
AD
87922003-08-26 Akim Demaille <akim@epita.fr>
8793
8794 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8795 "<\#" to avoid magic from Gnus when posting parts of this script.
8796
a08460b0
AD
87972003-08-26 Akim Demaille <akim@epita.fr>
8798
8799 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8800 (Parser::parse): here.
8801 Adjust: nerrs and errstatus is now replaced by...
8802 (Parser::nerrs_, Parser::errstatus_): New.
8803
603f1cfd
AD
88042003-08-25 Akim Demaille <akim@epita.fr>
8805
8806 * config/announce-gen, Makefile.cfg: New.
8807 * Makefile.am: Adjust.
8808 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8809 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8810
cd3684cf
AD
88112003-08-25 Akim Demaille <akim@epita.fr>
8812
8813 When reducing initial empty rules, Bison parser read an initial
8814 location that is not defined. This results in garbage, and that
8815 affects Bison's own parser. Therefore we need (i) to extend Bison
8816 to support a means to initialize this location, and (ii) to use
8817 this CVS Bison to fix CVS Bison's parser.
8818
8819 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8820 with...
8821 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8822 * src/parse-gram.y: Adjust.
8823 (%initial-action): New.
8824 (%error-verbose): Since we require CVS Bison, there is no reason
8825 not to use it.
8826 * src/scan-gram.l: Adjust.
8827 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8828 * data/yacc.c (yyparse): Use b4_initial_action.
8829
4e03e201
AD
88302003-08-25 Akim Demaille <akim@epita.fr>
8831
8832 * doc/bison.texinfo: Don't promote stdout for error messages.
8833
8c182d05
AD
88342003-08-25 Akim Demaille <akim@epita.fr>
8835
8836 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8837 From Alexandre Duret-Lutz.
8838
6a60c4cf
PE
88392003-08-25 Akim Demaille <akim@epita.fr>
8840
8841 Version 1.875c.
8842
25f66e1a
AD
88432003-08-25 Akim Demaille <akim@epita.fr>
8844
8845 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8846 Use them.
8847
5348bfbe
AD
88482003-08-25 Akim Demaille <akim@epita.fr>
8849
8850 * data/lalr1.cc (Parser::reduce_print_): New.
8851 Use it.
8852
47301314
AD
88532003-08-25 Akim Demaille <akim@epita.fr>
8854
8855 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8856 error recovery loops. This patch is based on
161a71f3 8857 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
8858 Also, augment the similarity between lalr1.cc and yacc.c.
8859 Note: the locations of error recovery rules are not correct yet.
8860
8861 * data/lalr1.cc: Comment changes to augment the similarity between
8862 lalr1.cc and yacc.c.
8863 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8864 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8865 yyerrlab), when hitting EOF, pop the whole stack here instead of
8866 merely falling thru the default error handling mechanism.
8867 (yyerrorlab): New label, with the old contents of YYERROR,
8868 plus the following change: pop the stack of rhs corresponding
8869 to the production that invoked YYERROR. That is how Yacc
8870 behaves (required by POSIX).
8871 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8872 fail.
8873
1f7a61ff
AD
88742003-08-25 Akim Demaille <akim@epita.fr>
8875
8876 Tune local.at so that people can "autom4te -l autotest calc.at -o
8877 calc" for instance, to extract a sub test suite.
8878
8879 * tests/testsuite.at: Move the initialization, Autotest version
8880 requirement, and AT_TESTED invocation into...
8881 * tests/local.at: here.
8882 * tests/testsuite.at: Include it for compatibility with Autoconf
8883 2.57.
8884 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8885 be ignore.
8886
327b5b56
PE
88872003-08-04 Paul Eggert <eggert@twinsun.com>
8888
8889 Rework code slightly to avoid gcc -Wtraditional warnings.
8890 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8891 The returned value is now stored in *YY0. All callers changed.
8892 * src/output.c (merge_output): Adjust to the above change.
8893
0051e3ed
PE
88942003-07-26 Paul Eggert <eggert@twinsun.com>
8895
8896 * data/glr.c (YYASSERT): New macro.
8897 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8898 yyresolveStates, yyprocessOneStack):
8899 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8900 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 8901
137437c6
PE
89022003-07-25 Paul Eggert <eggert@twinsun.com>
8903
5b620e06
PE
8904 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8905 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 8906 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
8907 by Frank Heckenbach, though I have omitted the structure-initialization
8908 part of his glr-knr.diff patch since I recall that the Portable
8909 C Compiler didn't require that change.
8910
137437c6
PE
8911 Let the user specify how to allocate and free memory.
8912 Derived from a suggestion by Frank Heckenbach in
161a71f3 8913 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
8914 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8915 All uses of free, malloc, realloc changed to use these macros,
8916 and unnecessary casts removed.
8917 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8918
ddb85ca5
PE
89192003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8920
8921 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8922 use s.empty() rather than s == "" to test for empty string; see
161a71f3 8923 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
8924 (trivial change)
8925
39910e09
AD
89262003-06-25 Akim Demaille <akim@epita.fr>
8927
8928 * config/depcomp, config/install-sh: Update from masters.
8929
0ae99356
PE
89302003-06-20 Paul Eggert <eggert@twinsun.com>
8931
8932 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8933 and return properly parenthesized result.
8934 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8935 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8936 Remove unnecessary parentheses from uses.
8937 * doc/bison.texinfo (Location Default Action): Describe the
8938 conventions for parentheses.
8939
cd05d13c
PE
89402003-06-19 Paul Eggert <eggert@twinsun.com>
8941
81fd08ca
PE
8942 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8943 yyreportTree): Do not assume that size_t is the same width as int,
8944 when printing sizes. Print sizes using an unsigned format.
8945 Problem reported by Frank Heckenbach in
161a71f3 8946 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 8947
cd05d13c
PE
8948 Port to Forte Developer 7 C compiler.
8949 * data/glr.c (struct YYLTYPE): If locations are not being used,
8950 declare a single dummy member, as empty structs do not conform
8951 to the C standard.
8952 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8953 the Forte Developer 7 C compiler complains that end-of-loop
8954 code is not reached.
8955
4dcf140b
PE
89562003-06-17 Paul Eggert <eggert@twinsun.com>
8957
8958 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8959 avoid warnings from picky compilers about redefinition of PARAMS.
8960
8dd76bee
PE
89612003-06-17 Paul Eggert <eggert@twinsun.com>
8962
8963 Version 1.875b.
8964
8965 * NEWS: Document 1.875b.
8966
8967 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8968 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8969 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8970 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8971 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8972 per recent gettext manual's suggestion.
8973 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8974 Use prototypes, not old-style definitions.
8975 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8976 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8977 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8978 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8979 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8980 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8981 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8982 vbitset_or_and_cmp, vbitset_copy): Likewise.
8983
8984 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8985 Do not include <stdlib.h>.
8986 (PARAMS): Define unconditionally for C89.
8987 (ATTRIBUTE_NORETURN): Remove.
8988 (ATTRIBUTE_UNUSED): Define unconditionally.
8989
8990 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 8991 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
8992 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8993 * lib/vbitset.c, lib/vbitset.h: New files.
8994 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8995 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8996 from libbitset.
8997
8998 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8999 `How Can I Reset @code{yyparse}', since texinfo does not allow
9000 arbitrary @ in node names.
9001
9002 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9003 shouldn't be needed according to the gettext 0.12.1 documentation
9004 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 9005 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 9006 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 9007 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 9008
8dd76bee
PE
9009 * lib/.cvsignore: Add stdbool.h.
9010 * m4/.cvsignore: Add nls.m4, po.m4.
9011
9012 Upgrade to CVS gnulib.
9013 * stdbool_.h: File renamed from stdbool.h.in.
9014 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9015 AC_HEADER_STDBOOL.
9016 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9017 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9018 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9019 (MOSTLYCLEANFILES): New var.
9020 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9021 (stdbool.h): New rule.
9022 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9023 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9024 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9025 m4/quote.m4: Upgrade to today's gnulib.
9026
9027 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9028 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9029 the tests right now.
9030 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9031 yyerror are declared before use; C99 requires this.
9032
25005f6a
PH
90332003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9034
9035 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9036 first.
9037 (yyrecoverSyntaxError): Correct the logic for setting and testing
9038 yyerrState.
9039 Correct comment on handling EOF.
9040 Allow states with only a default reduction, rather than failing
8dd76bee 9041 (I can't quite reconstruct why these were not allowed before).
25005f6a 9042
137437c6 9043 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 9044 buffer overruns, corrupting state.
8dd76bee
PE
9045
9046 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
9047 definition.
9048 * src/reader.h (max_left_semantic_context): New variable declaration.
9049 * src/scan-gram.l (max_left_semantic_context): Define.
9050 (handle_action_dollar): Update max_left_semantic_context.
9051 * data/glr.c (YYMAXLEFT): New definition.
9052 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9053 (yyresolveAction): Ditto.
9054
9055 Fixes to problems with location handling in GLR parsers reported by
9056 Frank Heckenbach (2003/06/05).
9057
9058 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9059 (YYRHSLOC): Add parentheses, and define only if locations used.
9060 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9061 locations not used.
9062 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9063 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 9064
25005f6a
PH
9065 * tests/cxx-type.at: Exercise location information; update tests
9066 to differentiate output with and without locations.
8dd76bee 9067 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
9068 because default YYLTYPE not yet defined.
9069 Change semantic actions to compute strings, rather than printing
9070 them directly (to test proper passing of semantics values). Change
9071 output to prefix notation and update test data and expected results.
9072 (yylex): Track locations.
9073 (stmtMerge): Return value rather than printing, and include arguments
9074 in value.
8dd76bee 9075
711f40b7
PE
90762003-06-03 Paul Eggert <eggert@twinsun.com>
9077
9078 Avoid warnings generated by GCC 2.95.4 when Bison is
9079 configured with --enable-gcc-warnings.
9080 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9081 yy::]b4_parser_class_name[::translate_,
9082 yy::Stack::operator[] (unsigned),
9083 yy::Stack::operator[] (unsigned) const,
9084 yy::Slice::operator[] (unsigned),
9085 yy::Slice::operator[] (unsigned) const):
9086 Rename local vars to avoid warnings.
9087 * tests/glr-regression.at (Improper handling of embedded actions
9088 and $-N in GLR parsers): Remove unused local variable from yylex.
9089 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9090 (void) as arg when not pure, since we now assume C89 when building
9091 Bison. Pacify GCC by using parameter.
9092
ac695f7d
PE
90932003-06-02 Paul Eggert <eggert@twinsun.com>
9094
9095 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9096 yy::Location::lines, yy::Location::columns): Rename arguments
9097 to avoid shadowing; this removes a warning generated by GCC 3.3.
9098
26ec81e0
PE
90992003-06-01 Paul Eggert <eggert@twinsun.com>
9100
9101 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9102 to g++, as GCC 3.3 complains if you do it.
9103 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9104 everything that WARNING_CFLAGS has, except omit warnings
9105 not suitable for C++.
9106 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9107 * tests/atlocal.in (CXXFLAGS): New var.
9108 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9109
9110 Fix a GLR parser bug I reported in February; see
161a71f3 9111 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
9112 The problem was that GLR parsers did not conform to the C standard,
9113 because actions like { $1 = $2 + $3; } expanded to expressions
9114 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9115 to a local variable. The C standard says that expressions
9116 like (var = f ()) + (var = f ()) have undefined behavior.
9117 Another problem was that GCC sometimes issues warnings that
9118 yyfill and its parameters are unused.
9119
9120 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9121 as possibly unused.
9122 (yyfill): New function.
9123 (YYFILL): Use it.
9124 (yyuserAction): Change type of yynormal to bool, so that it matches
9125 the new yyfill signature. Mark it as possibly unused.
9126
9127
9128 Follow up on a bug I reported in February, where a Bison-generated
9129 parser can loop. Provide a test case and a fix for yacc.c. I
9130 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9131 The original bug report is in:
161a71f3 9132 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
9133
9134 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9135 macro's size was becoming unwieldy.
9136 (yyerrlab): Do not discard an empty lookahead symbol, as this
9137 might destroy garbage.
9138 (yyerrorlab): New label, with the old contents of YYERROR,
9139 plus the following change: pop the stack of rhs corresponding
9140 to the production that invoked YYERROR. That is how Yacc
9141 behaves, and POSIX requires this behavior.
9142 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9143 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9144 Define 'alarm' to do nothing if unistd.h is not available.
9145 Add a new rule "exp: '-' error;" to test the above change to
9146 data/yacc.c. Use 'alarm' to abort any test taking longer than
9147 10 seconds, as it's probably looping.
9148 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9149 Also, the new yacc.c generates two fewer diagnostics for an
9150 existing test.
9151
d0829076
PE
91522003-05-24 Paul Eggert <eggert@twinsun.com>
9153
c6ae27df
PE
9154 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9155 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9156 This fixes a problem reported by John Bowman when the Compaq/HP
9157 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9158 -ansi -Wall -gall).
9159 * data/yacc.c (union yyalloc): Likewise.
9160 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 9161
d0829076
PE
9162 Switch from 'int' to 'bool' where that makes sense.
9163
9164 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9165 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9166 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9167 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9168 Return or accept bool, not int. All callers changed.
9169 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9170 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9171 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9172 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9173 bitset_or_and_cmp_): Likewise.
9174 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9175 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9176 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9177 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9178 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9179 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9180 bitset_stats_or_and_cmp): Likewise.
9181 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9182 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9183 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9184 ebitset_xor_cmp): Likewise.
9185 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9186 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9187 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9188 lbitset_xor_cmp): Likewise.
9189 * lib/bbitset.h: Include <stdbool.h>.
9190 (struct bitset_vtable): The following members now return bool, not
9191 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9192 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9193 or_and_cmp).
9194 * src/conflicts.c (count_rr_conflicts): Likewise.
9195 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9196 All uses changed.
9197 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9198 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9199 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9200 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9201 graph_flag): Likewise.
9202 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9203 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9204 graph_flag): Likewise.
9205 * src/output.c (error_verbose): Likewise.
9206 * src/output.h (error_verbose): Likewise.
9207 * src/reader.c (start_flag, typed): Likewise.
9208 * src/reader.h (typed): Likewise.
9209 * src/getargs.c (LOCATIONS_OPTION): New constant.
9210 (long_options, getargs): Use it.
9211 * src/lalr.c (build_relations): Use bool, not int.
9212 * src/nullable.c (nullable_compute): Likewise.
9213 * src/print.c (print_reductions): Likewise.
9214 * src/tables.c (action_row, pack_vector): Likewise.
9215 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9216 * src/output.c (prepare): Use it.
9217 * src/output.c (token_definitions_output,
9218 symbol_destructors_output, symbol_destructors_output): Use string,
9219 not boolean integer, to keep track of whether to output separator.
9220 * src/print_graph.c (print_core): Likewise.
9221 * src/state.c (state_rule_lookaheads_print): Likewise.
9222
9223 * config/install-sh: Sync from automake 1.7.5.
9224
6b2584b7
PE
92252003-05-14 Paul Eggert <eggert@twinsun.com>
9226
9227 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9228 semicolon after a grammar declaration, in the interest of possible
9229 future changes to the Bison input language.
9230 Do not allow a stray semicolon at the start of the grammar.
9231 (rhses.1): Allow one or more semicolons after any rule, including
9232 just before "|" as required by POSIX.
9233 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9234 grammar.
9235
caf37a36
ADL
92362003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9237
9238 %parse-param support for lalr1.cc.
9239
9240 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9241 b4_cc_constructor_calls, b4_cc_constructor_call,
9242 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9243 definitions.
9244 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9245 parse-param arguments.
9246 (yy::b4_parser_class_name): Declare instance variables to
9247 hold parse-param arguments.
9248 * tests/calc.at: s/value/semantic_value/ because value clashes
9249 with a member of yy::b4_parser_class_name. Adjust C++ code
9250 to handle %parse-param. Enable %parse-param test in C++.
9251
3ab37077
PE
92522003-05-12 Paul Eggert <eggert@twinsun.com>
9253
9254 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9255 English a bit. Fix fclose typo. Change "const char" to "char
9256 const", and use ANSI C rather than K&R for "main". Suggest
9257 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9258 and suggest yy_switch_to_buffer.
9259
92602003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
9261
9262 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9263 C89. This avoids a diagnostic on compilers that define __STDC__
9264 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 9265 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 9266
e743727f
PE
92672003-05-03 Paul Eggert <eggert@twinsun.com>
9268
9269 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9270 Do not overrun array bounds.
9271 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 9272 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 9273
916708d5
AD
92742003-04-29 Akim Demaille <akim@epita.fr>
9275
9276 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9277 * src/getargs.c, src/getargs.h: here, as bool, not int.
9278 (nondeterministic_parser): New.
9279 * src/parse-gram.y, src/scan-gram.l: Support
9280 %nondeterministic-parser.
9281 * src/output.c (prepare): Use nondeterministic_parser instead
9282 of glr_parser where appropriate.
9283 * src/tables.c (conflict_row, action_row, save_row)
9284 (token_actions, token_actions, pack_vector): Ditto.
9285
a06ea4aa
AD
92862003-04-29 Akim Demaille <akim@epita.fr>
9287
9288 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9289
211074ca
AD
92902003-04-29 Akim Demaille <akim@epita.fr>
9291
9292 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9293 with %pure-parser and %locations to exercise the patch from Yakov
9294 Markovitch below.
9295
6175ffe3
PE
92962003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9297
9298 * data/yacc.c: (b4_lex_param): Corrected for the case where
9299 %lex-param is provided and %pure-parser isn't.
9300
b1e95857
PE
93012003-04-27 Paul Eggert <eggert@twinsun.com>
9302
9303 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 9304 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
9305 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9306 if it is not defined.
9307 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9308
acda9df6
PE
93092003-04-26 Paul Eggert <eggert@twinsun.com>
9310
3470c57b
PE
9311 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9312 Declare to be of type suitable for the ninf value itself, not of
9313 type suitable for the corresponding table, since the latter might
9314 be unsigned but the ninf value might be negative. This fixes a
9315 bug reported by Alexandre Duret-Lutz in
161a71f3 9316 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 9317
acda9df6
PE
9318 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9319 invokes it. We shouldn't invoke it twice because it will attempt
9320 to put error.o in the archive twice. This fixes a glitch reported
9321 by Martin Mokrejs in
161a71f3 9322 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 9323
b5250f26
PE
93242003-04-21 Paul Eggert <eggert@twinsun.com>
9325
9326 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9327 to gnulib.
9328
089ac0f1
PE
93292003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9330
9331 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9332 Fix obvious typo that results in uncompilable GLR parsers
9333 when both %pure-parser and %locations are used. (trivial change)
9334
5ededac6
PE
93352003-04-17 Paul Eggert <eggert@twinsun.com>
9336
1b8f2fff
PE
9337 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9338 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9339 Do not insert the expected token via unput, as this runs afoul
9340 of a POSIX-compatibility bug in flex 2.5.31.
9341 All uses changed to BEGIN the parent state,
9342 since we no longer insert the expected token via unput.
9343 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9344 that is no longer emitted after the above change.
9345
5ededac6
PE
9346 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9347 the first one. This change is from Paul Hilfinger, and it fixes
9348 regression reported by Werner Lemberg in
161a71f3 9349 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
9350
9351 (resolve_sr_conflict): Don't invoke state_errs_set
9352 unless one or more tokens have been explicitly made errors.
9353 Otherwise, the above change causes Bison to abort.
9354
9355 * tests/existing.at (GNU pic Grammar): New test case, taken from
9356 Lemberg's email.
9357
b8be9132
AD
93582003-03-31 Akim Demaille <akim@epita.fr>
9359
9360 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9361
d423d460
AD
93622003-03-31 Akim Demaille <akim@epita.fr>
9363
9364 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9365 output.
9366
c7e441b4
AD
93672003-03-31 Akim Demaille <akim@epita.fr>
9368
9369 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9370 From Paul Hilfinger.
9371
231897ad
AD
93722003-03-29 Akim Demaille <akim@epita.fr>
9373
9374 * m4/error.m4: Do not put under dynamic conditions some code which
9375 expansion is under static control.
9376
5b066063
AD
93772003-03-29 Akim Demaille <akim@epita.fr>
9378
9379 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9380
22a74fec
AD
93812003-03-29 Akim Demaille <akim@epita.fr>
9382
9383 * doc/bison.texinfo (Strings are Destroyed): New.
9384
0eee27e7
PE
93852003-03-13 Paul Eggert <eggert@twinsun.com>
9386
9387 * .cvsignore: Add configure.lineno.
9388 * src/.cvsignore: Add yacc.
9389 * tests/.cvsignore: Add testsuite.log.
9390 * doc/fdl.texi: Sync with latest FSF version.
9391
f61aad93
PE
93922003-03-12 Paul Eggert <eggert@twinsun.com>
9393
537636c7
PE
9394 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9395 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9396 cursor, instead of leaving it undefined. This fixes a bug
9397 reported by Tim Van Holder in
161a71f3 9398 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
9399 * tests/input.at (Torturing the Scanner): Test the scanner on
9400 an empty input file, which was Tim Van Holder's test case.
9401
9402 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9403 <sys/resource.h> can be included, include sys/time.h and
9404 sys/times.h first, if available. This works around the SunOS
9405 4.1.4 porting bug reported by Bruce Becker in
161a71f3 9406 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
9407
9408 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9409 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9410 AC_HEADER_SYS_WAIT.
9411
f61aad93
PE
9412 Merge changes from gnulib. This was prompted because the CVS
9413 snapshot didn't build on Solaris 7 due to strnlen problems.
9414
9415 These changes need to be merged back into gnulib:
9416 * lib/hash.c: Include <stdbool.h> unconditionally.
9417 * m4/onceonly.m4 (m4_quote): New macro.
9418 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9419 Quote AC_FOREACH variable-expansions properly.
9420 The 2003-01-03 obstack.h change also needs merging.
9421 {end of changes requiring merging}
5b066063 9422
f61aad93
PE
9423 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9424 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9425 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9426 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9427 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9428 New files, imported from gnulib.
9429 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9430 above.
9431
9432 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9433 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9434 gnulib sources.
9435
9436 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9437 Add.
9438 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9439 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9440 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9441 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9442 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9443 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9444 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9445 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9446 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9447 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9448 (jm_PREREQ_ARGMATCH): Remove.
9449 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9450 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9451
9452 * src/system.h: Include <stdbool.h> unconditionally.
9453
9454 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9455 assuming at least C89 in the bitset code for some time now.
9456
d2ffe116
AD
94572003-03-03 Akim Demaille <akim@epita.fr>
9458
9459 * ro.po: New.
9460
052826fd
AD
94612003-03-02 Akim Demaille <akim@epita.fr>
9462
9463 * doc/bison.texinfo (Table of Symbols): Reactivate the
9464 documentation for %lex-param, and %parse-param.
9465
c4749565
AD
94662003-03-02 Akim Demaille <akim@epita.fr>
9467
9468 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9469 generate verbose error messages.
9470 Use the number of tokens as an upper bound in yytname, as it
9471 cannot be a non terminal.
9472
d5286af1
AD
94732003-03-02 Akim Demaille <akim@epita.fr>
9474
9475 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9476 message.
9477
22e304a6
AD
94782003-03-02 Akim Demaille <akim@epita.fr>
9479
22e304a6
AD
9480 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9481 Use them to exercise yycheck overrun.
9482 Based on Andrew Suffield's grammar.
9483
67a25fed
AD
94842003-03-02 Akim Demaille <akim@epita.fr>
9485
9486 Create tests/local.at for Bison generic testing macros.
9487
9488 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9489 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9490 This new file.
9491 * tests/calc.at (AT_CHECK_CALC): Adjust.
9492 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9493 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9494 * tests/local.at: here.
9495 (AT_COMPILE_CXX): Tags the tests using it as c++.
9496 Ignore the test if CXX is not functional.
9497
9c2b381f
PE
94982003-03-01 Paul Eggert <eggert@twinsun.com>
9499
9500 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9501 not loc->end, since loc->end might contain garbage and this leads
9502 to undefined behavior on some platforms.
9503 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9504 depend on *loc, so that the reader doesn't give the the false
9505 impression that *loc is initialized.
9506 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9507 does not survive the return.
9508
0433ba88
AD
95092003-03-01 Akim Demaille <akim@epita.fr>
9510
9511 * src/scan-gram.l (code_start): Always initialize it when entering
9512 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9513 yylex invocation. An alternative would be making it static, but
9514 then it starts with the second %%'s beginning, instead of its end.
9515
b305ea69
PE
95162003-02-28 Paul Eggert <eggert@twinsun.com>
9517
9518 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9519 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 9520 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 9521
c3d25e01
PE
95222003-02-26 Paul Eggert <eggert@twinsun.com>
9523
9524 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9525 Remove Sequent/Pyramid discussion (nobody uses them any more).
9526 Merge VMS and MS-DOS discussion; these ports may well be dead
9527 but let's keep mentioning them for now. Put <> around email
9528 addresses. Add copyright notice.
9529
c267ffbc
PE
95302003-02-24 Paul Eggert <eggert@twinsun.com>
9531
9532 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9533 to avoid collision with flex use of yylineno.
9534 Problem reported by Bruce Lilly in
161a71f3 9535 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
9536 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9537 * data/yacc.c (yy_reduce_print): Likewise.
9538
9539 * config/depcomp: Sync with Automake 1.7.3.
9540
f939fc12
AD
95412003-02-21 Akim Demaille <akim@epita.fr>
9542
9543 * data/lalr1.cc: Use temporary variables instead of casts to
9544 change integer types.
9545 Suggested by Paul Eggert.
9546
95923bd6
AD
95472003-02-21 Akim Demaille <akim@epita.fr>
9548
9549 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9550 to avoid confusions with lalr1.cc's notion of Position.
9551 Suggested by Paul Eggert.
9552
2cdc240e
AD
95532003-02-20 Akim Demaille <akim@epita.fr>
9554
9555 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9556 before initial_columns.
9557 (location.hh): Use consistent variable names when defining the
9558 operator<<.
9559 Use "last" so that we subtract from Positions, not from unsigned.
9560
5d003116
AD
95612003-02-20 Akim Demaille <akim@epita.fr>
9562
9563 * data/lalr1.cc (position.hh): New subfile, including the extended
9564 and Doxygen'ed documentation of class Position.
9565 (location.hh): Use it.
9566 Document a` la Doxygen.
ba1ecc07 9567 With the help of Benoit Perrot.
5d003116 9568
d02b25f9
AD
95692003-02-20 Akim Demaille <akim@epita.fr>
9570
9571 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9572 AT_YACC_IF.
9573 Redefine AT_YYERROR_SEES_LOC_IF using it.
9574 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9575 not defined.
9576 Don't use the location in yy::Parser::error_ and
9577 yy::Parser::print_ when not %locations.
9578 Activate more lalr1.cc tests.
9579
0d1c3a04
AD
95802003-02-19 Akim Demaille <akim@epita.fr>
9581
9582 * data/lalr1.cc: When displaying a line number, be sure to make it
9583 an int.
9584
60a777aa
AD
95852003-02-19 Akim Demaille <akim@epita.fr>
9586
9587 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9588 Remove, useless.
9589 (YYABORT, YYACCEPT, YYERROR): New.
9590 * tests/calc.at: Renable the lalr1.cc test.
9591
0b86fc41
AD
95922003-02-19 Akim Demaille <akim@epita.fr>
9593
9594 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9595 error recovery, mixing with/without pops and discarding of the
9596 lookahead.
9597 Exercise YYERROR.
9598 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9599
da99a5dc
PE
96002003-02-17 Paul Eggert <eggert@twinsun.com>
9601
9602 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9603 * tests/testsuite.at (AT_COMPILE): Use them.
9604 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 9605 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 9606
93b8c255
PE
96072003-02-12 Paul Eggert <eggert@twinsun.com>
9608
9609 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9610 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 9611 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
9612 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9613 Check for malloc failure, for consistency with yacc.c.
9614 (yytname_size): Remove, for consistency with yacc.c.
9615
9616 The bug still remains in data/lalr1.cc, as I didn't have time
9617 to fix it there.
9618
7548fed2
AD
96192003-02-06 Akim Demaille <akim@epita.fr>
9620
9621 * configure.ac (GXX): Rename as...
9622 (CXX): this, to keep the original Autoconf semantics.
9623 Require 2.57.
9624 * data/lalr1.cc: Fix b4_copyright invocations.
9625 If YYDEBUG is not defined, don't depend upon name_ being defined.
9626 (location.hh): Include string and iostream.
9627 (Position::filename): New member.
9628 (Position::Position ()): New.
9629 (operator<< (Position)): New.
9630 (operator- (Position, int)): New.
9631 (Location::first, Location::last): Rename as...
9632 (Location::begin, Location::end): these, to mock the conventional
9633 iterator names.
9634 (operator<< (Location)): New.
9635 * tests/atlocal.in (CXX): New.
9636 * tests/testsuite.at (AT_COMPILE_CXX): New.
9637 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9638 locations in a more synthetic way.
9639 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9640 lalr1.cc is used.
9641 Adjust the C locations to match those from Emacs: first column is
9642 column 0.
9643 Change all the expected results.
9644 Conform to the GCS: simplify the locations when applicable.
9645 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9646 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9647 these CPP macros with the m4 macros new defined by...
9648 (AT_CHECK_PUSHDEFS): this, i.e.:
9649 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 9650 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
9651 New macros.
9652 (AT_CHECK_POPDEFS): Undefine them.
9653 (AT_CHECK_CALC_LALR1_CC): New.
9654 Use it for the first lalr1.cc test.
9655
43a176ef
AD
96562003-02-04 Akim Demaille <akim@epita.fr>
9657
9658 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9659 Location as is defined.
9660
fc049e9c
AD
96612003-02-04 Akim Demaille <akim@epita.fr>
9662
9663 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9664 name_ being defined.
9665
a737b216
PE
96662003-02-03 Paul Eggert <eggert@twinsun.com>
9667
9668 * src/gram.h (start_symbol): Remove unused decl.
9669
9670 Use more-consistent naming conventions for local vars.
9671
9672 * src/derives.c (derives_compute): Change type of local var from
9673 int to rule_number.
9674 * src/gram.c (grammar_rules_partial_print): Likewise.
9675 * src/print.c (print_core): Likewise.
9676 * src/reduce.c (reduce_grammar_tables): Likewise.
9677
9678 * src/gram.c (grammar_dump): Change name of item_number *
9679 local var from r to rp.
9680 * src/nullable.c (nullable_compute): Likewise.
9681
9682 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9683
9684 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9685 for symbol or symbol_number var.
9686 * src/reader.c (grammar_start_symbol_set): Likewise.
9687 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9688 Likewise.
9689 * src/state.c (transitions_to): Likewise.
9690 * src/state.h: Likewise.
9691 * src/tables.c (symbol_number_to_vector_number): Likewise.
9692
9693 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9694 char * var.
9695
9696 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9697 var.
9698
9699 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9700 var.
9701
9702 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9703 Use str, not s, for char * var. Use ch, not c, for character var.
9704 Use size for size var.
9705
9706 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9707 char * var.
9708 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9709 uniqstr var.
9710 * src/uniqstr.h: Likewise.
9711
9712 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9713 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9714 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9715 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9716 param to have same name as that of enum, so that we don't use
9717 "s" to stand for a non-state.
9718
68e93ad5
AD
97192003-02-02 Akim Demaille <akim@epita.fr>
9720
9721 * src/scan-skel.l: Scan more than one inert character per yylex
9722 invocation.
9723
92898986
PE
97242003-02-01 Paul Eggert <eggert@twinsun.com>
9725
9726 Version 1.875a.
9727
1d9d5d71
PE
9728 * po/LINGUAS: Add ms.
9729
0435d061
AD
97302003-01-30 Akim Demaille <akim@epita.fr>
9731
9732 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9733
6029a57f
PH
97342003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9735
9736 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9737 of $1.
0435d061
AD
9738
9739 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 9740 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 9741 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 9742
6029a57f
PH
9743 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9744 (b4_rhs_location): Ditto.
0435d061 9745 (yyfill): New function to copy from stack tree into array
6029a57f 9746 incrementally.
0435d061
AD
9747 (yyuserAction): Modify to allow incremental move of semantic values
9748 to rhs array when in GLR mode.
9749 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
9750 as needed.
9751 Remove dummy use of yystack, as there is now a guaranteed use.
9752 (yydoAction): Modify to allow incremental move of semantic values
9753 to rhs array when in GLR mode.
9754 (yyresolveAction): Ditto.
9755 (yyglrShiftDefer): Update comment.
0435d061 9756 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
9757 (yyglrReduce): Ditto.
9758 (yydoAction): Ditto
0435d061 9759
6029a57f
PH
9760 * tests/glr-regr1.at: Rename to ...
9761 * tests/glr-regression.at: Add new regression test for the problems
9762 described above (adapted from S. Eken).
9763 Update copyright notice.
9764 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9765 * tests/Makefile.am: Ditto.
9766
6cee6297
PE
97672003-01-28 Paul Eggert <eggert@twinsun.com>
9768
9769 * data/lalr1.cc: Do not use @output_header_name@ unless
9770 b4_defines_flag is set. This fixes two bugs reported by
9771 Tim Van Holder in
161a71f3
PE
9772 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9773 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 9774
b2a836b5
PE
97752003-01-21 Paul Eggert <eggert@twinsun.com>
9776
9777 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9778 we don't need to worry about yyerrlab1 being reported as an
9779 "unused label" by non-GCC C compilers. The downside is that if
9780 locations are used then a couple of statements are duplicated each
9781 time YYERROR is invoked, but the upside is that the warnings
9782 should vanish.
9783 (yyerrlab1): Move code to YERROR.
9784 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9785 This reverts some of the 2002-12-27 change.
9786
4196b931
PE
97872003-01-17 Paul Eggert <eggert@twinsun.com>
9788
9789 * src/output.c (symbol_printers_output): Fix typo that led
9790 to core dump. Problem reported by Antonio Rus in
161a71f3 9791 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 9792
3ae831b4
AD
97932003-01-13 Akim Demaille <akim@epita.fr>,
9794 Quoc Peyrot <chojin@lrde.epita.fr>,
9795 Robert Anisko <anisko_r@lrde.epita.fr>
9796
9797 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9798 when the stacks contain one element, as the loop would otherwise
9799 free the last state, and then use the top state (the one we just
9800 popped). This means that the initial elements will not be freed
9801 explicitly, as is the case in yacc.c; it is not a problem, as
9802 these elements have fake values.
9803
e3aa65c5
PE
98042003-01-11 Paul Eggert <eggert@twinsun.com>
9805
9806 * NEWS: %expect-violations are now just warnings, reverting
9807 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9808 bootstrapping problem reported by Matthias Klose; see
161a71f3 9809 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
9810 * src/conflicts.c (conflicts_print): Likewise.
9811 * tests/conflicts.at (%expect not enough, %expect too much,
9812 %expect with reduce conflicts): Likewise.
9813 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9814 that the warning is enabled if the number of conflicts changes
9815 (not necessarily increases).
9816
9817 * src/getargs.c (version): Update copyright year.
9818
f0057011
AD
98192003-01-09 Akim Demaille <akim@epita.fr>
9820
9821 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9822
1ee6d2a0
PE
98232003-01-08 Paul Eggert <eggert@twinsun.com>
9824
9825 * Makefile.maint (WGETFLAGS):
9826 New macro, containing "-C off" to disable proxy caches.
9827 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9828 (rel-check): Use $(WGET) instead of wget.
9829
d4fd77c4
PE
98302003-01-06 Paul Eggert <eggert@twinsun.com>
9831
9832 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9833 the GLR paper of Scott, Johnstone and Hussain.
9834
464c6927
PE
98352003-01-04 Paul Eggert <eggert@twinsun.com>
9836
d600ee67
PE
9837 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9838 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9839 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9840 (EXTRA_LIBRARIES): New var, for liby.a.
9841 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9842 (EXTRA_SCRIPTS): New var, for yacc.
9843
464c6927
PE
9844 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9845 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9846 Problem reported by Nelson H. F. Beebe.
9847
98482003-01-03 Paul Eggert <eggert@twinsun.com>
9849
9850 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9851 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9852 when compiling Bison 1.875's `bitset bset = obstack_alloc
9853 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9854
9855 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9856 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9857 grow to a huge size with typical invocation.
d600ee67 9858
464c6927
PE
9859 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9860 Use the pattern recommended by Autoconf 2.57, except also protect
9861 against double-definition.
9862 * src/system.h: Likewise.
9863 Portability issues reported by Nelson H. F. Beebe.
d600ee67 9864
464c6927
PE
9865 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9866 All uses changed. Provide a definition in both C and C++.
9867 (yytrue, yyfalse): Define even if defined (__cplusplus).
9868
9869 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9870 Reported by Nelson H. F. Beebe.
d600ee67 9871
464c6927
PE
9872 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9873
0f42c7d5
PE
98742003-01-02 Paul Eggert <eggert@twinsun.com>
9875
9876 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9877 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9878 Bug reported by Nelson H. F. Beebe.
9879
dc546b0f
PE
98802003-01-01 Paul Eggert <eggert@twinsun.com>
9881
9882 * Version 1.875.
9883
2c09b6a7
PE
98842002-12-30 Paul Eggert <eggert@twinsun.com>
9885
9886 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9887 Moved here from...
9888 (<INITIAL>","): Here. This causes stray "," to be treated
9889 more uniformly.
9890
dc546b0f 9891 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
9892 last brace in braced code when not in Yacc mode, for compatibility
9893 with Bison 1.35. This resurrects the 2001-12-15 patch to
9894 src/reader.c.
9895
9896 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9897 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9898
535c0f63
PE
98992002-12-28 Paul Eggert <eggert@twinsun.com>
9900
9901 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9902 that of SYM's type. This fixes Debian bug 168069, reported by
9903 Thomas Olsson.
d600ee67 9904
963fcc17
PE
99052002-12-28 Paul Eggert <eggert@twinsun.com>
9906
9907 Version 1.75f.
9908
9909 Switch back to the Yacc style of conflict reports, undoing some
9910 of the 2002-07-30 change.
9911 * doc/bison.texinfo (Understanding): Use Yacc style for
9912 conflict reports. Also, use new way of locating rules.
9913 * src/conflicts.c (conflict_report):
9914 Renamed from conflict_report_yacc, removing the old
9915 'conflict_report'. Translate the entire conflict report at once,
9916 so that we don't assume that "," has the same interpretation in
9917 all languages.
9918 (conflicts_output): Use Yacc-style conflict report for each state,
9919 instead of our more-complicated style.
9920 (conflicts_print): Use Yacc-style conflict report, except print
9921 the input file name when not emulating Yacc.
9922 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9923 Conflicted Reduction, %expect not enough, %expect too much,
9924 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9925 * tests/existing.at (GNU Cim Grammar): Likewise.
9926 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9927
9928 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9929 fatal): Don't invoke fflush; it's not needed and it might even be
9930 harmful for stdout, as stdout might not be open.
9931 * src/reduce.c (reduce_print): Likewise.
9932
b1efe548
PE
99332002-12-27 Paul Eggert <eggert@twinsun.com>
9934
9935 Fix a bug where error locations were not being recorded correctly.
9936 This problem was originally reported by Paul Hilfinger in
161a71f3 9937 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
9938
9939 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9940 top of the location stack's error locations.
9941 (yyerrlab): Set it. When discarding a token, push its location
9942 onto yylerrsp so that we don't lose track of the error's end.
9943 (yyerrlab1): Now is only the target of YYERROR, so that we can
9944 properly record the location of the action that failed. For GCC
9945 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9946 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9947 (yyerrlab2): New label, which yyerrlab now falls through to.
9948 Compute the error's location by applying YYLLOC_DEFAULT to
9949 the locations of all the symbols that went into the error.
9950 * doc/bison.texinfo (Location Default Action): Mention that
9951 YYLLOC_DEFAULT is also invoked for syntax errors.
9952 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9953 Error locations include the locations of all the tokens that were
9954 discarded, not just the last token.
d600ee67 9955
983c5c2c
PE
99562002-12-26 Paul Eggert <eggert@twinsun.com>
9957
b1efe548
PE
9958 * src/files.c: Include quote.h.
9959 (compute_output_file_names): Warn if we detect conflicting
9960 outputs to the same file. This should catch the misunderstanding
9961 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9962
9963 * src/conflicts.c (conflicts_print): If the user specifies
9964 "%expect N", report an error if there are any reduce/reduce
9965 conflicts. This is what the manual says should happen.
9966 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9967 * tests/conflicts.at (%expect with reduce conflicts): New test.
9968
983c5c2c
PE
9969 Don't use m4_include on relative file names, as it doesn't work as
9970 desired if there happens to be a file with that name under ".".
d600ee67 9971
983c5c2c
PE
9972 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9973 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9974 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9975 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9976 * src/output.c (output_skeleton): Use full path names when
9977 specifying a file to include; don't rely on include path, as
9978 it's unreliable when the working file contains a file with
9979 that name.
d600ee67 9980
983c5c2c
PE
99812002-12-25 Paul Eggert <eggert@twinsun.com>
9982
9983 Remove obsolete references to bison.simple and bison.hairy.
9984 Problem mentioned by Aubin Mahe in
161a71f3 9985 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
9986 * data/glr.c: Comment fix.
9987 * doc/bison.1: Remove references. Also, mention "yacc".
9988
9989 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9990 with -g option.
9991
9992 * src/parse-gram.y (declaration): Use enum "report_states" rather
9993 than its numeric value 1.
9994
9995 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9996 opening a new one. This fixes Debian bug 165349, reported by
9997 Bruce Stephens.
9998
23f2d9dc
PE
99992002-12-24 Paul Eggert <eggert@twinsun.com>
10000
10001 Version 1.75e.
10002
10003 * Makefile.maint (cvs-update): Don't assume that the shell
10004 supports $(...), as Solaris sh doesn't.
10005
10006 * src/parse-gram.y (lloc_default): Remove test for empty
10007 nonterminals at the end, since it didn't change the result.
10008
100092002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
10010
10011 If the user does not define YYSTYPE as a macro, Bison now declares it
10012 using typedef instead of defining it as a macro. POSIX requires this.
10013 For consistency, YYLTYPE is also declared instead of defined.
10014
10015 %union directives can now have a tag before the `{', e.g., the
10016 directive `%union foo {...}' now generates the C code
10017 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10018 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10019 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10020 instead of `yyltype'.
10021
10022 `yystype' and `yyltype' are now obsolescent macros instead of being
10023 typedefs or tags; they are no longer documented and will be
10024 withdrawn in a future release.
10025
10026 * data/glr.c (b4_location_type): Remove.
10027 (YYSTYPE): Renamed from yystype.
10028 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10029 (struct YYLTYPE): Renamed from struct yyltype.
10030 (YYLTYPE): Renamed from yyltype.
10031 (yyltype, yystype): New (and obsolescent) macros,
10032 for backward compatibility.
10033 * data/yacc.c: Likewise.
10034
10035 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10036 does not specify a union tag. This is for compatibility with
10037 Solaris 9 yacc.
10038
10039 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10040 const *, since it is now modified by stripping surrounding { }.
10041 (current_braced_code): Remove.
10042 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10043 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10044 trailing " {...}". Now of type <chars>.
10045 (grammar_declaration): Adjust to bundled tokens.
10046 (code_content): Remove; stripping is now done by add_param.
10047 (print_token_value): Print contents of bundled tokens.
10048 (token_name): New function.
10049
10050 * src/reader.h (braced_code, current_braced_code): Remove.
10051 (token_name): New decl.
10052
10053 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10054 token_type, not braced_code code_kind. All uses changed.
10055 (SC_PRE_CODE): New state, for scanning after a keyword that
10056 has (or usually has) an immediately-following braced code.
10057 (token_type): New local var, to keep track of which token type
10058 to return when scanning braced code.
10059 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 10060 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
10061 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10062 instead of returning a token type immediately.
10063 (<INITIAL>"{"): Set token type.
10064 (<SC_BRACED_CODE>"}"): Use it.
10065 (handle_action_dollar, handle_action_at): Now returns bool
10066 indicating success. Fail if ! current_rule; this prevents a core dump.
10067 (handle_symbol_code_dollar, handle_symbol_code_at):
10068 Remove; merge body into caller.
10069 (handle_dollar, handle_at): Complain in invalid contexts.
10070
10071 * NEWS, doc/bison.texinfo: Document the above.
10072 * NEWS: Fix years and program names in copyright notice.
10073
879ca4f8
PE
100742002-12-17 Paul Eggert <eggert@twinsun.com>
10075
10076 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10077 Reporting, Table of Symbols): Omit mentions of %lex-param and
10078 %parse-param from the documentation for now.
10079
1c5fe69d
PE
100802002-12-15 Paul Eggert <eggert@twinsun.com>
10081
10082 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10083 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10084 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
10085 disagreed with the Bison documentation. Bug
10086 reported by Andrew Walrond.
d600ee67 10087
1c5fe69d
PE
10088 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10089 as the caller now does that.
10090 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10091 (YYEMPTY): Parenthesize right hand side, since others use it.
10092 (yyparse): Don't assume that our generated code is the only code
10093 that sets yychar.
10094
d1de5372
PE
100952002-12-13 Paul Eggert <eggert@twinsun.com>
10096
10097 Version 1.75d.
10098
10099 POSIX requires a "yacc" command.
10100 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10101 (MOSTLYCLEANFILES): Add yacc.
10102 (yacc): New rule.
1c5fe69d 10103 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
10104 as an alias for bison y.
10105
10106 * po/LINGUAS: Add da.
d600ee67 10107
d1de5372
PE
10108 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10109 problem with latest <getopt.h>.
10110 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10111
10112 * doc/fdl.texi: Upgrade to 1.2.
10113 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10114 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10115 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10116 gnulib.
10117 * config/install-sh: Sync with autotools.
10118
10119 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 10120 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
10121 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10122 locations are requested.
10123 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10124 locations are requested.
10125
d0f3fe23
PE
101262002-12-12 Paul Eggert <eggert@twinsun.com>
10127
10128 Remove unportable casts and storage allocation tricks.
10129 While we're at it, remove almost all casts, since they
10130 usually aren't needed and are a sign of trouble.
10131
10132 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10133
10134 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10135 the pointer DSET returned by malloc; this isn't portable.
10136 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10137 Similarly for DERIVES.
10138 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10139 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10140 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10141
10142 * src/derives.c (derives_compute): Do not bother invoking
10143 int_of_rule_number, since rule numbers are integers.
10144
10145 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10146 rather than XMALLOC (char, N).
10147
10148 * src/files.c (filename_split): Rewrite to avoid cast.
10149
10150 * src/gram.h (symbol_number_as_item_number,
10151 item_number_as_symbol_number, rule_number_as_item_number,
10152 item_number_as_rule_number):
10153 Now inline functions rather than macros, to avoid casts.
10154 * src/state.h (state_number_as_int): Likewise.
10155 * src/tables.c (state_number_to_vector_number,
10156 symbol_number_to_vector_number): Likewise.
10157
10158 * src/gram.h (int_of_rule_number): Remove; no longer used.
10159
10160 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10161 since the resulting storage is always stored into.
10162
10163 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10164 where it's needed.
10165
10166 * src/muscle_tab.c (muscle_m4_output):
10167 Now inline. Return bool, not int.
10168 * src/state.c (state_compare): Likewise.
10169 * src/symtab.c (symbol_check_defined,
10170 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10171 hash_compare_symbol, hash_symbol):
10172 Likewise.
10173 * src/uniqstr.c (uniqstr_print): Likewise.
10174 * src/muscle_tab.c (muscle_m4_output_processor):
10175 New function, to avoid casts.
10176 * src/state.c (state_comparator, stage_hasher): Likewise.
10177 * src/symtab.c (symbol_check_defined_processor,
10178 symbol_check_alias_consistency_processor, symbol_pack_processor,
10179 symbol_translation_processor, hash_symbol_comparator,
10180 hash_symbol_hasher): Likewise.
10181 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10182 * src/muscle_tab.c (muscles_m4_output):
10183 Use new functions instead of casting old functions unportably.
10184 * src/state.c (state_hash_new): Likewise.
10185 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10186 symbols_token_translations_init):
10187 Likewise.
10188 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10189
10190 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10191 var instead of casting to long, to avoid casts.
10192 (prepare_states): Use MALLOC rather than alloca, so that we don't
10193 have to worry about alloca.
10194 * src/state.c (state_hash_lookup): Likewise.
10195
10196 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10197 local var instead of casting to unsigned char, to avoid casts.
10198
10199 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10200 STATE_ALLOC): Remove.
10201 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10202 rather than calloc, and use offsetof to avoid allocating slightly
10203 too much storage.
10204 (state_new): Initialize all members.
10205
10206 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10207
10208 * src/symtab.c (symbol_free): Remove; unused.
10209 (symbol_get): Remove cast in lhs of assignment.
10210 (symbols_do): Now static. Accept generic arguments, not
10211 hashing-related ones.
10212
10213 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10214 (symbol_processor): Remove.
10215 (symbols_do): Remove decl; now static.
10216
10217 * src/system.h (alloca): Remove; decl no longer needed.
10218 (<stddef.h>): Include, for offsetof.
10219 (<inttypes.>, <stdint.h>): Include if available.
10220 (uintptr_t): New type, if system lacks it.
10221 (CALLOC, MALLOC, REALLOC): New macros.
10222 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10223 new macros.
10224
10225 * src/tables.c (table_size): Now int, to pacify GCC.
10226 (table_grow, table_ninf_remap): Use signed table size.
10227 (save_row): Don't bother initializing locals when not needed.
10228 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10229 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10230
10231 * src/vcg.h: Correct misspellings.
10232
10233 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10234
10235
10236 * src/getargs.c (getargs): Don't assume EOF == -1.
10237
26b4a969
PE
102382002-12-09 Paul Eggert <eggert@twinsun.com>
10239
10240 Change identifier spellings to avoid collisions with names
10241 that are reserved by POSIX.
10242
10243 Don't use names ending in _t, since POSIX reserves them.
10244 For consistency, remove _e and _s endings -- they're weren't
10245 needed to remove ambiguity. All uses changed.
10246 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10247 turn was just renamed from struniq_t.
10248 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10249 which in turn was just renamed from struniq_processor_t.
10250 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10251 in turn was renamed from hash_compare_struniq_t.
10252 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10253 (state_list): Renamed from state_list_t.
10254 * src/assoc.h (assoc): Renamed from assoc_t.
10255 * src/conflicts.c (enum conflict_resolution): Renamed from
10256 enum conflict_resolution_e.
10257 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10258 (rule_list): Renamed from rule_list_t.
10259 * src/getargs.h (enum trace): Renamed from enum trace_e.
10260 (enum report): Renamed from enum report_e.
10261 * src/gram.h (item_number): Renamed from item_number_t.
10262 (rule_number): Renamed from rule_number_t.
10263 (struct rule_s): Remove the "rule_s" part; not used.
10264 (rule): Renamed from rule_t.
10265 (rule_filter): Renamed from rule_filter_t.
10266 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10267 (goto_list): Renamed from goto_list_t.
10268 * src/lalr.h (goto_number): Renamed from goto_number_t.
10269 * src/location.h (location): Renamed from location_t.
10270 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10271 and moved here from:
10272 * src/muscle_tab.h (muscle_entry_t): here.
10273 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10274 (rule_list): Renamed from rule_list_t.
10275 * src/print_graph.c (static_graph): Renamed from graph.
10276 * src/reader.h (braced_code): Renamed from braced_code_t.
10277 Remove brace_code_e tag.
10278 * src/relation.h (relation_node): Renamed from relation_node_t.
10279 (relation_nodes): Renamed from relation_nodes_t.
10280 (relation): Renamed from relation_t.
10281 * src/state.h (state_number): Renamed from state_number_t.
10282 (struct state): Renamed from struct state_s.
10283 (state): Renamed from state_t.
10284 (transitions): Renamed from transitions_t. Unused (and
10285 misspelled) transtion_s tag removed.
10286 (errs): Renamed from errs_t. Unused errs_s tag removed.
10287 (reductions): Renamed from reductions_t. Unused tag
10288 reductions_s removed.
10289 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10290 (struct symbol_list): Renamed from struct symbol_list_s.
10291 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10292 (struct symbol): Renamed from struct symbol_s.
10293 (symbol): Renamed from symbol_t.
10294 * src/tables.c (vector_number): Renamed from vector_number_t.
10295 (action_number): Renamed from action_t.
10296 * src/tables.h (base_number): Renamed from base_t.
10297 * src/vcg.h (enum color): Renamed from enum color_e.
10298 (enum textmode): Renamed from enum textmode_e.
10299 (enum shape): Renamed from enum shape_e.
10300 (struct colorentry): Renamed from struct colorentry_s.
10301 (struct classname): Renamed from struct classname_s.
10302 (struct infoname): Renamed from struct infoname_s.
10303 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10304 (enum decision): Renamed from enum decision_e.
10305 (enum orientation): Renamed from enum orientation_e.
10306 (enum alignment): Renamed from enum alignment_e.
10307 (enum arrow_mode): Renamed from enum arrow_mode_e.
10308 (enum crossing_type): Renamed from enum crossing_type_e.
10309 (enum view): Renamed from enum view_e.
10310 (struct node): Renamed from struct node_s.
10311 (node): Renamed from node_t.
10312 (enum linestyle): Renamed from enum linestyle_e.
10313 (enum arrowstyle): Renamed from enum arrowstyle_e.
10314 (struct edge): Renamed from struct edge.
10315 (edge): Renamed from edge_t.
10316 (struct graph): Renamed from struct graph_s.
10317 (graph): Renamed from graph_t.
10318 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10319 Rename value_t -> value.
10320 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10321 value_t_as_yystype -> value_as_yystype.
10322
10323 Don't include <errno.h> in the mainstream code, since it
10324 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10325 * lib/get-errno.c, lib/get-errno.h: New files.
10326 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10327 get-errno.c.
10328 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10329 * src/output.c (output_skeleton): Likewise.
10330 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10331 instead of errno.
10332 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10333 Likewise.
10334 (handle_action_dollar, handle_action_at): Likewise.
10335 * src/system.h: Do not include <errno.h>.
10336 (TAB_EXT): Renamed from EXT_TAB.
10337 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10338
10339 Avoid str[a-z]*, since <string.h> reserves that name space.
10340 Change all instances of "struniq" in names to "uniqstr", and
10341 likewise for "STRUNIQ" and "UNIQSTR".
10342 * src/uniqstr.c: Renamed from src/struniq.c.
10343 * src/uniqstr.h: Renamed from src/struniq.h.
10344 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10345 * src/files.c (strsuffix): Remove; unused.
10346 (concat2): Renamed from stringappend. Now static.
10347 * src/files.h (strsuffix, stringappend): Remove; unused.
10348 * src/parse-gram.y (<chars>): Renamed from <string>.
10349 (<uniqstr>): Renamed from <struniq>.
10350 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10351 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10352 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10353 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10354 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10355 (N_EXPAND): Renamed from N_STRETCH.
10356
10357 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10358 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10359 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10360 Remove; unused.
10361 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10362 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10363 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10364 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10365 (BASE_MAXIMUM): Renamed from BASE_MAX.
10366 (BASE_MINIMUM): Renamed from BASE_MIN.
10367 (ACTION_MAX): Remove; unused.
10368 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10369 Unnecessary casts removed from above defines.
10370
10371
10372 Fix misspelling in names.
10373 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10374 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10375 G_NODE_ALIGNEMENT.
10376
10377
10378 * lib/timevar.c (timevar_report): Renamed from time_report,
10379 for consistency with other names.
10380 * lib/timevar.h (timevar_report): New decl.
10381 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10382
10383
10384 Sort include-file uses.
10385
10386 Reorder all include files under src to be in the order "system.h".
10387 then the ../lib include files in angle brackets (alphabetized),
10388 then the . include files in double-quotes (alphabetized). Fix
10389 dependency breakages encountered in this process, as follows:
10390 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10391 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10392 * src/state.h: Include "symtab.h".
10393
996b1c7e
PE
103942002-12-08 Paul Eggert <eggert@twinsun.com>
10395
10396 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10397 since this causes problems when __file__ contains character
10398 sequences like "@" that are treated specially by src/scan-skel.l.
10399 Instead, just use the file's basename. This fixes the bug
10400 reported by Martin Mokrejs in
161a71f3 10401 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 10402
e19c4e5d
PE
104032002-12-06 Paul Eggert <eggert@twinsun.com>
10404
10405 Add support for rules that do not have trailing semicolons, as
10406 POSIX requires. Improve the quality of locations in Bison
10407 diagnostics.
26b4a969 10408
e19c4e5d
PE
10409 * src/location.c: Include <quotearg.h>.
10410 (empty_location): Now const.
10411 (location_print): New function. Follow the recommendation of the
10412 GNU Coding Standards for locations that span file boundaries.
10413 * src/location.h: Do not include <quotearg.h>; no longer needed.
10414 (boundary): New type.
10415 (location_t): Use it. This allows locations to span file boundaries.
10416 All member uses changed: file -> start.file or end.file (as needed),
10417 first_line -> start.line, first_column -> start.column,
10418 last_line -> end.line, last_column -> end.column.
10419 (equal_boundaries): New function.
10420 (LOCATION_RESET, LOCATION_STEP): Remove.
10421 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10422 (empty_location): Now const.
10423 (location_print): New decl.
10424 * src/parse-gram.y (lloc_default): New function, which handles
10425 empty locations more accurately.
10426 (YYLLOC_DEFAULT): Use it.
10427 (%token COLON): Remove.
10428 (%token ID_COLON): New token.
26b4a969 10429 (rules): Use it.
e19c4e5d
PE
10430 (declarations, rules): Remove trailing semicolon.
10431 (declaration, rules_or_grammar_declaration):
10432 Allow empty (";") declaration.
10433 (symbol_def): Remove empty actions; no longer needed.
10434 (rules_or_grammar_declaration): Remove trailing semicolon.
10435 (semi_colon.opt): Remove.
10436 * src/reader.h: Include location.h.
10437 (scanner_cursor): New decl.
10438 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10439 rolling our own.
10440 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10441 of *loc.
10442 (STEP): Remove. No longer needed, now that adjust_location does
10443 the work. All uses removed.
10444 (scanner_cursor): New var.
10445 (adjust_location): Renamed from extend_location. It now sets
10446 *loc and adjusts the scanner cursor. All uses changed.
10447 Don't bother testing for CR.
10448 (handle_syncline): Remove location arg; now updates scanner cursor.
10449 All callers changed.
10450 (unexpected_end_of_file): Now accepts start boundary of token or
10451 comment, not location. All callers changed. Update scanner cursor,
10452 not the location.
10453 (SC_AFTER_IDENTIFIER): New state.
10454 (context_state): Renamed from c_context. All uses changed.
10455 (id_loc, code_start, token_start): New local vars.
10456 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10457 processing of Yacc white space and equivalents here.
10458 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10459 instead of returning ID immediately, since we need to search for
10460 a subsequent colon.
10461 (<INITIAL>"'", "\""): Save token_start.
10462 (<INITIAL>"%{", "{", "%%"): Save code_start.
10463 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10464 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10465 BEGIN context_state at end, not INITIAL.
10466 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10467 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10468 Return correct token start.
10469 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10470 the start of a character, string or multiline comment is found.
10471 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10472 Reduction): Adjust reported locations to match the more-precise
10473 results now expected.
10474 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10475 * tests/reduce.at (Useless Rules, Reduced Automaton,
10476 Underivable Rules): Likewise.
10477 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10478 or "|"' now that so many other tokens are allowed by the new grammar.
10479
10480 * src/complain.h (current_file): Remove duplicate decl;
10481 current_file is now owned by files.h.
10482 * src/complain.c, src/scan-gram.l: Include files.h.
10483
104842002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 10485
e19c4e5d
PE
10486 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10487 promotes to int; it might be unsigned int.
10488 * data/yacc.c (yy_reduce_print): Likewise.
10489
10490 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10491 be #defined in the prologue, not in the Bison declarations.
10492 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 10493
b64755e3
PE
104942002-12-02 Paul Eggert <eggert@twinsun.com>
10495
10496 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10497 * lib/strtoul.c: New file, from gnulib.
10498 This fixes a porting bug reported by Peter Klein in
161a71f3 10499 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 10500
6e746484
PE
105012002-11-30 Paul Eggert <eggert@twinsun.com>
10502
b64755e3
PE
10503 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10504 and put only a forward declaration in the prologue. This is for
10505 consistency with the other scanner helper functions.
10506
6ba55592
PE
10507 Type clashes now generate warnings, not errors, since it
10508 appears that POSIX may allow some grammars with type clashes.
10509 * src/reader.c (grammar_current_rule_check): Warn about
10510 type clashes instead of complaining.
10511 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10512
6e746484
PE
10513 Add Yacc library, since POSIX requires it.
10514 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10515 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10516 * lib/main.c, lib/yyerror.c: New files.
10517
10518 gram_error can be static; it need not be extern.
10519 * src/reader.h (gram_error): Remove decl.
10520 * src/parse-gram.y (gram_error): Now static. Add static decl.
10521 (print_token_value): Omit parameter names from forward decl,
10522 for consistency.
10523
88510f9c
PE
105242002-11-29 Paul Eggert <eggert@twinsun.com>
10525
6e746484
PE
10526 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10527 be declared before being used. E.g., one should typically
10528 declare them in the prologue. Use GNU coding style in examples.
10529 Put "const" consistently after the type it modifies. Mention
10530 that C99 supports "inline". Mention that yyerror traditionally
10531 returns "int".
10532
88510f9c
PE
10533 %parse-param and %lex-param now take just one argument, the
10534 declaration; the argument name is deduced from the declaration.
10535
10536 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10537 Reporting, Table of Symbols): Document this.
10538 * src/parse-gram.y (add_param): New function.
10539 (COMMA): Remove.
10540 (declaration): Implement new rule for %parse-param and %lex-param.
10541 * src/scan-gram.l: "," now elicits a warning, rather than being
10542 a token; this is more compatible with byacc.
10543 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10544
bb92250c
PE
105452002-11-27 Paul Eggert <eggert@twinsun.com>
10546
10547 Rename identifiers to avoid real and potential collisions.
10548
10549 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10550 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 10551 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
10552 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10553 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10554 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10555 All uses changed.
10556 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10557 The name "yycontrol" violates the name space rules, and this stuff
10558 wasn't being used anyway.
10559 (input): Remove action; this stuff wasn't being used.
10560 (gram_error): Rename local variable yylloc -> loc.
10561 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10562 (YY_DECL): Don't use "yy" at start of local variables.
10563 All uses changed, e.g., yylloc -> loc.
10564 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10565 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10566 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10567 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10568
10569 * src/parse-gram.y (gram_error): loc is now const *.
10570 * src/reader.h (gram_error): Likewise.
10571
3af4feb2
PE
105722002-11-24 Paul Eggert <eggert@twinsun.com>
10573
10574 Version 1.75c.
10575
10576 * tests/actions.at (Actions after errors): Use an output format
10577 more similar to that of the Printers and Destructors test.
10578 Test the position of the ';' token too.
10579 (Printers and Destructors): Likewise.
10580 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10581 unnecessarily alarming people when the test fails.
10582
10583 * data/yacc.c (yyerrlab1): Move this label down, so that the
10584 parser does not discard the lookahead token if the user code
10585 invokes YYERROR. This change is required for POSIX conformance.
10586
10587 * lib/error.c: Sync with gnulib.
10588
105892002-11-22 Paul Eggert <eggert@twinsun.com>
10590
10591 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10592 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10593 * lib/xmalloc.c: Likewise.
26b4a969 10594
58004308
PE
105952002-11-20 Paul Eggert <eggert@twinsun.com>
10596
10597 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10598
105992002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 10600
58004308
PE
10601 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10602 should use `if (! x) abort ();' rather than `assert (x);', and
10603 anyway it's one less thing to worry about configuring.
10604
10605 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10606 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10607 and replace all instances of assert with abort.
10608 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10609 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10610
10611 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10612 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10613 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10614 hash_find_entry, hash_rehash, hash_insert): Likewise.
10615 * src/conflicts.c (resolve_sr_conflict): Likewise.
10616 * src/lalr.c (set_goto_map, map_goto): Likewise.
10617 * src/nullable.c (nullable_compute): Likewise.
10618 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10619 * src/reader.c (packgram, reader): Likewise.
10620 * src/state.c (state_new, state_free, state_transitions_set,
10621 state_reduction_find): Likewise.
10622 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10623 symbol_pack): Likewise.
10624 * src/tables.c (conflict_row, pack_vector): Likewise.
10625 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10626 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10627 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10628 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10629
10630 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10631 (ARGMATCH_CONSTRAINT): New macro.
10632 (ARGMATCH_ASSERT): Use it.
10633
10634 * src/system.h (verify): New macro.
10635 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10636 rather than assert.
10637 * src/tables.c (tables_generate): Likewise.
10638
10639 * src/struniq.c (struniq_assert): Now returns void, and aborts
10640 if the assertion is false.
10641 (struniq_assert_p): Remove.
10642 * src/struniq.h: Likewise.
10643
76ae8198
PE
106442002-11-18 Paul Eggert <eggert@twinsun.com>
10645
10646 * data/glr.c (yygetLRActions): Replace `yyindex' with
10647 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10648 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 10649 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 10650
d3c4e709
AD
106512002-11-18 Akim Demaille <akim@epita.fr>
10652
10653 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10654 space.
10655 From Tim Van Holder.
10656
8d8a7238
PE
106572002-11-17 Paul Eggert <eggert@twinsun.com>
10658
10659 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10660 to "SyntaxError" for consistency with my 2002-11-15 change.
10661
10662 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10663 not define to {}, since this breaks the common use of `YYDPRINTF
10664 ((...));' if a single statement is desired (e.g. before `else').
10665 Work around GCC warnings by surrounding corresponding calls with
10666 {} if needed.
10667 (yyhasResolvedValue): Remove unused function.
10668 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10669 loop body.
10670 (yyreportSyntaxError): Renamed from yyreportParseError.
10671 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10672 All uses changed.
10673 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10674 extern when possible. Remove unused initializations.
10675
b0937b22
AD
106762002-11-16 Akim Demaille <akim@epita.fr>
10677
10678 Augment the similarity between GLR and LALR traces.
10679
10680 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10681 (YY_REDUCE_PRINT): New.
10682 (yyparse): Use them.
10683 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10684 YYDPRINT here.
10685 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10686 state reached after the reduction/recovery, since...
10687 (yyparse, yyprocessOneStack): Report the state we are entering in.
10688
c5e3e510
AD
106892002-11-16 Akim Demaille <akim@epita.fr>
10690
10691 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10692 Add support for --trace=skeleton.
10693 * src/scan-skel.l: %option debug.
10694 Scan strings of non-@ or \n instead of character by character.
10695 (scan_skel): Handle trace_skeleton.
10696 (QPUTS): New.
10697 (@output_parser_name@, @output_header_name@): ``Restore'' their
10698 support (used to be M4 macros).
10699 * data/yacc.c: Quote larger chunks, a la glr.c.
10700 * data/lalr1.cc: Likewise.
10701 The header guards are no longer available, so use some other
10702 string than `YYLSP_NEEDED'.
10703
4c6cc1db
AD
107042002-11-16 Akim Demaille <akim@epita.fr>
10705
10706 Make the ``Printers and Destructors'' test more verbose, taking
10707 `yacc.c''s behavior as (possibly wrong) reference.
10708
10709 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10710 instead of fprint on stdout.
10711 Set and report the last_line of the symbols.
10712 Consistently display values and locations.
10713
6d9e8019
PE
107142002-11-16 Paul Eggert <eggert@twinsun.com>
10715
10716 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10717
6e649e65
PE
107182002-11-15 Paul Eggert <eggert@twinsun.com>
10719
b25d88f6
PE
10720 * tests/actions.at (Actions after errors): New test case.
10721
6e649e65
PE
10722 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10723 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10724 tests/action.at, tests/calc.at, tests/conflicts.at,
10725 tests/cxx-type.at, tests/regression.at:
10726 "parse error" -> "syntax error" for POSIX compatibility.
10727 "parsing stack overflow..." -> "parser stack overflow" so
10728 that code matches Bison documentation.
10729
0f39aab9
AD
107302002-11-15 Akim Demaille <akim@epita.fr>
10731
10732 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10733 take two BRACED_CODE, not two string_content.
10734 Free the scanner's obstack when we are done.
10735 (code_content): New.
10736 * tests/calc.at: Adjust.
10737 * doc/bison.texinfo: Adjust.
10738 Also, make sure to include the `,' for these declarations.
10739
761c1926
AD
107402002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10741
10742 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10743 definition; avoids potential autoreconf problems.
10744
b0f98b10
AD
107452002-11-15 Akim Demaille <akim@epita.fr>
10746
10747 Always check the value returned by yyparse.
10748
10749 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10750 returned by yyparse.
10751 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10752 Adjust calls.
10753 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10754 returned by yyparse.
10755
970785f1
PH
107562002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10757
10758 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10759 on input.at test.
10760
8fcc7db1
PE
107612002-11-14 Paul Eggert <eggert@twinsun.com>
10762
7ec1b48e
PE
10763 * src/output.c (output_skeleton): Call xfopen instead of
10764 duplicating xfopen's body.
10765
cfff7583 10766 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 10767 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 10768
8fcc7db1
PE
10769 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10770 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10771 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10772 file twice in the grammar, as an extra check.
10773
10774 * tests/input.at (Torturing the Scanner): Surround the
10775 backslash-newline tests with "#if 0", to make it less likely that
10776 we'll run into compiler bugs. Bring back solitary \ inside
10777 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 10778 test backslash-newline in C character constant.
8fcc7db1 10779
4e8d992c
AD
107802002-11-14 Akim Demaille <akim@epita.fr>
10781
10782 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10783 status of the compiler.
f32b346d 10784 Calling `exit 1' is no longer needed.
4e8d992c
AD
10785 Reported by Nelson H. F. Beebe.
10786
9501dc6e
AD
107872002-11-14 Akim Demaille <akim@epita.fr>
10788
10789 * tests/atlocal.in (CPPFLAGS): We have config.h.
10790 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10791 New.
10792 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10793 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10794 * tests/regression.at, tests/torture.at: Use them for all the
10795 grammars that are to be compiled.
10796 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10797 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10798 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10799
18b519c0
AD
108002002-11-14 Akim Demaille <akim@epita.fr>
10801
10802 * doc/bison.texinfo: Various formatting changes (alignments in
10803 samples, additional @group/@end group, GCS in samples.
10804 Use @deffn instead of simple @table to define the directives,
10805 macros, variables etc.
10806
9a86cdb9
PE
108072002-11-13 Paul Eggert <eggert@twinsun.com>
10808
daa33def 10809 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 10810 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 10811
daa33def 10812 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 10813 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
10814 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10815 * tests/headers.at (export YYLTYPE): Likewise.
10816
10817 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 10818 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 10819
9a86cdb9
PE
10820 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10821 comments, since they're not portable. Use GNU coding style.
10822
9c1e26bd
AD
108232002-11-13 Akim Demaille <akim@epita.fr>
10824
10825 * data/yacc.c: Leave bigger chunks of quoted text.
10826 (YYDSYMPRINTF): New.
10827 Use it to report symbol activities.
10828 * data/glr.c (YYDSYMPRINTF): New.
10829 Use it.
10830
87f721cc
PE
108312002-11-12 Paul Eggert <eggert@twinsun.com>
10832
10833 Version 1.75b.
10834
10835 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10836 (yyglrReduce): Return yyok, not 0.
10837 This should avoid the enumerated-type warnings reported
464c6927 10838 by Nelson H. F. Beebe in
161a71f3 10839 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
10840
10841 * lib/bbitset.h (BITSET_INLINE): Remove.
10842 * lib/bitset.h [! BITSET_INLINE]: Remove.
10843 (bitset_set, bitset_reset, bitset_test): Rename local vars
10844 to avoid shadowing warnings by GCC.
10845
10846 * data/glr.c (inline): Remove #define. It's the user's
10847 responsibility to #define it away, just like 'const'.
464c6927 10848 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 10849 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 10850
87f721cc
PE
10851 * Makefile.maint (po-check): Scan .l and .y files instead of the
10852 .c and the .h files that they generate. This fixes the bug
10853 reported by Tim Van Holder in:
161a71f3 10854 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
10855 Look for N_ as well as for _. Try to avoid matching #define for
10856 N_ and _.
10857 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10858 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10859 * src/scan-gram.l: Revamp regular expressions so that " and '
10860 do not confuse xgettext.
10861
10862 * src/struniq.h (struniq_new): Do not declare the return type
10863 to be 'const'; this violates the C standard.
10864 * src/struniq.c (struniq_new): Likewise.
10865
be14ade5
AD
108662002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10867
10868 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10869 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10870 linker.
10871
05291fbc
AD
108722002-11-12 Akim Demaille <akim@epita.fr>
10873
10874 * Makefile.maint: Sync with Autoconf:
10875 (local_updates): New.
10876
1f5fd52e
AD
108772002-11-12 Akim Demaille <akim@epita.fr>
10878
10879 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10880
283f1e64
AD
108812002-11-12 Akim Demaille <akim@epita.fr>
10882
10883 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10884 locations.
10885
886b69d1
AD
108862002-11-12 Akim Demaille <akim@epita.fr>
10887
10888 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10889 not yyvalue.
10890
3df37415
AD
108912002-11-12 Akim Demaille <akim@epita.fr>
10892
10893 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10894 Use it to test the GLR parser.
10895
7bd6c77e
AD
108962002-11-12 Akim Demaille <akim@epita.fr>
10897
10898 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10899 defines it.
10900 * data/glr.c (yystos): New.
10901 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10902 (YYDSYMPRINT): New.
10903 (yyval): Don't define it, it is handled via M4.
10904 (yyrecoverParseError): Free verbosely the discarded symbols.
10905 * data/yacc.c (yysymprint): Remove, rather...
10906 (b4_yysymprint_generate): invoke.
10907 * data/c.m4 (b4_yysymprint_generate): New.
10908 Accept pointers as arguments, as opposed to the version from
10909 yacc.c.
10910 (b4_yydestruct_generate): Likewise.
10911 * tests/cations.at (Printers and Destructors): Use Bison directives
10912 instead of CPP macros.
10913 Don't rely on internal details.
10914
b0400cc6
AD
109152002-11-12 Akim Demaille <akim@epita.fr>
10916
10917 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10918 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10919 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10920 it against YYEMPTY and so forth), work on yytoken (i.e., set
10921 it to YYEMPTY etc.).
10922 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10923 (b4_symbol_actions): Remove.
10924 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10925 for 0, end-of-input.
10926
72f889cc
AD
109272002-11-12 Akim Demaille <akim@epita.fr>
10928
10929 * doc/bison.texinfo (Destructor Decl): New.
10930
b1ae9233
AD
109312002-11-12 Akim Demaille <akim@epita.fr>
10932
10933 * src/tables.c (tables_generate): Use free for pointers that
10934 cannot be NULL, not XFREE.
10935 (pack_vector): Use assert, not fatal, for bound violations.
10936 * src/state.c (state_new): Likewise.
10937 * src/reader.c (reader): Likewise.
10938 * src/lalr.c (set_goto_map): Likewise.
72f889cc 10939 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
10940 the file name.
10941
7ec2d4cd
AD
109422002-11-12 Akim Demaille <akim@epita.fr>
10943
10944 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10945 Restore.
10946 * src/scan-gram.l (last_string): Is global to the file, not to
10947 yylex.
10948 * src/parse-gram.y (input): Don't append the epilogue here,
10949 (epilogue.opt): do it here, and free the scanner's obstack.
10950 * src/reader.c (epilogue_set): Rename as...
10951 (epilogue_augment): this.
10952 * data/c.m4 (b4_epilogue): Defaults to empty.
10953
573a6cd3
AD
109542002-11-12 Akim Demaille <akim@epita.fr>
10955
10956 * src/getargs.c (long_options): Remove duplicates.
10957 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10958 Remove.
10959 * doc/bison.rnh: Remove.
10960 * doc/bison.texinfo (VMS Invocation): Remove.
10961
95612cfa
AD
109622002-11-12 Akim Demaille <akim@epita.fr>
10963
10964 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10965 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10966
10967 Use struniq for symbols.
10968
10969 * src/symtab.h (symbol_t): The tag member is a struniq.
10970 (symbol_type_set): Adjust.
10971 * src/symtab.c (symbol_new): Takes a struniq.
10972 (symbol_free): Don't free the tag member.
10973 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10974 (hash_compare_symbol, hash_symbol): these.
10975 Use the fact that tags as struniqs.
10976 (symbol_get): Use struniq_new.
10977 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10978 Returns a strniq.
10979 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10980 and type members are struniqs.
10981 * src/reader.c (get_merge_function)
10982 (grammar_current_rule_merge_set): Adjust.
10983 (TYPE, current_type): Are struniq.
10984
10985 Use struniq for file names.
10986
10987 * src/files.h, src/files.c (infile): Split into...
10988 (grammar_file, current_file): these.
10989 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10990 * src/reduce.c (reduce_print): Likewise.
10991 * src/getargs.c (getargs): Likewise.
10992 * src/complain.h, src/complain.c: Likewise.
10993 * src/main.c (main): Call struniqs_new early enough to use it for
10994 file names.
10995 Don't free the input file name.
10996
3e6656f9
AD
109972002-11-12 Akim Demaille <akim@epita.fr>
10998
10999 * src/symtab.c (symbol_free): Remove dead deactivated code:
11000 type_name are properly removed.
11001 Don't use XFREE to free items that cannot be NULL.
11002 * src/struniq.h, src/struniq.c: New.
11003 * src/main.c (main): Initialize/free struniqs.
11004 * src/parse-gram.y (%union): Add astruniq member.
11005 (yyprint): Adjust.
11006 * src/scan-gram.l (<{tag}>): Return a struniq.
11007 Free the obstack bit that used to store it.
11008 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11009
7672019c
PE
110102002-11-11 Paul Eggert <eggert@twinsun.com>
11011
11012 Revamp to fix many (but not all) of the C- and M4-related quoting
11013 problems. Among other things, this fixes the Bison bug reported
11014 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 11015 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
11016
11017 Use new @ escapes consistently. Represent brackets with @{ and @}
11018 rather than @<:@ and @:>@, since this works a bit better with dumb
11019 editors like vi. Represent @ with @@, since @ is now consistently
11020 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11021 __ofile__, to avoid unexpected expansions. Similarly, use @output
11022 rather than #output.
11023
11024 * data/c.m4 (b4_copyright): Omit file name from comment, since
11025 the file name could contain "*/".
11026 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11027 be quoted. All uses changed.
11028
11029 * data/glr.c: Use new @ escapes consistently.
11030 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11031 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11032 Remove, since they couldn't handle arbitrary characters in file
11033 names.
11034 * data/lalr1.cc: Likewise.
11035 * data/yacc.c: Likewise.
11036
11037 * src/files.c (output_infix): Remove; all uses removed.
11038 * src/files.h: Likewise.
11039
11040 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11041 mishandled funny characters in file names, and anyway it isn't
11042 needed any more.
11043 * data/yacc.c: Likewise.
11044 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11045
11046 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11047 * data/yacc.c: Likewise.
11048
11049 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11050 strings now.
11051 (muscle_init): Quote filename as a C string.
11052 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11053 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11054 * src/output.c (escaped_file_name_output): New function.
11055 (prepare_symbols): Quote tokens for M4.
11056 (prepare): Don't insert output_infix, output_prefix,
11057 output_parser_name, output_header_name; this is now down by scan-skel.
11058 Insert skeleton as a C string.
11059
11060 * src/output.c (user_actions_output, symbol_destructors_output,
11061 symbol_printers_output): Quote filenames for C and M4.
11062 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11063
11064 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11065 escapes other than \\ and \'; this simplifies the code.
11066 (<SC_STRING>): Likewise, for \\ and \".
11067 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11068 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11069 Use new escapes @{ and @} for [ and ].
11070
11071 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11072 them with auto vars.
11073 Switch to new escape scheme, where @ is the escape character uniformly.
11074 Abort if a stray escape character is found. Avoid unbounded input
11075 buffer when parsing non-escaped text.
11076
11077 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11078 __oline__, #output, $@, and @{ do not have unintended meanings.
11079
acea4f3b
PE
110802002-11-09 Paul Eggert <eggert@twinsun.com>
11081
11082 Fix the test failure due to GCC warnings described in
161a71f3 11083 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
11084 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11085 evaluate to 0 if it's impossible for NINF to be in the respective
11086 table.
11087 (yygetLRActions, yyrecoverParseError): Use them.
11088
11089 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11090 counted in the token inserted at end of file. Now takes
11091 location_t *, not location_t, so that the location can be
11092 adjusted. All uses changed.
11093
11094 * tests/regression.at (Invalid inputs): Adjust wording in
11095 diagnostic to match the new behavior.
11096
11097 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11098 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11099 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11100 abort ();'. This reduces the runtime of the "Many lookaheads"
11101 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11102 GCC 3.2.
11103
20ef1ad5
PE
111042002-11-07 Paul Eggert <eggert@twinsun.com>
11105
11106 * src/parse-gram.y (CHARACTER): Remove unused token.
11107 All uses removed.
11108
11109 * src/scan-gram.l: Remove stack option. We no longer use the
11110 stack, since the stack was never deeper than 1; instead, use the
11111 new auto var c_context to record the stacked value.
11112
11113 Remove nounput option. At an unexpected end of file, we now unput
11114 the minimal input necessary to end cleanly; this simplifies the
11115 code.
11116
11117 Avoid unbounded token sizes where this is easy.
11118
11119 (unexpected_end_of_file): New function.
11120 Use it to systematize the error message on unexpected EOF.
11121 (last-string): Now auto, not static.
11122 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11123 (scanner_last_string_free): Remove; not used.
11124 (percent_percent_count): Move decl to just before use.
11125 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11126 not the (never otherwised-used) CHARACTER.
11127
93724f13
AD
111282002-11-07 Akim Demaille <akim@epita.fr>
11129
11130 Let yyerror always receive the msg as last argument, so that
11131 yyerror can be variadic.
11132
11133 * data/yacc.c (b4_yyerror_args): New.
11134 Use it when calling yyerror.
11135 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11136 Use it when calling yyerror.
11137 * doc/bison.texinfo (Error Reporting): Adjust.
11138 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11139 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11140
6e40b4eb
AD
111412002-11-06 Akim Demaille <akim@epita.fr>
11142
11143 #line should have quoted strings.
11144 Ideally, this should be done by m4_quotearg.
11145
11146 * src/scan-skel.l: Include quotearg.h.
11147 Quote __ofile__.
11148 * src/output.c (symbol_printers_output)
11149 (symbol_destructors_output): Quote the file name.
11150
2dfbfc12
AD
111512002-11-06 Akim Demaille <akim@epita.fr>
11152
11153 * tests/regression.at (Invalid inputs): Adjust to the recent
11154 messages.
11155
437c2d80
AD
111562002-11-06 Akim Demaille <akim@epita.fr>
11157
11158 Restore --no-lines.
11159 Reported by Jim Kent.
11160
11161 * data/c.m4 (b4_syncline): New.
11162 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11163 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11164 * src/output.c (user_actions_output): Likewise.
11165 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 11166 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 11167
900c5db5
AD
111682002-11-06 Akim Demaille <akim@epita.fr>
11169
11170 * src/main.c (main): Free `infile'.
11171 * src/scan-gram.l (handle_syncline): New.
11172 Recognize `#line'.
11173 * src/output.c (user_actions_output, symbol_destructors_output)
11174 (symbol_printers_output): Use the location's file name, not
11175 infile.
11176 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11177
e183b123 111782002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 11179
e183b123 11180 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 11181 either has GLR conflict entries.
e183b123 11182
193eb6b7
PE
111832002-11-05 Paul Eggert <eggert@twinsun.com>
11184
e183b123
PE
11185 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11186 "integer out of range" rather than "invalid value".
11187 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11188 accordingly.
11189
193eb6b7
PE
11190 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11191 Also, remove one static variable in the scanner.
11192
11193 * src/scan-gram.l (braces_level): Now auto, not static.
11194 Initialize to zero if the compiler is being picky.
11195 (INITIAL): Clear braces_level instead of incrementing it.
11196 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11197 as POSIX 1003.1-2001 requires.
11198 * src/system.h (IF_LINT): New macro, taken from coreutils.
11199 * configure.ac: Define "lint" if --enable-gcc-warnings.
11200
29c01725
AD
112012002-11-05 Akim Demaille <akim@epita.fr>
11202
11203 * src/scan-gram.l: When it starts with `%', complain about the
11204 whole directive, not just that `invalid character: %'.
11205
8aeac3ca
AD
112062002-11-04 Akim Demaille <akim@epita.fr>
11207
11208 * Makefile.maint: Update from Autoconf.
11209 (update, cvs-update, po-update, do-po-update): New.
11210
793a58bb
AD
112112002-11-04 Akim Demaille <akim@epita.fr>
11212
11213 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11214 and yyerror.
11215 Have yyerror `use' its arguments.
11216 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11217 returns true when location & yacc & pure & parse-param.
11218 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11219
c4d720cd
AD
112202002-11-04 Akim Demaille <akim@epita.fr>
11221
11222 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11223 clashes.
11224 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11225 font-lock-mode.
11226 Use complain_at.
11227 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11228 slot 0.
11229
613a0dc5
PE
112302002-11-03 Paul Eggert <eggert@twinsun.com>
11231
11232 * src/reader.c (get_merge_function, grammar_current_rule_check):
11233 Use consistent diagnostics for reporting type name clashes.
11234 Quote the types with <>, for consistency with Yacc.
11235 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11236
2a8d363a
AD
112372002-11-03 Akim Demaille <akim@epita.fr>
11238
11239 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11240 New.
11241 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11242 (b4_parse_param): Remove.
11243 Use b4_identification.
11244 Propagate b4_pure_args where needed to pass them to yyerror.
11245 * data/glr.m4 (b4_parse_param): Remove.
11246 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11247 (b4_lpure_formals): New.
11248 Use b4_identification.
11249 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11250 b4_user_formals and b4_user_args.
11251 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11252 (yyreportAmbiguity): When using a pure parser, also need
11253 the location, and the parse-params.
11254 Adjust callers.
11255 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11256 When using a pure parser, also need the parse-params.
11257 Adjust callers.
11258 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11259 (%pure-parser + %parse-param) LALR and GLR parsers.
11260 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11261 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11262 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11263 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11264 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11265 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11266 * doc/bison.texinfo: Untabify the whole file.
11267 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11268 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11269 (Error Reporting): Adjust to these new directives.
11270 Document %error-verbose, deprecate YYERROR_VERBOSE.
11271
9e32add8
AD
112722002-11-03 Akim Demaille <akim@epita.fr>
11273
11274 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11275 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11276 command line options.
11277 * tests/cxx-type.at: Formatting changes.
11278
b02d90a5
PE
112792002-11-03 Paul Eggert <eggert@twinsun.com>
11280
11281 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11282 to count columns correctly, and to check for invalid inputs.
9e32add8 11283
b02d90a5
PE
11284 Use mbsnwidth to count columns correctly. Account for tabs, too.
11285 Include mbswidth.h.
11286 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11287 (extend_location): New function.
11288 (YY_LINES): Remove.
11289
11290 Handle CRLF in C code rather than in Lex code.
11291 (YY_INPUT): New macro.
11292 (no_cr_read): New function.
11293
11294 Scan UCNs, even though we don't fully handle them yet.
11295 (convert_ucn_to_byte): New function.
11296
11297 Handle backslash-newline correctly in C code.
11298 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11299 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11300 all uses changed.
11301 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11302 Use {splice} wherever C allows backslash-newline.
11303 YY_STEP after space, newline, vertical-tab.
11304 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 11305
b02d90a5
PE
11306 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11307
11308 ({int}, handle_action_dollar, handle_action_at): Check for integer
11309 overflow.
9e32add8 11310
b02d90a5
PE
11311 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11312
11313 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11314 as well as \000. Check for UCHAR_MAX, not 255.
11315 Allow \x with an arbitrary positive number of digits, as in C.
11316 Check for overflow here.
11317 Allow \? and UCNs, for compatibility with C.
11318
11319 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11320 with quote slot used by complain_at.
11321
11322 * tests/input.at: Add tests for backslash-newline, m4 quotes
11323 in symbols, long literals, and funny escapes in strings.
11324
11325 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11326 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11327 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11328 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11329 * m4/mbswidth.m4: New file, from GNU coreutils.
11330
11331 * doc/bison.texinfo (Grammar Outline): Document // comments.
11332 (Symbols): Document that trigraphs have no special meaning in Bison,
11333 nor is backslash-newline allowed.
11334 (Actions): Document that trigraphs have no special meaning.
11335
11336 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11337 no longer used.
11338
113392002-11-02 Paul Eggert <eggert@twinsun.com>
11340
11341 * src/reader.c: Don't include quote.h; not needed.
11342 (get_merge_function): Reword warning to be consistent with
11343 type clash diagnostic in grammar_current_rule_check.
11344
11345 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11346 bug in trigraph handling.
11347
11348 * src/output.c (prepare_symbols): When printing token names,
11349 escape "[" as "@<:@" and likewise for "]".
11350
11351 * src/system.h (errno): Remove declaration, as we are now
11352 assuming C89 or better, and C89 guarantees errno.
11353
762b212b
PE
113542002-10-30 Paul Eggert <eggert@twinsun.com>
11355
11356 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11357 Check for close failures.
11358 * src/files.h (xfclose): Return void, not int, since it always
11359 returned zero.
11360 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11361 indicates one.
11362 * src/output.c (output_skeleton): Use xfclose rather than fclose
11363 and ferror. xfclose now checks ferror.
11364
11365 * data/glr.c (YYLEFTMOST_STATE): Remove.
11366 (yyreportTree): Use a stack-based leftmost state. This avoids
11367 our continuing battles with bogus warnings about initializers.
11368
56100c60
AD
113692002-10-30 Akim Demaille <akim@epita.fr>
11370
11371 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11372 #if.
11373
51b4a04c
PH
113742002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11375
11376 * tests/glr-regr1.at: New test for reported regressions.
11377 * tests/testsuite.at: Add glr-regr1.at test.
11378 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 11379
bf1ebda2
PE
113802002-10-24 Paul Eggert <eggert@twinsun.com>
11381
5c16c6b1
PE
11382 Version 1.75a.
11383
bf1ebda2
PE
11384 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11385 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11386 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11387 Don't assume strdup exists; POSIX says its an XSI extension.
11388 Check for buffer overflow on input.
11389
b526ee61
AD
113902002-10-24 Akim Demaille <akim@epita.fr>
11391
11392 * src/output.c (output_skeleton): Don't disable M4sugar comments
11393 too soon: it results in comments being expanded.
11394 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11395 first output.
11396
f1886bb2
AD
113972002-10-24 Akim Demaille <akim@epita.fr>
11398
11399 * data/yacc.c (m4_int_type): New.
11400 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11401 char' as only yacc.c wants K&R portability.
11402 * data/glr.c (yysigned_char): Remove.
11403 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11404 Reported by Quoc Peyrot.
11405
c5576256
PE
114062002-10-23 Paul Eggert <eggert@twinsun.com>
11407
11408 * src/main.c (main): With --trace=time, report times even if a
11409 non-fatal error occurs. Formerly, the times were reported in some
11410 such cases but not in others.
11411 * src/reader.c (reader): Just return if a complaint has been issued,
11412 instead of exiting, so that 'main' can report times.
11413
27b0ffea
AD
114142002-10-22 Akim Demaille <akim@epita.fr>
11415
11416 * src/system.h: Include sys/types.
11417 Reported by Bert Deknuydt.
11418
223a7883
PE
114192002-10-23 Paul Eggert <eggert@twinsun.com>
11420
11421 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11422 Suggested by Art Haas.
11423
114242002-10-22 Paul Eggert <eggert@twinsun.com>
11425
11426 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11427 decl; not needed any more.
11428 * src/main.c (main): Use return to exit, undoing yesterday's change.
11429 The last OS that we could find where this wouldn't work is
11430 SunOS 3.5, and that's too old to worry about now.
11431
11432 * data/glr.c (struct yyltype): Define members even when not
11433 doing locations. This is more consistent with yacc.c, and it
11434 works around the following bug reports:
161a71f3
PE
11435 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11436 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 11437
223a7883
PE
11438 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11439 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11440 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11441
8b76775a
AD
114422002-10-22 Akim Demaille <akim@epita.fr>
11443
11444 * data/README: New.
11445
6db10d14
PE
114462002-10-21 Paul Eggert <eggert@twinsun.com>
11447
11448 Be consistent about 'bool'; the old code used an enum in one
11449 module and an int in another, and this violates the C standard.
11450 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11451 * configure.ac (AC_HEADER_STDBOOL): Add.
11452 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11453 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11454 * src/symtab.c (hash_compare_symbol_t): Likewise.
11455 * src/system.h (bool, false, true): Use a definition consistent
11456 with ../lib/hash.c. All uses changed.
11457
11458 * src/complain.c (warning_issued): Renamed from warn_message_count,
11459 so that we needn't worry about integer overflow (!).
11460 Now of type bool. All uses changed.
11461 (complaint_issued): Renamed from complain_message_count; likewise.
11462
11463 * src/main.c (main): Use exit to exit with failure.
27b0ffea 11464
6db10d14
PE
11465 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11466 rather than 1 and 0.
11467 * src/main.c (main): Likewise.
11468 * src/getargs.c (getargs): Likewise.
11469 * src/reader.c (reader): Likewise.
11470
11471 * src/getarg.c (getargs): Remove duplicate code for
11472 "Try `bison --help'".
11473
11474 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11475 What was that "2" for?
11476
11477 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11478 * src/getargs.c (usage): Likewise.
11479
11480 * src/getargs.c (getargs): When there are too few operands, report
11481 the last one. When there are too many, report the first extra
11482 one. This is how diffutils does it.
11483
92a060fd
PE
114842002-10-20 Paul Eggert <eggert@twinsun.com>
11485
11486 Remove K&R vestiges.
11487 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11488 * src/complain.c (VA_START): Remove. Assume prototypes.
11489 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11490 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11491 fatal): Assume prototypes.
11492 * src/complain.h: Assume prototypes.
11493 * src/system.h (PARAMS): Remove.
11494 Include <limits.h> unconditionally, since it's guaranteeed even
11495 for a freestanding C89 compiler.
11496 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11497 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 11498
e7cb57c0
AD
114992002-10-20 Akim Demaille <akim@epita.fr>
11500
11501 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11502 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11503 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11504 (yyresolveStates, yyresolveAction, yyresolveStack)
11505 (yyprocessOneStack): Use them.
11506 (yy_reduce_print): New.
11507 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11508
0245f82d
AD
115092002-10-20 Akim Demaille <akim@epita.fr>
11510
11511 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11512 arguments and output `void'.
11513 (b4_c_function): Rename as...
11514 (b4_c_function_def): this.
11515 (b4_c_function_decl, b4_c_ansi_function_def)
11516 (b4_c_ansi_function_decl): New.
11517 Change the interpretation of the arguments: before `int, foo', now
11518 `int foo, foo'.
11519 * data/yacc.c (yyparse): Prototype and define thanks to these.
11520 Adjust b4_c_function_def uses.
11521 * data/glr.c (yyparse): Likewise, but ANSI only.
11522
39912f52
AD
115232002-10-20 Akim Demaille <akim@epita.fr>
11524
11525 * src/output.c (prepare): Move the definition of `tokens_number',
11526 `nterms_number', `undef_token_number', `user_token_number_max'
11527 to...
11528 (prepare_tokens): Here.
11529 (prepare_tokens): Rename as...
11530 (prepare_symbols): this.
11531 (prepare): Move the definition of `rules_number' to...
11532 (prepare_rules): here.
11533 (prepare): Move the definition of `last', `final_state_number',
11534 `states_number' to...
11535 (prepare_states): here.
11536 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11537
20c1e2ad
AD
115382002-10-20 Akim Demaille <akim@epita.fr>
11539
11540 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11541
21964f43
AD
115422002-10-20 Akim Demaille <akim@epita.fr>
11543
11544 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11545 * data/c.m4: here.
11546
66d30cd4
AD
115472002-10-20 Akim Demaille <akim@epita.fr>
11548
11549 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11550 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11551 `pair'.
11552 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11553 `name' to...
11554 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11555 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11556 These.
11557
95f2c9fe
PE
115582002-10-19 Paul Eggert <eggert@twinsun.com>
11559
11560 Do not create a temporary file, as that involves security and
11561 cleanup headaches. Instead, use a pair of pipes.
11562 Derived from a suggestion by Florian Krohm.
11563 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11564 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11565 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11566 (BISON_PREREQ_SUBPIPE): Add.
11567 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11568 Add subpipe.h, subpipe.c.
11569 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11570 * po/POTFILES.in: Add lib/subpipe.c.
11571 * src/output.c: Include "subpipe.h".
11572 (m4_invoke): Remove decl.
11573 (scan_skel): New decl.
11574 (output_skeleton): Use pipe rather than temporary file for m4 input.
11575 Check that m4sugar.m4 is readable, to avoid deadlock.
11576 Check for pipe I/O error.
11577 * src/scan-skel.l (readpipe): Remove decl.
11578 (scan_skel): New function, to be used in place of m4_invoke.
11579 Read from stream rather than file.
66d30cd4 11580
95f2c9fe
PE
11581 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11582 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11583 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11584 this generates a more-accurate value anyway.
11585
11586 * lib/timevar.c (timervar_accumulate): Rename locals to
11587 avoid confusion with similarly-named more-global.
11588 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11589
11590 * src/output.c (prepare): Use xstrdup to convert char const *
11591 to char *, to avoid GCC warning.
11592
c19988b7
AD
115932002-10-19 Akim Demaille <akim@epita.fr>
11594
11595 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11596 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11597 Use them to have `calc.y' ready for %pure-parser.
11598 * data/yacc.c (YYLEX): Pass a yylex return type to
11599 b4_c_function_call.
11600
ae7453f2
AD
116012002-10-19 Akim Demaille <akim@epita.fr>
11602
11603 Prototype support of %lex-param and %parse-param.
11604
11605 * src/parse-gram.y: Add the definition of the %lex-param and
11606 %parse-param tokens, plus their rules.
11607 Drop the `_' version of %glr-parser.
11608 Add the "," token.
11609 * src/scan-gram.l (INITIAL): Scan them.
11610 * src/muscle_tab.c: Comment changes.
11611 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11612 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11613 (muscle_entry_s): The `value' member is no longer const.
11614 Adjust all dependencies.
11615 * src/muscle_tab.c (muscle_init): Adjust: use
11616 MUSCLE_INSERT_STRING.
11617 Initialize the obstack earlier.
11618 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11619 (muscle_pair_list_grow): New.
11620 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11621 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11622 * tests/calc.at: Use %locations, not --locations.
11623 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11624
0e575721
AD
116252002-10-19 Akim Demaille <akim@epita.fr>
11626
11627 * src/getargs.c (usage): Take status as argument and exit
11628 accordingly.
11629 Report the traditional `Try ... --help' message when status != 0.
11630 (usage, version): Don't take a FILE * as arg, it is pointless.
11631 (getargs): When there is an incorrect number of arguments, make it
11632 an error, and report it GNUlically thanks to `usage ()'.
11633
724ce7f5
PE
116342002-10-18 Paul Eggert <eggert@twinsun.com>
11635
3a781eb2
PE
11636 * data/glr.c (yyreportParseError): Don't assume that sprintf
11637 yields the length of the printed string, as this is not true
11638 on SunOS 4.1.4. Reported by Peter Klein.
11639
724ce7f5
PE
11640 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11641 * tests/conflicts.at (%nonassoc and eof): Likewise.
11642 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11643
473d0a75
AD
116442002-10-17 Akim Demaille <akim@epita.fr>
11645
11646 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11647 * src/getargs.c (trace_types, trace_args): Adjust.
11648 * src/reader.c (grammar_current_rule_prec_set)
11649 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11650 Standardize error messages.
11651 And s/@prec/%prec/!
11652 (reader): Use trace_flag to enable scanner/parser debugging,
11653 instead of an adhoc scheme.
11654 * src/scan-gram.l: Remove trailing debugging code.
11655
e76d2469
PE
116562002-10-16 Paul Eggert <eggert@twinsun.com>
11657
93e2236a
PE
11658 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11659 MUSCLE_TAB_H.
11660
e76d2469
PE
11661 * NEWS: Officially drop support for building Bison with K&R C,
11662 since it didn't work anyway and it's not worth worrying about.
11663 * Makefile.maint (wget_files): Remove ansi2knr.c.
11664 (ansi2knr.c-url_prefix): Remove.
11665 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11666 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11667 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11668
5bd1c419
PE
116692002-10-15 Paul Eggert <eggert@twinsun.com>
11670
11671 Stop using the "enum_" trick for K&R-style function definitions;
11672 it confused me, and I was the author! Instead, assume that people
11673 who want to use K&R C compilers (when using these modules in GCC,
11674 perhaps?) will run ansi2knr.
11675
11676 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11677 All uses of "enum_" changed to "enum ".
11678 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11679 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 11680
5bd1c419
PE
11681 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11682 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11683 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11684 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11685 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11686 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11687 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11688 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11689 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11690 Use function prototypes; this removes the need for declaring
11691 static functions simply to provide their prototypes.
11692 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11693 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11694 bitset_count_, bitset_create, bitset_dump, bitset_first,
11695 bitset_free, bitset_init, bitset_last, bitset_next,
11696 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11697 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11698 bitset_print, bitset_release_memory, bitset_toggle_,
11699 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11700 debug_bitset): Likewise.
11701 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11702 * lib/bitset_stats.c (bitset_log_histogram_print,
11703 bitset_percent_histogram_print, bitset_stats_and,
11704 bitset_stats_and_cmp, bitset_stats_and_or,
11705 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11706 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11707 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11708 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11709 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11710 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11711 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11712 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11713 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11714 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11715 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11716 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11717 bitset_stats_zero): Likewise.
11718 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11719 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11720 bitsetv_dump, debug_bitsetv): Likewise.
11721 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11722 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11723 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11724 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11725 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11726 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11727 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11728 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11729 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11730 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11731 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11732 Likewise.
11733 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11734 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11735 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11736 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11737 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11738 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11739 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11740 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11741 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11742 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11743 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 11744
ae26e1f0
AD
117452002-10-14 Akim Demaille <akim@epita.fr>
11746
11747 Version 1.75.
11748
d43baf71
AD
117492002-10-14 Akim Demaille <akim@epita.fr>
11750
11751 * tests/Makefile.am (maintainer-check-posix): New.
11752
7ebc83e3
AD
117532002-10-14 Akim Demaille <akim@epita.fr>
11754
11755 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11756 member.
11757
05846dae
AD
117582002-10-14 Akim Demaille <akim@epita.fr>
11759
11760 * src/tables.c (table_ninf_remap): base -> tab.
11761 Reported by Matt Rosing.
11762
1318e37d
PE
117632002-10-14 Paul Eggert <eggert@twinsun.com>
11764
447fbb17
PE
11765 * tests/action.at, tests/calc.at, tests/conflicts.at,
11766 tests/cxx-type.at, tests/headers.at, tests/input.at,
11767 tests/regression.at, tests/synclines.at, tests/torture.at:
11768 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11769 so that the tests still work even if POSIXLY_CORRECT is set.
11770 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 11771
1318e37d
PE
11772 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11773 for portability to K&R hosts. Fix typo: signed char is guaranteed
11774 only to 127, not to 128.
11775 * data/glr.c (yysigned_char): New type.
11776 * data/yacc.c (yysigned_char): Likewise.
11777 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11778
cc0f0794
PE
117792002-10-13 Paul Eggert <eggert@twinsun.com>
11780
5038f418
PE
11781 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11782 true due to limited range of data type" warning from GCC.
11783
cc0f0794
PE
11784 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11785 by wrapping enum yytokentype's definition inside #ifndef
11786 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11787
6fed0802
AD
117882002-10-13 Akim Demaille <akim@epita.fr>
11789
11790 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11791 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11792
32f0598d
AD
117932002-10-13 Akim Demaille <akim@epita.fr>
11794
11795 * Makefile.maint: Update from Autoconf 2.54.
11796 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11797
7ea9a33f
AD
117982002-10-13 Akim Demaille <akim@epita.fr>
11799
11800 * src/print.c (print_state): Separate the list of solved conflicts
11801 from the other items.
11802 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11803
ea99527d
AD
118042002-10-13 Akim Demaille <akim@epita.fr>
11805
11806 Let nondeterministic skeletons be usable with deterministic
11807 tables.
11808
11809 With the patch, GAWK compiled by GCC without -O2 passes its test
11810 suite using a GLR parser driven by LALR tables. It fails with -O2
11811 because `struct stat' gives two different answers on my machine:
11812 88 (definition of an auto var) and later 96 (memset on this var).
11813 Hence the stack is badly corrumpted. The headers inclusion is to
11814 blame: if I move the awk.h inclusion before GLR's system header
11815 inclusion, the two struct stat have the same size.
11816
11817 * src/tables.c (pack_table): Always create conflict_table.
11818 (token_actions): Always create conflict_list.
11819 * data/glr.c (YYFLAG): Remove, unused.
11820
f377f69f
AD
118212002-10-13 Akim Demaille <akim@epita.fr>
11822
11823 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11824 (O0FLAGS): New.
11825 (VALGRIND, GXX): New.
11826 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11827 * tests/bison.in: Run $PREBISON a pre-command.
11828 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11829 (maintainer-check-g++): New.
11830 * Makefile.am (maintainer-check): New.
11831
2a1fe6ed
AD
118322002-10-13 Akim Demaille <akim@epita.fr>
11833
11834 * data/glr.c: Formatting changes.
11835 Tweak some trace messages to match yacc.c's.
11836
f50adbbd
AD
118372002-10-13 Akim Demaille <akim@epita.fr>
11838
11839 GLR parsers sometimes raise parse errors instead of performing the
11840 default reduction.
11841 Reported by Charles-Henry de Boysson.
11842
11843 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 11844 check the length of the traces when %glr.
f50adbbd
AD
11845 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11846 GLR's traces.
11847 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11848 Test GLR parsers.
11849 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11850 (yyltype): Remove the yy prefix from the member names.
11851 (yytable): Complete its comment.
11852 (yygetLRActions): Map error action number from YYTABLE from
11853 YYTABLE_NINF to 0.
11854 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11855 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11856 not satisfying as we could compare an YYACTION computed from
11857 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11858 only value for error actions.
11859 (yyreportParseError): In verbose parse error messages, don't issue
11860 `error' in the list of expected tokens.
11861 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11862 next action to perform to match glr.c's decoding.
11863 (yytable): Complete its comment.
11864
bcbad5b9
PE
118652002-10-13 Paul Eggert <eggert@twinsun.com>
11866
11867 Fix problem reported by Henrik Grubbstroem in
161a71f3 11868 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
11869 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11870 because the Bison parser reads the second action before reducing
11871 the first one.
11872 * src/scan-gram.l (rule_length): New static var.
11873 Use it to keep track of the rule length in the scanner, since
11874 we can't expect the parser to be in lock-step sync with the scanner.
11875 (handle_action_dollar, handle_action_at): Use this var.
11876 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 11877
14904b89
PE
118782002-10-12 Paul Eggert <eggert@twinsun.com>
11879
1fe611e5
PE
11880 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11881 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11882 Include <sys/time.h> when checking for clock_t and struct tms.
11883 Use same include order as source.
11884 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 11885 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 11886
1fe611e5
PE
11887 * lib/timevar.c: Update copyright date and clarify comments.
11888 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 11889
1fe611e5
PE
11890 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11891 GCC version as of today, then merge Bison's changes.
11892 Change "GCC" to "Bison" in copyright notice. timevar.def's
11893 author is Akim, so change that too.
11894
98194095
PE
11895 * src/reader.c (grammar_current_rule_check):
11896 Don't worry about the default action if $$ is untyped.
11897 Prevents bogus warnings reported by Jim Gifford in
161a71f3 11898 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 11899
14904b89
PE
11900 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11901 * data/glr.c, data/lalr1.cc, data/yacc.c:
11902 Output token definitions before the first part of user declarations.
11903 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 11904 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 11905
ff6dca18
PE
119062002-10-11 Paul Eggert <eggert@twinsun.com>
11907
11908 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11909 (yyparse): here. This undoes some of the 2002-07-25 change.
11910 Compatibility problem reported by Ralf S. Engelschall with
11911 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11912
eb714592
AD
119132002-10-11 Akim Demaille <akim@epita.fr>
11914
11915 * tests/regression.at Characters Escapes): New.
11916 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11917 characters.
11918 Reported by Jan Nieuwenhuizen.
11919
b7195100
AD
119202002-10-11 Akim Demaille <akim@epita.fr>
11921
11922 * po/id.po: New.
11923
f28a0f2d
PE
119242002-10-10 Paul Eggert <eggert@twinsun.com>
11925
11926 Portability fixes for bitsets; this also avoids several GCC
11927 warnings.
11928
11929 * lib/abitset.c: Include <stddef.h>, for offsetof.
11930 * lib/lbitset.c: Likewise.
11931
11932 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11933 properly for vectors of objects. Do not assume that adding a
11934 header size to a multiple of a word size yields a value that is
11935 properly aligned for the whole union.
11936 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11937
11938 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11939 unique names for structures.
11940 * lib/ebitset.c (ebitset_bytes): Likewise.
11941 * lib/lbitset.c (lbitset_bytes): Likewise.
11942
11943 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11944 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11945 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11946 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11947 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11948 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11949 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11950 to improve the type-checking that GCC can do.
11951 * lib/bitset.c (bitset_op4_cmp): Likewise.
11952 * lib/bitset_stats.c (bitset_stats_count,
11953 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11954 bitset_stats_copy, bitset_stats_disjoint_p,
11955 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11956 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11957 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11958 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11959 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11960 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11961 bitset_stats_or_and_cmp): Likewise.
11962 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11963 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11964 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11965 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11966
11967 * lib/abitset.h: Include bitset.h, not bbitset.h.
11968 * lib/ebitset.h: Likewise.
11969 * lib/lbitset.h: Likewise.
11970
11971 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11972 All instances of parameters of type enum bitset_opts are now of
11973 type enum_bitset_opts, to conform to the C Standard, and similarly
11974 for enum_bitset_type.
11975 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11976 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11977
11978 Do not use "struct bitset_struct" to mean different things in
11979 different modules. Not only is this confusing, it violates
11980 the C Standard, which requires that structure types in different
11981 modules must be compatible if one is to be passed to the other.
11982 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11983 All instances of "struct bitset_struct *" replaced with "bitset".
11984 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11985 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11986 struct lbitset_struct, struct bitset_stats_struct): New types.
11987 All uses of struct bitset_struct changed to union bitset_union,
11988 etc.
ba0fe3c7 11989 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
11990 struct bitset_struct): Remove.
11991 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11992 struct bitset_struct): Remove.
11993 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11994 bitset_struct): Remove.
11995 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11996 Likewise.
11997
11998 Do not call a function of type T using a call that assumes the
11999 function is of a different type U. Standard C requires that a
12000 function must be called with a type that is compatible with its
12001 definition.
12002 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12003 New decls.
12004 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12005 New functions.
12006 * lib/ebitset.c (PFV): Remove.
12007 * lib/lbitset.c (PFV): Likewise.
12008 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12009 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12010 decls.
12011 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12012 (ebitset_vtable): Use them.
12013 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12014 lbitset_xor): New functions.
12015 (lbitset_vtable): Use them.
12016
12017 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12018 Declare.
12019
12020 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12021 GCC warning.
12022 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12023 Use offsetof, for simplicity.
12024
6fbe4984
PE
120252002-10-06 Paul Eggert <eggert@twinsun.com>
12026
12027 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12028 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 12029 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
12030 which was inadvertently undone by the 2002-09-30 patch.
12031 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12032 the same width as int.
12033
420f93c8
PE
120342002-10-04 Paul Eggert <eggert@twinsun.com>
12035
12036 Version 1.50.
12037
12038 * configure.ac (AC_INIT), NEWS: Increment version number.
12039
12040 * doc/bison.texinfo: Minor spelling, grammar, and white space
12041 fixes.
12042 (Symbols): Mention that any negative value returned from yylex
12043 signifies end-of-input. Warn about negative chars. Mention
12044 the portable Standard C character set.
12045
12046 The GNU coding standard says CFLAGS and YFLAGS are reserved
12047 for the installer to set.
12048 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12049 * src/Makefile.am (AM_CFLAGS): Likewise.
12050 (AM_YFLAGS): Renamed from YFLAGS.
12051
12052 Fix some MAX and MIN problems.
12053 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12054 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12055 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12056 * src/reader.c (reader): Use it.
12057
12058 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12059 POSIX 1003.1-2001 has removed fgrep.
12060
120612002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12062
12063 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12064 interpreted as signed.
12065 * lib/ebitset.c (ebitset_list): Fix bug.
12066
ff68026d
PE
120672002-10-01 Paul Eggert <eggert@twinsun.com>
12068
12069 More fixes for 64-bit hosts and large bitsets.
12070
12071 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12072 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12073 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12074 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12075 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12076 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12077 bitset_count_): Likewise.
12078 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12079 bitset_first, bitset_last): Likewise.
12080 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12081 bitset_stats_list_reverse, bitset_stats_size,
12082 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12083 Likewise.
12084 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12085 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12086 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12087 bitsetv_reflexive_transitive_closure): Likewise.
12088 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12089 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12090 Likewise.
12091 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12092 Likewise.
420f93c8 12093
ff68026d
PE
12094 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12095 Use size_t, not unsigned int, to count bytes.
12096 * lib/abitset.h (abitset_bytes): Likewise.
12097 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12098 Likewise.
12099 * lib/bitset.h (bitset_bytes): Likewise.
12100 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12101 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12102 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12103 * lib/ebitset.c (ebitset_bytes): Likewise.
12104 * lib/ebitset.h (ebitset_bytes): Likewise.
12105 * lib/lbitset.c (lbitset_bytes): Likewise.
12106 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 12107
ff68026d
PE
12108 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12109 abitset_subset_p, abitset_disjoint_p, abitset_and,
12110 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12111 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12112 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12113 abitset_or_and, abitset_or_and_cmp):
12114 Use bitset_windex instead of unsigned int.
12115 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12116 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12117 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12118 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12119 Likewise.
12120 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 12121
ff68026d
PE
12122 * lib/bitset.c (bitset_print):
12123 Use proper printf formats for widths of integer types.
12124 * lib/bitset_stats.c (bitset_percent_histogram_print,
12125 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12126 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12127 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12128 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 12129
ff68026d
PE
12130 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12131 BITSET_SIZE_MAX): New macros.
12132 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12133 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12134 to BITSET_WINDEX_MAX.
12135
12136 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12137 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12138 since we now return the bitset_bindex type (not int).
12139
12140 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12141 when computing sizes.
12142 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12143
12144 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12145 and avoid cast to unsigned.
12146
6aa452a6
AD
121472002-09-30 Akim Demaille <akim@epita.fr>
12148
12149 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12150 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12151 Updates from Michael Hayes.
12152
927f7817
AD
121532002-09-30 Art Haas <ahaas@neosoft.com>
12154
12155 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12156 invocations.
12157 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12158 defined.
12159
9738f41e
AD
121602002-09-27 Akim Demaille <akim@epita.fr>
12161
12162 Version 1.49c.
12163
a5c75d7f
AD
121642002-09-27 Akim Demaille <akim@epita.fr>
12165
12166 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12167 (Because of AC_LIBSOURCE).
12168
8280e179
AD
121692002-09-27 Akim Demaille <akim@epita.fr>
12170
12171 Playing with Autoscan.
12172
12173 * configure.ac: Remove the old LIBOBJ tweaks.
12174 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12175 * lib/strrchr.c: New.
12176 * lib/strtol.c: New, from the Coreutils 4.5.1.
12177
ae64af35
AD
121782002-09-27 Akim Demaille <akim@epita.fr>
12179
12180 Playing with Autoscan.
12181
12182 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12183 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12184 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12185 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12186 Coreutils 4.5.1.
12187
d1a1114f
AD
121882002-09-24 Akim Demaille <akim@epita.fr>
12189
12190 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12191 (Frequently Asked Questions, Parser Stack Overflow): New.
12192
b906441c
AD
121932002-09-13 Akim Demaille <akim@epita.fr>
12194
12195 Playing with autoscan.
12196
12197 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12198 * src/files.c (skeleton_find): Remove, unused.
12199 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12200 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12201
bd701811
AD
122022002-09-13 Akim Demaille <akim@epita.fr>
12203
12204 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12205 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12206
e0a13e7b
AD
122072002-09-13 Akim Demaille <akim@epita.fr>
12208
12209 * configure.ac: Require 2.54.
12210 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12211 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12212 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12213 Remove, provided by Autoconf macros.
12214
c97011bf
AD
122152002-09-12 Akim Demaille <akim@epita.fr>
12216
12217 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12218
d862b1be
AD
122192002-09-12 Akim Demaille <akim@epita.fr>
12220
12221 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12222 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12223 Reported by Martin Mokrejs.
12224
3d38c03a
AD
122252002-09-10 Akim Demaille <akim@epita.fr>
12226
12227 * src/parse-gram.y: Associate a human readable string to each
12228 token type.
12229 * tests/regression.at (Invalid inputs): Adjust.
12230
b6347355
AD
122312002-09-10 Gary V. Vaughan <gary@gnu.org>
12232
12233 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12234 with an Autoconf-2.5x style configure.ac.
12235
09ba4ab2
PE
122362002-09-06 Paul Eggert <eggert@twinsun.com>
12237
12238 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12239 exception applies only to yacc.c. This is a modification of a
12240 patch originally suggested by Akim Demaille.
12241
21846f69
AD
122422002-09-06 Akim Demaille <akim@epita.fr>
12243
09ba4ab2
PE
12244 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12245 here to...
12246 * data/yacc.c: here.
12247
21846f69
AD
12248 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12249 LocationType.
12250 (b4_ltype): Default to yy::Location from location.hh.
12251
c0ad8bf3
AD
122522002-09-04 Jim Meyering <jim@meyering.net>
12253
12254 * data/yacc.c: Guard the declaration of yytoknum also with
12255 `#ifdef YYPRINT', so it is declared only when used.
12256
3a93251e
AD
122572002-09-04 Akim Demaille <akim@epita.fr>
12258
12259 * configure.in: Rename as...
12260 * configure.ac: this.
12261 Bump to 1.49c.
12262
427c0dda
AD
122632002-09-04 Akim Demaille <akim@epita.fr>
12264
12265 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12266 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12267 translate maintainer only messages.
12268
6a254321
PE
122692002-08-12 Paul Eggert <eggert@twinsun.com>
12270
645e30d1
PE
12271 Version 1.49b.
12272
6a254321
PE
12273 * Makefile.am (SUBDIRS): Remove intl.
12274 (DISTCLEANFILES): Remove.
12275 * NEWS: Mention that GNU M4 is now required. Clarify what is
12276 meant by "larger grammars". Mention the pt_BR translation.
12277 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12278 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12279 Bump version from 0.11.2 to 0.11.5.
12280 (BISON_PREREQ_STAGE): Remove.
12281 (AM_GNU_GETTEXT): Use external gettext.
12282 (AC_OUTPUT): Remove intl/Makefile.
12283
12284 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12285
12286 * data/glr.c: Include string.h, for strlen.
12287 (yyreportParseError): Use size_t for yysize.
12288 (yy_yypstack): No longer nested inside yypstates, as nested
12289 functions are not portable. Do not assume size_t is the
12290 same width as int.
12291 (yypstates): Do not assume that ptrdiff_t is the same width
12292 as int, and similarly for yyposn and YYINDEX.
12293
12294 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12295
12296 * lib/Makefile.am (INCLUDES): Do not include from the intl
12297 directory, which has been removed.
12298 * src/Makefile.am (INCLUDES): Likewise.
12299
12300 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12301 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12302 New vars.
12303
12304 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12305 * tests/Makefile.am (EXTRA_DIST): Likewise.
12306
12307 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12308 Do not assume that bitset_windex is the same width as unsigned.
12309
12310 * lib/abitset.c (abitset_unused_clear): Do not assume that
12311 bitset_word is the same width as int.
12312 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12313 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12314 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12315 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12316 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12317
12318 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12319 portability to one's complement hosts!).
12320 * lib/ebitset.c (ebitset_op1): Likewise.
12321 * lib/lbitset.c (lbitset_op1): Likewise.
12322
12323 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12324 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12325 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12326 Sync with fileutils.
12327 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12328 lib/gettext.h: Sync with diffutils.
12329
12330 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12331 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12332
12333 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12334 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12335 check for void *.
12336
12337 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12338 size_t; the old version tried to do this but casted improperly.
12339 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12340 (bitset_test): Now returns int, not unsigned long.
12341
12342 * lib/bitset_stats.c: Include "gettext.h".
12343 (_): New macro.
12344 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12345 name locals "index", as it generates unnecessary warnings on some
12346 hosts that have an "index" function.
12347
12348 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12349 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12350 they need translation.
12351 * src/LR0.c (state_list_append, new_itemsets, get_state,
12352 append_states, generate_states): Likewise.
12353 * src/assoc.c (assoc_to_string): Likewise.
12354 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12355 * src/gram.c (grammar_dump): Likewise.
12356 * src/injections.c (injections_compute): Likewise.
12357 * src/lalr.c (lookaheads_print): Likewise.
12358 * src/relation.c (relation_transpose): Likewise.
12359 * src/scan-gram.l: Likewise.
12360 * src/tables.c (table_grow, pack_vector): Likewise.
12361
12362 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12363 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12364 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12365 * m4/mbstate_t.m4: Sync with fileutils.
12366 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12367
12368 * po/LINGUAS: Add pt_BR.
12369 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12370 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12371 lib/timevar.c.
12372 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12373 manual recommends.
12374 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12375
12376 * src/complain.c (strerror_r): Remove decl; not needed.
12377 (strerror): Use same pattern as ../lib/error.c.
12378
12379 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12380
12381 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12382
12383 * src/main.c (main): Cast result of bindtextdomain and textdomain
12384 to void, to avoid a GCC warning when --disable-nls is in effect.
12385
12386 * src/scan-gram.l: Use strings rather than escapes when possible,
12387 to minimize the number of warnings from xgettext.
12388 (handle_action_dollar, handle_action_at): Don't use isdigit,
12389 as it mishandles negative chars and it may not work as expected
12390 outside the C locale.
12391
12392 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12393 this is a GCC extension and is not portable to other compilers.
12394
12395 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12396 Do not include <ctype.h>; no longer needed.
12397 Do not include <malloc.h>; no longer needed (and generates
12398 warnings on OpenBSD 3.0).
12399
12400 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12401 it's not portable.
12402
12403 * tests/regression.at: Do not use 'cc -c input.c -o input';
12404 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12405
12406 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12407 exit status as failure, not just exit status 1. Sun C exits
12408 with status 2 sometimes.
12409
12410 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12411 Use it for the two large tests.
12412
c8f002c7
AD
124132002-08-02 Akim Demaille <akim@epita.fr>
12414
12415 * src/conflicts.c (conflicts_output): Don't output rules never
12416 reduced here, since anyway that computation doesn't work.
12417 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12418 (rule_useless_p, rule_never_reduced_p): New.
12419 (grammar_rules_partial_print): Use a filter instead of a range.
12420 Display the title only if needed.
12421 (grammar_rules_print): Adjust.
12422 (grammar_rules_never_reduced_report): New.
12423 * src/tables.c (action_row): Move the computation of rules never
12424 reduced to...
12425 (token_actions): here.
12426 * src/main.c (main): Make the parser before making the report, so
12427 that rules never reduced are computed.
12428 Call grammar_rules_never_reduced_report.
12429 * src/print.c (print_results): Report rules never reduced.
12430 * tests/conflicts.at, tests/reduce.at: Adjust.
12431
cd08e51e
AD
124322002-08-01 Akim Demaille <akim@epita.fr>
12433
12434 Instead of attaching lookaheads and duplicating the rules being
12435 reduced by a state, attach the lookaheads to the reductions.
12436
12437 * src/state.h (state_t): Remove the `lookaheads',
12438 `lookaheads_rule' member.
12439 (reductions_t): Add a `lookaheads' member.
12440 Use a regular array for the `rules'.
12441 * src/state.c (reductions_new): Initialize the lookaheads member
12442 to 0.
12443 (state_rule_lookaheads_print): Adjust.
12444 * src/state.h, src/state.c (state_reductions_find): New.
12445 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12446 (count_rr_conflicts): Adjust.
12447 * src/lalr.c (LArule): Remove.
12448 (add_lookback_edge): Adjust.
12449 (state_lookaheads_count): New.
12450 (states_lookaheads_initialize): Merge into...
12451 (initialize_LA): this.
12452 (lalr_free): Adjust.
12453 * src/main.c (main): Don't free nullable and derives too early: it
12454 is used by --verbose.
12455 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12456
bb0027a9
AD
124572002-08-01 Akim Demaille <akim@epita.fr>
12458
12459 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12460 `rule_number_t**'.
12461 (set_derives, free_derives): Rename as...
12462 (derives_compute, derives_free): this.
12463 Adjust all dependencies.
12464 * src/nullable.c (set_nullable, free_nullable): Rename as...
12465 (nullable_compute, nullable_free): these.
12466 (rule_list_t): Store rule_t *, not rule_number_t.
12467 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12468 pointers, instead of their numbers.
12469 * src/main.c (main): Call nullable_free, and derives_free earlier,
12470 as they were lo longer used.
12471
3325ddc4
AD
124722002-08-01 Akim Demaille <akim@epita.fr>
12473
12474 * lib/timevar.c (get_time): Include children time.
12475 * src/lalr.h (LA, LArule): Don't export them: used with the
12476 state_t.
12477 * src/lalr.c (LA, LArule): Static.
12478 * src/lalr.h, src/lalr.c (lalr_free): New.
12479 * src/main.c (main): Call it.
12480 * src/tables.c (pack_vector): Check whether loc is >= to the
12481 table_size, not >.
12482 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12483 (tables_generate): do it, since that's also it which allocates
12484 them.
12485 Don't free LA and LArule, main does.
12486
c6f1a33c
AD
124872002-07-31 Akim Demaille <akim@epita.fr>
12488
12489 Separate parser tables computation and output.
12490
12491 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12492 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12493 (yydefgoto, yydefact, high): Move to...
12494 * src/tables.h, src/tables.c: here.
12495 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12496 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12497 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12498 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12499 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12500 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12501 (action_row, save_row, token_actions, save_column, default_goto)
12502 (goto_actions, sort_actions, matching_state, pack_vector)
12503 (table_ninf_remap, pack_table, prepare_actions): Move to...
12504 * src/tables.c: here.
12505 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12506 * src/output.c (token_actions, output_base, output_conflicts)
12507 (output_check): Merge into...
12508 (prepare_actions): this.
12509 (actions_output): Rename as...
12510 (user_actions_output): this.
12511 * src/main.c (main): Call tables_generate and tables_free.
12512
1509d42f
AD
125132002-07-31 Akim Demaille <akim@epita.fr>
12514
12515 Steal GCC's --time-report support.
12516
12517 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12518 stolen/adjusted from GCC.
12519 * m4/stage.m4: Remove time related checks.
12520 * m4/timevar.m4: New.
12521 * configure.in: Adjust.
12522 * src/system.h: Adjust to using timevar.h.
12523 * src/getargs.h, src/getargs.c: Support trace_time for
12524 --trace=time.
12525 * src/main.c (stage): Remove.
12526 (main): Replace `stage' invocations with timevar calls.
12527 * src/output.c: Insert pertinent timevar calls.
12528
273a74fa
AD
125292002-07-31 Akim Demaille <akim@epita.fr>
12530
12531 Let --trace have arguments.
12532
12533 * src/getargs.h (enum trace_e): New.
12534 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12535 (long_options, short_options): --trace/-T takes an optional
12536 argument.
12537 Change all the uses of trace_flag to reflect the new flags.
12538 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12539
12540 Strengthen `stage' portability.
12541
12542 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12543 * configure.in: Use it.
12544 Don't check for malloc.h and sys/times.h.
12545 * src/system.h: Include them when appropriate.
12546 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12547 times and struct tms are available.
12548
217598da
AD
125492002-07-30 Akim Demaille <akim@epita.fr>
12550
12551 In verbose parse error message, don't report `error' as an
12552 expected token.
12553 * tests/actions.at (Printers and Destructors): Adjust.
12554 * tests/calc.at (Calculator $1): Adjust.
12555 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12556 error message, do not report the parser accepts the error token in
12557 that state.
12558
52489d44
AD
125592002-07-30 Akim Demaille <akim@epita.fr>
12560
12561 Normalize conflict related messages.
12562
12563 * src/complain.h, src/complain.c (warn, complain): New.
12564 * src/conflicts.c (conflicts_print): Use them.
12565 (conflict_report_yacc): New, extracted from...
12566 (conflicts_print): here.
12567 * tests/conflicts.at, tests/existing.at: Adjust.
12568
e8832397
AD
125692002-07-30 Akim Demaille <akim@epita.fr>
12570
12571 Report rules which are never reduced by the parser: those hidden
12572 by conflicts.
12573
12574 * src/LR0.c (save_reductions): Don't make the final state too
12575 different: save its reduction (accept) instead of having a state
12576 without any action (no shift or goto, no reduce).
12577 Note: the final state is now a ``regular'' state, i.e., the
12578 parsers now contain `reduce 0' as default reduction.
12579 Nevertheless, since they decide to `accept' when yystate =
12580 final_state, they still will not reduce rule 0.
12581 * src/print.c (print_actions, print_reduction): Adjust.
12582 * src/output.c (action_row): Track reduced rules.
12583 (token_actions): Report rules never reduced.
12584 * tests/conflicts.at, tests/regression.at: Adjust.
12585
caf23d24
AD
125862002-07-30 Akim Demaille <akim@epita.fr>
12587
12588 `stage' was accidently included in a previous patch.
12589 Initiate its autoconfiscation.
12590
12591 * configure.in: Look for malloc.h and sys/times.h.
12592 * src/main.c (stage): Adjust.
12593 Report only when trace_flag.
12594
640748ee
AD
125952002-07-29 Akim Demaille <akim@epita.fr>
12596
12597 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12598 state_number_t.
12599 (errs_t): symbol_t*, not symbol_number_t.
12600 (reductions_t): rule_t*, not rule_number_t.
12601 (FOR_EACH_SHIFT): New.
12602 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12603 * src/print.c, src/print_graph.c: Adjust.
12604
88bce5a2
AD
126052002-07-29 Akim Demaille <akim@epita.fr>
12606
12607 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12608
12609 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12610 (endtoken, accept): these.
12611 * src/reader.c (reader): Set endtoken's default tag to "$end".
12612 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12613 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12614 Adjust.
12615
1bfb97db
AD
126162002-07-29 Akim Demaille <akim@epita.fr>
12617
12618 * src/reduce.c (reduce_grammar): When the language is empty,
12619 complain about the start symbol, not the axiom.
12620 Use its location.
12621 * tests/reduce.at (Empty Language): New.
12622
fc5734fe
AD
126232002-07-26 Akim Demaille <akim@epita.fr>
12624
12625 * src/reader.h, src/reader.c (gram_error): ... can't get
12626 yycontrol without making too strong assumptions on the parser
12627 itself.
12628 * src/output.c (prepare_tokens): Use the real 0th value of
12629 token_translations instead of `0'.
12630 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12631 visible here.
12632 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12633 for the time being: %locations ought to provide it to yyerror.
12634
3650b4b8
AD
126352002-07-25 Akim Demaille <akim@epita.fr>
12636
12637 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12638 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12639 * tests/regression.at (Web2c Actions): Adjust.
12640
4b3d3a8e
AD
126412002-07-25 Akim Demaille <akim@epita.fr>
12642
12643 Stop storing rules from 1 to nrules + 1.
12644
12645 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12646 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12647 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12648 Iterate from 0 to nrules.
12649 Use rule_number_as_item_number and item_number_as_rule_number.
12650 Adjust to `derive' now containing possibly 0.
12651 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12652 Handle the `- 1' part in rule numbers from/to item numbers.
12653 * src/conflicts.c (log_resolution): Fix the message which reversed
12654 shift and reduce.
12655 * src/output.c (action_row): Initialize default_rule to -1.
12656 (token_actions): Adjust.
12657 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12658 expected output.
12659 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12660
4a2a22f4
AD
126612002-07-25 Akim Demaille <akim@epita.fr>
12662
12663 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12664 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12665 (b4_c_knr_arg_decl): New.
12666 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12667 yyreport_parse_error.
12668
b8df3223
AD
126692002-07-25 Akim Demaille <akim@epita.fr>
12670
12671 * data/yacc.c (yyreport_parse_error): New, extracted from...
12672 (yyparse): here.
12673 (yydestruct, yysymprint): Move above yyparse.
12674 Be K&R compliant.
12675
a762e609
AD
126762002-07-25 Akim Demaille <akim@epita.fr>
12677
12678 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12679 replace...
12680 (b4_sint_type, b4_uint_type): these.
12681 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12682 * tests/regression.at (Web2c Actions): Adjust.
12683
12b0043a
AD
126842002-07-25 Akim Demaille <akim@epita.fr>
12685
12686 * src/gram.h (TIEM_NUMBER_MAX): New.
12687 (item_number_of_rule_number, rule_number_of_item_number): Rename
12688 as...
12689 (rule_number_as_item_number, item_number_as_rule_number): these.
12690 Adjust dependencies.
12691 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12692 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12693 (symbol_number_to_vector_number): New.
12694 (order): Of vector_number_t* type.
12695 (base_t, BASE_MAX, BASE_MIN): New.
12696 (froms, tos, width, pos, check): Of base_t type.
12697 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12698 (actrow): Of action_number_t type.
12699 (conflrow): Of unsigned int type.
12700 (table_ninf, base_ninf): New.
12701 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12702 (muscle_insert_int_table, muscle_insert_base_table)
12703 (muscle_insert_rule_number_table): New.
12704 (prepare_tokens): Output `toknum' as int_table.
12705 (action_row): Returns a rule_number_t.
12706 Use ACTION_MIN, not SHRT_MIN.
12707 (token_actions): yydefact is rule_number_t*.
12708 (table_ninf_remap): New.
12709 (pack_table): Use it for `base' and `table'.
12710 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12711 replaced with...
12712 (YYPACT_NINF, YYTABLE_NINF): these.
12713 (yypact, yytable): Compute their types instead of hard-coded
12714 `short'.
12715 * tests/regression.at (Web2c Actions): Adjust.
12716
5dde258a
AD
127172002-07-19 Akim Demaille <akim@epita.fr>
12718
12719 * src/scan-gram.l (id): Can start with an underscore.
12720
a945ec39
AD
127212002-07-16 Akim Demaille <akim@epita.fr>
12722
12723 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12724 Adjust all former `associativity' dependencies.
12725 * src/symtab.c (symbol_new): Default associativity is `undef', not
12726 `right'.
12727 (symbol_check_alias_consistence): Adjust.
12728
fae437e8
AD
127292002-07-09 Akim Demaille <akim@epita.fr>
12730
12731 * doc/bison.texinfo: Properly set the ``header'' part.
12732 Use @dircategory ``GNU programming tools'' as per Texinfo's
12733 documentation.
12734 Use @copying.
12735
1a715ef2
AD
127362002-07-09 Akim Demaille <akim@epita.fr>
12737
12738 * lib/quotearg.h: Protect against multiple inclusions.
12739 * src/location.h (location_t): Add a `file' member.
12740 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12741 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12742 `error_one_per_line' support.
12743
a5d50994
AD
127442002-07-09 Akim Demaille <akim@epita.fr>
12745
12746 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12747 * src/reader.c (lineno): Remove.
12748 Adjust all dependencies.
12749 (get_merge_function): Take a location and use complain_at.
12750 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12751 * tests/regression.at (Invalid inputs, Mixing %token styles):
12752 Adjust.
12753
b275314e
AD
127542002-07-09 Akim Demaille <akim@epita.fr>
12755
12756 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12757 recovery rule, and forbid extensions when --yacc.
12758 (gram_error): Use complain_at.
12759 * src/reader.c (reader): Exit if there were parse errors.
12760
865b9df1
AD
127612002-07-09 Akim Demaille <akim@epita.fr>
12762
12763 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12764 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12765 Reported by R Blake <blakers@mac.com>.
12766
c76e14da
AD
127672002-07-09 Akim Demaille <akim@epita.fr>
12768
12769 * data/yacc.c: Output the copyright notive in the header.
12770
7db2ed2d
AD
127712002-07-03 Akim Demaille <akim@epita.fr>
12772
12773 * src/output.c (froms, tos): Are state_number_t.
12774 (save_column): sp, sp1, and sp2 are state_number_t.
12775 (prepare): Rename `final' as `final_state_number', `nnts' as
12776 `nterms_number', `nrules' as `rules_number', `nstates' as
12777 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12778 unused.
12779 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12780 * data/lalr1.cc (nsym_): Remove, unused.
12781
e68e0410
AD
127822002-07-03 Akim Demaille <akim@epita.fr>
12783
12784 * src/lalr.h, src/lalr.c (goto_number_t): New.
12785 * src/lalr.c (goto_list_t): New.
12786 Propagate them.
12787 * src/nullable.c (rule_list_t): New.
12788 Propagate.
12789 * src/types.h: Remove.
12790
e1a4f3a4
AD
127912002-07-03 Akim Demaille <akim@epita.fr>
12792
12793 * src/closure.c (print_fderives): Use rule_rhs_print.
12794 * src/derives.c (print_derives): Use rule_rhs_print.
12795 (rule_list_t): New, replaces `shorts'.
12796 (set_derives): Add comments.
12797 * tests/sets.at (Nullable, Firsts): Adjust.
12798
536545f3
AD
127992002-07-03 Akim Demaille <akim@epita.fr>
12800
12801 * src/output.c (prepare_actions): Free `tally' and `width'.
12802 (prepare_actions): Allocate and free `order'.
12803 * src/symtab.c (symbols_free): Free `symbols'.
12804 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12805 * src/output.c (m4_invoke): Move to...
12806 * src/scan-skel.l: here.
12807 (<<EOF>>): Close yyout, and free its name.
12808
8b752b00
AD
128092002-07-03 Akim Demaille <akim@epita.fr>
12810
12811 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12812
12813 * src/LR0.c (new_state): Merge into...
12814 (state_list_append): this.
12815 (new_states): Merge into...
12816 (generate_states): here.
12817 (set_states): Don't ensure a proper `errs' state member here, do it...
12818 * src/conflicts.c (conflicts_solve): here.
12819 * src/state.h, src/state.c: Comment changes.
12820 (state_t): Rename member `shifts' as `transitions'.
12821 Adjust all dependencies.
12822 (errs_new): For consistency, also take the values as argument.
12823 (errs_dup): Remove.
12824 (state_errs_set): New.
12825 (state_reductions_set, state_transitions_set): Assert that no
12826 previous value was assigned.
12827 (state_free): New.
12828 (states_free): Use it.
12829 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12830 temporary storage: use `errs' and `nerrs' as elsewhere.
12831 (set_conflicts): Allocate and free this `errs'.
12832
613f5e1a
AD
128332002-07-02 Akim Demaille <akim@epita.fr>
12834
12835 * lib/libiberty.h: New.
12836 * lib: Update the bitset implementation from upstream.
12837 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12838 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12839 * src/main.c: Adjust bitset stats calls.
12840
26e0cadc
PE
128412002-07-01 Paul Eggert <eggert@twinsun.com>
12842
12843 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12844 char, so that negative chars don't collide with $.
12845
1154cced
AD
128462002-06-30 Akim Demaille <akim@epita.fr>
12847
12848 Have the GLR tests be `warning' checked, and fix the warnings.
12849
12850 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12851 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12852 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12853 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12854 (yyaddDeferredAction): static.
12855 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12856 (yyreportParseError): yyprefix is const.
12857 yytokenp is used only when verbose.
12858 (yy__GNUC__): Replace with __GNUC__.
12859 (yypdumpstack): yyi is size_t.
12860 (yypreference): Un-yy local variables and arguments, to avoid
12861 clashes with `yyr1'. Anyway, we are not in the user name space.
12862 (yytname_size): be an int, as is compared with ints.
12863 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12864 Use them.
12865 * tests/cxx-gram.at: Use quotation to protect $1.
12866 Use AT_COMPILE to enable warnings hunts.
12867 Prototype yylex and yyerror.
12868 `Use' argc.
12869 Include `string.h', not `strings.h'.
12870 Produce and prototype stmtMerge only when used.
12871 yylex takes a location.
12872
97650f4e
AD
128732002-06-30 Akim Demaille <akim@epita.fr>
12874
12875 We spend a lot of time in quotearg, in particular when --verbose.
12876
12877 * src/symtab.c (symbol_get): Store a quoted version of the key.
12878 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12879 Adjust all callers.
12880
d2576365
AD
128812002-06-30 Akim Demaille <akim@epita.fr>
12882
12883 * src/state.h (reductions_t): Rename member `nreds' as num.
12884 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12885 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12886
ccaf65bc
AD
128872002-06-30 Akim Demaille <akim@epita.fr>
12888
12889 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12890 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12891 (shifts_to): Rename as...
12892 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12893 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12894 (TRANSITION_IS_DISABLED, transitions_to): these.
12895
87675353
AD
128962002-06-30 Akim Demaille <akim@epita.fr>
12897
12898 * src/print.c (print_shifts, print_gotos): Merge into...
12899 (print_transitions): this.
12900 (print_transitions, print_errs, print_reductions): Align the
12901 lookaheads columns.
12902 (print_core, print_transitions, print_errs, print_state,
12903 print_grammar): Output empty lines separator before, not after.
12904 (state_default_rule_compute): Rename as...
12905 (state_default_rule): this.
12906 * tests/conflicts.at (Defaulted Conflicted Reduction),
12907 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12908 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12909
ce4ccb4b
AD
129102002-06-30 Akim Demaille <akim@epita.fr>
12911
12912 Display items as we display rules.
12913
12914 * src/gram.h, src/gram.c (rule_lhs_print): New.
12915 * src/gram.c (grammar_rules_partial_print): Use it.
12916 * src/print.c (print_core): Likewise.
12917 * tests/conflicts.at (Defaulted Conflicted Reduction),
12918 (Unresolved SR Conflicts): Adjust.
12919 (Unresolved SR Conflicts): Adjust and rename as...
12920 (Resolved SR Conflicts): this, as was meant.
12921 * tests/regression.at (Web2c Report): Adjust.
12922
bc933ef1
AD
129232002-06-30 Akim Demaille <akim@epita.fr>
12924
12925 * src/print.c (state_default_rule_compute): New, extracted from...
12926 (print_reductions): here.
12927 Pessimize, but clarify the code.
12928 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12929
53d4308d
AD
129302002-06-30 Akim Demaille <akim@epita.fr>
12931
12932 * src/output.c (action_row): Let default_rule be always a rule
12933 number.
12934
574fb2d5
AD
129352002-06-30 Akim Demaille <akim@epita.fr>
12936
12937 * src/closure.c (print_firsts, print_fderives, closure):
12938 Use BITSET_EXECUTE.
12939 * src/lalr.c (lookaheads_print): Likewise.
12940 * src/state.c (state_rule_lookaheads_print): Likewise.
12941 * src/print_graph.c (print_core): Likewise.
12942 * src/print.c (print_reductions): Likewise.
12943 * src/output.c (action_row): Likewise.
12944 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12945
05811fd7
AD
129462002-06-30 Akim Demaille <akim@epita.fr>
12947
12948 * src/print_graph.c: Use report_flag.
12949
0e4d5753
AD
129502002-06-30 Akim Demaille <akim@epita.fr>
12951
12952 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12953 to...
12954 * src/relation.h, src/relation.c (traverse, relation_digraph)
12955 (relation_print, relation_transpose): New.
12956
24c7d800
AD
129572002-06-30 Akim Demaille <akim@epita.fr>
12958
12959 * src/state.h, src/state.c (shifts_to): New.
12960 * src/lalr.c (build_relations): Use it.
12961
9222837b
AD
129622002-06-30 Akim Demaille <akim@epita.fr>
12963
12964 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12965 (item_number_of_rule_number, rule_number_of_item_number): New.
12966 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12967 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12968 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12969 Propagate their use.
12970 Much remains to be done, in particular wrt `shorts' from types.h.
12971
260008e5
AD
129722002-06-30 Akim Demaille <akim@epita.fr>
12973
12974 * src/symtab.c (symbol_new): Initialize the `printer' member.
12975
8a731ca8
AD
129762002-06-30 Akim Demaille <akim@epita.fr>
12977
12978 * src/LR0.c (save_reductions): Remove, replaced by...
12979 * src/state.h, src/state.c (state_reductions_set): New.
12980 (reductions, errs): Rename as...
12981 (reductions_t, errs_t): these.
12982 Adjust all dependencies.
12983
32e1e0a4
AD
129842002-06-30 Akim Demaille <akim@epita.fr>
12985
12986 * src/LR0.c (state_list_t, state_list_append): New.
12987 (first_state, last_state): Now symbol_list_t.
12988 (this_state): Remove.
12989 (new_itemsets, append_states, save_reductions): Take a state_t as
12990 argument.
12991 (set_states, generate_states): Adjust.
12992 (save_shifts): Remove, replaced by...
12993 * src/state.h, src/state.c (state_shifts_set): New.
12994 (shifts): Rename as...
12995 (shifts_t): this.
12996 Adjust all dependencies.
12997 * src/state.h (state_t): Remove the `next' member.
12998
e5fb6710
AD
129992002-06-30 Akim Demaille <akim@epita.fr>
13000
13001 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13002 escaped in slot 0.
13003
c7ca99d4
AD
130042002-06-30 Akim Demaille <akim@epita.fr>
13005
13006 Use hash.h for the state hash table.
13007
13008 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13009 (allocate_storage): Use state_hash_new.
13010 (free_storage): Use state_hash_free.
13011 (new_state, get_state): Adjust.
13012 * src/lalr.h, src/lalr.c (states): Move to...
13013 * src/states.h (state_t): Remove the `link' member, no longer
13014 used.
13015 * src/states.h, src/states.c: here.
13016 (state_hash_new, state_hash_free, state_hash_lookup)
13017 (state_hash_insert, states_free): New.
13018 * src/states.c (state_table, state_compare, state_hash): New.
13019 * src/output.c (output_actions): Do not free states now, since we
13020 still need to know the final_state number in `prepare', called
13021 afterwards. Do it...
13022 * src/main.c (main): here: call states_free after `output'.
13023
df0e7316
AD
130242002-06-30 Akim Demaille <akim@epita.fr>
13025
13026 * src/state.h, src/state.c (state_new): New, extracted from...
13027 * src/LR0.c (new_state): here.
13028 * src/state.h (STATE_ALLOC): Move to...
13029 * src/state.c: here.
13030 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13031 * src/state.h, src/state.c: here.
13032
39f41916
AD
130332002-06-30 Akim Demaille <akim@epita.fr>
13034
13035 * src/reader.c (gensym): Rename as...
13036 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13037 (getsym): Rename as...
13038 (symbol_get): this.
13039
d57650a5
AD
130402002-06-30 Akim Demaille <akim@epita.fr>
13041
13042 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13043 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13044 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13045 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13046
5a08f1ce
AD
130472002-06-30 Akim Demaille <akim@epita.fr>
13048
13049 Make the test suite pass with warnings checked.
13050
13051 * tests/actions.at (Printers and Destructors): Improve.
13052 Avoid unsigned vs. signed issues.
13053 * tests/calc.at: Don't exercise the scanner here, do it...
13054 * tests/input.at (Torturing the Scanner): here.
13055
720623af
PH
130562002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13057
88e7e941 13058 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
13059 reorganize first lines parallel to yacc.c.
13060
fb8135fa
AD
130612002-06-28 Akim Demaille <akim@epita.fr>
13062
13063 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13064 (b4_token_enum, b4_token_defines): New, factored from...
13065 * data/lalr1.cc, data/yacc.c, glr.c: here.
13066
41442480
AD
130672002-06-28 Akim Demaille <akim@epita.fr>
13068
13069 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13070 unused variables.
13071 * src/output.c (merger_output): static.
13072
e0e5bf84
AD
130732002-06-28 Akim Demaille <akim@epita.fr>
13074
ba0fe3c7 13075 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
13076 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13077 pacify GCC.
13078 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 13079
676385e2
PH
130802002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13081
13082 Accumulated changelog for new GLR parsing features.
13083
6a254321 13084 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
13085 conflicts_total_count.
13086 * src/conflicts.h: Ditto.
13087 * src/output.c (token_actions): Use the new name.
13088 (output_conflicts): Change conflp => conflict_list_heads, and
13089 confl => conflict_list for better readability.
13090 * data/glr.c: Use the new names.
13091 * NEWS: Add self to GLR announcement.
e0e5bf84 13092
676385e2
PH
13093 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13094
13095 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13096 Akim Demaille.
13097
13098 * data/bison.glr: Change name to glr.c
13099 * data/glr.c: Renamed from bison.glr.
13100 * data/Makefile.am: Add glr.c
e0e5bf84
AD
13101
13102 * src/getargs.c:
13103
676385e2 13104 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 13105 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 13106
676385e2
PH
13107 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13108
13109 * data/bison.glr: Be sure to restore the
13110 current #line when returning to the skeleton contents after having
13111 exposed the input file's #line.
13112
13113 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13114
13115 * data/bison.glr: Bring up to date with changes to bison.simple.
13116
13117 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13118
13119 * data/bison.glr: Correct definitions that use b4_prefix.
13120 Various reformatting.
13121 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13122 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13123 yytokenp argument; now part of stack.
13124 (yychar): Define to behave as documented.
13125 (yyclearin): Ditto.
e0e5bf84 13126
676385e2
PH
13127 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13128
13129 * src/reader.h: Add declaration for free_merger_functions.
13130
13131 * src/reader.c (merge_functions): New variable.
13132 (get_merge_function): New function.
13133 (free_merger_functions): New function.
13134 (readgram): Check for %prec that is not followed by a symbol.
13135 Handle %dprec and %merge declarations.
13136 (packgram): Initialize dprec and merger fields in rules array.
13137
13138 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13139 conflict_list_cnt, conflict_list_free): New variables.
13140 (table_grow): Also grow conflict_table.
e0e5bf84 13141 (prepare_rules): Output dprec and merger tables.
676385e2 13142 (conflict_row): New function.
e0e5bf84 13143 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
13144 default reduction in conflicted states for GLR parser so that there
13145 are spaces for the conflict lists.
13146 (save_row): Also save conflict information.
13147 (token_actions): Allocate conflict list.
13148 (merger_output): New function.
13149 (pack_vector): Pack conflict table, too.
13150 (output_conflicts): New function to output yyconflp and yyconfl.
13151 (output_check): Allocate conflict_tos.
13152 (output_actions): Output conflict tables, also.
13153 (output_skeleton): Output b4_mergers definition.
13154 (prepare): Output b4_max_rhs_length definition.
13155 Use 'bison.glr' as default skeleton for GLR parsers.
13156
13157 * src/gram.c (glr_parser): New flag.
13158 (grammar_free): Call free_merger_functions.
13159
13160 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13161 all pairs of conflicting reductions, rather than just all tokens
13162 causing conflicts. Needed to size conflict tables.
e0e5bf84 13163 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
13164 interface.
13165 (conflicts_print): Ditto.
13166 (count_total_conflicts): New function.
13167
13168 * src/reader.h (merger_list): New type.
13169 (merge_functions): New variable.
13170
13171 * src/lex.h (tok_dprec, tok_merge): New token types.
13172
13173 * src/gram.h (rule_s): Add dprec and merger fields.
13174 (glr_parser): New flag.
13175
13176 * src/conflicts.h (count_total_conflicts): New function.
13177
13178 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13179
13180 * doc/bison.texinfo (Generalized LR Parsing): New section.
13181 (GLR Parsers): New section.
13182 (Language and Grammar): Mention GLR parsing.
13183 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13184 Correct typo ("tge" -> "the").
13185
13186 * data/bison.glr: New skeleton for GLR parsing.
13187
13188 * tests/cxx-gram.at: New tests for GLR parsing.
13189
13190 * tests/testsuite.at: Include cxx-gram.at.
13191
13192 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 13193
676385e2
PH
13194 * src/parse-gram.y:
13195
13196 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13197
13198 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 13199
b5480d74 132002002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
13201
13202 * src/options.h, src/options.c: Remove.
13203 * src/getargs.c (short_options, long_options): New.
13204
60491a94
AD
132052002-06-27 Akim Demaille <akim@epita.fr>
13206
13207 * data/bison.simple, data/bison.c++: Rename as...
13208 * data/yacc.c, data/lalr1.cc: these.
13209 * doc/bison.texinfo (Environment Variables): Remove.
13210
9be0c25b
AD
132112002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13212
13213 * src/getargs.c (report_argmatch): Initialize strtok().
13214
1ae72863
AD
132152002-06-20 Akim Demaille <akim@epita.fr>
13216
13217 * data/bison.simple (b4_symbol_actions): New, replaces...
13218 (b4_symbol_destructor, b4_symbol_printer): these.
13219 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13220 user token numbers.
13221
87542d29
AD
132222002-06-20 Akim Demaille <akim@epita.fr>
13223
13224 * data/bison.simple (yydestructor): Rename as...
13225 (yydestruct): this.
13226
1a31ed21
AD
132272002-06-20 Akim Demaille <akim@epita.fr>
13228
13229 * src/symtab.h, src/symtab.c (symbol_type_set)
13230 (symbol_destructor_set, symbol_precedence_set): The location is
13231 the last argument.
13232 Adjust all callers.
13233
e776192e
AD
132342002-06-20 Akim Demaille <akim@epita.fr>
13235
13236 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13237 internals.
13238 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13239 Takes a location.
13240 * src/symtab.h, src/symtab.c (symbol_class_set)
13241 (symbol_user_token_number_set): Likewise.
13242 Adjust all callers.
13243 Promote complain_at.
13244 * tests/input.at (Type Clashes): Adjust.
13245
5c1180b3
AD
132462002-06-20 Akim Demaille <akim@epita.fr>
13247
13248 * data/bison.simple (YYLEX): Fix the declaration when
13249 %pure-parser.
13250
e3170060
AD
132512002-06-20 Akim Demaille <akim@epita.fr>
13252
13253 * data/bison.simple (yysymprint): Don't print the token number,
13254 just its name.
13255 * tests/actions.at (Destructors): Rename as...
13256 (Printers and Destructors): this.
13257 Also exercise %printer.
13258
253862fd
AD
132592002-06-20 Akim Demaille <akim@epita.fr>
13260
13261 * data/bison.simple (YYDSYMPRINT): New.
13262 Use it to remove many of the #if YYDEBUG/if (yydebug).
13263
366eea36
AD
132642002-06-20 Akim Demaille <akim@epita.fr>
13265
13266 * src/symtab.h, src/symtab.c (symbol_t): printer and
13267 printer_location are new members.
13268 (symbol_printer_set): New.
13269 * src/parse-gram.y (PERCENT_PRINTER): New token.
13270 Handle its associated rule.
13271 * src/scan-gram.l: Adjust.
13272 (handle_destructor_at, handle_destructor_dollar): Rename as...
13273 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13274 * src/output.c (symbol_printers_output): New.
13275 (output_skeleton): Call it.
13276 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13277 since there are already many grammar files with a user `yyprint'.
13278 Replace the calls to YYPRINT to calls to yysymprint.
13279 * tests/calc.at: Adjust.
13280 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13281 taking advantage of parser very internal details (stack size!).
13282
4f25ebb0
AD
132832002-06-20 Akim Demaille <akim@epita.fr>
13284
13285 * src/scan-gram.l: Complete the scanner with the missing patterns
13286 to pacify Flex.
13287 Use `quote' and `symbol_tag_get' where appropriate.
13288
93b68a0e
AD
132892002-06-19 Akim Demaille <akim@epita.fr>
13290
13291 * tests/actions.at (Destructors): Augment to test locations.
13292 * data/bison.simple (yydestructor): Pass it the current location
13293 if locations are enabled.
13294 Prototype only when __STDC__ or C++.
13295 Change the argument names to move into the yy name space: there is
13296 user code here.
13297
58612f1d
AD
132982002-06-19 Akim Demaille <akim@epita.fr>
13299
74310291
AD
13300 * data/bison.simple (b4_pure_if): New.
13301 Use it instead of #ifdef YYPURE.
13302
133032002-06-19 Akim Demaille <akim@epita.fr>
13304
13305 * data/bison.simple (b4_location_if): New.
58612f1d
AD
13306 Use it instead of #ifdef YYLSP_NEEDED.
13307
f25bfb75
AD
133082002-06-19 Akim Demaille <akim@epita.fr>
13309
13310 Prepare @$ in %destructor, but currently don't bind it in the
13311 skeleton, as %location use is not cleaned up yet.
13312
13313 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13314 (handle_action_at): New.
13315 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13316 a braced_code_t and a location as additional arguments.
13317 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13318 unquote one when outputting `b4_dollar_dollar'.
13319 Adjust callers.
13320 * data/bison.simple (b4_eval): Remove.
13321 (b4_symbol_destructor): Adjust.
13322 * tests/input.at (Invalid @n): Adjust.
13323
c732d2c6
AD
133242002-06-19 Zack Weinberg <zack@codesourcery.com>
13325
13326 * doc/bison.texinfo: Document ability to have multiple
13327 prologue sections.
13328
8c165d89
AD
133292002-06-18 Akim Demaille <akim@epita.fr>
13330
13331 * src/files.c (compute_base_names): When computing the output file
13332 names from the input file name, strip the directory part.
13333
ca98bf57
AD
133342002-06-18 Akim Demaille <akim@epita.fr>
13335
13336 * data/bison.simple.new: Comment changes.
13337 Reported by Andreas Schwab.
13338
0bfb02ff
AD
133392002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13340
13341 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13342 there are no `label `yyoverflowlab' defined but not used' warnings
13343 when yyoverflow is defined.
13344
24c0aad7
AD
133452002-06-18 Akim Demaille <akim@epita.fr>
13346
13347 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13348 new member.
13349 (symbol_destructor_set): Adjust.
13350 * src/output.c (symbol_destructors_output): Output the destructor
13351 locations.
13352 Output the symbol name.
13353 * data/bison.simple (b4_symbol_destructor): Adjust.
13354
5719c109
AD
133552002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13356 and Akim Demaille <akim@epita.fr>
13357
13358 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13359 what's left on the stack when the error recovery hits EOF.
13360 * tests/actions.at (Destructors): Complete to exercise this case.
13361
9280d3ef
AD
133622002-06-17 Akim Demaille <akim@epita.fr>
13363
13364 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13365 arguments is really empty, not only equal to `[]'.
13366 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13367 member.
13368 (symbol_destructor_set): New.
13369 * src/output.c (symbol_destructors_output): New.
13370 * src/reader.h (brace_code_t, current_braced_code): New.
13371 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13372 (handle_dollar): Rename as...
13373 (handle_action_dollar): this.
13374 (handle_destructor_dollar): New.
13375 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13376 (grammar_declaration): Use it.
13377 * data/bison.simple (yystos): Is always defined.
13378 (yydestructor): New.
13379 * tests/actions.at (Destructors): New.
13380 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13381
dafdc66f
AD
133822002-06-17 Akim Demaille <akim@epita.fr>
13383
13384 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13385 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13386 rule_length only when needed.
13387 * src/output.c (actions_output, token_definitions_output): Output
13388 the full M4 block.
13389 * src/symtab.c: Don't access directly to the symbol tag, use
13390 symbol_tag_get.
13391 * src/parse-gram.y: Use symbol_list_free.
13392
56c47203
AD
133932002-06-17 Akim Demaille <akim@epita.fr>
13394
13395 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13396 (symbol_list_prepend, get_type_name): Move to...
13397 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13398 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13399 Adjust all callers.
13400 (symbol_list_free): New.
13401 * src/scan-gram.l (handle_dollar): Takes a location.
13402 * tests/input.at (Invalid $n): Adjust.
13403
1e0bab92
AD
134042002-06-17 Akim Demaille <akim@epita.fr>
13405
13406 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13407 (symbol_list_prepend): New.
13408 * src/parse-gram.y (%union): `list' is a new member.
13409 (symbols.1): New, replaces...
13410 (terms_to_prec.1, nterms_to_type.1): these.
13411 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13412 Take a location as additional argument.
13413 Adjust all callers.
13414
04e60654
AD
134152002-06-15 Akim Demaille <akim@epita.fr>
13416
13417 * src/parse-gram.y: Move %token in the declaration section so that
13418 we don't depend upon CVS Bison.
13419
10e5b8bd
AD
134202002-06-15 Akim Demaille <akim@epita.fr>
13421
13422 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13423 * src/print.c (print_core): Use it.
13424
9801d40c
AD
134252002-06-15 Akim Demaille <akim@epita.fr>
13426
13427 * src/conflicts.c (log_resolution): Accept the rule involved in
13428 the sr conflicts instead of the lookahead number that points to
13429 that rule.
13430 (flush_reduce): Accept the current lookahead vector as argument,
13431 instead of the index in LA.
13432 (resolve_sr_conflict): Accept the current number of lookahead
13433 bitset to consider for the STATE, instead of the index in LA.
13434 (set_conflicts): Adjust.
13435 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13436
c0263492
AD
134372002-06-15 Akim Demaille <akim@epita.fr>
13438
13439 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13440 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13441 Adjust all dependencies.
13442 * src/lalr.c (initialize_lookaheads): Split into...
13443 (states_lookaheads_count, states_lookaheads_initialize): these.
13444 (lalr): Adjust.
13445
9757c359
AD
134462002-06-15 Akim Demaille <akim@epita.fr>
13447
13448 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13449 out of...
13450 (grammar_rules_print): here.
13451 * src/reduce.c (reduce_output): Use it.
13452 * tests/reduce.at (Useless Rules, Reduced Automaton)
13453 (Underivable Rules): Adjust.
13454
6b98e4b5
AD
134552002-06-15 Akim Demaille <akim@epita.fr>
13456
13457 Copy BYacc's nice way to report the grammar.
13458
13459 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13460 New.
13461 Don't print the rules' location, it is confusing and useless.
13462 (rule_print): Use grammar_rhs_print.
13463 * src/print.c (print_grammar): Use grammar_rules_print.
13464
6b98e4b5
AD
134652002-06-15 Akim Demaille <akim@epita.fr>
13466
13467 Complete and rationalize `useless thing' warnings.
13468
13469 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13470 (symbol_tag_print): New.
13471 Use them everywhere in place of accessing directly the tag member.
13472 * src/gram.h, src/gram.c (rule_print): New.
13473 Use it where a rule used to be printed `by hand'.
13474 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13475 (reduce_grammar_tables): Report the useless rules.
13476 (reduce_print): Useless things are a warning, not an error.
13477 Report it as such.
13478 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13479 (Reduced Automaton, Underivable Rules): Adjust.
13480 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13481 * tests/conflicts.at (Unresolved SR Conflicts)
13482 (Solved SR Conflicts): Adjust.
13483
ee000ba4
AD
134842002-06-15 Akim Demaille <akim@epita.fr>
13485
13486 Let symbols have a location.
13487
13488 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13489 (getsym): Adjust.
13490 Adjust all callers.
13491 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13492 Use location_t, not int.
13493 * src/symtab.c (symbol_check_defined): Take advantage of the
13494 location.
13495 * tests/regression.at (Invalid inputs): Adjust.
13496
8efe435c
AD
134972002-06-15 Akim Demaille <akim@epita.fr>
13498
13499 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13500 (input): Don't try to initialize yylloc here, do it in the
13501 scanner.
13502 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13503 * src/gram.h (rule_t): Change line and action_line into location
13504 and action_location, of location_t type.
13505 Adjust all dependencies.
13506 * src/location.h, src/location.c (empty_location): New.
13507 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13508 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13509 (grammar_current_rule_symbol_append)
13510 (grammar_current_rule_action_append): Expect a location as argument.
13511 * src/reader.c (grammar_midrule_action): Adjust to attach an
13512 action's location as dummy symbol location.
13513 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13514 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13515 the line numbers.
13516
1921f1d7
AD
135172002-06-14 Akim Demaille <akim@epita.fr>
13518
13519 Grammar declarations may be found in the grammar section.
13520
13521 * src/parse-gram.y (rules_or_grammar_declaration): New.
13522 (declarations): Each declaration may end with a semicolon, not
13523 just...
13524 (grammar_declaration): `"%union"'.
13525 (grammar): Branch to rules_or_grammar_declaration.
13526
4515534c
AD
135272002-06-14 Akim Demaille <akim@epita.fr>
13528
13529 * src/main.c (main): Invoke scanner_free.
13530
f958596b
AD
135312002-06-14 Akim Demaille <akim@epita.fr>
13532
13533 * src/output.c (m4_invoke): Extracted from...
13534 (output_skeleton): here.
13535 Free tempfile.
13536
2c569025
AD
135372002-06-14 Akim Demaille <akim@epita.fr>
13538
13539 * src/parse-gram.y (directives, directive, gram)
13540 (grammar_directives, precedence_directives, precedence_directive):
13541 Rename as...
13542 (declarations, declaration, grammar, grammar_declaration)
13543 (precedence_declaration, precedence_declarator): these.
13544 (symbol_declaration): New.
13545
592e8d4d
AD
135462002-06-14 Akim Demaille <akim@epita.fr>
13547
13548 * src/files.c (action_obstack): Remove, unused.
13549 (output_obstack): Remove it, and all its dependencies, as it is no
13550 longer needed.
13551 * src/reader.c (epilogue_set): Build the epilogue in the
13552 muscle_obstack.
13553 * src/output.h, src/output.c (muscle_obstack): Move to...
13554 * src/muscle_tab.h, src/muscle_tab.h: here.
13555 (muscle_init): Initialize muscle_obstack.
13556 (muscle_free): New.
13557 * src/main.c (main): Call it.
13558
0c15323d
AD
135592002-06-14 Akim Demaille <akim@epita.fr>
13560
13561 * src/location.h: New, extracted from...
13562 * src/reader.h: here.
13563 * src/Makefile.am (noinst_HEADERS): Merge into
13564 (bison_SOURCES): this.
13565 Add location.h.
13566 * src/parse-gram.y: Use location_t instead of Bison's.
13567 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13568 Use location_t instead of ints.
13569
e96c9728
AD
135702002-06-14 Akim Demaille <akim@epita.fr>
13571
13572 * data/bison.simple, data/bison.c++: Be sure to restore the
13573 current #line when returning to the skeleton contents after having
13574 exposed the input file's #line.
13575
75d1fe16
AD
135762002-06-12 Akim Demaille <akim@epita.fr>
13577
13578 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13579 eager.
13580 * tests/actions.at (Exotic Dollars): New.
13581
6c35d22c
AD
135822002-06-12 Akim Demaille <akim@epita.fr>
13583
13584 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13585 ['"/] too eagerly.
13586 * tests/input.at (Torturing the Scanner): New.
13587
1d6412ad
AD
135882002-06-11 Akim Demaille <akim@epita.fr>
13589
13590 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13591 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13592 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13593 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13594 * src/reader.c (reader): Use it.
13595
4cdb01db
AD
135962002-06-11 Akim Demaille <akim@epita.fr>
13597
13598 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13599 Adjust all callers.
13600 (scanner_last_string_free): New.
13601
44995b2e
AD
136022002-06-11 Akim Demaille <akim@epita.fr>
13603
13604 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13605 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13606 (last_string, YY_OBS_FREE): New.
13607 Use them when returning an ID.
13608
e9955c83
AD
136092002-06-11 Akim Demaille <akim@epita.fr>
13610
13611 Have Bison grammars parsed by a Bison grammar.
13612
13613 * src/reader.c, src/reader.h (prologue_augment): New.
13614 * src/reader.c (copy_definition): Remove.
13615
13616 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13617 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13618 (grammar_current_rule_prec_set, grammar_current_rule_check)
13619 (grammar_current_rule_symbol_append)
13620 (grammar_current_rule_action_append): Export.
13621 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13622 (symbol_list_action_append): Remove.
13623 Hook the routines from reader.
13624 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13625 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13626
13627 * src/reader.c (read_declarations): Remove, unused.
13628
13629 * src/parse-gram.y: Handle the epilogue.
13630 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13631 (grammar_start_symbol_set): this.
13632 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13633 * src/reader.c (readgram): Remove, unused.
13634 (reader): Adjust to insert eoftoken and axiom where appropriate.
13635
13636 * src/reader.c (copy_dollar): Replace with...
13637 * src/scan-gram.h (handle_dollar): this.
13638 * src/parse-gram.y: Remove `%thong'.
13639
13640 * src/reader.c (copy_at): Replace with...
13641 * src/scan-gram.h (handle_at): this.
13642
13643 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13644 New.
13645
13646 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13647 time being.
13648
13649 * src/reader.h, src/reader.c (grammar_rule_end): New.
13650
13651 * src/parse.y (current_type, current_class): New.
13652 Implement `%nterm', `%token' support.
13653 Merge `%term' into `%token'.
13654 (string_as_id): New.
13655 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13656 type name.
13657
13658 * src/parse-gram.y: Be sure to handle properly the beginning of
13659 rules.
13660
13661 * src/parse-gram.y: Handle %type.
13662 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13663
13664 * src/parse-gram.y: More directives support.
13665 * src/options.c: No longer handle source directives.
13666
13667 * src/parse-gram.y: Fix %output.
13668
13669 * src/parse-gram.y: Handle %union.
13670 Use the prologue locations.
13671 * src/reader.c (parse_union_decl): Remove.
13672
13673 * src/reader.h, src/reader.c (epilogue_set): New.
13674 * src/parse-gram.y: Use it.
13675
13676 * data/bison.simple, data/bison.c++: b4_stype is now either not
13677 defined, then default to int, or to the contents of %union,
13678 without `union' itself.
13679 Adjust.
13680 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13681
13682 * src/output.c (actions_output): Don't output braces, as they are
13683 already handled by the scanner.
13684
13685 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13686 characters to themselves.
13687
13688 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13689 that the epilogue has a proper #line.
13690
13691 * src/parse-gram.y: Handle precedence/associativity.
13692
13693 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13694 a terminal.
13695 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13696 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13697 at all to define terminals that cannot be emitted.
13698
13699 * src/scan-gram.l: Escape M4 characters.
13700
13701 * src/scan-gram.l: Working properly with escapes in user
13702 strings/characters.
13703
13704 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13705 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13706 grammar.
13707 Use more modest sizes, as for the time being the parser does not
13708 release memory, and therefore the process swallows a huge amount
13709 of memory.
13710
13711 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13712 stricter %token grammar.
13713
13714 * src/symtab.h (associativity): Add `undef_assoc'.
13715 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13716 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13717
13718 * tests/regression.at (Invalid %directive): Remove, as it is now
13719 meaningless.
13720 (Invalid inputs): Adjust to the new error messages.
13721 (Token definitions): The new grammar doesn't allow too many
13722 eccentricities.
13723
13724 * src/lex.h, src/lex.c: Remove.
13725 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13726 (copy_character, copy_string2, copy_string, copy_identifier)
13727 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13728 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13729 (parse_action): Remove.
13730 * po/POTFILES.in: Adjust.
13731
2e047461
AD
137322002-06-11 Akim Demaille <akim@epita.fr>
13733
cd05d13c 13734 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
13735 rule's action member: return the action as a string.
13736 Don't require `rule_length' as an argument: compute it.
13737 (grammar_current_rule_symbol_append)
13738 (grammar_current_rule_action_append): New, eved out from
13739 (readgram): here.
13740 Remove `action_flag', `rulelength', unused now.
13741
9af3fbce
AD
137422002-06-11 Akim Demaille <akim@epita.fr>
13743
13744 * src/reader.c (grammar_current_rule_prec_set).
13745 (grammar_current_rule_check): New, eved out from...
13746 (readgram): here.
13747 Remove `xaction', `first_rhs': useless.
13748 * tests/input.at (Type clashes): New.
13749 * tests/existing.at (GNU Cim Grammar): Adjust.
13750
1485e106
AD
137512002-06-11 Akim Demaille <akim@epita.fr>
13752
13753 * src/reader.c (grammar_midrule_action): New, Eved out from
13754 (readgram): here.
13755
da4160c3
AD
137562002-06-11 Akim Demaille <akim@epita.fr>
13757
13758 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13759 New.
13760 (readgram): Use them as replacement of inlined code, crule and
13761 crule1.
13762
f6d0f937
AD
137632002-06-11 Akim Demaille <akim@epita.fr>
13764
13765 * src/reader.c (grammar_end, grammar_symbol_append): New.
13766 (readgram): Use them.
13767 Make the use of `p' as local as possible.
13768
69078d4b
AD
137692002-06-10 Akim Demaille <akim@epita.fr>
13770
13771 GCJ's parser requires the tokens to be defined before the prologue.
13772
13773 * data/bison.simple: Output the token definition before the user's
13774 prologue.
13775 * tests/regression.at (Braces parsing, Duplicate string)
13776 (Mixing %token styles): Check the output from bison.
13777 (Early token definitions): New.
13778
5e424082
AD
137792002-06-10 Akim Demaille <akim@epita.fr>
13780
13781 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13782 assigning twice the same user number to a token, so that we can
13783 use it in...
13784 * src/lex.c (lex): here.
13785 Also use `symbol_class_set' instead of hand written code.
13786 * src/reader.c (parse_assoc_decl): Likewise.
13787
44536b35
AD
137882002-06-10 Akim Demaille <akim@epita.fr>
13789
13790 * src/symtab.c, src/symtab.c (symbol_class_set)
13791 (symbol_user_token_number_set): New.
13792 * src/reader.c (parse_token_decl): Use them.
13793 Use a switch instead of ifs.
13794 Use a single argument.
13795
8b9f2372
AD
137962002-06-10 Akim Demaille <akim@epita.fr>
13797
13798 Remove `%thong' support as it is undocumented, unused, duplicates
13799 `%token's job, and creates useless e-mail traffic with people who
13800 want to know what it is, why it is undocumented, unused, and
13801 duplicates `%token's job.
13802
13803 * src/reader.c (parse_thong_decl): Remove.
13804 * src/options.c (option_table): Remove "thong".
13805 * src/lex.h (tok_thong): Remove.
13806
3ae2b51f
AD
138072002-06-10 Akim Demaille <akim@epita.fr>
13808
13809 * src/symtab.c, src/symtab.c (symbol_type_set)
13810 (symbol_precedence_set): New.
13811 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13812 (value_components_used): Remove, unused.
13813
2f1afb73
AD
138142002-06-09 Akim Demaille <akim@epita.fr>
13815
13816 Move symbols handling code out of the reader.
13817
13818 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13819 (axiom): Move to...
13820 * src/symtab.h, src/symtab.c: here.
13821
13822 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13823 * src/reader.c (startval): Rename as...
13824 * src/symtab.h, src/symtab.c (startsymbol): this.
13825 * src/reader.c: Adjust.
13826
13827 * src/reader.c (symbol_check_defined, symbol_make_alias)
13828 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13829 (token_translations_init)
13830 Move to...
13831 * src/symtab.c: here.
13832 * src/reader.c (packsymbols): Move to...
13833 * src/symtab.h, src/symtab.c (symbols_pack): here.
13834 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13835 argument.
13836
e9bca3ad
AD
138372002-06-03 Akim Demaille <akim@epita.fr>
13838
13839 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13840 then statements.
13841
86eff183
AD
138422002-06-03 Akim Demaille <akim@epita.fr>
13843
13844 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13845 structs with non literals.
13846 * src/scan-skel.l: never-interactive.
13847 * src/conflicts.c (enum conflict_resolution_e): No trailing
13848 comma.
13849 * src/getargs.c (usage): Split long literal strings.
13850 Reported by Hans Aberg.
13851
717be197
AD
138522002-05-28 Akim Demaille <akim@epita.fr>
13853
13854 * data/bison.c++: Use C++ ostreams.
13855 (cdebug_): New member.
13856
670ddffd
AD
138572002-05-28 Akim Demaille <akim@epita.fr>
13858
13859 * src/output.c (output_skeleton): Be sure to allocate enough room
13860 for `/' _and_ for `\0' in full_skeleton.
13861
769b430f
AD
138622002-05-28 Akim Demaille <akim@epita.fr>
13863
13864 * data/bison.c++: Catch up with bison.simple:
13865 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13866 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13867 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13868 and popping traces.
13869
7067cb36
PH
138702002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13871
13872 * src/output.c (output_skeleton): Put an explicit path in front of
13873 the skeleton file name, rather than relying on the -I directory,
13874 to partially alleviate effects of having a skeleton file lying around
13875 in the current directory.
769b430f 13876
4a713ec2
PH
138772002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13878
769b430f 13879 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
13880 obstack_printf should be obstack_fgrow1.
13881
b408954b
AD
138822002-05-26 Akim Demaille <akim@epita.fr>
13883
13884 * src/state.h (state_t): `solved_conflicts' is a new member.
13885 * src/LR0.c (new_state): Set it to 0.
13886 * src/conflicts.h, src/conflicts.c (print_conflicts)
13887 (free_conflicts, solve_conflicts): Rename as...
13888 (conflicts_print, conflicts_free, conflicts_solve): these.
13889 Adjust callers.
13890 * src/conflicts.c (enum conflict_resolution_e)
13891 (solved_conflicts_obstack): New, used by...
13892 (log_resolution): this.
13893 Adjust to attach the conflict resolution to each state.
13894 Complete the description with the precedence/associativity
13895 information.
13896 (resolve_sr_conflict): Adjust.
13897 * src/print.c (print_state): Output its solved_conflicts.
13898 * tests/conflicts.at (Unresolved SR Conflicts)
13899 (Solved SR Conflicts): Exercise --report=all.
13900
a49aecd5
AD
139012002-05-26 Akim Demaille <akim@epita.fr>
13902
13903 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13904 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13905 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13906 (token_number_t, item_number_as_token_number)
13907 (token_number_as_item_number, muscle_insert_token_number_table):
13908 Rename as...
13909 (symbol_number_t, item_number_as_symbol_number)
13910 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13911 these, since it is more appropriate.
13912
5504898e
AD
139132002-05-26 Akim Demaille <akim@epita.fr>
13914
13915 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13916 `Error:' lines.
13917 * data/bison.simple (yystos) [YYDEBUG]: New.
13918 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13919 error recovery.
13920 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13921
ec3bc396
AD
139222002-05-25 Akim Demaille <akim@epita.fr>
13923
13924 * doc/bison.texinfo (Debugging): Split into...
13925 (Tracing): this new section, its former contents, and...
13926 (Understanding): this new section.
13927 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13928 by...
13929 (report_flag): this.
13930 Adjust all dependencies.
13931 (report_args, report_types, report_argmatch): New.
13932 (usage, getargs): Report/support -r, --report.
13933 * src/options.h
13934 (struct option_table_struct): Rename as..,
13935 (struct option_table_s): this.
13936 Rename the `set_flag' member to `flag' to match with getopt_long's
13937 struct.
13938 * src/options.c (option_table): Split verbose into an entry for
13939 %verbose, and another for --verbose.
13940 Support --report/-r, so remove -r from the obsolete --raw.
13941 * src/print.c: Attach full item sets and lookaheads reports to
13942 report_flag instead of trace_flag.
13943 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13944
78df8250
PE
139452002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13946 and Paul Eggert <eggert@twinsun.com>
769b430f 13947
78df8250
PE
13948 * data/bison.simple (yyparse): Correct error handling to conform to
13949 POSIX and yacc. Specifically, after syntax error is discovered,
13950 do not reduce further before shifting the error token.
13951 Clean up the code a bit by removing the labels yyerrdefault,
13952 yyerrhandle, yyerrpop.
13953 * NEWS: Document the above.
13954
c0c9ea05
PH
139552002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13956
13957 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13958 type; it isn't always big enough, since it doesn't necessarily
13959 include non-terminals.
769b430f 13960 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
13961 the latter can be removed.
13962 (yy_token_number_type): Remove, only one use.
13963 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13964 don't use TokenNumberType as element type.
769b430f 13965
c0c9ea05
PH
13966 * tests/regression.at: Modify expected output to agree with change
13967 to yyr1 and yytranslate.
769b430f 13968
6390a83f
FK
139692002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13970
13971 * src/reader.c (parse_action): Use copy_character instead of
13972 obstack_1grow.
13973
db7c8e9a
AD
139742002-05-13 Akim Demaille <akim@epita.fr>
13975
13976 * tests/regression.at (Token definitions): Prototype yylex and
13977 yyerror.
13978
fcc61800
PH
139792002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13980
158c687b 13981 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
13982 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13983 32-bit arithmetic.
13984 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13985
5683e9b2
AD
139862002-05-07 Akim Demaille <akim@epita.fr>
13987
13988 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13989 avoid GCC warnings.
13990
0c2d3f4c
AD
139912002-05-07 Akim Demaille <akim@epita.fr>
13992
13993 Kill GCC warnings.
13994
13995 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13996 over the RHS of each rule.
13997 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13998 * src/state.h (state_t): Member `nitems' is unsigned short.
13999 * src/LR0.c (get_state): Adjust.
14000 * src/reader.c (packgram): Likewise.
14001 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14002 `Type'.
14003 (muscle_insert_int_table): Remove, unused.
14004 (prepare_rules): Remove `max'.
14005
1565b720
AD
140062002-05-06 Akim Demaille <akim@epita.fr>
14007
14008 * src/closure.c (print_firsts): Display of the symbol tags.
14009 (bitmatrix_print): Move to...
14010 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14011 here.
14012 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14013
cfaee611
AD
140142002-05-06 Akim Demaille <akim@epita.fr>
14015
14016 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14017 hash_do_for_each.
14018
458be8e0
AD
140192002-05-06 Akim Demaille <akim@epita.fr>
14020
14021 * src/LR0.c (new_state, get_state): Instead of using the global
14022 `kernel_size' and `kernel_base', have two new arguments:
14023 `core_size' and `core'.
14024 Adjust callers.
14025
a900a624
AD
140262002-05-06 Akim Demaille <akim@epita.fr>
14027
14028 * src/reader.c (packgram): No longer end `ritem' with a 0
14029 sentinel: it is not used.
14030
d4e7d3a1
AD
140312002-05-05 Akim Demaille <akim@epita.fr>
14032
14033 New experimental feature: display the lookaheads in the report and
14034 graph.
14035
14036 * src/print (print_core): When --trace-flag, display the rules
14037 lookaheads.
14038 * src/print_graph.c (print_core): Likewise.
14039 Swap the arguments.
14040 Adjust caller.
14041
39ceb25b
AD
140422002-05-05 Akim Demaille <akim@epita.fr>
14043
14044 * tests/torture.at (Many lookaheads): New test.
14045
5372019f
AD
140462002-05-05 Akim Demaille <akim@epita.fr>
14047
14048 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14049 (GENERATE_MUSCLE_INSERT_TABLE): this.
14050 (output_int_table, output_unsigned_int_table, output_short_table)
14051 (output_token_number_table, output_item_number_table): Replace with...
14052 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14053 (muscle_insert_short_table, muscle_insert_token_number_table)
14054 (muscle_insert_item_number_table): these.
14055 Adjust all callers.
14056 (prepare_tokens): Don't free `translations', since...
14057 * src/reader.h, src/reader.c (grammar_free): do it.
14058 Move to...
14059 * src/gram.h, src/gram.c (grammar_free): here.
14060 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14061 b4_translate_max.
14062
5df5f6d5
AD
140632002-05-05 Akim Demaille <akim@epita.fr>
14064
14065 * src/output.c (output_unsigned_int_table): New.
14066 (prepare_rules): `i' is unsigned.
14067 `prhs', `rline', `r2' are unsigned int.
14068 Rename muscle `rhs_number_max' as `rhs_max'.
14069 Output muscles `prhs_max', `rline_max', and `r2_max'.
14070 Free rline and r1.
14071 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14072 to compute types instead of constant types.
14073 * tests/regression.at (Web2c Actions): Adjust.
14074
b87f8b21
AD
140752002-05-04 Akim Demaille <akim@epita.fr>
14076
14077 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14078 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14079 Adjust dependencies.
14080 * src/output.c (token_definitions_output): Be sure not to output a
14081 `#define 'a'' when fed with `%token 'a' "a"'.
14082 * tests/regression.at (Token definitions): New.
14083
8bb936e4
PE
140842002-05-03 Paul Eggert <eggert@twinsun.com>
14085
14086 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14087 for K&R C.
14088
140892002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14090
14091 * Makefile.am (SUBDIRS): Remove intl.
14092 (EXTRA_DIST): Add config/config.rpath.
14093
53c71a12
AD
140942002-05-03 Akim Demaille <akim@epita.fr>
14095
14096 * data/bison.simple (m4_if): Don't output empty enums.
14097 And actually, output valid enum definitions :(.
14098
289dd0cf
AD
140992002-05-03 Akim Demaille <akim@epita.fr>
14100
14101 * configure.bat: Remove, completely obsolete.
14102 * Makefile.am (EXTRA_DIST): Adjust.
14103 Don't distribute config.rpath...
14104 * config/Makefile.am (EXTRA_DIST): Do it.
14105
db85e524
AD
141062002-05-03 Akim Demaille <akim@epita.fr>
14107
14108 * configure.in (GETTEXT_VERSION): New.
14109 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14110
83ccf991
AD
141112002-05-03 Akim Demaille <akim@epita.fr>
14112
14113 * data/bison.simple (b4_token_enum): New.
14114 (b4_token_defines): Use it to output tokens both as #define and
14115 enums.
14116 Suggested by Paul Eggert.
14117 * src/output.c (token_definitions_output): Don't output spurious
14118 white spaces.
14119
1f418995
AD
141202002-05-03 Akim Demaille <akim@epita.fr>
14121
14122 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14123
45119f04
RA
141242002-05-02 Robert Anisko <robert@lrde.epita.fr>
14125
14126 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14127 Update the stack class, give a try to deque as the default container.
14128
b2d52318
AD
141292002-05-02 Akim Demaille <akim@epita.fr>
14130
14131 * data/bison.simple (yyparse): Do not implement @$ = @1.
14132 (YYLLOC_DEFAULT): Adjust to do it.
14133 * doc/bison.texinfo (Location Default Action): Fix.
14134
3a8b4109
AD
141352002-05-02 Akim Demaille <akim@epita.fr>
14136
14137 * src/reader.c (parse_braces): Merge into...
14138 (parse_action): this.
14139
84614e13
AD
141402002-05-02 Akim Demaille <akim@epita.fr>
14141
14142 * configure.in (ALL_LINGUAS): Remove.
14143 * po/LINGUAS, hr.po: New.
14144
fdbcd8e2
AD
141452002-05-02 Akim Demaille <akim@epita.fr>
14146
14147 Remove the so called hairy (semantic) parsers.
14148
14149 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14150 * src/gram.h, src/gram.c (semantic_parser): Remove.
14151 (rule_t): Remove the guard and guard_line members.
14152 * src/lex.h (token_t): remove tok_guard.
14153 * src/options.c (option_table): Remove %guard and %semantic_parser
14154 support.
14155 * src/output.c, src/output.h (guards_output): Remove.
14156 (prepare): Adjust.
14157 (token_definitions_output): Don't output the `T'
14158 tokens (???).
14159 (output_skeleton): Don't output the guards.
14160 * src/files.c, src/files.c (attrsfile): Remove.
14161 * src/reader.c (symbol_list): Remove the guard and guard_line
14162 members.
14163 Adjust dependencies.
14164 (parse_guard): Remove.
14165 * data/bison.hairy: Remove.
14166 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14167 BISON_HAIRY.
14168
82b6cb3f
AD
141692002-05-02 Akim Demaille <akim@epita.fr>
14170
14171 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14172 (parse_guard): Rename the formal argument `stack_offset' as
14173 `rule_length', which is more readable.
14174 Adjust callers.
14175 (copy_at, copy_dollar): Instead of outputting the hard coded
14176 values of $$, $n and so forth, output invocation to b4_lhs_value,
14177 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
14178 Note: this patch partially drops `semantic-parser' support: it
14179 always does `rule_length - n', where semantic parsers ought to
14180 always use `-n'.
82b6cb3f
AD
14181 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14182 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14183
6cbfbcc5
AD
141842002-05-02 Akim Demaille <akim@epita.fr>
14185
14186 * configure.in (AC_INIT): Bump to 1.49b.
14187 (AM_INIT_AUTOMAKE): Short invocation.
14188
b8548114
AD
141892002-05-02 Akim Demaille <akim@epita.fr>
14190
14191 Version 1.49a.
14192
c20cd1fa
AD
141932002-05-01 Akim Demaille <akim@epita.fr>
14194
14195 * src/skeleton.h: Remove.
14196
8a9566d4
AD
141972002-05-01 Akim Demaille <akim@epita.fr>
14198
14199 * src/skeleton.h: Fix the #endif.
14200 Reported by Magnus Fromreide.
14201
8c6d399a
PE
142022002-04-26 Paul Eggert <eggert@twinsun.com>
14203
14204 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14205 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 14206 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 14207
2b7ed18a
RA
142082002-04-25 Robert Anisko <robert@lrde.epita.fr>
14209
14210 * src/scan-skel.l: Postprocess quadrigraphs.
14211
14212 * src/reader.c (copy_character): New function, used to output
14213 single characters while replacing `[' and `]' with quadrigraphs, to
14214 avoid troubles with M4 quotes.
14215 (copy_comment): Output characters with copy_character.
14216 (read_additionnal_code): Likewise.
14217 (copy_string2): Likewise.
14218 (copy_definition): Likewise.
14219
14220 * tests/calc.at: Exercise M4 quoting.
14221
34a89c50
AD
142222002-04-25 Akim Demaille <akim@epita.fr>
14223
14224 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14225 between `!' and the command.
14226 Reported by Paul Eggert.
14227
0dd1580a
RA
142282002-04-24 Robert Anisko <robert@lrde.epita.fr>
14229
14230 * tests/calc.at: Exercise prologue splitting.
14231
14232 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14233 `b4_post_prologue' instead of `b4_prologue'.
14234
14235 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14236 muscles.
14237 (output): Free pre_prologue_obstack and post_prologue_obstack.
14238 * src/files.h, src/files.c (attrs_obstack): Remove.
14239 (pre_prologue_obstack, post_prologue_obstack): New.
14240 * src/reader.c (copy_definition): Add a parameter to specify the
14241 obstack to fill, instead of using attrs_obstack unconditionally.
14242 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14243 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14244
83c1796f
PE
142452002-04-23 Paul Eggert <eggert@twinsun.com>
14246
14247 * data/bison.simple: Remove unnecessary commentary and white
14248 space differences from 1_29-branch.
14249 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14250
14251 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14252 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14253 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14254 constructors or destructors.
14255
14256 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14257
1207eeac
AD
142582002-04-23 Akim Demaille <akim@epita.fr>
14259
14260 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14261 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14262 location with columns.
14263 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14264 All reported by Paul Eggert.
14265
78ab8f67
AD
142662002-04-22 Akim Demaille <akim@epita.fr>
14267
14268 * src/reduce.c (dump_grammar): Move to...
14269 * src/gram.h, src/gram.c (grammar_dump): here.
14270 Be sure to separate long item numbers.
14271 Don't read the members of a rule's prec if its nil.
14272
133c20e2
AD
142732002-04-22 Akim Demaille <akim@epita.fr>
14274
14275 * src/output.c (table_size, table_grow): New.
14276 (MAXTABLE): Remove, replace uses with table_size.
14277 (pack_vector): Instead of dying when the table is too big, grow it.
14278
9515e8a7
AD
142792002-04-22 Akim Demaille <akim@epita.fr>
14280
14281 * data/bison.simple (yyr1): Its type is that of a token number.
14282 * data/bison.c++ (r1_): Likewise.
14283 * tests/regression.at (Web2c Actions): Adjust.
14284
23c5a174
AD
142852002-04-22 Akim Demaille <akim@epita.fr>
14286
14287 * src/reader.c (token_translations_init): 256 is now the default
14288 value for the error token, i.e., it will be assigned another
14289 number if the user assigned 256 to one of her tokens.
14290 (reader): Don't force 256 to error.
14291 * doc/bison.texinfo (Symbols): Adjust.
14292 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14293 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14294 etc. instead of 10, 20, 30 (which was used to `jump' over error
14295 (256) and undefined (2)).
14296
5fbb0954
AD
142972002-04-22 Akim Demaille <akim@epita.fr>
14298
14299 Propagate more token_number_t.
14300
14301 * src/gram.h (token_number_as_item_number)
14302 (item_number_as_token_number): New.
14303 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14304 Use it to create output_item_number_table and
14305 output_token_number_table.
14306 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14307 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14308 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14309 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14310
4f940944
AD
143112002-04-22 Akim Demaille <akim@epita.fr>
14312
14313 * src/output.h, src/output.c (get_lines_number): Remove.
14314
3ded9a63
AD
143152002-04-19 Akim Demaille <akim@epita.fr>
14316
14317 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14318 as Lex/Flex'.
14319 (Debugging): More details about enabling the debugging features.
14320 (Table of Symbols): Describe $$, $n, @$, and @n.
14321 Suggested by Tim Josling.
14322
e0c471a9
AD
143232002-04-19 Akim Demaille <akim@epita.fr>
14324
14325 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14326
fecc10cd
AD
143272002-04-10 Akim Demaille <akim@epita.fr>
14328
14329 * src/system.h: Rely on HAVE_LIMITS_H.
14330 Suggested by Paul Eggert.
14331
51dec47b
AD
143322002-04-09 Akim Demaille <akim@epita.fr>
14333
14334 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14335 full stderr, and strip it according to the bison options, instead
14336 of composing the error message from different bits.
14337 This makes it easier to check for several error messages.
14338 Adjust all the invocations.
14339 Add an invocation exercising the error token.
14340 Add an invocation demonstrating a stupid error message.
14341 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14342 Adjust the tests.
14343 Error message are for stderr, not stdout.
14344
007a50a4
AD
143452002-04-09 Akim Demaille <akim@epita.fr>
14346
14347 * src/gram.h, src/gram.c (error_token_number): Remove, use
14348 errtoken->number.
14349 * src/reader.c (reader): Don't specify the user token number (2)
14350 for $undefined, as it uselessly prevents using it.
14351 * src/gram.h (token_number_t): Move to...
14352 * src/symtab.h: here.
14353 (state_t.number): Is a token_number_t.
14354 * src/print.c, src/reader.c: Use undeftoken->number instead of
14355 hard coded 2.
14356 (Even though this 2 is not the same as above: the number of the
14357 undeftoken remains being 2, it is its user token number which
14358 might not be 2).
14359 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14360 `user_token_number_max'.
14361 Output `undef_token_number'.
14362 * data/bison.simple, data/bison.c++: Use them.
14363 Be sure to map invalid yylex return values to
14364 `undef_token_number'. This saves us from gratuitous SEGV.
14365
14366 * tests/conflicts.at (Solved SR Conflicts)
14367 (Unresolved SR Conflicts): Adjust.
14368 * tests/regression.at (Web2c Actions): Adjust.
14369
06446ccf
AD
143702002-04-08 Akim Demaille <akim@epita.fr>
14371
14372 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14373 Adding #line.
14374 Remove the duplicate `typedefs'.
14375 (RhsNumberType): Fix the declaration and various other typos.
14376 Use __ofile__.
14377 * data/bison.simple: Use __ofile__.
14378 * src/scan-skel.l: Handle __ofile__.
14379
62a3e4f0
AD
143802002-04-08 Akim Demaille <akim@epita.fr>
14381
14382 * src/gram.h (item_number_t): New, the type of item numbers in
14383 RITEM. Note that it must be able to code symbol numbers as
14384 positive number, and the negation of rule numbers as negative
14385 numbers.
14386 Adjust all dependencies (pretty many).
14387 * src/reduce.c (rule): Remove this `short *' pointer: use
14388 item_number_t.
14389 * src/system.h (MINSHORT, MAXSHORT): Remove.
14390 Include `limits.h'.
14391 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14392 (shortcpy): Remove.
14393 (MAXTABLE): Move to...
14394 * src/output.c (MAXTABLE): here.
14395 (prepare_rules): Use output_int_table to output rhs.
14396 * data/bison.simple, data/bison.c++: Adjust.
14397 * tests/torture.at (Big triangle): Move the limit from 254 to
14398 500.
14399 * tests/regression.at (Web2c Actions): Ajust.
14400
14401 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14402 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14403 passes, but produces negative #line number, once fixed, GCC is
14404 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14405 C), it passes.
14406 * src/state.h (state_h): Code input lines on ints, not shorts.
14407
bb88b0fc
AD
144082002-04-08 Akim Demaille <akim@epita.fr>
14409
14410 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14411 and then the grammar.
14412
9a636f47
AD
144132002-04-08 Akim Demaille <akim@epita.fr>
14414
14415 * src/system.h: No longer using strndup.
14416
680e8701
AD
144172002-04-07 Akim Demaille <akim@epita.fr>
14418
14419 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14420 * src/output.c (output_table_data): Return the longest number.
14421 (prepare_tokens): Output `token_number_max').
14422 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14423 New.
14424 Use them to define yy_token_number_type/TokenNumberType.
14425 Use this type for yytranslate.
14426 * tests/torture.at (Big triangle): Push the limit from 124 to
14427 253.
14428 * tests/regression.at (Web2c Actions): Adjust.
14429
817e9f41
AD
144302002-04-07 Akim Demaille <akim@epita.fr>
14431
14432 * tests/torture.at (Big triangle): New.
14433 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14434 * tests/existing.at: here.
14435
5123689b
AD
144362002-04-07 Akim Demaille <akim@epita.fr>
14437
14438 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14439 nritems.
14440 Adjust dependencies.
14441
f3849179
AD
144422002-04-07 Akim Demaille <akim@epita.fr>
14443
14444 * src/reader.c: Normalize increments to prefix form.
14445
bd02036a
AD
144462002-04-07 Akim Demaille <akim@epita.fr>
14447
14448 * src/reader.c, symtab.c: Remove debugging code.
14449
db8837cb
AD
144502002-04-07 Akim Demaille <akim@epita.fr>
14451
14452 Rename all the `bucket's as `symbol_t'.
14453
14454 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14455 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14456 * src/symtab.c, src/symtab.h (bucket): Rename as...
14457 (symbol_t): this.
14458 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14459 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14460 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14461 (buckets_new, buckets_free, buckets_do): Rename as...
14462 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14463 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14464 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14465 (symbols_new, symbols_free, symbols_do): these.
14466
72a23c97
AD
144672002-04-07 Akim Demaille <akim@epita.fr>
14468
14469 Use lib/hash for the symbol table.
14470
14471 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14472 EOF.
14473 * src/lex.c (lex): Set the `number' member of new terminals.
14474 * src/reader.c (bucket_check_defined, bucket_make_alias)
14475 (bucket_check_alias_consistence, bucket_translation): New.
14476 (reader, grammar_free, readgram, token_translations_init)
14477 (packsymbols): Adjust.
14478 (reader): Number the predefined tokens.
14479 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14480 for predefined tokens.
14481 * src/symtab.h (bucket): Remove all the hash table related
14482 members.
14483 * src/symtab.c (symtab): Replace by...
14484 (bucket_table): this.
14485 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14486 (buckets_new, buckets_do): New.
14487
280a38c3
AD
144882002-04-07 Akim Demaille <akim@epita.fr>
14489
14490 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14491 (start_symbol, max_user_token_number, semantic_parser)
14492 (error_token_number): Initialize.
14493 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14494 Initialize.
14495 (reader): Don't.
14496 (errtoken, eoftoken, undeftoken, axiom): Extern.
14497
03b31c0c
AD
144982002-04-07 Akim Demaille <akim@epita.fr>
14499
14500 * src/gram.h (rule_s): prec and precsym are now pointers
14501 to the bucket giving the priority/associativity.
14502 Member `associativity' removed: useless.
14503 * src/reduce.c, src/conflicts.c: Adjust.
14504
8b3df748
AD
145052002-04-07 Akim Demaille <akim@epita.fr>
14506
14507 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14508 Properly escape the symbols' TAG when outputting them.
14509
e601aa1d
AD
145102002-04-07 Akim Demaille <akim@epita.fr>
14511
14512 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14513
b0299a2e
AD
145142002-04-07 Akim Demaille <akim@epita.fr>
14515
14516 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14517 (LArule): this, which is an array to rule_t*.
14518 * src/print.c, src/conflicts.c: Adjust.
14519
d7e1f00c
AD
145202002-04-07 Akim Demaille <akim@epita.fr>
14521
14522 * src/gram.h (rule_t): Rename `number' as `user_number'.
14523 `number' is a new member.
14524 Adjust dependencies.
14525 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14526
cc9305dd
AD
145272002-04-07 Akim Demaille <akim@epita.fr>
14528
14529 As a result of the previous patch, it is no longer needed
14530 to reorder ritem itself.
14531
14532 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14533
b0940840
AD
145342002-04-07 Akim Demaille <akim@epita.fr>
14535
14536 Be sure never to walk through RITEMS, but use only data related to
14537 the rules themselves. RITEMS should be banished.
14538
14539 * src/output.c (output_token_translations): Rename as...
14540 (prepare_tokens): this.
14541 In addition to `translate', prepare the muscles `tname' and
14542 `toknum', which were handled by...
14543 (output_rule_data): this.
14544 Remove, and move the remainder of its outputs into...
14545 (prepare_rules): this new routines, which also merges content from
14546 (output_gram): this.
14547 (prepare_rules): Be sure never to walk through RITEMS.
14548 (output_stos): Rename as...
14549 (prepare_stos): this.
14550 (output): Always invoke prepare_states, after all, just don't use it
14551 in the output if you don't need it.
14552
643a5994
AD
145532002-04-07 Akim Demaille <akim@epita.fr>
14554
14555 * src/LR0.c (new_state): Display `nstates' as the name of the
14556 newly created state.
14557 Adjust to initialize first_state and last_state if needed.
14558 Be sure to distinguish the initial from the final state.
14559 (new_states): Create the itemset of the initial state, and use
14560 new_state.
14561 * src/closure.c (closure): Now that the initial state has its
14562 items properly set, there is no need for a special case when
14563 creating `ruleset'.
14564
14565 As a result, now the rule 0, reducing to $axiom, is visible in the
14566 outputs. Adjust the test suite.
14567
14568 * tests/conflicts.at (Solved SR Conflicts)
14569 (Unresolved SR Conflicts): Adjust.
14570 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14571 * tests/conflicts.at (S/R in initial): New.
14572
b4c4ccc2
AD
145732002-04-07 Akim Demaille <akim@epita.fr>
14574
14575 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14576 the RHS of the rules.
14577 * src/output.c (output_gram): Likewise.
14578
bba97eb2
AD
145792002-04-07 Akim Demaille <akim@epita.fr>
14580
14581 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14582 bucket.
14583 Adjust all dependencies.
14584 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14585 `number' of the buckets too.
14586 * src/gram.h: Include `symtab.h'.
14587 (associativity): Move to...
14588 * src/symtab.h: here.
14589 No longer include `gram.h'.
14590
c3b407f4
AD
145912002-04-07 Akim Demaille <akim@epita.fr>
14592
14593 * src/gram.h, src/gram.c (rules_rhs_length): New.
14594 (ritem_longest_rhs): Use it.
14595 * src/gram.h (rule_t): `number' is a new member.
14596 * src/reader.c (packgram): Set it.
14597 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14598 the end of `rules', and count them out of `nrules'.
14599 (reduce_output, dump_grammar): Adjust.
14600 * src/print.c (print_grammar): It is no longer needed to check for
14601 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14602 * tests/reduce.at (Reduced Automaton): New test.
14603
11652ab3
AD
146042002-04-07 Akim Demaille <akim@epita.fr>
14605
14606 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14607 lacking `+ 1' to nrules, Bison reported as useless a token if it
14608 was used solely to set the precedence of the last rule...
14609
26b23c1a
AD
146102002-04-07 Akim Demaille <akim@epita.fr>
14611
14612 * data/bison.c++, data/bison.simple: Don't output the current file
14613 name in #line, to avoid useless diffs between two identical
14614 outputs under different names.
14615
18bcecb0
AD
146162002-04-07 Akim Demaille <akim@epita.fr>
14617
14618 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14619 Normalize loops to using `< nrules + 1', not `<= nrules'.
14620
fa770c86
AD
146212002-04-07 Akim Demaille <akim@epita.fr>
14622
14623 * TODO: Update.
14624
d9b739c3
AD
146252002-04-07 Akim Demaille <akim@epita.fr>
14626
14627 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14628 bucket.value as bucket.number.
14629
99013900
AD
146302002-04-07 Akim Demaille <akim@epita.fr>
14631
14632 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14633 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14634 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14635 RHS, instead of being an index in RITEMS.
14636
e966383b
PE
146372002-04-04 Paul Eggert <eggert@twinsun.com>
14638
14639 * doc/bison.texinfo: Update copyright date.
14640 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14641 (Symbols): Warn about running Bison in one character set,
14642 but compiling and/or running in an incompatible one.
14643 Warn about character code 256, too.
14644
146452002-04-03 Paul Eggert <eggert@twinsun.com>
14646
14647 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14648 YYERROR_VERBOSE is nonzero, not whether it is defined.
14649
14650 Merge changes from bison-1_29-branch.
c307773e 14651
8d6c48b9
PE
146522002-03-20 Paul Eggert <eggert@twinsun.com>
14653
14654 Merge fixes from Debian bison_1.34-1.diff.
14655
14656 * configure.in (AC_PREREQ): 2.53.
14657
e53c6322
AD
146582002-03-20 Akim Demaille <akim@epita.fr>
14659
14660 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14661
9ffbeca7
PE
146622002-03-19 Paul Eggert <eggert@twinsun.com>
14663
21db0b2a
PE
14664 * src/bison.simple (YYCOPY): New macro.
14665 (YYSTACK_RELOCATE): Use it.
14666 Remove Type arg; no longer needed. All callers changed.
14667 (yymemcpy): Remove; no longer needed.
14668
9ffbeca7
PE
14669 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14670 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14671
642cb8f8
AD
146722002-03-19 Akim Demaille <akim@epita.fr>
14673
14674 Test and fix the #line outputs.
14675
14676 * tests/atlocal.at (GCC): New.
14677 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 14678 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
14679 (Action synch line, Epilogue synch line): New tests.
14680 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14681 * data/bison.simple, data/bison.c++: Use it.
14682
3c31a486
AD
146832002-03-19 Akim Demaille <akim@epita.fr>
14684
14685 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14686 (Solved SR Conflicts, %expect not enough, %expect right)
14687 (%expect too much): Move to...
14688 * tests/conflicts.at: this new file.
14689
0d8bed56
AD
146902002-03-19 Akim Demaille <akim@epita.fr>
14691
14692 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14693 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14694 that we can move to enums for instance.
14695 * src/output.c (token_definitions_output): Output a list of
14696 `token-name, token-number' instead of the #define.
14697 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14698
9208d17f
AD
146992002-03-14 Akim Demaille <akim@epita.fr>
14700
14701 Use Gettext 0.11.1.
14702
af27eacb
RA
147032002-03-09 Robert Anisko <robert@lrde.epita.fr>
14704
14705 * data/bison.c++: Make the user able to add members to the generated
14706 parser by subclassing.
14707
9101a310
RA
147082002-03-05 Robert Anisko <robert@lrde.epita.fr>
14709
14710 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14711 a character.
14712 Reported by Nicolas Tisserand and Nicolas Burrus.
14713
fff9bf0b
RA
147142002-03-04 Robert Anisko <robert@lrde.epita.fr>
14715
14716 * src/reader.c: Warn about lacking semi-colons, do not complain.
14717
64dba31e
RA
147182002-03-04 Robert Anisko <robert@lrde.epita.fr>
14719
14720 * data/bison.c++: Remove a debug line.
14721
374f5a14
RA
147222002-03-04 Robert Anisko <robert@lrde.epita.fr>
14723
14724 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14725 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14726 provide a default implementation.
14727
bfcf1f3a
AD
147282002-03-04 Akim Demaille <akim@epita.fr>
14729
14730 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14731 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14732 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14733 * tests/semantic.at (Parsing Guards): Similarly.
14734 * src/reader.at (readgram): Complain if the last rule is not ended
14735 with a semi-colon.
14736
65ccf9fc
AD
147372002-03-04 Akim Demaille <akim@epita.fr>
14738
14739 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14740 * src/closure.c: here.
14741 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14742 RTC.
14743 * src/warshall.h, src/warshall.c: Remove.
14744 * tests/sets.at (Broken Closure): Adjust.
14745
d0039cbc
AD
147462002-03-04 Akim Demaille <akim@epita.fr>
14747
14748 * src/output.c (output_skeleton): tempdir is const.
14749 bytes_read is unused.
14750
345cea78
AD
147512002-03-04 Akim Demaille <akim@epita.fr>
14752
14753 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14754 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14755 Update.
14756 From Michael Hayes.
14757
564801f7
AD
147582002-03-04 Akim Demaille <akim@epita.fr>
14759
14760 * src/closure.c (closure): `r' is unused.
14761
e5352bc7
AD
147622002-03-04 Akim Demaille <akim@epita.fr>
14763
14764 * tests/sets.at (Broken Closure): Add the ending `;'.
14765 * src/reader.at (readgram): Complain if a rule is not ended with a
14766 semi-colon.
14767
914feea9
AD
147682002-03-04 Akim Demaille <akim@epita.fr>
14769
14770 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14771 (count_sr_conflicts): Use bitset_count.
14772 * src/reduce.c (inaccessable_symbols): Ditto.
14773 (bits_size): Remove.
14774 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14775
f0250de6
AD
147762002-03-04 Akim Demaille <akim@epita.fr>
14777
14778 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14779 * src/reduce.c: Remove the `bitset_zero's following the
14780 `bitset_create's, as now it is performed by the latter.
14781
ef017502
AD
147822002-03-04 Akim Demaille <akim@epita.fr>
14783
14784 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14785 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14786 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14787 latest sources from Michael.
14788
76514394
AD
147892002-03-04 Akim Demaille <akim@epita.fr>
14790
14791 * src/output.c (output): Don't free the grammar.
14792 * src/reader.c (grammar_free): New.
14793 * src/main.c (main): Call it and don't free symtab here.
14794
55024580
AD
147952002-03-04 Akim Demaille <akim@epita.fr>
14796
14797 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14798 before returning.
14799 Reported by Benoit Perrot.
14800
f9abaa2c
AD
148012002-03-04 Akim Demaille <akim@epita.fr>
14802
14803 Use bitset operations when possible, not loops over bits.
14804
14805 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14806 bitset_or.
14807 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14808 * src/reduce.c (useless_nonterminals): Formatting changes.
14809 * src/warshall.c (TC): Use bitset_or.
14810
0e721e75
AD
148112002-03-04 Akim Demaille <akim@epita.fr>
14812
14813 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14814 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14815 Ditto.
14816
0fb1ffb1
AD
148172002-03-04 Akim Demaille <akim@epita.fr>
14818
14819 * src/lalr.c (F): Now a bitset*.
14820 Adjust all dependencies.
14821
b86796bf
AD
148222002-03-04 Akim Demaille <akim@epita.fr>
14823
14824 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14825 Adjust all dependencies.
14826
602bbf31
AD
148272002-03-04 Akim Demaille <akim@epita.fr>
14828
14829 * src/L0.c, src/LR0.h (nstates): Be size_t.
14830 Adjust comparisons (signed vs unsigned).
14831 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14832 bitset*.
14833 Adjust all dependencies.
14834
d8a0245c
AD
148352002-03-04 Akim Demaille <akim@epita.fr>
14836
14837 * src/closure.c (firsts): Now, also a bitset.
14838 Adjust all dependencies.
14839 (varsetsize): Remove, now unused.
14840 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14841
34ba9743
AD
148422002-03-04 Akim Demaille <akim@epita.fr>
14843
14844 * src/print.c: Convert to use bitset.h, not hand coded iterations
14845 over ints.
14846
ed86e78c
AD
148472002-03-04 Akim Demaille <akim@epita.fr>
14848
14849 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14850
dfdb1797
AD
148512002-03-04 Akim Demaille <akim@epita.fr>
14852
14853 * src/closure.c (ruleset): Be a bitset.
14854 (rulesetsize): Remove.
14855
7086e707
AD
148562002-03-04 Akim Demaille <akim@epita.fr>
14857
14858 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14859 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14860 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14861 * src/closure.c (fderives): Be an array of bitsets.
14862
98254360
RA
148632002-02-28 Robert Anisko <robert@lrde.epita.fr>
14864
14865 * data/bison.c++: Merge the two generated headers. Insert a copyright
14866 notice in each output file.
14867
a75c057f
AD
148682002-02-28 Akim Demaille <akim@epita.fr>
14869
14870 * data/bison.c++: Copy the prologue of bison.simple to fetch
14871 useful M4 definitions, such as b4_header_guard.
14872
06b00abc
AD
148732002-02-25 Akim Demaille <akim@epita.fr>
14874
14875 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
14876 translator friendly scheme for the bgr
14877 copyright notice.
06b00abc 14878
70e7d534
AD
148792002-02-25 Akim Demaille <akim@epita.fr>
14880
14881 * src/output.c (header_output): Remove, now handled completely via
14882 M4.
14883
abe017f6
AD
148842002-02-25 Akim Demaille <akim@epita.fr>
14885
14886 * m4/m4.m4: New, from CVS Autoconf.
14887 * configure.in: Invoke it.
14888 * src/output.c (output_skeleton): Use its result instead of the
14889 hard coded name.
14890
381fb12e
AD
148912002-02-25 Akim Demaille <akim@epita.fr>
14892
14893 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14894 Fileutils 4.1.5.
14895 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14896 * src/output.c (output_skeleton): Use mkstemp to create a real
14897 temporary file.
14898 Move the filling of `skeleton' and its muscle to...
14899 (prepare): here.
14900 (output): Move the definition of the prologue muscle to...
14901 (prepare): here.
14902 * src/system.h (DEFAULT_TMPDIR): New.
14903
6f38107f
PE
149042002-02-14 Paul Eggert <eggert@twinsun.com>
14905
14906 Remove the support for C++ namespace cleanliness; it was
14907 causing more problems than it was curing, since it didn't work
14908 properly on some nonstandard C++ compilers. This can wait
14909 for a proper C++ parser.
14910
14911 * NEWS: Document this.
14912 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14913 of C++, as it's treated like C now.
14914 * src/bison.simple (YYSTD): Remove.
14915 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14916 Treat C++ just like Standard C instead of trying to support
14917 namespace cleanliness.
14918
80cce3da
AD
149192002-02-14 Akim Demaille <akim@epita.fr>
14920
14921 * tests/regression.at (else): Adjust to Andreas' change.
14922
842e8679
AD
149232002-02-14 Akim Demaille <akim@epita.fr>
14924
14925 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14926
4bda3f10
AD
149272002-02-13 Andreas Schwab <schwab@suse.de>
14928
14929 * src/output.c (output_rule_data): Don't output NULL, it might
14930 not be defined yet.
14931
4162fa07 149322002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 14933
4162fa07
RA
14934 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14935 (Copyright notice): Update.
b418ecd8 14936
bd16a5dc
AD
149372002-02-11 Akim Demaille <akim@epita.fr>
14938
14939 * tests/regression.at (%nonassoc and eof): Don't include
14940 nonportable headers.
14941
8d69a1a3
RA
149422002-02-08 Robert Anisko <robert@lrde.epita.fr>
14943
14944 * data/bison.c++: Correct error recovery. Make the user able to
14945 initialize the starting location.
14946
9b2d0677
AD
149472002-02-07 Akim Demaille <akim@epita.fr>
14948
14949 * tests/input.at: New.
14950
69e2658b
RA
149512002-02-07 Robert Anisko <robert@lrde.epita.fr>
14952
14953 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 14954 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
14955 directives around tables only needed for debugging.
14956
4aacc3a7
RA
149572002-02-07 Robert Anisko <robert@lrde.epita.fr>
14958
14959 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14960 C++ parsers.
14961 (yy::b4_name::parse): Use print_.
14962
762a801e
RA
149632002-02-07 Robert Anisko <robert@lrde.epita.fr>
14964
14965 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14966
4bb2bc3f
RA
149672002-02-07 Robert Anisko <robert@lrde.epita.fr>
14968
14969 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14970 C++ parsers.
14971 (yy::b4_name::parse): Build verbose error messages, and use error_.
14972
6b45a3ca
RA
149732002-02-06 Robert Anisko <robert@lrde.epita.fr>
14974
14975 * data/bison.c++: Fix m4 quoting in comments.
14976
50997c6e
RA
149772002-02-06 Robert Anisko <robert@lrde.epita.fr>
14978
14979 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14980 not expanded by m4.
14981
3f3eed27
AD
149822002-02-05 Akim Demaille <akim@epita.fr>
14983
14984 * data/bison.c++: Adjust to the M4 back end.
14985 More is certainly needed.
14986
be2a1a68
AD
149872002-02-05 Akim Demaille <akim@epita.fr>
14988
14989 Give a try to M4 as a back end.
14990
14991 * lib/readpipe.c: New, from wdiff.
14992 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14993 BISON_HAIRY.
14994 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14995 specific values. Now it is m4 that performs the lookup.
14996 * src/parse-skel.y: Remove.
14997 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14998 * src/output.c (actions_output, guards_output)
14999 (token_definitions_output): No longer keeps track of the output
15000 line number, hence remove the second argument.
15001 (guards_output): Check against the guard member of a rule, not the
15002 action member.
15003 Adjust callers.
15004 (output_skeleton): Don't look for the skeleton location, let m4 do
15005 that.
15006 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15007 file will be used.
15008 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15009 (prepare): Given that for the time being changesyntax is not
15010 usable in M4, rename the muscles using `-' to `_'.
15011 Define `defines_flag', `output_parser_name' and `output_header_name'.
15012 * src/output.h (actions_output, guards_output)
15013 (token_definitions_output): Adjust prototypes.
15014 * src/scan-skel.l: Instead of scanning the skeletons, it now
15015 processes the output of m4: `__oline__' and `#output'.
15016 * data/bison.simple: Adjust to be used by M4(sugar).
15017 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15018 to date.
15019 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15020 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15021 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15022 shamelessly stolen from CVS Autoconf.
15023
beda758b
AD
150242002-02-05 Akim Demaille <akim@epita.fr>
15025
15026 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15027 * configure.in: Check for the declarations of free and malloc.
15028 * src/muscle_tab.c: Adjust.
15029
5ece6d43
AD
150302002-02-05 Akim Demaille <akim@epita.fr>
15031
15032 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15033 which have no values.
15034
5bb18f9a
AD
150352002-02-05 Akim Demaille <akim@epita.fr>
15036
15037 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15038 * data/: here.
15039
894dd62e
PE
150402002-01-29 Paul Eggert <eggert@twinsun.com>
15041
15042 * src/bison.simple (YYSIZE_T): Do not define merely because
15043 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15044 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15045
82841af7
AD
150462002-01-27 Akim Demaille <akim@epita.fr>
15047
15048 Fix `%nonassoc and eof'.
15049
15050 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15051 which were not properly copied! Replace
15052 memcpy (res->errs, src->errs, src->nerrs);
15053 with
15054 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15055 !!!
15056 * tests/regression.at (%nonassoc and eof): Adjust to newest
15057 Autotest: `.' is not in the PATH.
15058
318b76e9
AD
150592002-01-27 Akim Demaille <akim@epita.fr>
15060
15061 * tests/sets.at (AT_EXTRACT_SETS): New.
15062 (Nullable): Use it.
15063 (Firsts): New.
15064
30d2f3d5
AD
150652002-01-26 Akim Demaille <akim@epita.fr>
15066
15067 * tests/actions.at, tests/calc.at, tests/headers.at,
15068 * tests/torture.at: Adjust to the newest Autotest which no longer
15069 forces `.' in the PATH.
15070
30f8c395
AD
150712002-01-25 Akim Demaille <akim@epita.fr>
15072
15073 * tests/regression.at (%nonassoc and eof): New.
15074 Suggested by Robert Anisko.
15075
29ae55f1
AD
150762002-01-24 Akim Demaille <akim@epita.fr>
15077
15078 Bison dumps core when trying to complain about broken input files.
15079 Reported by Cris van Pelt.
15080
15081 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15082 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15083 into...
15084 (Invalid inputs): Strengthen: exercise parse_percent_token.
15085
2b548aa6
RA
150862002-01-24 Robert Anisko <robert.anisko@epita.fr>
15087
15088 * src/Makefile.am: Add bison.c++.
15089 * src/bison.c++: New skeleton.
15090
bb0146c2
AD
150912002-01-21 Paolo Bonzini <bonzini@gnu.org>
15092
15093 * po/it.po: New.
15094
bec30531
AD
150952002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15096
15097 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15098
fc6edc45
MA
150992002-01-20 Marc Autret <marc@gnu.org>
15100
15101 * src/files.c (compute_output_file_names): Fix
15102
5e5d5415
MA
151032002-01-20 Marc Autret <marc@gnu.org>
15104
15105 * tests/output.at: New test.
15106 * src/files.c (compute_base_names): Don't map extensions when
15107 the YACC flag is set, use defaults.
15108 Reported by Evgeny Stambulchik.
15109
44ea3fbd
MA
151102002-01-20 Marc Autret <marc@gnu.org>
15111
ba0fe3c7
PE
15112 * src/system.h: Need to define __attribute__ away for non-GCC
15113 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
15114 Suggested by Albert Chin-A-Young.
15115
338963d1
TVH
151162002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15117
15118 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15119 canonical definition.
15120 * src/system.h: Use the canonical definition for PARAMS (avoids
15121 a conflict with the macro from lib/hash.h).
15122
c57b2479
AD
151232002-01-11 Akim Demaille <akim@epita.fr>
15124
15125 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 15126 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 15127
b85810ae
AD
151282002-01-09 Akim Demaille <akim@epita.fr>
15129
15130 * src/files.c, src/files.h (output_infix): New.
15131 (tab_extension): Remove.
15132 (compute_base_names): Compute the former, drop the latter.
15133 * src/output.c (prepare): Insert the muscles `output-infix', and
15134 `output-suffix'.
15135 * src/parse-skel.y (string, string.1): New.
15136 (section.header): Use it.
15137 (section.yacc): Remove.
15138 (prefix): Remove too.
15139 * src/scan-skel.l: Adjust.
15140 * src/bison.simple, src/bison.hairy: Adjust.
15141
cae60122
AD
151422002-01-09 Akim Demaille <akim@epita.fr>
15143
15144 * configure.in (WERROR_CFLAGS): Compute it.
15145 * src/Makefile.am (CFLAGS): Pass it.
15146 * tests/atlocal.in (CFLAGS): Idem.
15147 * src/files.c: Fix a few warnings.
15148 (get_extension_index): Remove, unused.
15149
ae404801
AD
151502002-01-08 Akim Demaille <akim@epita.fr>
15151
15152 * src/getargs.c (AS_FILE_NAME): New.
15153 (getargs): Use it to convert DOSish file names.
15154 * src/files.c (base_name): Rename as full_base_name to avoid
15155 clashes with `base_name ()'.
15156 (filename_split): New.
15157 (compute_base_names): N-th rewrite, using filename_split.
15158
22312b71
AD
151592002-01-08 Akim Demaille <akim@epita.fr>
15160
15161 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15162 New, stolen from the Fileutils 4.1.
15163 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15164 * configure.in: Check for the presence of memrchr, and of its
15165 prototype.
15166
a67cef01
TVH
151672002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15168
15169 * lib/hash.h (__P): Added definition for this macro.
15170 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15171 BUILT_SOURCES, to ensure they are generated first.
15172 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15173 %error-verbose to allow bootstrapping with bison 1.30x.
15174
2b25d624
AD
151752002-01-06 Akim Demaille <akim@epita.fr>
15176
15177 * src/reader.c (parse_braces): Don't fetch the next char, the
15178 convention is to fetch on entry.
15179 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15180 'switch' without a following semicolon.
15181 * tests/regression.at (braces parsing): New.
15182
3460813b
AD
151832002-01-06 Akim Demaille <akim@epita.fr>
15184
15185 Bison is dead wrong in its RR conflict reports.
15186
15187 * tests/torture.at (GNU Cim Grammar): New.
15188 * src/conflicts.c (count_rr_conflicts): Fix.
15189
73784c64
AD
151902002-01-06 Akim Demaille <akim@epita.fr>
15191
15192 Creating package.m4 from configure.ac causes too many problems.
15193
15194 * tests/Makefile.am (package.m4): Create it by hand,
15195 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15196
25d81090
AD
151972002-01-06 Akim Demaille <akim@epita.fr>
15198
15199 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15200 skeleton.h.
15201
a9b8959e
PE
152022002-01-04 Paul Eggert <eggert@twinsun.com>
15203
15204 * doc/bison.texinfo (Debugging):
15205 Remove YYSTDERR; it's no longer defined or used.
15206 Also, s/cstdio.h/cstdio/.
15207
25d81090
AD
152082002-01-03 Akim Demaille <akim@epita.fr>
15209
15210 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15211
1109455c
AD
152122002-01-03 Akim Demaille <akim@epita.fr>
15213
15214 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15215 tracing code to --trace, wait for a better --trace option, with
15216 args.
15217
7ea5e977
AD
152182002-01-03 Akim Demaille <akim@epita.fr>
15219
15220 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15221 The ISO C++ standard is extremely clear about it: stderr is
15222 considered a macro, not a regular symbol (see table 94 `Header
15223 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15224 Therefore std:: does not apply to it. It still does with fprintf.
15225 Also, s/cstdio.h/cstdio/.
15226
fab5b110
AD
152272002-01-03 Akim Demaille <akim@epita.fr>
15228
15229 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15230 for non system headers.
15231
aed7fd9b
AD
152322002-01-02 Akim Demaille <akim@epita.fr>
15233
15234 Equip the skeleton chain with location tracking, runtime trace,
15235 pure parser and scanner.
15236
15237 * src/parse-skel.y: Request a pure parser, locations, and prefix
15238 renaming.
15239 (%union): Having several members with the same type does not help
15240 type mismatches, simplify.
15241 (YYPRINT, yyprint): New.
15242 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15243 (skel_error): this.
15244 Handle locations.
15245 * src/scan-skel.l: Adjust to these changes.
15246 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15247 (LOCATION_PRINT, skel_control_t): New.
15248
24fad99e
AD
152492001-12-30 Akim Demaille <akim@epita.fr>
15250
15251 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15252 replace `gb' with BLANKS.
15253 * src/scan-skel.l: Adjust.
15254
a4b36db4
AD
152552001-12-30 Akim Demaille <akim@epita.fr>
15256
15257 * src/system.h: We don't need nor want bcopy.
15258 Throw away MS-DOS crap: we don't need getpid.
15259 * configure.in: We don't need strndup. It was even causing
15260 problems: because Flex includes the headers *before* us,
15261 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15262 not visible.
15263 * lib/xstrndup.c: New.
15264 * src/scan-skel.l: Use it.
15265 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15266 * src/parse-skel.y: Use %directives instead of #defines.
15267
1239777d
AD
152682001-12-30 Akim Demaille <akim@epita.fr>
15269
15270 * src/skeleton.h: New.
15271 * src/output.c (output_parser, output_master_parser): Remove, dead
15272 code.
15273 * src/output.h (get_lines_number, actions_output, guards_output)
15274 (token_definitions_output): Prototype them.
15275 * src/parse-skel.y: Add the license notice.
15276 Include output.h and skeleton.h.
15277 (process_skeleton): Returns void, and takes a single parameter.
15278 * src/scan-skel.l: Add the license notice.
15279 Include skeleton.h.
15280 Don't use %option yylineno: it seems that then Flex imagines
15281 REJECT has been used, and therefore it won't reallocate its
15282 buffers (which makes no other sense to me than a bug). It results
15283 in warnings for `unused: yy_flex_realloc'.
15284
9b3add5b
RA
152852001-12-30 Robert Anisko <robert.anisko@epita.fr>
15286
15287 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15288 (MUSCLE_INSERT_PREFIX): ...to there.
15289 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15290 (MUSCLE_INSERT_PREFIX): Move from here...
15291
15292 * src/bison.hairy: Add a section directive. Put braces around muscle
15293 names. This parser skeleton is still broken, but Bison should not
15294 choke on a bad muscle 'syntax'.
15295 * src/bison.simple: Add a section directive. Put braces around muscle
15296 names.
15297
15298 * src/files.h (strsuffix, stringappend): Add declarations.
15299 (tab_extension): Add declaration.
15300 (short_base_name): Add declaration.
15301
15302 * src/files.c (strsuffix, stringappend): No longer static. These
15303 functions are used in the skeleton parser.
15304 (tab_extension): New.
15305 (compute_base_names): Use the computations done in this function
fab5b110 15306 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
15307 names.
15308 (short_base_name): No longer static.
15309
15310 * src/output.c (output_skeleton): New.
15311 (output): Disable call to output_master_parser, and give a try to
15312 a new skeleton handling system.
15313 (guards_output, actions_output): No longer static.
15314 (token_definitions_output, get_lines_number): No longer static.
15315
15316 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15317
fab5b110 15318 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
15319 parse-skel.y.
15320
15321 * src/parse-skel.y: New file.
15322 * src/scan-skel.l: New file.
15323
b5b61c61
AD
153242001-12-29 Akim Demaille <akim@epita.fr>
15325
15326 %name-prefix is broken.
15327
15328 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15329 Adjust all dependencies.
15330 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15331 %name-prefix.
15332
15333 Renaming yylval but not yylloc is not consistent. Now we do.
15334
15335 * src/bison.simple: Prefix yylloc if used.
15336 * doc/bison.texinfo (Decl Summary): Document that.
15337
8c9a50be
AD
153382001-12-29 Akim Demaille <akim@epita.fr>
15339
15340 * doc/bison.texinfo: Promote `%long-directive' over
15341 `%long_directive'.
15342 Remove all references to fixed-output-files, yacc is enough.
15343
d99361e6
AD
153442001-12-29 Akim Demaille <akim@epita.fr>
15345
15346 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15347 user prologue. These are defaults.
15348 * tests/actions.at (Mid-rule actions): Make sure the user can
15349 define YYDEBUG and YYERROR_VERBOSE.
15350
b9cecb91
AD
153512001-12-29 Akim Demaille <akim@epita.fr>
15352
15353 * src/output.c (header_output): Don't forget to export YYLTYPE and
15354 yylloc.
15355 * tests/headers.at (export YYLTYPE): New, make sure it does.
15356 * tests/regression.at (%union and --defines, Invalid CPP headers):
15357 Move to...
15358 * tests/headers.at: here.
15359
aea13e97
AD
153602001-12-29 Akim Demaille <akim@epita.fr>
15361
15362 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15363
931394cb
AD
153642001-12-29 Akim Demaille <akim@epita.fr>
15365
15366 * tests/actions.at (Mid-rule actions): Output on a single line
15367 instead of several.
15368
704a47c4
AD
153692001-12-29 Akim Demaille <akim@epita.fr>
15370
15371 * doc/bison.texinfo: Formatting changes.
15372
091e20bb
AD
153732001-12-29 Akim Demaille <akim@epita.fr>
15374
15375 Don't store the token defs in a muscle, just be ready to output it
15376 on command. Now possible via `symbols'. Fixes a memory leak.
15377
15378 * src/output.c (token_definitions_output): New.
15379 (output_parser, header_output): Use it.
15380 * src/reader.c (symbols_save): Remove.
15381
cce71710
AD
153822001-12-29 Akim Demaille <akim@epita.fr>
15383
15384 * src/bison.simple: Do not provide a default for YYSTYPE and
15385 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15386 default.
15387
82c035a8
AD
153882001-12-29 Akim Demaille <akim@epita.fr>
15389
15390 Mid-rule actions are simply... ignored!
15391
15392 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15393 the empty-rule associated to the dummy symbol, not to the host
15394 rule.
15395 * tests/actions.at (Mid-rule actions): New.
15396
8419d367
AD
153972001-12-29 Akim Demaille <akim@epita.fr>
15398
15399 Memory leak.
15400
15401 * src/reader.c (reader): Free grammar.
15402
375d5806
AD
154032001-12-29 Akim Demaille <akim@epita.fr>
15404
15405 Memory leak.
15406
15407 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15408 since it allocates it for each state, although only one is needed.
15409 (allocate_storage): Do it here.
15410
f51cb8ff
AD
154112001-12-29 Akim Demaille <akim@epita.fr>
15412
15413 * src/options.h, src/options.c (create_long_option_table): Rename
15414 as...
15415 (long_option_table_new): this, with a clearer prototype.
15416 (percent_table): Remove, unused,
15417 * src/getargs.c (getargs): Adjust.
15418
29e88316
AD
154192001-12-29 Akim Demaille <akim@epita.fr>
15420
15421 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15422 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15423 as states.
15424
b9f71f19
AD
154252001-12-29 Akim Demaille <akim@epita.fr>
15426
15427 * src/lalr.c (build_relations): Rename `states' as `states1'.
15428 Sorry, I don't understand exactly what it is, no better name...
15429
1a2b5d37
AD
154302001-12-29 Akim Demaille <akim@epita.fr>
15431
15432 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15433 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15434 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15435 as rules.
15436
1cca533e
AD
154372001-12-29 Akim Demaille <akim@epita.fr>
15438
15439 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15440 ago.
15441
c03ae966
AD
154422001-12-29 Akim Demaille <akim@epita.fr>
15443
15444 * src/reader.c, src/reader.h (user_toknums): Remove.
15445 Adjust all users to use symbols[i]->user_token_number.
15446
5a670b1e
AD
154472001-12-29 Akim Demaille <akim@epita.fr>
15448
15449 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15450 Adjust all users to use symbols[i]->prec or ->assoc.
15451
ad949da9
AD
154522001-12-29 Akim Demaille <akim@epita.fr>
15453
15454 * src/reader.c, src/reader.h (tags): Remove.
15455 Adjust all users to use symbols[i]->tag.
15456
0e78e603
AD
154572001-12-29 Akim Demaille <akim@epita.fr>
15458
15459 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15460 and rule_table.
15461 * src/reader.c (packsymbols): Fill this table.
15462 Drop sprec.
15463 * src/conflicts.c (resolve_sr_conflict): Adjust.
15464 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15465 single table.
15466 Use symbols[i]->tag instead of tags[i].
15467
213e640e
AD
154682001-12-29 Akim Demaille <akim@epita.fr>
15469
15470 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15471 In addition, put a comment in there, to replace...
15472 * tests/regression.at (%union and C comments): Remove.
15473
e7b8bef1
AD
154742001-12-29 Akim Demaille <akim@epita.fr>
15475
15476 * tests/regression.at (Web2c Actions): Blindly move the actual
15477 output as expected output. The contents *seem* right to me, but I
15478 can't pretend reading perfectly parser tables... Nonetheless, all
15479 the other tests pass correctly, the table look OK, even though the
15480 presence of `$axiom' is to be noted: AFAICS it is useless (but
15481 harmless).
15482
b68e7744
AD
154832001-12-29 Akim Demaille <akim@epita.fr>
15484
15485 * src/reader.c (readgram): Don't add the rule 0 if there were no
15486 rules read. In other words, add it _after_ having performed
15487 grammar sanity checks.
15488 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15489
78d5bae9
AD
154902001-12-29 Akim Demaille <akim@epita.fr>
15491
15492 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15493 visible, and some states have now a different number.
15494
ff442794
AD
154952001-12-29 Akim Demaille <akim@epita.fr>
15496
15497 * src/reader.c (readgram): Bind the initial rule's lineno to that
15498 of the first rule.
15499 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15500 (Solved SR Conflicts): Adjust rule 0's line number.
15501
610ab194
AD
155022001-12-29 Akim Demaille <akim@epita.fr>
15503
15504 Fix the `GAWK Grammar' failure.
15505
15506 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15507 the reductions of the first state which was mistakenly confused
15508 with the final state because precisely final_state was initialized
15509 to 0.
15510 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15511 now noticed by Bison.
15512 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15513 have a reduction on $default.
15514
29d29c8f
AD
155152001-12-29 Akim Demaille <akim@epita.fr>
15516
15517 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15518 rule line numbers.
15519 * src/closure.c (print_closure): Likewise.
15520 * src/derives.c (print_derives): Likewise.
15521 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15522 now.
15523
7c6b64d0
AD
155242001-12-29 Akim Demaille <akim@epita.fr>
15525
15526 * src/lalr.c (lookaheads_print): New.
15527 (lalr): Call it when --trace-flag.
15528 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15529 are dumped.
15530
3d4daee3
AD
155312001-12-29 Akim Demaille <akim@epita.fr>
15532
15533 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15534 when walking through ritem, even via rule->rhs.
15535 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15536 (useful_production, useless_nonterminals): Likewise.
15537 (reduce_grammar_tables): Likewise, plus update nritems.
15538 * src/nullable.c (set_nullable): Likewise.
15539 * src/lalr.c (build_relations): Likewise.
15540 * tests/sets.at (Nullable): Adjust.
15541 Fortunately, now, the $axiom is no longer nullable.
15542
9e7f6bbd
AD
155432001-12-29 Akim Demaille <akim@epita.fr>
15544
15545 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15546 the 0-sentinel.
15547 * src/gram.c (ritem_longest_rhs): Likewise.
15548 * src/reduce.c (nonterminals_reduce): Likewise.
15549 * src/print_graph.c (print_graph): Likewise.
15550 * src/output.c (output_rule_data): Likewise.
15551 * src/nullable.c (set_nullable): Likewise.
15552
255ef638
AD
155532001-12-29 Akim Demaille <akim@epita.fr>
15554
15555 * src/output.c: Comment changes.
15556
0d8a7363
AD
155572001-12-27 Paul Eggert <eggert@twinsun.com>
15558
15559 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15560 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15561 Sparc, as they were causing more porting problems than the
15562 (minor) performance improvement was worth.
15563
15564 Also, catch up with 1.31's YYSTD.
15565
3db472b9
AD
155662001-12-27 Akim Demaille <akim@epita.fr>
15567
15568 * src/output.c (output_gram): Rely on nritems, not the
15569 0-sentinel. See below.
15570 Use -1 as separator, not 0.
15571 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15572 Rely on -1 as separator in yyrhs, instead of 0.
15573 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15574 twice `Now at end of input', therefore there are two lines less to
15575 expect.
15576
b365aa05
AD
155772001-12-27 Akim Demaille <akim@epita.fr>
15578
15579 * tests/regression.at (Unresolved SR Conflicts):
15580 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15581 below.
15582
30171f79
AD
155832001-12-27 Akim Demaille <akim@epita.fr>
15584
15585 * src/LR0.c (new_state): Recognize the final state by the fact it
15586 is reached by eoftoken.
15587 (insert_start_shifting_state, insert_eof_shifting_state)
15588 (insert_accepting_state, augment_automaton): Remove, since now
15589 these states are automatically computed from the initial state.
15590 (generate_states): Adjust.
15591 * src/print.c: When reporting a rule number to the user, substract
15592 1, so that the axiom rule is rule 0, and the first user rule is 1.
15593 * src/reduce.c: Likewise.
15594 * src/print_graph.c (print_core): For the time being, just as for
15595 the report, depend upon --trace-flags to dump the full set of
15596 items.
15597 * src/reader.c (readgram): Once the grammar read, insert the rule
15598 0: `$axiom: START-SYMBOL $'.
15599 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15600 number of the states has changed (the final state is no longer
15601 necessarily the last), catch up.
15602
75142d45
AD
156032001-12-27 Akim Demaille <akim@epita.fr>
15604
15605 Try to make the use of the eoftoken valid. Given that its value
15606 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15607 is used instead of > 0 where appropriate, (ii), depend upon nritems
15608 instead of the 0-sentinel.
15609
15610 * src/gram.h, src/gram.c (nritems): New.
15611 Expected to be duplication of nitems, but for the time being...
15612 * src/reader.c (packgram): Assert nritems and nitems are equal.
15613 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15614 * src/closure.c (print_closure, print_fderives): Likewise.
15615 * src/gram.c (ritem_print): Likewise.
15616 * src/print.c (print_core, print_grammar): Likewise.
15617 * src/print_graph.c: Likewise.
15618
b7c49edf
AD
156192001-12-27 Akim Demaille <akim@epita.fr>
15620
15621 * src/main.c (main): If there are complains after grammar
15622 reductions, then output the report anyway if requested, then die.
15623 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15624 * src/reader.c (eoftoken): New.
15625 (parse_token_decl): If the token being defined has value `0', it
15626 is the eoftoken.
15627 (packsymbols): No longer hack `tags' to insert `$' by hand.
15628 Be sure to preserve the value of the eoftoken.
15629 (reader): Make sure eoftoken is defined.
15630 Initialize nsyms to 0: now eoftoken is created just like the others.
15631 * src/print.c (print_grammar): Don't special case the eof token.
15632 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15633 lie anyway, albeit pleasant.
15634 * tests/calc.at: Exercise error messages with eoftoken.
15635 Change the grammar so that empty input is invalid.
15636 Adjust expectations.
15637 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15638
ec2da99f
AD
156392001-12-27 Akim Demaille <akim@epita.fr>
15640
15641 * configure.in: Check the protos of strchr ans strspn.
15642 Replace strchr if needed.
15643 * src/system.h: Provide the protos of strchr, strspn and memchr if
15644 missing.
15645 * lib/strchr.c: New.
15646 * src/reader.c (symbols_save): Use strchr.
15647
8adfa272
AD
156482001-12-27 Akim Demaille <akim@epita.fr>
15649
15650 * src/print.c, src/print_graph.c (escape): New.
15651 Use it to quote the TAGS outputs.
15652 * src/print_graph.c (print_state): Now errors are in red, and
15653 reductions in green.
15654 Prefer high to wide: output the state number on a line of its own.
15655
80dac38c
AD
156562001-12-27 Akim Demaille <akim@epita.fr>
15657
15658 * src/state.h, src/state.c (reductions_new): New.
15659 * src/LR0.c (set_state_table): Let all the states have a
15660 `reductions', even if reduced to 0.
15661 (save_reductions): Adjust.
15662 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15663 * src/print.c (print_reductions, print_actions): Adjust.
15664 * src/output.c (action_row): Adjust.
15665
2cec70b9
AD
156662001-12-27 Akim Demaille <akim@epita.fr>
15667
15668 * src/state.h, src/state.c (errs_new, errs_dup): New.
15669 * src/LR0.c (set_state_table): Let all the states have an errs,
15670 even if reduced to 0.
15671 * src/print.c (print_errs, print_reductions): Adjust.
15672 * src/output.c (output_actions, action_row): Adjust.
15673 * src/conflicts.c (resolve_sr_conflict): Adjust.
15674
13ca549a
AD
156752001-12-27 Akim Demaille <akim@epita.fr>
15676
15677 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15678
5092aba5
AD
156792001-12-27 Akim Demaille <akim@epita.fr>
15680
15681 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15682 * src/print.c: here.
15683 (lookaheadset, shiftset): New, used as additional storage by
15684 print_reductions.
15685 (print_results): Adjust.
15686 (print_shifts, print_gotos, print_errs): New, extracted from...
15687 (print_actions): here.
15688 * src/print_graph.c (print_actions): Remove dead code.
15689
11e2beca
AD
156902001-12-27 Akim Demaille <akim@epita.fr>
15691
15692 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15693 `$n' and `@n'.
15694
dac3c910
AD
156952001-12-27 Akim Demaille <akim@epita.fr>
15696
15697 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15698 (build_relations): Adjust.
15699
d0b0fefa
AD
157002001-12-27 Akim Demaille <akim@epita.fr>
15701
15702 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15703 duplication.
15704
adc8c848
AD
157052001-12-27 Akim Demaille <akim@epita.fr>
15706
15707 * src/reader.c (packgram): Catch nitems overflows.
15708
14d293ac
AD
157092001-12-27 Akim Demaille <akim@epita.fr>
15710
15711 * src/files.c, src/files.h (guard_obstack): Remove.
15712 * src/output.c (output): Adjust.
15713 * src/reader.c (parse_braces): New, factoring...
15714 (copy_action, copy_guard): these two which are renamed as...
15715 (parse_action, parse_guard): these.
15716 As a voluntary consequence, using braces around guards is now
15717 mandatory.
15718
f499b062
AD
157192001-12-27 Akim Demaille <akim@epita.fr>
15720
15721 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15722 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15723 members.
15724 (symbol_list_new): Adjust.
15725 (copy_action): action_line is the first line, not the last.
15726 (copy_guard): Just as for actions, store the `action' only, not
15727 the switch/case/break flesh.
15728 Don't parse the user action that might follow the guard, let...
15729 (readgram): do it, i.e., now, there can be an action after a
15730 guard.
15731 In other words the guard is just explicitly optional.
15732 (packgram): Adjust.
15733 * src/output.c (guards_output): New.
15734 (output_parser): Call it when needed.
15735 (output): Also free the guard and attrs obstacks.
15736 * src/files.c, src/files.h (obstack_save): Remove.
15737 (output_files): Remove.
15738 As a result, if one needs the former `.act' file, using an
15739 appropriate skeleton which requires actions and guards is now
15740 required.
15741 * src/main.c (main): Adjust.
15742 * tests/semantic.at: New.
15743 * tests/regression.at: Use `input.y' as input file name.
15744 Avoid 8+3 problems by requiring input.c when the test needs the
15745 parser.
15746
d945f5cd
AD
157472001-12-27 Akim Demaille <akim@epita.fr>
15748
15749 * src/reader.c (symbol_list_new): Be sure to initialize all the
15750 fields.
15751
d200e455
AD
157522001-12-27 Akim Demaille <akim@epita.fr>
15753
15754 All the hacks using a final pseudo state are now useless.
15755
15756 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15757 * src/lalr.c (nLA): New.
15758 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15759 instead of lookaheadsp from the pseudo state (nstate + 1).
15760
f9507c28
AD
157612001-12-27 Akim Demaille <akim@epita.fr>
15762
15763 * src/output.c (action_row, token_actions): Use a state_t instead
15764 of a integer, and nlookaheads instead of the following state's
15765 lookaheadsp.
15766
065fbd27
AD
157672001-12-27 Akim Demaille <akim@epita.fr>
15768
15769 * src/conflicts.c (log_resolution, flush_shift)
15770 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15771 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15772 (conflicts_print, print_reductions): Use a state_t instead of an
15773 integer when referring to a state.
15774 As much as possible, depend upon nlookaheads, instead of the
15775 `lookaheadsp' member of the following state (since lookaheads of
15776 successive states are successive, the difference between state n + 1
15777 and n served as the number of lookaheads for state n).
15778 * src/lalr.c (add_lookback_edge): Likewise.
15779 * src/print.c (print_core, print_actions, print_state)
15780 (print_results): Likewise.
15781 * src/print_graph.c (print_core, print_actions, print_state)
15782 (print_graph): Likewise.
15783 * src/conflicts.h: Adjust.
15784
1b177bd7
AD
157852001-12-27 Akim Demaille <akim@epita.fr>
15786
15787 * src/bison.hairy: Formatting/comment changes.
15788 ANSIfy.
15789 Remove `register' indications.
15790 Add plenty of `static'.
15791
7742ddeb
AD
157922001-12-27 Akim Demaille <akim@epita.fr>
15793
15794 * src/output.c (prepare): Drop the muscle `ntbase' which
15795 duplicates ntokens.
15796 * src/bison.simple: Formatting/comment changes.
15797 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15798 is an undocumented synonym.
15799
1fa14068
AD
158002001-12-22 Akim Demaille <akim@epita.fr>
15801
15802 * src/output.c (output_table_data): Change the prototype to use
15803 `int' for array ranges: some invocations do pass an int, not a
15804 short.
15805 Reported by Wayne Green.
15806
b9752825
AD
158072001-12-22 Akim Demaille <akim@epita.fr>
15808
15809 Some actions of web2c.y are improperly triggered.
15810 Reported by Mike Castle.
15811
15812 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15813 * tests/regression.at (Web2c): Rename as...
15814 (Web2c Report): this.
15815 (Web2c Actions): New.
15816
776209d6
AD
158172001-12-22 Akim Demaille <akim@epita.fr>
15818
15819 Reductions in web2c.y are improperly reported.
15820 Reported by Mike Castle.
15821
15822 * src/conflicts.c (print_reductions): Fix.
15823 * tests/regression.at (Web2c): New.
15824
275fc3ad
AD
158252001-12-18 Akim Demaille <akim@epita.fr>
15826
15827 Some host fail on `assert (!"foo")', which expands to
15828 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15829 Reported by Nelson Beebee.
15830
15831 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15832 `#define it_succeeded 0' and `assert (it_succeeded)'.
15833
897668ee
MA
158342001-12-17 Marc Autret <autret_m@epita.fr>
15835
15836 * src/bison.simple: Don't hard code the skeleton line and filename.
15837 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15838 New line counter 'skeleton_line' (skeleton-line muscle).
15839
ab3399e0
PE
158402001-12-17 Paul Eggert <eggert@twinsun.com>
15841
15842 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15843 YYDEBUG must be defined to a nonzero value.
15844
15845 * src/bison.simple (yytname): Do not assume that the user defines
15846 YYDEBUG to a properly parenthesized expression.
15847
3877f72b
AD
158482001-12-17 Akim Demaille <akim@epita.fr>
15849
15850 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15851 nlookaheads is a new member.
15852 Adjust all users.
15853 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15854 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15855 state.
776209d6 15856
331dbc1b
AD
158572001-12-17 Akim Demaille <akim@epita.fr>
15858
15859 * src/files.h, src/files.c (open_files, close_files): Remove.
15860 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15861 let...
15862 * src/reader.c (reader): Do it.
776209d6 15863
be750e4c
AD
158642001-12-17 Akim Demaille <akim@epita.fr>
15865
15866 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 15867
709ae8c6
AD
158682001-12-17 Akim Demaille <akim@epita.fr>
15869
15870 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15871 (flush_reduce): New.
15872 (resolve_sr_conflict): Adjust.
776209d6 15873
f87685c3
AD
158742001-12-17 Akim Demaille <akim@epita.fr>
15875
15876 * src/output.c (output_obstack): Be static and rename as...
15877 (format_obstack): this, to avoid any confusion with files.c's
15878 output_obstack.
15879 * src/reader.h (muscle_obstack): Move to...
15880 * src/output.h: here, since it's defined in output.c.
15881
837491d8
AD
158822001-12-17 Akim Demaille <akim@epita.fr>
15883
15884 * src/output.c (action_row, save_column, default_goto)
15885 (sort_actions, matching_state, pack_vector): Better variable
15886 locality.
15887
796d61fb
AD
158882001-12-17 Akim Demaille <akim@epita.fr>
15889
15890 * src/output.c: Various formatting changes.
776209d6 15891
64d15509
AD
158922001-12-17 Akim Demaille <akim@epita.fr>
15893
15894 * src/files.c (output_files): Free the output_obstack.
15895 * src/main.c (main): Call print and print_graph conditionally.
15896 * src/print.c (print): Work unconditionally.
15897 * src/print_graph.c (print_graph): Work unconditionally.
15898 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15899
fbc8ecb7
MA
159002001-12-16 Marc Autret <autret_m@epita.fr>
15901
15902 * src/output.c (actions_output): Fix. When we use %no-lines,
15903 there is one less line per action.
15904
f0440388
MA
159052001-12-16 Marc Autret <autret_m@epita.fr>
15906
15907 * src/bison.simple: Remove a useless #line directive.
15908 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15909 * src/output.c (get_lines_number): New.
776209d6 15910 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
15911 output muscles.
15912 Fix line numbering.
15913 (actions_output): Computes the number of lines taken by actions.
15914 (output_master_parser): Insert new skeleton which is the name of
15915 the output parser file name.
15916
a79986b8
MA
159172001-12-15 Marc Autret <autret_m@epita.fr>
15918
15919 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15920
4ec8e00f
MA
159212001-12-15 Marc Autret <autret_m@epita.fr>
15922
15923 * src/output.c (output_gram): Keep track of the hairy one.
15924
1a4648ff
AD
159252001-12-15 Akim Demaille <akim@epita.fr>
15926
15927 Make `make distcheck' work.
15928
15929 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15930 system.h which uses libgettext.h.
15931
9c2c67e6
AD
159322001-12-15 Akim Demaille <akim@epita.fr>
15933
15934 * src/nullable.c (set_nullable): Useless rules must be skipped,
15935 otherwise, since we range over their symbols, we might look at a
15936 nonterminal which no longer ``exists'', i.e., it is not counted in
15937 `nvars', hence we overflow our arrays.
15938
93ede233
AD
159392001-12-15 Akim Demaille <akim@epita.fr>
15940
15941 The header can also be produced directly, without any obstack!
15942 Yahoo!
15943
15944 * src/files.c, src/files.h (defines_obstack): Remove.
15945 (compute_header_macro): Global.
15946 (defines_obstack_save): Remove.
15947 * src/reader.c (parse_union_decl): No longer output to
15948 defines_obstack: its content can be found in the `stype' muscle
15949 anyway.
15950 (output_token_translations): Merge into...
15951 (symbols_output): this.
15952 Rename as...
15953 (symbols_save): this.
15954 (reader): Adjust.
15955 * src/output.c (header_output): New.
15956 (output): Call it.
15957
2666f928
AD
159582001-12-15 Akim Demaille <akim@epita.fr>
15959
15960 * src/reader.c (parse_union_decl): Instead of handling two obstack
15961 simultaneously, use one to define the `stype' muscle, and use the
15962 value of the latter to fill defines_obstack.
15963 (copy_comment): Remove.
15964 (copy_comment2): Work for a single obstack.
15965 Rename as...
15966 (copy_comment): this.
15967
428046f8
AD
159682001-12-15 Akim Demaille <akim@epita.fr>
15969
15970 * src/lex.c, src/lex.h (xgetc): No longer static.
15971 * src/reader.c (parse_union_decl): Revamp.
15972
ea52d706
AD
159732001-12-15 Akim Demaille <akim@epita.fr>
15974
15975 Still making progress in separating Bison into (i) input, (ii)
15976 process, (iii) output: now we can directly output the parser file
15977 without using table_obstack at all.
15978
15979 * src/files.c, src/files.h (table_obstack): Bye bye.
15980 (parser_file_name): New.
15981 * src/files.c (compute_output_file_names): Compute it.
15982 * src/output.c (actions_output, output_parser)
15983 (output_master_parser): To a file instead of an obstack.
15984
3f96f4dc
AD
159852001-12-15 Akim Demaille <akim@epita.fr>
15986
15987 Attach actions to rules, instead of pre-outputting them to
15988 actions_obstack.
15989
15990 * src/gram.h (rule_t): action and action_line are new members.
15991 * src/reader.c (symbol_list): Likewise.
15992 (copy_action): Save the actions within the rule.
15993 (packgram): Save them in rule_table.
15994 * src/output.c (actions_output): New.
15995 (output_parser): Use it on `%%actions'.
15996 (output_rule_data): Don't free rule_table.
15997 (output): Do it.
15998 (prepare): Don't save the `action' muscle.
15999 * src/bison.simple: s/%%action/%%actions/.
16000
51576fb3
AD
160012001-12-15 Akim Demaille <akim@epita.fr>
16002
16003 * src/reader.c (copy_action): When --yacc, don't append a `;'
16004 to the user action: let it fail if lacking.
dee049eb 16005 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 16006
2648a72d
AD
160072001-12-14 Akim Demaille <akim@epita.fr>
16008
16009 * src/lex.c (literalchar): Simply return the char you decoded, non
16010 longer mess around with obstacks and int pointers.
16011 Adjust all callers.
16012
92790e5b
AD
160132001-12-14 Akim Demaille <akim@epita.fr>
16014
16015 * src/lex.c (literalchar): Don't escape the special characters,
16016 just decode them, and keep them as char (before, eol was output as
16017 the 2 char string `\n' etc.).
16018 * src/output.c (output_rule_data): Use quotearg to output the
16019 token strings.
16020
927c1557
PE
160212001-12-13 Paul Eggert <eggert@twinsun.com>
16022
16023 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16024 Do not infringe on the global user namespace when using C++.
16025 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16026 All uses of `fprintf' and `stderr' changed.
16027
16028 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16029
ed8e1f68
AD
160302001-12-13 Akim Demaille <akim@epita.fr>
16031
16032 The computation of nullable is broken: it doesn't handle empty
16033 RHS's properly.
16034
16035 * tests/torture.at (GNU AWK Grammar): New.
16036 * tests/sets.at (Nullable): New.
16037 * src/nullable.c (set_nullable): Instead of blindly looping over
16038 `ritems', loop over the rules, and then over their rhs's.
16039
16040 Work around Autotest bugs.
16041
16042 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16043 frame, because Autotest understand lines starting with a `+' as
16044 traces from the shell. Then, they are not processed properly.
16045 Admittedly an Autotest bug, but we don't have time to wait for
16046 Autotest to catch up.
16047 * tests/regression.at (Broken Closure): Adjust to the new table
16048 frames.
16049 Move to...
16050 * tests/sets.at: here.
16051
cb581495
AD
160522001-12-13 Akim Demaille <akim@epita.fr>
16053
16054 * src/closure.c (closure): Use nrules instead of playing tricks
16055 with BITS_PER_WORD.
16056
2e729273
AD
160572001-12-13 Akim Demaille <akim@epita.fr>
16058
16059 * src/print.c (print_actions): Output the handling of `$' as the
16060 traces do: shifting the token EOF. Before EOF was treated as a
16061 nonterminal.
16062 * tests/regression.at: Adjust some tests.
16063 * src/print_graph.c (print_core): Complete the set of items via
16064 closure. The next-to-final and final states are still unsatisfying,
16065 but that's to be addressed elsewhere.
16066 No longer output the rule numbers, but do output the state number.
16067 A single loop for the shifts + gotos is enough, but picked a
16068 distinct color for each.
16069 (print_graph): Initialize and finalize closure.
16070
107f7dfb
AD
160712001-12-13 Akim Demaille <akim@epita.fr>
16072
16073 * src/reader.c (readgram): Remove dead code, an strip useless
16074 braces.
16075 (get_type): Remove, unused.
16076
9b53a24f
AD
160772001-12-12 Akim Demaille <akim@epita.fr>
16078
16079 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16080 on that of lib/error.c.
16081
dbfb6dcd
AD
160822001-12-12 Akim Demaille <akim@epita.fr>
16083
16084 Some hosts don't like `/' in includes.
16085
16086 * src/system.h: Include libgettext.h without qualifying the path.
16087 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16088 $(top_srcdir).
16089
c25fb648
MA
160902001-12-11 Marc Autret <autret_m@epita.fr>
16091
16092 * src/output.c (output_parser): Remove useless muscle.
16093
710ddc4f
MA
160942001-12-11 Marc Autret <autret_m@epita.fr>
16095
16096 * src/bison.simple: Remove #line just before %%epilogue. It
16097 is now handled in ...
16098 * src/reader.c (read_additionnal_code): Add the output of a
16099 #line for the epilogue.
16100
e83d80b8
MA
161012001-12-10 Marc Autret <autret_m@epita.fr>
16102
927c1557 16103 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
16104 replace precedent remove.
16105 * src/bison.simple: Remove #line before %%prologue because
16106 %%input-line is wrong at this time.
16107
971d5158
MA
161082001-12-10 Marc Autret <autret_m@epita.fr>
16109
16110 * src/reader.c (symbols_output): Clean up.
927c1557 16111 * src/output.c (output_gram, output): Clean up.
971d5158 16112
5edafffd
AD
161132001-12-10 Akim Demaille <akim@epita.fr>
16114
16115 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16116 * src/LR0.c (set_state_table): here.
16117 * src/lalr.c (lalr): Call it.
16118
0279f8e9
AD
161192001-12-10 Akim Demaille <akim@epita.fr>
16120
16121 * src/state.h (shifts): Remove the `number' member: shifts are
16122 attached to state, hence no longer need to be labelled with a
16123 state number.
16124
190c4f5f
AD
161252001-12-10 Akim Demaille <akim@epita.fr>
16126
16127 Now that states have a complete set of members, the linked list of
16128 shifts is useless: just fill directly the state's shifts member.
16129
16130 * src/state.h (shifts): Remove the `next' member.
16131 * src/LR0.c (first_state, last_state): Remove.
16132 Adjust the callers.
16133 (augment_automaton): Don't look for the shifts that must be added
16134 a shift on EOF: it is those of the state we looked for! But now,
16135 since shifts are attached, it is no longer needed to looking
16136 merely by its id: its number.
16137
2a73b93d
AD
161382001-12-10 Akim Demaille <akim@epita.fr>
16139
16140 * src/LR0.c (augment_automaton): Better variable locality.
16141 Remove an impossible branch: if there is a state corresponding to
16142 the start symbol being shifted, then there is shift for the start
16143 symbol from the initial state.
16144
74392f6a
AD
161452001-12-10 Akim Demaille <akim@epita.fr>
16146
16147 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16148 only when appropriate: when insert_start_shifting_state' is not
16149 invoked.
16150 * tests/regression.at (Rule Line Numbers): Adjust.
16151
37c82725
AD
161522001-12-10 Akim Demaille <akim@epita.fr>
16153
16154 * src/LR0.c (augment_automaton): Now that all states have shifts,
16155 merge the two cases addition shifts to the initial state.
16156
6a164e0c
AD
161572001-12-10 Akim Demaille <akim@epita.fr>
16158
16159 * src/lalr.c (set_state_table): Move to...
16160 * src/LR0.c: here.
16161 * src/lalr.c (lalr): Don't call it...
16162 * src/LR0.c (generate_states): do it.
16163 * src/LR0.h (first_state): Remove, only the table is used.
16164
7215de24
AD
161652001-12-10 Akim Demaille <akim@epita.fr>
16166
16167 * src/LR0.h (first_shift, first_reduction): Remove.
16168 * src/lalr.c: Don't use first_shift: find shifts through the
16169 states.
16170
80e25d4d
AD
161712001-12-10 Akim Demaille <akim@epita.fr>
16172
16173 * src/LR0.c: Attach shifts to states as soon as they are
16174 computed.
16175 * src/lalr.c (set_state_table): Instead of assigning shifts to
16176 state, just assert that the mapping was properly done.
16177
0ab3728b
AD
161782001-12-10 Akim Demaille <akim@epita.fr>
16179
16180 * src/LR0.c (insert_start_shift): Rename as...
16181 (insert_start_shifting_state): this.
16182 (insert_eof_shifting_state, insert_accepting_state): New.
16183 (augment_automaton): Adjust.
16184 Better locality of the variables.
16185 When looking if the start_symbol is shifted from the initial
16186 state, using `while (... symbol != start_symbol ...)' sounds
16187 better than `while (... symbol < start_symbol ...)': If fail
16188 to see how the order between symbols could be relevant!
16189
78af9bbc
AD
161902001-12-10 Akim Demaille <akim@epita.fr>
16191
16192 * src/getargs.h: Don't declare `spec_name_prefix' and
16193 `spec_file_prefix', declared by src/files.h.
16194 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16195 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16196 * src/output.c (prepare): Adjust.
16197 * src/reader.c (symbols_output): Likewise.
16198 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16199
bdef2a41
AD
162002001-12-10 Akim Demaille <akim@epita.fr>
16201
16202 * src/muscle_tab.c (muscle_init): NULL is a better default than
16203 `"0"'.
16204
3735969c
AD
162052001-12-10 Akim Demaille <akim@epita.fr>
16206
16207 * src/reader.c (reader): Calling symbols_output once is enough.
16208
49701457
AD
162092001-12-10 Akim Demaille <akim@epita.fr>
16210
16211 Now that states have a complete set of members, the linked list of
16212 reductions is useless: just fill directly the state's reductions
16213 member.
16214
16215 * src/state.h (struct reductions): Remove member `number' and
16216 `next'.
16217 * src/LR0.c (first_reduction, last_reduction): Remove.
16218 (save_reductions): Don't link the new reductions, store them in
16219 this_state.
16220 * src/lalr.c (set_state_table): No need to attach reductions to
16221 states, it's already done.
16222 * src/output.c (output_actions): No longer free the shifts, then
16223 the reductions, then the states: free all the states and their
16224 members.
16225
0edad749
AD
162262001-12-10 Akim Demaille <akim@epita.fr>
16227
16228 * src/options.c (OPTN, DRTV, BOTH): New.
16229 (option_table): Use them.
16230
0edad749
AD
16231 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16232 the job of system.h.
16233 * src/options.c: Don't include stdio.h and xalloc.h for the same
16234 reasons.
16235
5449dd0f
AD
162362001-12-10 Akim Demaille <akim@epita.fr>
16237
16238 * src/output.c (output, prepare): Make sure the values of the
16239 muscles `action' and `prologue' are 0-terminated.
16240
a870c567
AD
162412001-12-10 Akim Demaille <akim@epita.fr>
16242
16243 Clean up GCC warnings.
16244
16245 * src/reader.c (copy_action): `buf' is not used.
16246 (parse_skel_decl): Be static.
16247 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16248 * src/options.h (create_long_option_table): Have a real prototype.
16249 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16250 (hash_delete_at): Return const void *.
16251 Adjust casts to preserve the const.
16252
80df8768
AD
162532001-12-10 Akim Demaille <akim@epita.fr>
16254
16255 * configure.in: Require 2.52g.
16256 M4 is not needed, but AUTOM4TE is.
16257 * m4/m4.m4: Remove.
16258 * tests/Makefile.am: Adjust.
16259
f693ad14
AD
162602001-12-10 Akim Demaille <akim@epita.fr>
16261
16262 One structure for states is enough, even though theoretically
16263 there are LR(0) states and LALR(1) states.
16264
16265 * src/lalr.h (state_t): Remove.
16266 (state_table): Be state_t **, not state_t *.
16267 * src/state.h (core, CORE_ALLOC): Rename as...
16268 (state_t, STATE_ALLOC): this.
16269 Add the LALR(1) members: shifts, reductions, errs.
16270 * src/LR0.c (state_table): Rename as...
16271 (state_hash): this, to avoid name clashes with the global
16272 `state_table'.
16273 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16274 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16275
74ffbcb6
AD
162762001-12-10 Akim Demaille <akim@epita.fr>
16277
16278 Bison dumps core on bash.y.
16279 Reported by Pascal Bart.
16280
16281 * src/warshall.c (bitmatrix_print): New.
16282 (TC): Use it.
ba0fe3c7 16283 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
16284 j must be the outer loop.
16285 * tests/regression.at (Broken Closure): New.
16286
07708e19
AD
162872001-12-05 Akim Demaille <akim@epita.fr>
16288
16289 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16290 its argument.
ba1ecc07 16291 Reported by Peter Hamorsky.
07708e19 16292
92b16366
AD
162932001-12-05 Akim Demaille <akim@epita.fr>
16294
16295 * src/conflicts.c (err_table): Remove.
16296 (resolve_sr_conflict): Adjust.
16297 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16298 Rename as...
16299 (state_t.reductions, state_t.shifts): this.
16300
076ab033
AD
163012001-12-05 Akim Demaille <akim@epita.fr>
16302
16303 * src/reduce.c (reduce_grammar_tables): No longer disable the
16304 removal of useless rules via CPP but via `if (0)', so that the
16305 compiler still check the code is valid.
16306 For instance, it should have noticed `rline' no longer exists: use
16307 the `line' member of rule_t.
16308 * src/gram.c (dummy, rline): Remove, unused.
16309
3843c413
AD
163102001-12-05 Akim Demaille <akim@epita.fr>
16311
16312 * src/output.c (pack_vector): Use assert, not berror.
16313 * src/main.c (berror): Remove, unused.
16314
43168960
AD
163152001-12-05 Akim Demaille <akim@epita.fr>
16316
16317 New experimental feature: if --verbose --trace output all the
16318 items of a state, not only its kernel.
16319
16320 * src/print.c (print_core): If `trace_flag', then invoke closure
16321 before outputting the items of the state (print_core is no longer
16322 a correct name them).
16323 (print_results): Invoke new_closure/free_closure if needed.
16324
b2872512
AD
163252001-12-05 Akim Demaille <akim@epita.fr>
16326
16327 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16328 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16329 (nitemset): for consistency with the rest of the project.
16330
23cbcc6c
AD
163312001-12-05 Akim Demaille <akim@epita.fr>
16332
16333 * src/closure.c (print_closure): Improve.
16334 (closure): Use it for printing input and output.
16335
03ec521c
AD
163362001-12-05 Akim Demaille <akim@epita.fr>
16337
16338 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16339 indexed by nonterminals.
16340
3a7456dd
AD
163412001-12-05 Akim Demaille <akim@epita.fr>
16342
16343 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16344 what it was!).
16345 * src/warshall.h: Remove accidental duplication of the content.
16346
1cbcf2e7
AD
163472001-12-05 Akim Demaille <akim@epita.fr>
16348
16349 * src/closure.c (set_fderives): De-obfuscate.
16350
84182270
AD
163512001-12-05 Akim Demaille <akim@epita.fr>
16352
16353 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16354
3f6f053c
AD
163552001-12-05 Akim Demaille <akim@epita.fr>
16356
16357 * src/closure.c (set_firsts): De-obfuscate.
16358
7a5350ba
AD
163592001-12-05 Akim Demaille <akim@epita.fr>
16360
16361 * src/output.c (action_row): De-obfuscate
16362 using the good o' techniques: arrays not pointers, variable
16363 locality, BITISSET, RESETBIT etc.
16364
d954473d
AD
163652001-12-05 Akim Demaille <akim@epita.fr>
16366
16367 Pessimize the code to simplify it: from now on, all the states
16368 have a valid SHIFTS, which NSHIFTS is possibly 0.
16369
16370 * src/LR0.c (shifts_new): Be global and move to..
16371 * src/state.c, src/state.h: here.
16372 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16373 * src/print_graph: Adjust.
16374
9839bbe5
AD
163752001-12-05 Akim Demaille <akim@epita.fr>
16376
16377 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16378 * src/conflicts.c: Use it.
16379 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16380 incorrectly ``simplified''.
16381
9f136c07
AD
163822001-12-05 Akim Demaille <akim@epita.fr>
16383
16384 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16385 using the good o' techniques: arrays not pointers, variable
16386 locality, BITISSET, RESETBIT etc.
16387
b608206e
AD
163882001-12-05 Akim Demaille <akim@epita.fr>
16389
16390 * src/state.h (SHIFT_SYMBOL): New.
16391 * src/conflicts.c: Use it to deobfuscate.
16392
52afa962
AD
163932001-12-05 Akim Demaille <akim@epita.fr>
16394
16395 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16396 (print_reductions): De-obfuscate using the good o' techniques:
16397 arrays not pointers, variable locality, BITISSET.
16398
e74dc321
AD
163992001-12-05 Akim Demaille <akim@epita.fr>
16400
16401 * src/conflicts.c (print_reductions): Arrays, not pointers.
16402 Use BITISSET.
16403
768fca83
AD
164042001-12-05 Akim Demaille <akim@epita.fr>
16405
16406 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16407
a17e599f
AD
164082001-12-05 Akim Demaille <akim@epita.fr>
16409
16410 * src/conflicts.c (print_reductions): Improve variable locality.
16411
a04bc341
AD
164122001-12-05 Akim Demaille <akim@epita.fr>
16413
16414 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16415
c8ea038e
AD
164162001-12-05 Akim Demaille <akim@epita.fr>
16417
16418 * src/conflicts.c (print_reductions): Improve variable locality.
16419
aa2aab3c
AD
164202001-12-05 Akim Demaille <akim@epita.fr>
16421
16422 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16423 * src/lalr.c: Use them.
16424
b178c8cc
AD
164252001-12-05 Akim Demaille <akim@epita.fr>
16426
16427 * src/LR0.c (augment_automaton): Formatting changes.
16428 Better variable locality.
16429
f67d13aa
AD
164302001-12-05 Akim Demaille <akim@epita.fr>
16431
16432 * src/lalr.c (matrix_print): New.
16433 (transpose): Use it.
16434 Use arrays instead of pointers.
16435
c2713865
AD
164362001-12-05 Akim Demaille <akim@epita.fr>
16437
16438 * src/lalr.c (maxrhs): Move to...
16439 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16440 * src/lalr.c (build_relations): Adjust.
16441
9887c18a
AD
164422001-12-05 Akim Demaille <akim@epita.fr>
16443
16444 * src/lalr.c (transpose): Free the memory allocated to the
16445 argument, as it is replaced by the results by the unique caller.
16446 (build_relations): Merely invoke transpose: it handles the memory
16447 deallocation.
16448 Improve variable locality.
16449 Avoid variables used as mere abbreviations.
16450 (compute_lookaheads): Use arrays instead of pointers.
16451
4d4f699c
AD
164522001-12-05 Akim Demaille <akim@epita.fr>
16453
16454 * src/lalr.c (initialize_F): Improve variable locality.
16455 Avoid variables used as mere abbreviations.
16456
80a69750
AD
164572001-12-05 Akim Demaille <akim@epita.fr>
16458
16459 * src/derives.c (print_derives): Display the ruleno.
16460 * src/lalr.c (initialize_F, transpose): Better variable locality
16461 to improve readability.
16462 Avoid variables used as mere abbreviations.
16463
fe961097
AD
164642001-12-05 Akim Demaille <akim@epita.fr>
16465
16466 * src/lalr.c (traverse): Use arrays instead of pointers.
16467
e3e4e814
AD
164682001-12-05 Akim Demaille <akim@epita.fr>
16469
16470 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16471 the handling of squeue.
16472 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16473
630e182b
AD
164742001-12-05 Akim Demaille <akim@epita.fr>
16475
16476 Because useless nonterminals are now kept alive (instead of being
16477 `destroyed'), we now sometimes examine them, and store information
16478 related to them. Hence we need to know their number, and adjust
16479 memory allocations.
16480
16481 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16482 static.
16483 * src/LR0.c (allocate_itemsets): The memory allocated to
16484 `symbol_count' was used for two different purpose: once to count
16485 the number of occurrences of each symbol, and later reassigned to
16486 `shift_symbol', containing the symbol that can be shifted from a
16487 given state.
16488 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16489 only, and...
16490 (new_itemsets): Allocate `shift_symbol' here.
16491 (allocate_itemsets): symbol_count includes useless nonterminals.
16492 Make room for them.
16493 (free_storage): Use `free', not `XFREE', for pointers that cannot
16494 be null.
16495
81b51460
AD
164962001-12-05 Akim Demaille <akim@epita.fr>
16497
16498 * src/nullable.c (set_nullable): Deobfuscate the handling of
16499 ritem.
16500 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16501
3067fbef
AD
165022001-12-05 Akim Demaille <akim@epita.fr>
16503
16504 * src/gram.c, src/gram.h (ritem_print): New.
16505 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16506 (This useless function was defined only to work around VMS linkers
16507 that can't handle compilation units with variables only).
16508 * src/reduce.c (dump_grammar): Use it to trace the construction of
16509 ritem.
16510
c2bea5f9
PE
165112001-12-04 Paul Eggert <eggert@twinsun.com>
16512
7d27c823
PE
16513 * src/bison.simple (union yyalloc): Change member names
16514 to be the same as the stack names.
16515 (yyparse): yyptr is now union yyalloc *, not char *.
16516 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16517 and may generate better code on some machines.
c2bea5f9
PE
16518 (yystpcpy): Use prototype if __STDC__ is defined, not just
16519 if __cplusplus is defined.
35687a9d 16520
2c8a9dfa
AD
165212001-11-30 Akim Demaille <akim@epita.fr>
16522
16523 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16524 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16525 Gettext doesn't compile cleanly, and dies with -Werror.
16526 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16527 Include WARNING_CFLAGS here.
16528 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16529 before being defined.
16530
f4e421e6
AD
165312001-11-27 Paul Eggert <eggert@twinsun.com>
16532
16533 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16534 First arg is int, not unsigned.
16535 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16536 (SIZE_MAX, UINT_MAX): New macros.
16537 (quotearg_n_options): Abort if N is negative.
16538 Avoid overflow check on hosts where size_t is 64 bits and int
16539 is 32 bits, as overflow is impossible there.
16540 Fix off-by-one typo that caused unnecessary reallocation.
16541
7093d0f5
AD
165422001-11-29 Paul Eggert <eggert@twinsun.com>
16543
16544 Name space cleanup in generated parser.
16545
16546 * doc/bison.texinfo (Bison Parser): Discuss system headers
16547 and their effect on the user name space.
16548
16549 * src/bison.simple:
16550 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16551 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16552 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16553
16554 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16555 on user names when possible.
16556
16557 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16558 Simplify test for whather <alloca.h> exists.
16559
16560 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16561
16562 (<stdio.h>): Include if YYDEBUG.
16563
16564 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16565 ! defined (yyoverflow) && ! defined (yymemcpy).
16566
16567 (yymemcpy, yyparse): Rename local variables as needed so that
16568 they all begin with 'yy'.
16569
16570 (yystrlen, yystpcpy): New functions.
16571
16572 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16573 All uses changed.
16574
16575 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16576 instead of relying on string.h functions. Use YYSTACK_ALLOC
16577 and YYSTACK_FREE instead of malloc and free.
16578
fd51e5ff
AD
165792001-11-30 Akim Demaille <akim@epita.fr>
16580
16581 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16582 before their first uses.
16583 (YYBISON, YYPURE): Move to the top of the output.
16584
7d13ff5f
AD
165852001-11-30 Akim Demaille <akim@epita.fr>
16586
16587 * tests/reduce.at (Useless Nonterminals): Fix.
16588
892a3995
AD
165892001-11-30 Akim Demaille <akim@epita.fr>
16590
16591 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16592 if body instead of `;' to pacify GCC's warnings.
16593
68f1e3ed
AD
165942001-11-30 Akim Demaille <akim@epita.fr>
16595
16596 Instead of mapping the LHS of unused rules to -1, keep the LHS
16597 valid, but flag the rules as invalid.
16598
16599 * src/gram.h (rule_t): `useful' is a new member.
16600 * src/print.c (print_grammar): Adjust.
16601 * src/derives.c (set_derives): Likewise.
16602 * src/reader.c (packgram, reduce_output): Likewise.
16603 * src/reduce.c (reduce_grammar_tables): Likewise.
16604 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16605
d2d1b42b
AD
166062001-11-30 Akim Demaille <akim@epita.fr>
16607
16608 * src/reduce.c (reduce_output): Formatting changes.
16609 * src/print.c (print_results, print_grammar): Likewise.
16610 * tests/regression.at (Rule Line Numbers)
16611 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16612
760b53a8
AD
166132001-11-30 Akim Demaille <akim@epita.fr>
16614
16615 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16616 useless nonterminals, move them at the end of the symbol arrays.
16617 (reduce_output): Adjust.
16618 * tests/reduce.at (Useless Nonterminals): Adjust.
16619
00238958
AD
166202001-11-30 Akim Demaille <akim@epita.fr>
16621
16622 * src/reduce.c: Various comment/formatting changes.
16623 (nonterminals_reduce): New, extracted from...
16624 (reduce_grammar_tables): here.
16625 (reduce_grammar): Call nonterminals_reduce.
16626
396452de
PE
166272001-11-29 Paul Eggert <eggert@twinsun.com>
16628
16629 * src/bison.simple (YYSTACK_REALLOC): Remove.
16630 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16631 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16632 New macros.
16633 (union yyalloc): New type.
16634 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16635 an arbitrary restriction on hosts where size_t is wider than int.
16636
16637 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16638 a parser stack overflow. Allocate just one block of memory for all
16639 three stacks, instead of allocating three blocks; this typically is
16640 faster and reduces fragmentation.
16641
16642 Do not limit the number of items in the stack to a value that fits
16643 in 'int', as this is an arbitrary limit on hosts with 64-bit
16644 size_t and 32-bit int.
16645
147e184c
MA
166462001-11-29 Marc Autret <autret_m@epita.fr>
16647
16648 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16649 of defining YYERROR_VERBOSE.
16650 [AT_DATA]: $4 is now out of C declarations in the prologue.
16651
426cf563
MA
166522001-11-28 Marc Autret <autret_m@epita.fr>
16653
16654 * src/reader.c (parse_dquoted_param): New.
16655 (parse_skel_decl): Use it.
16656 * src/lex.h: Add its prototype.
16657 * src/lex.c (literalchar): Become not static.
16658
c7925b99
MA
166592001-11-28 Marc Autret <autret_m@epita.fr>
16660
16661 * src/output.h: And put its extern declaration here.
16662 * src/output.c (error_verbose): Define here.
16663 (prepare): Echo name modification.
16664 * src/getargs.h: Clean its extern declaration.
16665 * src/getargs.c (error_verbose_flag): Remove.
16666 (getargs): Remove case 'e'.
16667 * src/options.c (option_table): 'error-verbose' is now seen as simple
16668 percent option.
16669 Include output.h.
16670
16671 * src/reader.c (read_declarations): Remove case tok_include.
16672 (parse_include_decl): Remove.
16673 * src/lex.h (token_t): Remove tok_include.
16674 * src/options.c (option_table): 'include' is now a simple command line
16675 option.
16676
5b5d1929
MA
166772001-11-28 Marc Autret <autret_m@epita.fr>
16678
16679 * src/bison.simple: Adjust muscle names.
16680 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16681 * src/output.c (prepare): s/_/-/ for the muscles names.
16682 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16683
8850be4b
MA
166842001-11-28 Marc Autret <autret_m@epita.fr>
16685
16686 * src/bison.simple: Fix debug.
16687 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16688
4a38e613
AD
166892001-11-28 Akim Demaille <akim@epita.fr>
16690
16691 * src/LR0.c (shifts_new): New.
16692 (save_shifts, insert_start_shift, augment_automaton): Use it.
16693
4b35e1c1
AD
166942001-11-28 Akim Demaille <akim@epita.fr>
16695
16696 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16697 keep ruleno only.
16698
d2b04478
AD
166992001-11-28 Akim Demaille <akim@epita.fr>
16700
16701 * src/closure.c (closure): Instead of looping over word in array
16702 then bits in words, loop over bits in array.
16703
2c4c30aa
AD
167042001-11-28 Akim Demaille <akim@epita.fr>
16705
16706 * src/closure.c (closure): No longer optimize the special case
16707 where all the bits of `ruleset[r]' are set to 0, to make the code
16708 clearer.
16709
576890b7
AD
167102001-11-28 Akim Demaille <akim@epita.fr>
16711
16712 * src/closure.c (closure): `r' and `c' are new variables, used to
16713 de-obfuscate accesses to RULESET and CORE.
16714
cb487d7d
AD
167152001-11-28 Akim Demaille <akim@epita.fr>
16716
16717 * src/reduce.c (reduce_print): Use ngettext.
16718 (dump_grammar): Improve the trace accuracy.
16719
6013d43f
AD
167202001-11-28 Akim Demaille <akim@epita.fr>
16721
16722 * src/reduce.c (dump_grammar): Don't translate trace messages.
16723
cb4956ee
AD
167242001-11-28 Akim Demaille <akim@epita.fr>
16725
16726 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16727 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16728 as all tags are free'ed afterwards.
16729 From Enrico Scholz.
16730
648185ab
PE
167312001-11-27 Paul Eggert <eggert@twinsun.com>
16732
16733 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16734 use alloca when we didn't want to, and vice versa.
16735
68254a03
MA
167362001-11-27 Marc Autret <autret_m@epita.fr>
16737
9113b58f
AD
16738 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16739 initialization.
68254a03
MA
16740 * src/output.c (prepare): Remove its update.
16741
04d843a2
MA
167422001-11-27 Marc Autret <autret_m@epita.fr>
16743
16744 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16745 Use %error-verbose.
16746
d2079671 167472001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
16748
16749 * src/bison.simple: Remove YYERROR_VERBOSE using.
16750 Use %%error_verbose.
16751 (yyparse): Likewise.
16752 * src/output.c (prepare): Give its final value.
16753 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16754 * src/getargs.h: Add its extern declaration.
16755 * src/getargs.c (error_verbose_flag): New int.
16756 (getargs): Update to catch new case.
16757 * src/options.c (option_table): 'error-verbose' is a new option.
16758 (shortopts): Update.
16759
e0327bc8
AD
167602001-11-27 Akim Demaille <akim@epita.fr>
16761
16762 * src/system.h: Use intl/libgettext.h.
16763 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16764
000f1a3c
AD
167652001-11-27 Akim Demaille <akim@epita.fr>
16766
16767 * tests/torture.at (Exploding the Stack Size with Malloc):
16768 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16769
26cfe0be
AD
167702001-11-27 Akim Demaille <akim@epita.fr>
16771
16772 * src/files.c: Include error.h.
16773 Reported by Hans Aberg.
16774
f6bd5427
MA
167752001-11-26 Marc Autret <autret_m@epita.fr>
16776
d2079671 16777 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
16778 (read_declarations): Add case tok_include.
16779 * src/getargs.h (include): Add its extern definition.
16780 * src/getargs.c (include): New const char *.
16781 (getargs): Add case '-I'.
16782 * src/options.c (option_table): Add include as command line and
16783 percent option.
16784 * src/lex.h (token_t): Add tok_include.
16785
2ca209c1
AD
167862001-11-26 Akim Demaille <akim@epita.fr>
16787
16788 * src/reader.c (readgram): Make sure rules for mid-rule actions
16789 have a lineno equal to that of their host rule.
16790 Reported by Hans Aberg.
16791 * tests/regression.at (Rule Line Numbers): New.
16792
0e41b407
AD
167932001-11-26 Akim Demaille <akim@epita.fr>
16794
16795 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16796 size_ts.
16797
167982001-11-26 Akim Demaille <akim@epita.fr>
16799
16800 * src/complain.c, src/complain.h (error): Remove, provided by
16801 lib/error.[ch].
16802
e0c40012
AD
168032001-11-26 Akim Demaille <akim@epita.fr>
16804
16805 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16806 issue an error message.
16807 * tests/regression.at (Invalid %directive): New.
16808 Reported by Hans Aberg.
16809
5e147124
AD
168102001-11-26 Akim Demaille <akim@epita.fr>
16811
16812 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16813 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16814
a034c8b8
AD
168152001-11-26 Akim Demaille <akim@epita.fr>
16816
16817 * src/conflicts.c (conflicts_print): Don't complain at all when
16818 there are no reduce/reduce conflicts, and as many shift/reduce
16819 conflicts as expected.
16820 * tests/regression.at (%expect right): Adjust.
16821
c64a20f3
AD
168222001-11-23 Akim Demaille <akim@epita.fr>
16823
16824 * lib/alloca.c: Update, from fileutils.
16825
5b0d29bb
AD
168262001-11-23 Akim Demaille <akim@epita.fr>
16827
16828 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16829
722c4bfe
AD
168302001-11-23 Akim Demaille <akim@epita.fr>
16831
16832 * src/system.h: Include alloca.h.
16833 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16834
6255b435
AD
168352001-11-23 Akim Demaille <akim@epita.fr>
16836
16837 * src/print_graph.c (print_actions): Remove `rule', unused.
16838 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16839 pacify GCC's signed < unsigned warnings.
16840 * src/closure.c (itemsetsize): Likewise.
16841 * src/reader.c (symbol_list_new): Static.
16842
b29b2ed5
AD
168432001-11-23 Akim Demaille <akim@epita.fr>
16844
16845 Attaching lineno to buckets is stupid, since only one copy of each
16846 symbol is kept, only the line of the first occurrence is kept too.
16847
16848 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16849 * src/reader.c (rline_allocated): Remove, unused.
16850 (symbol_list): Have a `line' member.
16851 (symbol_list_new): New.
16852 (readgram): Use it.
16853 * src/print.c (print_grammar): Output the rule line numbers.
16854 * tests/regression.at (Solved SR Conflicts)
16855 (Unresolved SR Conflicts): Adjust.
16856 Reported by Hans Aberg.
16857
a81b1d4a
MA
168582001-11-22 Marc Autret <autret_m@epita.fr>
16859
16860 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16861
c1ecb3c1
MA
168622001-11-22 Marc Autret <autret_m@epita.fr>
16863
16864 * src/muscle_tab.c (muscle_init): Remove initialization of
16865 skeleton muscle.
16866 * src/output.c (output_master_parser): Do it here.
16867
fbe01355
AD
168682001-11-20 Akim Demaille <akim@epita.fr>
16869
16870 * po/sv.po: New.
16871 * configure.in (ALL_LINGUAS): Adjust.
16872 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16873 longer contains strings to translate.
16874
81e895c0
AD
168752001-11-19 Akim Demaille <akim@epita.fr>
16876
16877 * src/conflicts.c (conflicts_print): Add a missing \n.
16878
6bb1878b
AD
168792001-11-19 Akim Demaille <akim@epita.fr>
16880
16881 * src/nullable.c (nullable_print): New.
16882 (set_nullable): Call it when tracing.
16883 Better locality of variables.
16884
d9ec2d07
AD
168852001-11-19 Akim Demaille <akim@epita.fr>
16886
16887 * src/print.c (print_actions): Better locality of variables.
16888
720e5c1b
AD
168892001-11-19 Akim Demaille <akim@epita.fr>
16890
16891 * src/derives.c (print_derives): Fix and enrich.
16892 * src/closure.c (print_fderives): Likewise.
16893
fb908786
AD
168942001-11-19 Akim Demaille <akim@epita.fr>
16895
16896 * src/closure.c (itemsetend): Remove, replaced with...
16897 (itemsetsize): new.
16898
125ecb56
AD
168992001-11-19 Akim Demaille <akim@epita.fr>
16900
16901 * src/LR0.c (kernel_end): Remove, replaced with...
16902 (kernel_size): new.
16903
d8cf039f
AD
169042001-11-19 Akim Demaille <akim@epita.fr>
16905
16906 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16907 to clarify.
16908
7bec0760
AD
169092001-11-19 Akim Demaille <akim@epita.fr>
16910
16911 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16912
c87d4863
AD
169132001-11-19 Akim Demaille <akim@epita.fr>
16914
16915 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16916 trace messages.
16917 * src/LR0.c: Likewise.
16918 (allocate_itemsets): Use arrays instead of pointers to clarify.
16919
9bfe901c
AD
169202001-11-19 Akim Demaille <akim@epita.fr>
16921
16922 * src/getargs.c (statistics_flag): Replace with...
16923 (trace_flag): New.
16924 (longopts): Accept --trace instead of --statistics.
16925 * src/getargs.h, src/options.c: Adjust.
16926 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16927 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16928
97db7bd4
AD
169292001-11-19 Akim Demaille <akim@epita.fr>
16930
cc72668c 16931 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
16932 pointers to clarify the code.
16933 (save_reductions, save_shifts): Factor common parts of alternatives.
16934
2c5f66ed
AD
169352001-11-19 Akim Demaille <akim@epita.fr>
16936
16937 * src/LR0.c (new_state, get_state): Complete TRACE code.
16938 * src/closure.c: Include `reader.h' to get `tags', needed by the
16939 trace code.
16940 Rename the conditional DEBUG as TRACE.
16941 Output consistently TRACEs to stderr, not stdout.
16942 * src/derives.c: Likewise.
16943 * src/reduce.c: (inaccessable_symbols): Using if is better style
16944 than goto.
16945 Use `#if TRACE' instead of `#if 0' for tracing code.
16946
300f275f
AD
169472001-11-19 Akim Demaille <akim@epita.fr>
16948
16949 * src/system.h (LIST_FREE, shortcpy): New.
16950 * src/LR0.c: Use them.
16951 * src/output.c (free_itemsets, free_reductions, free_shifts):
16952 Remove, replaced by LIST_FREE.
16953
f59c437a
AD
169542001-11-19 Akim Demaille <akim@epita.fr>
16955
16956 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16957 (REDUCTIONS_ALLOC): New.
16958 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16959 allocation.
16960
6986fd9e
AD
169612001-11-19 Akim Demaille <akim@epita.fr>
16962
16963 * src/LR0.c (new_state): Complete trace code.
16964 * src/nullable.c (set_nullable): Don't translate traces.
16965
4bc30f78
AD
169662001-11-19 Akim Demaille <akim@epita.fr>
16967
16968 * src/print_graph.c (print_core): Better locality of variables.
16969 * src/print.c (print_core): Likewise.
16970
08a946e0
AD
169712001-11-19 Akim Demaille <akim@epita.fr>
16972
16973 * src/vcg.c: You do the output, so you are responsible of the
16974 handling of VCG syntax, in particular: use quotearg.
16975 * src/print_graph.c: Don't.
16976 (print_actions): Don't output the actions as part of the nodes,
16977 since that's the job of the edges.
16978 (print_state): Don't output by hand: fill the node description,
9bfe901c 16979 and ask for its output.
08a946e0 16980
f0473484
AD
169812001-11-19 Akim Demaille <akim@epita.fr>
16982
cc72668c
AD
16983 * src/bison.simple (yyparse): When verbosely reporting an error,
16984 no longer put additional quotes around token names.
f0473484
AD
16985 * tests/calc.at: Adjust.
16986
e41dc700
AD
169872001-11-19 Akim Demaille <akim@epita.fr>
16988
16989 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16990 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16991 * src/output.c: Adjust.
16992
652a871c
AD
169932001-11-19 Akim Demaille <akim@epita.fr>
16994
16995 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16996 (rule_t): this.
16997 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16998
b2ed6e58
AD
169992001-11-19 Akim Demaille <akim@epita.fr>
17000
17001 * src/gram.h (rule_t): New.
17002 (rule_table): New.
17003 (rrhs, rlhs): Remove, part of state_t.
17004 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17005 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17006 * src/reader.c, src/reduce.c: Adjust.
17007
edad7067
AD
170082001-11-19 Akim Demaille <akim@epita.fr>
17009
17010 * src/reader.c (symbols_output): New, extracted from...
17011 (packsymbols): Here.
17012 (reader): Call it.
17013
3feec034
AD
170142001-11-19 Akim Demaille <akim@epita.fr>
17015
17016 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17017 (maxrhs): this new function.
17018
ddcd5fdf
AD
170192001-11-19 Akim Demaille <akim@epita.fr>
17020
cc72668c 17021 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
17022 Adjust.
17023
bb527fc2
AD
170242001-11-19 Akim Demaille <akim@epita.fr>
17025
cc72668c 17026 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
17027 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17028 * src/lalr.c: Adjust.
17029
a845a697
AD
170302001-11-19 Akim Demaille <akim@epita.fr>
17031
17032 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17033 (set_state_table): handle the `lookaheads' members.
17034
f004bf6a
AD
170352001-11-19 Akim Demaille <akim@epita.fr>
17036
cc72668c
AD
17037 * src/lalr.h (lookaheads): Removed array, whose contents is now
17038 a member of...
f004bf6a
AD
17039 (state_t): this structure.
17040 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17041 Adjust.
17042
de326cc0
AD
170432001-11-19 Akim Demaille <akim@epita.fr>
17044
cc72668c
AD
17045 * src/lalr.h (consistent): Removed array, whose contents is now
17046 a member of...
de326cc0
AD
17047 (state_t): this structure.
17048 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17049 Adjust.
17050
90b4416b
AD
170512001-11-19 Akim Demaille <akim@epita.fr>
17052
cc72668c
AD
17053 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17054 contents are now members of...
90b4416b
AD
17055 (state_t): this structure.
17056 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17057 Adjust.
17058
9703cc49
AD
170592001-11-19 Akim Demaille <akim@epita.fr>
17060
17061 * src/lalr.h (state_t): New.
17062 (state_table): Be a state_t * instead of a core **.
17063 (accessing_symbol): Remove, part of state_t.
17064 * src/lalr.c: Adjust.
17065 (set_accessing_symbol): Merge into...
17066 (set_state_table): this.
17067 * src/print_graph.c, src/conflicts.c: Adjust.
17068
d803322e
AD
170692001-11-14 Akim Demaille <akim@epita.fr>
17070
17071 * tests/calc.at, tests/output.at, tests/regression.at,
17072 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17073 now the tests are run in private dirs, therefore AC_CLEANUP and
17074 family can be simplified to 0-ary.
17075 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17076 use abs. path to find config.h.
17077 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17078 stderr, there can be way too much random noise.
17079 Instead pass -Werror to GCC and rely on the exit status.
17080 Reported by Wolfram Wagner.
17081
3d76b07d
AD
170822001-11-14 Akim Demaille <akim@epita.fr>
17083
17084 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17085 defined only if yyoverflow is defined, to avoid `warning: unused
17086 variable `yyvs1''.
17087 Reported by The Test Suite.
17088
09b503c8
AD
170892001-11-14 Akim Demaille <akim@epita.fr>
17090
17091 * src/print.c: Include reduce.h.
17092 Reported by Hans Aberg.
17093
170942001-11-14 Akim Demaille <akim@epita.fr>
17095
17096 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17097 Revert a previous patch: these are really const.
17098 * src/conflicts.c (conflict_report): Additional useless pair of
17099 braces to pacify GCC's warnings for `if () if () {} else {}'.
17100 * src/lex.c (parse_percent_token): Replace equal_offset with
17101 arg_offset.
17102 arg is const.
17103 Be sure to strdup `arg' when used, since there is no reason for
17104 token_buffer not to change.
17105
0f37a994
AD
171062001-11-14 Akim Demaille <akim@epita.fr>
17107
17108 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17109 definition.
17110 * src/main.c (main): Use them.
17111 Suggested by Hans Aberg.
17112
d39d93b8
AD
171132001-11-12 Akim Demaille <akim@epita.fr>
17114
17115 * src/system.h (ngettext): Now that we use ngettext, be sure to
17116 provide a default definition when NLS are not used.
17117
9edcd895
AD
171182001-11-12 Akim Demaille <akim@epita.fr>
17119
17120 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17121 Use @kbd to denote user input.
17122 (Language and Grammar): ANSIfy the example.
17123 Adjust its layout for info/notinfo.
17124 (Location Tracking Calc): Output error messages to stderr.
17125 Output locations in a more GNUtically correct way.
17126 Fix a couple of Englishos.
17127 Adjust @group/@end group pairs.
17128
7da99ede
AD
171292001-11-12 Akim Demaille <akim@epita.fr>
17130
e3aa65c5 17131 %expect was not functioning at all.
7da99ede
AD
17132
17133 * src/conflicts.c (expected_conflicts): Set to -1.
17134 (conflict_report): Use ngettext.
17135 (conflicts_print): Check %expect and make its violation an error.
17136 * doc/bison.texinfo (Expect Decl): Adjust.
17137 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17138 * tests/regression.at (%expect not enough, %expect right)
17139 (%expect too much): New.
17140
ba9dda1a
AD
171412001-11-12 Akim Demaille <akim@epita.fr>
17142
17143 * tests/regression.at (Conflicts): Rename as...
17144 (Unresolved SR Conflicts): this.
17145 (Solved SR Conflicts): New.
17146
337c5bd1
AD
171472001-11-12 Akim Demaille <akim@epita.fr>
17148
17149 * src/reduce.c (print_results): Rename as...
17150 (reduce_output): This.
17151 Output to OUT, passed as argument, instead of output_obstack.
17152 (dump_grammar): Likewise.
17153 (reduce_free): New.
17154 Also free V1.
17155 (reduce_grammar): No longer call reduce_output, since...
17156 * src/print.c (print_results): do it.
17157 * src/main.c (main): Call reduce_free;
17158
c73a41af
AD
171592001-11-12 Akim Demaille <akim@epita.fr>
17160
17161 * src/conflicts.c (print_reductions): Accept OUT as argument.
17162 Output to it, not to output_obstack.
17163 * src/print.c (print_actions): Adjust.
17164
0df87bb6
AD
171652001-11-12 Akim Demaille <akim@epita.fr>
17166
17167 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17168 the result instead of using...
17169 (src_total, rrc_total, src_count, rrc_count): Remove.
17170 (any_conflicts): Remove.
17171 (print_conflicts): Split into...
17172 (conflicts_print, conflicts_output): New.
17173 * src/conflicts.h: Adjust.
17174 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 17175 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
17176 * tests/regression.at (Conflicts): New.
17177 Reported by Tom Lane.
17178
e4d3d4de
AD
171792001-11-12 Akim Demaille <akim@epita.fr>
17180
17181 * tests/regression.at (Invalid input): Remove, duplicate with
17182 ``Invalid input: 1''.
17183
6d7d248e
AD
171842001-11-12 Akim Demaille <akim@epita.fr>
17185
17186 * tests/torture.at (AT_DATA_STACK_TORTURE)
17187 (Exploding the Stack Size with Alloca)
17188 (Exploding the Stack Size with Malloc): New.
17189
e9e4c321
AD
171902001-11-12 Akim Demaille <akim@epita.fr>
17191
17192 * src/bison.simple (YYSTACK_REALLOC): New.
17193 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 17194 Reported by Per Allansson.
e9e4c321 17195
5f7e0832
AD
171962001-11-12 Pascal Bart <pascal.bart@epita.fr>
17197
17198 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17199 define CPP macro, which substitute YYSTYPE by yystype.
17200 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17201 with yyltype/YYLTYPE. This allows inclusion of the generated
17202 header within the parser if the compiler, such as GGC, accepts
17203 multiple equivalent #defines.
17204 From Akim.
17205
e3f1699f
AD
172062001-11-05 Akim Demaille <akim@epita.fr>
17207
17208 * src/reader.c (symbols_output): New, extracted from...
17209 (packsymbols): here.
17210 (reader): Adjust.
17211
65be0866
AD
172122001-11-05 Akim Demaille <akim@epita.fr>
17213
17214 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17215
e4d910bf
AD
172162001-11-05 Akim Demaille <akim@epita.fr>
17217
17218 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17219 pattern.
17220
951366c1
AD
172212001-11-05 Akim Demaille <akim@epita.fr>
17222
17223 * src/options.h (struct option_table_struct): set_flags is void*.
17224 * src/options.c (longopts): Support `--output' and `%output'.
17225 (usage): Adjust.
17226 * src/lex.h (tok_setopt): Remove, replaced with...
17227 (tok_intopt, tok_stropt): these new guys.
17228 * src/lex.c (getopt.h): Not needed.
17229 (token_buffer, unlexed_token_buffer): Not const.
17230 (percent_table): Promote `-' over `_' in directive names.
17231 Active `%name-prefix', `file-prefix', and `output'.
17232 (parse_percent_token): Accept possible arguments to directives.
17233 Promote `-' over `_' in directive names.
17234
d8988b2f
AD
172352001-11-04 Akim Demaille <akim@epita.fr>
17236
17237 * doc/bison.texinfo (Decl Summary): Split the list into
17238 `directives for grammars' and `directives for bison'.
17239 Sort'em.
17240 Add description of `%name-prefix', `file-prefix', and `output'.
17241 Promote `-' over `_' in directive names.
17242 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17243 Simplify the description of `--name-prefix'.
17244 Promote `-' over `_' in directive names.
17245 Promote `--output' over `--output-file'.
17246 Fix the description of `--defines'.
17247 * tests/output.at: Exercise %file-prefix and %output.
17248
6468d18e
AD
172492001-11-02 Akim Demaille <akim@epita.fr>
17250
17251 * doc/refcard.tex: Update.
17252
6b7e85b9
AD
172532001-11-02 Akim Demaille <akim@epita.fr>
17254
17255 * src/symtab.h (SUNDEF): New.
17256 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17257 stand for `uninitialized', instead of 0.
17258 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17259 * src/lex.c (lex): Adjust.
17260
17261 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17262 Number it 0.
17263 Let yylex return it instead of a plain 0.
17264 Reported by Dick Streefland.
17265
cd5aafcf
AD
172662001-11-02 Akim Demaille <akim@epita.fr>
17267
17268 * tests/regression.at (Mixing %token styles): New test.
17269
037ca2f1
AD
172702001-11-02 Akim Demaille <akim@epita.fr>
17271
17272 * src/reader.c (parse_thong_decl): Formatting changes.
17273 (token_translations_init): New, extracted from...
17274 (packsymbols): Here.
17275 Adjust.
17276
270a173c
AD
172772001-11-01 Akim Demaille <akim@epita.fr>
17278
17279 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17280 Check that `9foo.y' produces correct cpp guards.
17281 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17282 guards.
17283 Reported by Wwp.
17284
561f9a30
AD
172852001-11-01 Akim Demaille <akim@epita.fr>
17286
17287 * tests/regression.at (Invalid input: 2): New.
17288 * src/lex.c (unlexed_token_buffer): New.
17289 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17290 too.
17291 Reported by Wwp.
17292
f987e9d2
AD
172932001-11-01 Akim Demaille <akim@epita.fr>
17294
17295 * tests/calc.at: Catch up with 1.30.
17296 * configure.in: Bump to 1.49a.
17297 Adjust to newer Autotest.
17298
0846f581
PB
172992001-10-19 Pascal Bart <pascal.bart@epita.fr>
17300
17301 * src/conflicts.c: Move global variables rrc_total and src_total ...
17302 (print_conflicts): here.
17303 * src/output.c (output): Free global variable user_toknums.
17304 * src/lex.c (token_obstack): Become static.
17305
3c1a79b3
AD
173062001-10-18 Akim Demaille <akim@epita.fr>
17307
17308 * tests/atlocal.in (GCC): Add.
17309 * tests/calc.at: s/m4_match/m4_bmatch/.
17310 s/m4_patsubst/m4_bpatsubst/.
17311 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17312 * configure.in: AC_SUBST(GCC).
17313
5d52e7d0
MA
173142001-10-14 Marc Autret <autret_m@epita.fr>
17315
17316 * src/options.c (create_long_option_table): Fix.
17317
631aa1d3
AD
173182001-10-10 Akim Demaille <akim@epita.fr>
17319
17320 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17321
f6ec6d13
AD
173222001-10-04 Akim Demaille <akim@epita.fr>
17323
17324 * src/reader.c (parse_union_decl): Push the caracters in
17325 union_obstack, not attrs_obstack.
17326
342b8b6e
AD
173272001-10-04 Akim Demaille <akim@epita.fr>
17328
17329 Merge in the branch 1.29.
17330
17331 * src/reader.c (packsymbols): Use a temporary obstack for
17332 `%%tokendef', since output_stack is already used elsewhere.
17333
17334 2001-10-02 Akim Demaille <akim@epita.fr>
17335
17336 Bump 1.29d.
17337
17338 2001-10-02 Akim Demaille <akim@epita.fr>
17339
17340 Version 1.29c.
17341
17342 2001-10-02 Akim Demaille <akim@epita.fr>
17343
17344 * tests/regression.at (Invalid CPP headers): New.
17345 From Alexander Belopolsky.
17346 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17347
17348 2001-10-02 Akim Demaille <akim@epita.fr>
17349
17350 * tests/regression.at (Invalid input): New.
17351 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17352 Reported by Shura.
17353
17354 2001-10-02 Akim Demaille <akim@epita.fr>
17355
17356 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17357
17358 2001-10-02 Akim Demaille <akim@epita.fr>
17359
17360 * src/output.c (output_parser): Assert `skeleton'.
17361 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17362 systems.
17363 From Shura.
17364
17365 2001-10-01 Marc Autret <autret_m@epita.fr>
17366
17367 * src/lex.h: Echo modifications.
17368 * src/lex.c (unlex): Parameter is now token_t.
17369 From Hans Aberg.
17370
17371 2001-10-01 Marc Autret <autret_m@epita.fr>
17372
17373 * src/main.c: Include lex.h.
17374 From Hans Aberg.
17375
17376 2001-09-29 Akim Demaille <akim@epita.fr>
17377
17378 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17379
17380 2001-09-28 Akim Demaille <akim@epita.fr>
17381
17382 * tests/testsuite.at: Update to newer Autotest.
17383 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17384
17385 2001-09-27 Akim Demaille <akim@epita.fr>
17386
17387 Position independent wrapper.
17388
17389 * tests/bison: Remove.
17390 * tests/bison.in: New.
17391 * configure.in: Adjust.
17392
17393 2001-09-27 Paul Eggert <eggert@twinsun.com>
17394
17395 Port quotearg fixes from tar 1.13.24.
17396
17397 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17398 tm to be declared.
17399 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17400 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17401
17402 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17403 * m4/mbrtowc.m4: New file.
17404 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17405 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17406
17407 2001-09-27 Akim Demaille <akim@epita.fr>
17408
17409 Bump to 1.29c.
17410
17411 2001-09-27 Akim Demaille <akim@epita.fr>
17412
17413 Version 1.29b.
17414
17415 2001-09-25 Akim Demaille <akim@epita.fr>
17416
17417 * src/system.h: Include `xalloc.h'.
17418 Remove it from the C files.
17419 * src/files.c (output_files): Free the obstacks.
17420 * src/lex.c (init_lex): Rename as...
17421 (lex_init): this.
17422 (lex_free): New.
17423 * src/main.c (main): Use it.
17424
17425 2001-09-24 Marc Autret <autret_m@epita.fr>
17426
17427 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17428 to output informations in fout (FILE*).
17429 (open_graph, close_graph): Likewise.
17430 (output_graph, output_edge, output_node): Likewise.
17431 * src/vcg.h: Update function prototypes.
17432 * src/print_graph.c (print_graph): Open output graph file.
17433 (print_actions): Adjust.
17434 * src/files.h: Remove extern declaration.
17435 * src/files.c: Remove graph_obstack declaration.
17436 (open_files): Remove graph_obstack initialization.
17437 (output_files): Remove graph_obstack saving.
17438
17439 2001-09-24 Marc Autret <autret_m@epita.fr>
17440
17441 * src/files.c (compute_output_file_names): Fix.
17442
17443 2001-09-24 Marc Autret <autret_m@epita.fr>,
17444 Akim Demaille <akim@epita.fr>
17445
17446 * src/reader.c (reader): Remove call to free_symtab ().
17447 * src/main.c (main): Call it here.
17448 Include symtab.h.
17449 * src/conflicts.c (initialize_conflicts): Rename as...
17450 (solve_conflicts): this.
17451 * src/print.c (print_core, print_actions, print_state)
17452 (print_grammar): Dump to a file instead a `output_obstack'.
17453 (print_results): Dump `output_obstack', and then proceed with the
17454 FILE *.
17455 * src/files.c (compute_output_file_names, close_files): New.
17456 (output_files): Adjust.
17457 * src/main.c (main): Adjust.
17458
17459 2001-09-23 Marc Autret <autret_m@epita.fr>
17460
17461 * src/files.c (compute_header_macro): Computes header macro name
17462 from spec_defines_file when given.
17463
17464 2001-09-23 Marc Autret <autret_m@epita.fr>
17465
17466 * src/files.c (output_files): Add default extensions.
17467
17468 2001-09-22 Akim Demaille <akim@epita.fr>
17469
17470 * src/conflicts.c (finalize_conflicts): Rename as...
17471 (free_conflicts): this.
17472
17473 2001-09-22 Akim Demaille <akim@epita.fr>
17474
17475 * src/gram.c (gram_free): Rename back as...
17476 (dummy): this.
17477 (output_token_translations): Free `token_translations'.
17478 * src/symtab.c (free_symtab): Free the tag field.
17479
17480 2001-09-22 Akim Demaille <akim@epita.fr>
17481
17482 Remove `translations' as it is always set to true.
17483
17484 * src/gram.h: Adjust.
17485 * src/reader.c (packsymbols, parse_token_decl): Adjust
17486 * src/print.c (print_grammar): Adjust.
17487 * src/output.c (output_token_translations): Adjust.
17488 * src/lex.c (lex): Adjust.
17489 * src/gram.c: Be sure the set pointers to NULL.
17490 (dummy): Rename as...
17491 (gram_free): this.
17492
17493 2001-09-22 Akim Demaille <akim@epita.fr>
17494
17495 * configure.in: Invoke AM_LIB_DMALLOC.
17496 * src/system.h: Use dmalloc.
17497 * src/LR0.c: Be sure to have pointers initialized to NULL.
17498 (allocate_itemsets): Allocate kernel_items only if needed.
17499
17500 2001-09-22 Akim Demaille <akim@epita.fr>
17501
17502 * configure.in: Bump to 1.29b.
17503 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17504 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17505 need xmalloc.c in calc.y.
17506 From Pascal Bart.
17507
17508 2001-09-21 Akim Demaille <akim@epita.fr>
17509
17510 Version 1.29a.
17511 * Makefile.maint, config/config.guess, config/config.sub,
17512 * config/missing: Update from masters.
17513 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17514 upon package.m4.
17515 * configure.in (ALL_LINGUAS): Add `tr'.
17516
17517 2001-09-21 Akim Demaille <akim@epita.fr>
17518
17519 * tests/Makefile.am (package.m4): Move to...
17520 ($(srcdir)/$(TESTSUITE)): here.
17521
17522 2001-09-20 Akim Demaille <akim@epita.fr>
17523
17524 * src/complain.c: No longer try to be standalone: use system.h.
17525 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17526 * src/complain.h: Likewise.
17527 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17528 Remove the unused variable `n'.
17529 From Albert Chin-A-Young.
17530
17531 2001-09-18 Marc Autret <autret_m@epita.fr>
17532
17533 * doc/bison.1: Update.
17534 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17535 descriptions.
17536 (Option Cross Key): Update.
17537 Add --graph.
17538
17539 2001-09-18 Marc Autret <autret_m@epita.fr>
17540
17541 * tests/regression.at: New test (comment in %union).
17542
17543 2001-09-18 Marc Autret <autret_m@epita.fr>
17544
17545 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17546 do that.
17547 Reported by Keith Browne.
17548
17549 2001-09-18 Marc Autret <autret_m@epita.fr>
17550
17551 * tests/output.at: Add tests for --defines and --graph.
17552
17553 2001-09-18 Marc Autret <autret_m@epita.fr>
17554
17555 * tests/output.at: Removes tests of %{header,src}_extension features.
17556
17557 2001-09-18 Akim Demaille <akim@epita.fr>
17558
17559 * tests/Makefile.am (package.m4): New.
17560 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17561 (_AT_CHECK_CALC_ERROR): Likewise.
17562 Factor the `, ' part of verbose error messages.
17563
17564 2001-09-18 Marc Autret <autret_m@epita.fr>
17565
17566 * src/getargs.c (longopts): Declare --defines and --graph as options
17567 with optional arguments.
17568 * src/files.h: Add extern declarations.
17569 * src/files.c (spec_graph_file, spec_defines_file): New.
17570 (output_files): Update.
17571 Remove CPP-outed code.
17572
17573 2001-09-18 Marc Autret <autret_m@epita.fr>
17574
17575 Turn off %{source,header}_extension feature.
17576
17577 * src/files.c (compute_exts_from_gf): Update.
17578 (compute_exts_from_src): Update.
17579 (output_files): CPP-out useless code.
17580 * src/files.h: Remove {header,source}_extension extern declarations.
17581 * src/reader.c (parse_dquoted_param): CPP-out.
17582 (parse_header_extension_decl): Remove.
17583 (parse_source_extension_decl): Remove.
17584 (read_declarations): Remove cases tok_{hdrext,srcext}.
17585 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17586 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17587
17588 2001-09-10 Akim Demaille <akim@epita.fr>
17589
17590 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17591 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17592 (AT_CHECK_OUTPUT): this.
17593 Merely check ls' exit status, its output is useless.
17594
17595 2001-09-10 Akim Demaille <akim@epita.fr>
17596
17597 * tests/calc.at: Use m4_match.
17598 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17599
17600 2001-09-10 Marc Autret <autret_m@epita.fr>,
17601 Akim Demaille <akim@epita.fr>
17602
17603 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17604 enum color_e.
17605 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17606 to `normal'.
17607 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17608 * src/lex.h: Adjust prototype.
17609 (token_t): Add `tok_undef'.
17610 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17611 (parse_percent_token): Now returns token_t.
17612 Add default statement in switch.
17613 (lex): Separate `c' as an input variable, from the token_t result
17614 part.
17615 (unlexed): Is a token_t.
17616
17617 2001-09-10 Akim Demaille <akim@epita.fr>
17618
17619 * configure.in: Bump to 1.29a.
17620
17621 2001-09-07 Akim Demaille <akim@epita.fr>
17622
17623 Version 1.29.
17624
17625 2001-08-30 Akim Demaille <akim@epita.fr>
17626
17627 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17628 * m4/atconfig.m4: Remove.
17629 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17630 * tests/bison: New.
17631 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17632 m4_if, m4_patsubst, and m4_regexp.
17633 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17634 `input' file instead of echo.
17635
17636 2001-08-29 Akim Demaille <akim@epita.fr>
17637
17638 Bump to 1.28e.
17639
17640 2001-08-29 Akim Demaille <akim@epita.fr>
17641
17642 Version 1.28d.
17643
17644 2001-08-29 Paul Eggert <eggert@twinsun.com>
17645
17646 * src/bison.simple (yyparse): Don't take the address of an
17647 item before the start of an array, as that doesn't conform to
17648 the C Standard.
17649
17650 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17651
17652 * doc/bison.texinfo (Location Tracking Calc): New node.
17653
17654 2001-08-29 Paul Eggert <eggert@twinsun.com>
17655
17656 * src/output.c (output): Do not define const, as this now
17657 causes more problems than it cures.
17658
17659 2001-08-29 Akim Demaille <akim@epita.fr>
17660
17661 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17662 the nodes.
17663 Be sure to tag the `detailmenu'.
17664
17665 2001-08-29 Akim Demaille <akim@epita.fr>
17666
17667 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17668 download in a tmp dir.
17669
17670 2001-08-28 Marc Autret <autret_m@epita.fr>
17671
17672 * config/depcomp: New file.
17673
17674 2001-08-28 Marc Autret <autret_m@epita.fr>
17675
17676 * doc/bison.1 (mandoc): Adjust.
17677 From Juan Manuel Guerrero.
17678
17679 2001-08-28 Marc Autret <autret_m@epita.fr>
17680
17681 * src/print_graph.c (print_state): Fix.
17682
17683 2001-08-27 Marc Autret <autret_m@epita.fr>
17684
17685 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17686 char * members.
17687 Echo modifications to the functions prototypes.
17688 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17689
17690 2001-08-27 Marc Autret <autret_m@epita.fr>
17691
17692 * src/vcg.c: Include `xalloc.h'.
17693 (add_colorentry): New.
17694 (add_classname): New.
17695 (add_infoname): New.
17696 * src/vcg.h: Add new prototypes.
17697
17698 2001-08-27 Akim Demaille <akim@epita.fr>
17699
17700 * Makefile.maint: Sync. again with CVS Autoconf.
17701
17702 2001-08-27 Akim Demaille <akim@epita.fr>
17703
17704 * Makefile.maint: Formatting changes.
17705 (po-update, cvs-update, update): New targets.
17706 (AMTAR): Remove.
17707
17708 2001-08-27 Akim Demaille <akim@epita.fr>
17709
17710 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17711 * Makefile.maint: Sync. with CVS Autoconf.
17712
17713 2001-08-27 Marc Autret <autret_m@epita.fr>
17714
17715 * src/vcg.h (struct infoname_s): New.
17716 (struct colorentry_s): New.
17717 (graph_s): New fields {vertical,horizontal}_order in structure.
17718 Add `infoname' field.
17719 Add `colorentry' field;
17720 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17721 (G_HORIZONTAL_ORDER): New.
17722 (G_INFONAME): New.
17723 (G_COLORENTRY): New.
17724 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17725 Add output of `infoname'.
17726 Add output of `colorentry'.
17727
17728 2001-08-27 Marc Autret <autret_m@epita.fr>
17729
17730 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17731 This one shadowed a global parameter.
17732
17733 2001-08-24 Marc Autret <autret_m@epita.fr>
17734
17735 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17736 instead of `unsigned'.
17737 (print_state): Do not call obstack_object_size () in obstack_grow ()
17738 to avoid macro variables shadowing.
17739
17740 2001-08-23 Marc Autret <autret_m@epita.fr>
17741
17742 * src/lex.c (percent_table): Typo: s/naem/name/.
17743 Add graph option.
17744 Normalize new options declarations.
17745
17746 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17747
17748 * tests/suite.at: Exercise %header_extension and %source_extension.
17749
17750 2001-08-16 Marc Autret <autret_m@epita.fr>
17751
17752 * src/reader.c (parse_dquoted_param): New.
17753 (parse_header_extension_decl): Use it.
17754 (parse_source_extension_decl): Likewise.
17755
17756 2001-08-16 Marc Autret <autret_m@epita.fr>
17757
17758 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17759 (get_xxxx_str): Use assert () instead of complain ().
17760 Remove return invokations in default cases.
17761 (get_decision_str): Modify default behaviour. Remove second argument.
17762 Echo modifications on calls.
17763 (output_graph): Fix.
17764
17765 2001-08-16 Marc Autret <autret_m@epita.fr>
17766
17767 * src/getargs.c (usage): Update with ``-g, --graph''.
17768
17769 2001-08-16 Marc Autret <autret_m@epita.fr>
17770
17771 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17772 (Option Cross Key): Likewise.
17773 * doc/bison.1: Update.
17774
1c8c2190
PB
177752001-09-25 Pascal Bart <pascal.bart@epita.fr>
17776
17777 * src/output.c (output_master_parser): Don't finish action_obstack.
17778 (output_parser): Don't care about the muscle action, here.
17779 (prepare): Copy the action_obstack in the action muscle.
17780 (output): Free action_obstack.
17781
180d45ba
PB
177822001-09-23 Pascal Bart <pascal.bart@epita.fr>
17783
17784 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17785 will contain `%union' declaration.
17786 (parse_union_decl): Delete #line directive output.
17787 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17788 informations about %union.
17789 (parse_union_decl): Copy the union_obstack in the muscle stype.
17790 * src/bison.simple: Add new #line directive.
17791 Add typdef %%stype YYSTYPE.
17792
c51d1a19
PB
177932001-09-23 Pascal Bart <pascal.bart@epita.fr>
17794
17795 * src/bison.simple: Add new `#line' directive.
17796
6f9344da
PB
177972001-09-22 Pascal Bart <pascal.bart@epita.fr>
17798
17799 * src/bison.simple: New `#line' directive.
17800 * src/output.c (output_parser): Support new dynamic muscle input_line.
17801
652def80
MA
178022001-09-22 Marc Autret <autret_m@epita.fr>
17803
17804 * src/output.c (output_master_parser): New.
17805 (output_parser): Be more re-entrant.
17806
25b222fa
MA
178072001-09-21 Marc Autret <autret_m@epita.fr>
17808
17809 * src/reader.c (copy_definition, parse_union_decl): Update and use
17810 `linef' muscle.
17811 (copy_action): Likewise.
17812 Use obstack_1grow ().
17813 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17814
6bc35ae5
MA
178152001-09-21 Marc Autret <autret_m@epita.fr>
17816
17817 * src/options.c (option_table): Adjust.
17818 * src/lex.c (parse_percent_token): Fix.
17819
c0629aa1
PB
178202001-09-20 Pascal Bart <pascal.bart@epita.fr>
17821
17822 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 17823
82b6d266
PB
178242001-09-20 Pascal Bart <pascal.bart@epita.fr>
17825
17826 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17827 is now an option_table_struct*.
17828 (option_strcmp): New function option_strcmp.
17829 (parse_percent_token): Call option_strcmp.
17830 * src/getargs.c (xalloc.h, options.h): Include it.
17831 (getargs): Call create_long_option_table.
17832 (getargs): Free longopts at the end of the function.
17833 (shortopts): Move in options.c.
17834 * src/options.c (create_long_option_table): New function. Convert
17835 information from option_table to option structure.
17836 * src/reader.c (options.h): Include it.
17837
17838 * src/Makefile.am: Adjust.
17839 * src/options.c (option_table): Create from longopts and percent_table.
17840 * src/getargs.c (longopts): Delete.
17841 * src/lex.c (struct percent_table_struct): Delete.
17842 (percent_table): Delete.
17843 (options.h): Include it.
17844 * src/options.c: Create.
17845 * src/options.h: Create.
17846 Declare enum opt_access_e.
17847 Define struct option_table_struct.
17848
75f5aaea
MA
178492001-09-20 Marc Autret <autret_m@epita.fr>
17850
17851 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17852 sections of Bison.
17853
f508cb0a
PB
178542001-09-19 Pascal Bart <pascal.bart@epita.fr>
17855
17856 * src/bison.simple: s/%%filename/%%skeleton.
17857 * src/muscle_tab.c (getargs.h): Include it.
17858 (muscle_init): Insert new muscle skeleton.
17859
13105fc1
PB
178602001-09-18 Pascal Bart <pascal.bart@epita.fr>
17861
17862 * src/output.c (output_parser): Delete unused variable actions_dumped.
17863
b0c4483e
PB
178642001-09-07 Pascal Bart <pascal.bart@epita.fr>
17865
17866 * src/output.c (output): Delete call to reader_output_yylsp.
17867 * src/reader.c (reader): Likewise.
ba0fe3c7 17868 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 17869
11d82f03
MA
178702001-09-02 Marc Autret <autret_m@epita.fr>
17871
17872 * src/reader.c: Include muscle_tab.h.
17873 (parse_union_decl): Update.
17874 (parse_macro_decl): Rename parse_muscle_decl.
17875 Update to use renamed functions and variable.
17876 (read_declarations, copy_action, read_additionnal_code, : Updated
17877 with correct variables and functions names.
17878 (packsymbols, reader): Likewise.
342b8b6e 17879
11d82f03 17880 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 17881
11d82f03
MA
17882 * src/output.c: Include muscle_tab.h
17883 In all functions using macro_insert, change by using muscle_insert ().
17884 (macro_obstack): Rename muscle_obstack.
17885 Echo modifications in the whole file.
17886 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17887 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17888 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17889
17890 * src/muscle_tab.h: Update double inclusion macros.
17891 (macro_entry_s): Rename muscle_entry_s.
17892 Update prototypes.
342b8b6e 17893
11d82f03
MA
17894 * src/muscle_tab.c: Include muscle_tab.h.
17895 Rename macro_tabble to muscle_table.
17896 (mhash1, mhash2, mcmp): Use muscle_entry.
17897 (macro_init): Rename muscle_init. Update.
17898 (macro_insert): Rename muscle_insert. Update.
17899 (macro_find): Rename muscle_find. Update.
17900
17901 * src/main.c: Include muscle_tab.h.
17902 (main): Call muscle_init ().
17903 * src/Makefile.am (bison_SOURCES): Echo modifications.
17904
93a37297
MA
179052001-09-02 Marc Autret <autret_m@epita.fr>
17906
f753cd62 17907 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 17908
f753cd62
MA
17909 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17910
179112001-09-02 Marc Autret <autret_m@epita.fr>
17912
17913 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 17914
682d48cd
PB
179152001-09-01 Pascal Bart <pascal.bart@epita.fr>
17916
342b8b6e 17917 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
17918 filename.
17919
087c8fda
MA
179202001-09-01 Marc Autret <autret_m@epita.fr>
17921
17922 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17923 to an explicit value to activate the feature. We do it here.
17924
dda680cb
PB
179252001-08-31 Pascal Bart <pascal.bart@epita.fr>
17926
17927 * src/output.c (prepare): Delete the `filename' muscule insertion.
17928 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17929 (parse_union_decl): Likewise.
17930 * src/macrotab.c (macro_init): Initialize filename by infile.
17931
9e644e64
MA
179322001-08-31 Marc Autret <autret_m@epita.fr>
17933
17934 * src/bison.simple (YYLSP_NEEDED): New definition.
17935 * src/output.c (prepare): Add macro insertion of `locations_flag'
17936
17da6427
PB
179372001-08-31 Pascal Bart <pascal.bart@epita.fr>
17938
17939 * src/output.c (prepare): Delete insertion of previous muscles,
17940 and insert the `prefix' muscles.
17941 * src/macrotab.c (macro_init): Likewise.
17942 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 17943 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
17944 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17945 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 17946 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
17947 name_prefix.
17948
e8cb70b9
PB
179492001-08-31 Pascal Bart <pascal.bart@epita.fr>
17950
17951 * src/main.c (main): Standardize.
17952 * src/output.c (output_table_data, output_parser): Likewise.
17953 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17954
63c2d5de
MA
179552001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17956
342b8b6e 17957 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
17958 %%epilogue.
17959 * src/output.c (output): Rename %%declarations to %%prologue.
17960 * src/bison.simple: Echo modifications.
342b8b6e 17961
d8cb5183
MA
179622001-08-31 Marc Autret <autret_m@epita.fr>
17963
17964 * src/reader.c (readgram): CleanUp.
17965 (output_token_defines): Likewise.
17966 (packsymbols): Likewise.
17967 (reader): Likewise.
17968 * src/output.c (output): CPP-out useless code.
17969
6c686258
PB
179702001-08-31 Pascal Bart <pascal.bart@epita.fr>
17971
342b8b6e 17972 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
17973 output_trailers and output_headers.
17974 * src/output.h: Remove obsolete functions prototypes of output_headers
17975 and output_trailers.
17976
8f451ef7
PB
179772001-08-30 Pascal Bart <pascal.bart@epita.fr>
17978
17979 * src/main.c: Include macrotab.h.
342b8b6e 17980 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
17981 Adjust functions prototypes.
17982 * src/macrotab.c (macro_insert): Constify key and value.
17983 (macro_find): Constify key.
17984 (macro_insert): Include 'xalloc.h'
17985 (macro_insert): Use XMALLOC.
17986 (macro_find): Constify return value.
17987 * src/output.c (output_table_data): Rename table to table_data.
17988 (output_parser): Constify macro_key, macro_value.
17989
997b6fd0 179902001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
17991
17992 * src/reader.c (parse_skel_decl): New.
342b8b6e 17993 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
17994 * src/lex.h (token_t): New token `tok_skel'.
17995 * src/lex.c (percent_table): Add skeleton option entry.
17996 Standardize.
17997
ff48177d
MA
179982001-08-29 Marc Autret <autret_m@epita.fr>
17999
18000 * src/bison.simple: Add %%user_code directive at the end.
18001 * src/reader.c (read_additionnal_code): New.
18002 (reader): Use it.
18003 * src/output.c (output_program): Remove.
18004 (output): Update.
18005
b33160bf
MA
180062001-08-28 Marc Autret <autret_m@epita.fr>
18007
18008 * src/output.c (output_actions): Clean up.
4e5caae2 18009 (output_gram): CPP-out useless code.
b33160bf
MA
18010 * src/reader.c (reader): Clean up, CPP-out useless code.
18011
d1a2daf7
PB
180122001-08-28 Pascal Bart <pascal.bart@epita.fr>
18013
342b8b6e 18014 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 18015 directive.
d1a2daf7
PB
18016 * src/bison.simple: Add `%%definitions'.
18017
2b763dfe
MA
180182001-08-28 Marc Autret <autret_m@epita.fr>
18019
18020 * config/depcomp: New file.
18021
f1a87ef6
PE
180222001-08-27 Paul Eggert <eggert@twinsun.com>
18023
18024 * src/bison.simple (yyparse): Don't take the address of an
18025 item before the start of an array, as that doesn't conform to
18026 the C Standard.
18027
82e236e2
RA
180282001-08-27 Robert Anisko <robert.anisko@epita.fr>
18029
f1a87ef6 18030 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
18031 obstack. It was done too late here.
18032
18033 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18034 completely wrong.
18035 (reader): Initialize the macro obstack here, since we need it to grow
18036 '%define' directives.
18037
18038 * src/reader.h: Declare the macro obstack as extern.
18039
b0cfa28a
RA
180402001-08-27 Robert Anisko <robert.anisko@epita.fr>
18041
18042 * src/output.c (output_parser): Fix. Store single '%' characters in
18043 the output obstack instead of throwing them away.
18044
6fc74234
AD
180452001-08-27 Akim Demaille <akim@epita.fr>
18046
18047 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18048
9c76d118
RA
180492001-08-25 Robert Anisko <robert.anisko@epita.fr>
18050
18051 * lib/Makefile.am: Adjust.
18052
a8289c62
RA
180532001-08-25 Robert Anisko <robert.anisko@epita.fr>
18054
18055 * src/bison.simple: Update and add '%%' directives.
18056
b6610515
RA
180572001-08-25 Robert Anisko <robert.anisko@epita.fr>
18058
18059 * src/reader.c (reader): Remove calls to 'output_headers' and
18060 'output_trailers'. Remove some C output.
18061 (readgram): Disable a piece of code that was writing a default
18062 definition for 'YYSTYPE'.
18063 (reader_output_yylsp): Remove.
18064 (packsymbols): Output token defintions to a macro.
18065 (copy_definition): Disable C output.
6fc74234 18066
b6610515
RA
18067 * src/reader.c (parse_macro_decl): New function used to parse macro
18068 declarations.
18069 (copy_string2): Put the body of copy_string into this new function.
18070 Add a parameter to let the caller choose whether he wants to copy the
18071 string delimiters or not.
18072 (copy_string): Be a simple call to copy_string2 with the last argument
18073 bound to true.
18074 (read_declarations): Add case for macro definition.
18075 (copy_identifier): New.
6fc74234 18076 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
18077 rather than lex.
18078
26f609ff
RA
180792001-08-25 Robert Anisko <robert.anisko@epita.fr>
18080
18081 * src/output.c (prepare): Add prefixed names.
18082 (output_parser): Output semantic actions.
18083 (output_parser): Fix bug on '%%line' directives.
6fc74234 18084
26f609ff
RA
18085 * src/output.c (output_headers): Remove. The C code printed by this
18086 function should now be in the skeletons.
18087 (output_trailers): Remove.
18088 (output): Disable call to 'reader_output_yylsp'.
18089 (output_rule_data): Do not output tables to the table obstack.
18090
18091 * src/output.c: Remove some C dedicated output.
18092 Improve the use of macro and output obstacks.
18093 (output_defines): Remove.
6fc74234 18094
26f609ff
RA
18095 * src/output.c (output_token_translations): Associate 'translate'
18096 table with a macro. No output to the table obstack.
18097 (output_gram): Same for 'rhs' and 'prhs'.
18098 (output_stos): Same for 'stos'.
18099 (output_rule_data): Same for 'r1' and 'r2'.
18100 (token_actions): Same for 'defact'.
18101 (goto_actions): Same for 'defgoto'.
18102 (output_base): Same for 'pact' and 'pgoto'.
18103 (output_table): Same for 'table'.
18104 (output_check): Same for 'check'.
6fc74234 18105
26f609ff
RA
18106 * src/output.c (output_table_data): New function.
18107 (output_short_table): Remove.
18108 (output_short_or_char_table): Remove.
6fc74234 18109
26f609ff
RA
18110 * src/output.c (output_parser): Replace most of the skeleton copy code
18111 with something new. Skeletons are now processed character by character
18112 rather than line by line, and Bison looks for '%%' macros. This is the
18113 first step in making Bison's output process (a lot) more flexible.
18114 (output_parser): Use the macro table.
18115
6f43b113
RA
181162001-08-25 Robert Anisko <robert.anisko@epita.fr>
18117
18118 * src/main.c (main): Initialize the macro table.
18119
dd3127cf
RA
181202001-08-25 Robert Anisko <robert.anisko@epita.fr>
18121
18122 * src/lex.c (percent_table): Add tok_define.
18123 * src/lex.h: Add tok_define.
18124
aa321494
RA
181252001-08-25 Robert Anisko <robert.anisko@epita.fr>
18126
18127 * src/macrotab.c: New file.
18128 * src/macrotab.h: New file.
18129 * src/Makefile.am: Update.
18130
68bd3b6b
RA
181312001-08-25 Robert Anisko <robert.anisko@epita.fr>
18132
18133 * lib/hash.c: New file.
18134 * lib/hash.h: New file.
18135 * lib/Makefile.am: Update.
18136
45f8dd1e
AD
181372001-08-15 Akim Demaille <akim@epita.fr>
18138
18139 Version 1.28c.
18140
40a64a7a 181412001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
18142
18143 * src/reader.c (readgram): Indent output macro YYSTYPE.
18144 (packsymbols): Likewise.
18145 (output_token_defines): Likewise.
18146 * src/files.c: Standardize.
18147 (compute_header_macro): New.
18148 (defines_obstack_save): New. Use compute_header_macro.
18149 (output_files): Update. Use defines_obstack_save.
18150
f9a8293a
AD
181512001-08-15 Akim Demaille <akim@epita.fr>
18152
18153 * doc/bison.texinfo (Table of Symbols): Document
18154 YYSTACK_USE_ALLOCA.
18155
150ca7a7
AD
181562001-08-15 Akim Demaille <akim@epita.fr>
18157
18158 * missing: Update from CVS Automake.
18159 * config/config.guess, config/config.sub, config/texinfo.tex:
18160 Update from gnu.org.
18161
69b5cec4
AD
181622001-08-15 Akim Demaille <akim@epita.fr>
18163
18164 * Makefile.maint: Sync with CVS Autoconf.
18165
f2b5126e
PB
181662001-08-14 Pascal Bart <pascal.bart@epita.fr>
18167
69b5cec4 18168 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
18169 `fdl.texi'.
18170 * doc/fdl.texi: Add to package.
18171
4ecbf796
MA
181722001-08-14 Marc Autret <autret_m@epita.fr>
18173
18174 Turn on %{source,header}_extension features.
18175
69b5cec4 18176 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
18177 source_extension.
18178 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 18179 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
18180 between options.
18181
95fb5662
MA
181822001-08-14 Marc Autret <autret_m@epita.fr>
18183
18184 * src/files.c (compute_base_names): Add extensions computing when
18185 `--file-prefix' used.
18186 Standardize function calls.
18187
78d09da9
MA
181882001-08-13 Marc Autret <autret_m@epita.fr>
18189
69b5cec4 18190 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
18191 defining it (defined but null disables alloca).
18192
5a009f2c
MA
181932001-08-13 Marc Autret <autret_m@epita.fr>
18194
18195 * src/bison.simple (_yy_memcpy): CPP reformat.
18196
1e41465a
PB
181972001-08-13 Pascal Bart <pascal.bart@epita.fr>
18198
18199 * tests/atconfig.in (CPPFLAGS): Fix.
18200
c67a198d
PB
182012001-08-10 Pascal Bart <pascal.bart@epita.fr>
18202
79282c6c 18203 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
18204 `gpl.texi'.
18205 * doc/gpl.texi: Add to package.
18206
09a6de7e
MA
182072001-08-10 Marc Autret <autret_m@epita.fr>
18208
18209 * src/print_graph.h: Fix.
18210 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18211
b77b9ee0
AD
182122001-08-10 Akim Demaille <akim@epita.fr>
18213
18214 * src/system.h: Provide default declarations for stpcpy, strndup,
18215 and strnlen.
18216
3e259915
MA
182172001-08-10 Robert Anisko <anisko_r@epita.fr>
18218
18219 * doc/bison.texinfo (Locations): Update @$ stuff.
18220
ca96bc2d
MA
182212001-08-09 Robert Anisko <anisko_r@epita.fr>
18222
18223 * src/bison.simple (YYLLOC_DEFAULT): Update.
18224 (yyparse): Adjust.
18225
fdc6758b
MA
182262001-08-08 Marc Autret <autret_m@epita.fr>
18227
b77b9ee0 18228 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
18229 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18230 Reported by Fabrice Bauzac.
957d4dbf 18231
600cad3b
MA
182322001-08-08 Marc Autret <autret_m@epita.fr>
18233
18234 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18235 * src/vcg.c (output_node): Fix.
18236 * src/vcg.h: Cleanup.
18237 * src/print_graph.c: Add comments.
b77b9ee0 18238 (node_output_size): New global variable. Simplify the formatting of
600cad3b 18239 the VCG graph output.
b77b9ee0 18240 (print_actions): Unused code is now used. It notifies the final state
600cad3b 18241 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 18242 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
18243 blue.
18244 Get the current node name and node_obstack by argument.
18245 (node_obstack): New variable.
18246 (print_state): Manage node_obstack.
18247 (print_core): Use node_obstack given by argument.
18248 A node is not only computed here but in print_actions also.
18249 (print_graph): CPP out useless code instead of commenting it.
18250
976e528f
AD
182512001-08-07 Pascal Bart <pascal.bart@epita.fr>
18252
18253 * tests/atconfig.in (CPPFLAGS): Fix.
18254
20e8e5ca
AD
182552001-08-07 Akim Demaille <akim@epita.fr>
18256
18257 * src/print_graph.c (quote): New.
18258 (print_core): Use it.
18259
957d4dbf 182602001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 18261
3e3da797
AD
18262 * src/vcg.c (complain.h): Include it.
18263 Unepitaize `return' invocations.
c4b66126 18264 [NDEBUG] (main): Remove.
79282c6c 18265 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
18266 * src/files.c (open_files): Initialize graph_obstack.
18267 * src/print_graph.c (print_actions): CPP out useless code.
18268 (print_core): Don't output the last `\n' in labels.
18269 Use `quote'.
18270 * src/files.c (output_files): Output the VCG file.
18271 * src/main.c (main): Invoke print_graph ();
3e3da797 18272
957d4dbf 182732001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
18274
18275 Automaton VCG graph output.
18276 Using option ``-g'' or long option ``--graph'', you can generate
18277 a gram_filename.vcg file containing a VCG description of the LALR (1)
18278 automaton of your grammar.
18279
18280 * src/main.c: Call to print_graph() function.
18281 * src/getargs.h: Update.
18282 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18283 (graph_flag): New flag.
18284 (longopts): Update.
18285 (getargs): Add case `g'.
18286 * src/files.c (graph_obstack): New obstack struct.
18287 (open_files): Initialize new obstack.
18288 (output_files): Saves graph_obstack if required.
18289 * src/files.h (graph_obstack): New extern declaration.
18290 * src/Makefile.am: Add new source files.
18291
927c1557 182922001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
18293
18294 * src/print_graph.c, src/print_graph.h (graph): New.
18295 * src/vcg.h: New file.
18296 * src/vcg.c: New file, VCG graph handling.
18297
7333d403
AD
182982001-08-06 Marc Autret <autret_m@epita.fr>
18299
18300 Add of %source_extension and %header_extension which specify
18301 the source or/and the header output file extension.
18302
18303 * src/files.c (compute_base_names): Remove initialisation of
18304 src_extension and header_extension.
18305 (compute_exts_from_gf): Update.
18306 (compute_exts_from_src): Update.
18307 (output_files): Update.
18308 * src/reader.c (parse_header_extension_decl): New.
18309 (parse_source_extension_decl): New.
18310 (read_declarations): New case statements for the new tokens.
18311 * src/lex.c (percent_table): Add entries for %source_extension
18312 and %header_extension.
18313 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18314
84163231
AD
183152001-08-06 Marc Autret <autret_m@epita.fr>
18316
18317 * configure.in: Bump to 1.28c.
18318 * doc/bison.texinfo: Texinfo thingies.
18319
8303fc42
AD
183202001-08-04 Pascal Bart <pascal.bart@epita.fr>
18321
18322 * tests/atconfig.in (CPPFLAGS): Add.
18323 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18324
70a84437
AD
183252001-08-03 Akim Demaille <akim@epita.fr>
18326
18327 Version 1.28b.
18328
2ce10144
AD
183292001-08-03 Akim Demaille <akim@epita.fr>
18330
18331 * tests/Makefile.am (check-local): Ship testsuite.
18332 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18333 Include `string.h'.
18334
1e3e4bc1
AD
183352001-08-03 Akim Demaille <akim@epita.fr>
18336
18337 * configure.in: Try using -Wformat when compiling.
18338
42b45b7f
AD
183392001-08-03 Akim Demaille <akim@epita.fr>
18340
18341 * configure.in: Bump to 1.28b.
18342
8f13fe33
AD
183432001-08-03 Akim Demaille <akim@epita.fr>
18344
18345 * src/complain.c: Adjust strerror_r portability issues.
18346
b37ba92c
AD
183472001-08-03 Akim Demaille <akim@epita.fr>
18348
18349 Version 1.28a.
18350
b0ce6046
AD
183512001-08-03 Akim Demaille <akim@epita.fr>
18352
18353 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18354 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18355 * src/getargs.c: Include complain.h.
18356 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18357 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18358
d01c415b
AD
183592001-08-03 Akim Demaille <akim@epita.fr>
18360
18361 * src/reader.c (readgram): Display hidden chars in error messages.
18362
459dd1a6
AD
183632001-08-03 Akim Demaille <akim@epita.fr>
18364
18365 Update to gettext 0.10.39.
18366
53b74c0c
AD
183672001-08-03 Akim Demaille <akim@epita.fr>
18368
18369 * lib/strspn.c: New.
18370
234a3be3
AD
183712001-08-01 Marc Autret <autret_m@epita.fr>
18372
18373 * doc/bison.texinfo: Update.
18374 * doc/bison.1 (mandoc): Update.
18375 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18376 * src/files.c: Support output files extensions computing.
18377 (src_extension): New static variable.
18378 (header_extension): New static variable.
18379 (tr): New function.
18380 (get_extension_index): New function, gets the index of an extension
18381 filename in a string.
18382 (compute_exts_from_gf): New function, computes extensions from the
18383 grammar file extension.
18384 (compute_exts_from_src): New functions, computes extensions from the
18385 C source file extension, file given by ``-o'' option.
18386 (compute_base_names): Update.
18387 (output_files): Update.
18388
847bf1f5
AD
183892001-08-01 Robert Anisko <anisko_r@epita.fr>
18390
d995fee7 18391 * doc/bison.texi: Document @$.
847bf1f5
AD
18392 (Locations): New section.
18393
d074a105
AD
183942001-07-18 Akim Demaille <akim@epita.fr>
18395
18396 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18397 * config/prev-version.txt, config/move-if-change: New.
18398 * Makefile.am: Adjust.
18399
3419715d
AD
184002001-07-08 Pascal Bart <pascal.bart@epita.fr>
18401
18402 * src/bison.simple (yyparse): Suppress warning `comparaison
18403 between signed and unsigned'.
18404
62ab6972
AD
184052001-07-05 Pascal Bart <pascal.bart@epita.fr>
18406
18407 * src/getargs.h (raw_flag): Remove.
18408 * src/getargs.c: Die on `-r'/`--raw'.
18409 * src/lex.c (parse_percent_token): Die on `%raw'.
18410 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18411 * tests/calc.at: Suppress test with option `--raw'.
18412
1e24cc5b
AD
184132001-07-14 Akim Demaille <akim@epita.fr>
18414
18415 * config/: New.
18416 * configure.in: Require Autoconf 2.50.
18417 Update to gettext 0.10.38.
18418
32dfccf8
AD
184192001-03-16 Akim Demaille <akim@epita.fr>
18420
18421 * doc/bison.texinfo: ANSIfy the examples.
18422
cd5bd6ac
AD
184232001-03-16 Akim Demaille <akim@epita.fr>
18424
18425 * getargs.c (skeleton): New variable.
18426 (longopts): --skeleton is a new option.
18427 (shortopts, getargs): -S is a new option.
18428 * getargs.h: Declare skeleton.
18429 * output.c (output_parser): Use it.
18430
5141b016
AD
184312001-03-16 Akim Demaille <akim@epita.fr>
18432
18433 * m4/strerror_r.m4: New.
18434 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18435 * lib/error.h, lib/error.c: Update.
18436
447992b9
AD
184372001-03-16 Akim Demaille <akim@epita.fr>
18438
18439 * src/getargs.c (longopts): Clean up.
18440
274d42ce
AD
184412001-02-21 Akim Demaille <akim@epita.fr>
18442
18443 * src/reader.c (gensym): `gensym_count' is your own.
18444 Use a static buf to create the symbol name, as token_buffer is no
18445 longer a buffer.
18446
22c821f3
AD
184472001-02-08 Akim Demaille <akim@epita.fr>
18448
18449 * src/conflicts.c (conflict_report): Be sure not to append to res
18450 between two calls, which could happen if both first sprintf were
18451 skipped, but not the first cp += strlen.
18452
18569462
AD
184532001-02-08 Akim Demaille <akim@epita.fr>
18454
18455 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18456 New, from fileutils 4.0.37.
18457 * configure.in: Require Autoconf 2.49c. I took some time before
18458 making this decision. This is the only way out for portability
18459 issues in Bison, it would mean way too much duplicate effort to
18460 import in Bison features implemented in 2.49c since 2.13.
18461 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18462
0d8f3c8a
AD
184632001-02-02 Akim Demaille <akim@epita.fr>
18464
18465 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 18466 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 18467
f17bcd1f
AD
184682001-01-19 Akim Demaille <akim@epita.fr>
18469
18470 Get rid of the ad hoc handling of token_buffer in the scanner: use
18471 the obstacks.
18472
18473 * src/lex.c (token_obstack): New.
18474 (init_lex): Initialize it. No longer call...
18475 (grow_token_buffer): this. Remove it.
18476 Adjust all the places which used it to use the obstack.
18477
511e79b3
AD
184782001-01-19 Akim Demaille <akim@epita.fr>
18479
18480 * src/lex.h: Rename all the tokens:
18481 s/\bENDFILE\b/tok_eof/g;
18482 s/\bIDENTIFIER\b/tok_identifier/g;
18483 etc.
18484 Let them be enums, not #define, to ease debugging.
18485 Adjust all the code.
18486
0d6508ef
AD
184872001-01-18 Akim Demaille <akim@epita.fr>
18488
18489 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18490 * src/lex.c (maxtoken, grow_token_buffer): Static.
18491
6deb4447
AD
184922001-01-18 Akim Demaille <akim@epita.fr>
18493
18494 Since we now use obstacks, more % directives can be enabled.
18495
18496 * src/lex.c (percent_table): Also accept `%yacc',
18497 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18498 `%debug'.
18499 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18500 instead of returning a token.
18501 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18502 * src/reader.c (read_declarations): Adjust.
18503 * src/files.c (open_files): Don't call `compute_base_names', don't
18504 compute `attrsfile' since they depend upon data which might be
18505 *in* the input file now.
18506 (output_files): Do it here.
18507 * src/output.c (output_headers): Document the fact that this patch
18508 introduces a guaranteed SEGV for semantic parsers.
18509 * doc/bison.texinfo: Document them.
18510 * tests/suite.at: Exercise these %options.
18511
ff4423cc
AD
185122000-12-20 Akim Demaille <akim@epita.fr>
18513
18514 Also handle the output file (--verbose) with obstacks.
18515
18516 * files.c (foutput): Remove.
18517 (output_obstack): New.
18518 Adjust all dependencies.
18519 * src/conflicts.c: Return a string.
18520 * src/system.h (obstack_grow_string): Rename as...
18521 (obstack_sgrow): this. Be ready to work with non literals.
18522 (obstack_fgrow4): New.
18523
956dba3a
AD
185242000-12-20 Akim Demaille <akim@epita.fr>
18525
18526 * src/files.c (open_files): Fix the computation of short_base_name
18527 in the case of `-o foo.tab.c'.
18528
337bab46
AD
185292000-12-20 Akim Demaille <akim@epita.fr>
18530
18531 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18532 (copy_dollar): Now that everything uses obstacks, get rid of the
18533 FILE * parameters.
18534
5d3214b8
AD
185352000-12-20 Akim Demaille <akim@epita.fr>
18536
18537 * src/files.c (open_files): Actually the `.output' file is based
18538 on the short_base_name, not base_name.
18539 * tests/suite.at (Checking output file names): Adjust.
18540
29092a57
AD
185412000-12-20 Akim Demaille <akim@epita.fr>
18542
18543 * src/bison.s1: Remove, we now use directly...
18544 * src/bison.simple: this.
18545 * src/Makefile.am: Use pkgdata instead of data.
18546
ea5607fd
AD
185472000-12-20 Akim Demaille <akim@epita.fr>
18548
18549 * src/files.c (guard_obstack): New.
18550 (open_files): Initialize it.
18551 (output_files): Dump it...
18552 * src/files.h: Export it.
18553 * src/reader.c (copy_guard): Use it.
18554
27110317
AD
185552000-12-19 Akim Demaille <akim@epita.fr>
18556
18557 * src/files.c (outfile, defsfile, actfile): Removed as global
18558 vars.
18559 (open_files): Don't compute them.
18560 (output_files): Adjust.
18561 (base_name, short_base_name): Be global.
18562 Adjust dependencies.
18563
19c50364
AD
185642000-12-19 Akim Demaille <akim@epita.fr>
18565
18566 * src/files.c (strsuffix): New.
18567 (stringappend): Be just like strcat but allocate.
18568 (base_names): Eve out from open_files.
18569 Try to simplify the rather hairy computation of base_name and
18570 short_base_name.
18571 (open_files): Use it.
18572 * tests/suite.at (Checking output file names): New test.
18573
573c1d9f
AD
185742000-12-19 Akim Demaille <akim@epita.fr>
18575
18576 * src/system.h (obstack_grow_literal_string): Rename as...
18577 (obstack_grow_string): this.
18578 * src/output.c (output_parser): Recognize `%% actions' instead of
18579 `$'.
18580 * src/bison.s1: s/$/%% actions/.
18581 * src/bison.hairy: Likewise.
18582
ef7ddedd
AD
185832000-12-19 Akim Demaille <akim@epita.fr>
18584
18585 * src/output.c (output_parser): Compute the `#line' lines when
18586 there are.
18587 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18588 Suggested by Hans Aberg.
18589
ff61dabd
AD
185902000-12-19 Akim Demaille <akim@epita.fr>
18591
18592 Let the handling of the skeleton files be local to the procedures
18593 that use it.
18594
18595 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18596 longer static.
18597 (fparser, open_extra_files): Remove.
18598 (open_files, output_files): Don't take care of fparser.
18599 * src/files.h: Adjust.
18600 * src/output.c (output_parser): Open and close the file to the
18601 skeleton.
18602 * src/reader.c (read_declarations): When %semantic_parser, open
18603 fguard.
18604
55b96341
AD
186052000-12-19 Akim Demaille <akim@epita.fr>
18606
18607 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18608 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18609
358c15b7
AD
186102000-12-19 Akim Demaille <akim@epita.fr>
18611
18612 * src/files.c (open_files): Yipee! We no longer need all the code
18613 looking for `/tmp' since we have no tmp file.
18614
7de3329e
AD
186152000-12-19 Akim Demaille <akim@epita.fr>
18616
18617 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18618 New macros.
18619 * src/files.c (open_files): Less dependency on MSDOS etc.
18620
3abcd459
AD
186212000-12-14 Akim Demaille <akim@epita.fr>
18622
18623 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18624 Provide a default definition.
18625 Use it when executing the default @ action.
18626 * src/reader.c (reader_output_yylsp): No longer include
18627 `timestamp' and `text' in the default YYLTYPE.
18628
2a91a95e
AD
186292000-12-12 Akim Demaille <akim@epita.fr>
18630
18631 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18632 (copy_guard): Quote the file names.
18633 Reported by Laurent Mascherpa.
18634
14d3eb9b
AD
186352000-12-12 Akim Demaille <akim@epita.fr>
18636
18637 * src/output.c (output_headers, output_program, output): Be sure
18638 to escape special characters when outputting filenames.
18639 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18640 (output_headers): Don't depend on them, Use ACTSTR.
18641
d7045ec6
AD
186422000-11-17 Akim Demaille <akim@epita.fr>
18643
18644 * lib/obstack.h: Formatting changes.
18645 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18646 prevents type checking.
18647 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18648 cast the value to (void *): assigning a `foo *' to a `void *'
18649 variable is valid.
18650 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18651 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18652 append characters.
18653
6fd54b73
AD
186542000-11-17 Akim Demaille <akim@epita.fr>
18655
18656 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18657 as...
18658 (suite.m4, regression.m4, calc.m4): these.
18659 * tests/atgeneral.m4: Update from CVS Autoconf.
18660
4c50eae6
AD
186612000-11-17 Akim Demaille <akim@epita.fr>
18662
18663 * tests/regression.m4 (%union and --defines): New test,
18664 demonstrating a current bug in the obstack implementation.
18665
a35f64ea
AD
186662000-11-17 Akim Demaille <akim@epita.fr>
18667
18668 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18669 macros.
18670 Use them to declare the variables which are global or local to
18671 `yyparse'.
18672
7de23534
AD
186732000-11-17 Akim Demaille <akim@epita.fr>
18674
18675 * acconfig.h: Remove, no longer used.
18676
aa7815f5
AD
186772000-11-07 Akim Demaille <akim@epita.fr>
18678
18679 * src: s/Copyright (C)/Copyright/g.
18680
5af1f549
AD
186812000-11-07 Akim Demaille <akim@epita.fr>
18682
18683 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18684 defining.
18685 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18686
553e2b22
AD
186872000-11-07 Akim Demaille <akim@epita.fr>
18688
18689 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18690 Merge in a single CPP if/else.
18691
8a4f41d6
AD
186922000-11-07 Akim Demaille <akim@epita.fr>
18693
18694 * src/output.c (output): Remove useless variables.
18695 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18696 argument `data' for consistency with the prototypes.
18697 Qualify it `const'.
18698 (obstack_copy, obstack_copy0): Rename the second argument as
18699 `address' for consistency. Qualify it `const'.
18700 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18701 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18702 `const' their input argument (`data' or `address').
18703 Adjust the corresponding macros to include `const' in casts.
18704
095a3fb5
AD
187052000-11-03 Akim Demaille <akim@epita.fr>
18706
18707 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18708 s/PFILE1/BISON_HAIRY/.
18709 Adjust dependencies.
18710
d1cdce7c
AD
187112000-11-03 Akim Demaille <akim@epita.fr>
18712
090c5ebf 18713 For some reason, this was not applied.
d1cdce7c
AD
18714
18715 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18716 `unlink': it's no longer used.
18717
9311529b
AD
187182000-11-03 Akim Demaille <akim@epita.fr>
18719
18720 * src/files.c (skeleton_find): New function, eved out of...
18721 (open_files, open_extra_files): here.
18722
d8880f69
AD
187232000-11-03 Akim Demaille <akim@epita.fr>
18724
18725 Don't use `atexit'.
18726
18727 * src/files.c (obstack_save): New function.
18728 (done): Rename as...
18729 (output_files): this.
18730 Use `obstack_save'.
18731 * src/main.c (main): Don't use `atexit' to register `done', since
18732 it no longer has to remove tmp files, just call `output_files'
18733 when there are no errors.
18734
0dbb648e
AD
187352000-11-02 Akim Demaille <akim@epita.fr>
18736
18737 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18738 `unlink': it's no longer used.
18739 * src/files.h: Formatting changes.
18740
896fe5c1
AD
187412000-11-02 Akim Demaille <akim@epita.fr>
18742
18743 Remove the last uses of mktemp and unlink/delete.
18744
18745 * src/files.c (fdefines, ftable): Removed.
18746 (defines_ostack, table_obstack): New.
18747 Adjust dependencies of the former into uses of the latter.
18748 * src/output.c (output_short_or_char_table, output_short_table):
18749 Convert to using obstacks.
18750 * src/reader.c (copy_comment2): Accept one FILE * and two
18751 obstacks.
18752 (output_token_defines, reader_output_yylsp): Use obstacks.
18753 * src/system.h (obstack_fgrow3): New.
1f65350a 18754 * po/POTFILES.in: Adjust.
896fe5c1 18755
dd60faec
AD
187562000-11-01 Akim Demaille <akim@epita.fr>
18757
18758 Change each use of `fattrs' into a use of `attrs_obstack'.
18759
18760 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18761 * src/files.c (fattrs): Remove.
18762 (attrs_obstack): New.
18763 Adjust all dependencies.
18764 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18765
8c7ebe49
AD
187662000-11-01 Akim Demaille <akim@epita.fr>
18767
18768 Introduce obstacks.
18769 Change each use of `faction' into a use of `action_obstack'.
18770
18771 * lib/obstack.h, lib/obstack.c: New files.
18772 * src/files.c (faction): Remove.
18773 (action_obstack): New.
18774 Adjust all dependencies.
18775
77aee789
AD
187762000-10-20 Akim Demaille <akim@epita.fr>
18777
18778 * lib/quote.h (PARAMS): New macro. Use it.
18779
43591cec
AD
187802000-10-16 Akim Demaille <akim@epita.fr>
18781
18782 * src/output.c (output_short_or_char_table): New function.
18783 (output_short_table, output_token_translations): Use it.
18784 (goto_actions): Use output_short_table.
18785
1e9798d5
AD
187862000-10-16 Akim Demaille <akim@epita.fr>
18787
18788 * src/symtab.c (bucket_new): New function.
18789 (getsym): Use it.
18790
18791 * src/output.c (output_short_table): New argument to display the
18792 comment associated with the table.
18793 Adjust dependencies.
18794 (output_gram): Use it.
18795 (output_rule_data): Nicer output layout for YYTNAME.
18796
f282676b
AD
187972000-10-16 Akim Demaille <akim@epita.fr>
18798
18799 * src/lex.c (read_typename): New function.
18800 (lex): Use it.
18801 * src/reader.c (copy_dollar): Likewise.
18802
550a72a3
AD
188032000-10-16 Akim Demaille <akim@epita.fr>
18804
18805 * src/reader.c (copy_comment2): Expect the input stream to be on
18806 the `/' which is suspected to open a comment, instead of being
18807 called after `//' or `/*' was read.
18808 (copy_comment, copy_definition, parse_union_decl, copy_action)
18809 (copy_guard): Adjust.
18810
131e2fef
AD
188112000-10-16 Akim Demaille <akim@epita.fr>
18812
18813 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18814 `read_signed_integer'.
18815
79282c5a
AD
188162000-10-16 Akim Demaille <akim@epita.fr>
18817
18818 * src/reader.c (copy_dollar): New function.
18819 (copy_guard, copy_action): Use it.
18820
ff4a34be
AD
188212000-10-16 Akim Demaille <akim@epita.fr>
18822
18823 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18824 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18825 New files, from Fileutils 4.0.27.
18826 * src/main.c (printable_version): Remove.
18827 * src/lex.c, src/reader.c: Use `quote'.
18828
188292000-10-04 Akim Demaille <akim@epita.fr>
18830
18831 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18832
14ded682
AD
188332000-10-04 Akim Demaille <akim@epita.fr>
18834
18835 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18836
8e03724b
AD
188372000-10-04 Akim Demaille <akim@epita.fr>
18838
18839 When a literal string is used to define two different tokens,
18840 `bison -v' segfaults.
18841 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18842
18843 * tests/regression.m4: New file.
18844 Include the core of the sample provided by Piotr Gackiewicz.
18845 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18846 properly.
18847
a9e64249
AD
188482000-10-04 Akim Demaille <akim@epita.fr>
18849
18850 * src/reader.c (parse_expect_decl): Keep `count' within the size
18851 of `buffer'.
18852 From Neil Booth.
18853
da9abf43
AD
188542000-10-02 Paul Eggert <eggert@twinsun.com>
18855
18856 * bison.s1 (yyparse): Assign the default value
18857 unconditionally, to avoid a GCC warning and make the parser a
18858 tad smaller.
18859
c33638bb
AD
188602000-10-02 Akim Demaille <akim@epita.fr>
18861
18862 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18863 options.
18864
444c570a
AD
188652000-10-02 Akim Demaille <akim@epita.fr>
18866
18867 * src/derives.c, src/print.c, src/reduce.c: To ease the
18868 translation, move some `\n' out of the translated strings.
18869
89cab50d
AD
188702000-10-02 Akim Demaille <akim@epita.fr>
18871
18872 The location tracking mechanism is precious for parse error
18873 messages. Nevertheless, it is enabled only when `@n' is used in
18874 the grammar, which is a different issue (you can use it in error
18875 message, but not in the grammar per se). Therefore, there should
18876 be another means to enable it.
18877
18878 * src/getargs.c (getargs): Support `--locations'.
18879 (usage): Report it.
18880 * src/getargs.h (locationsflag): Export it.
18881 * src/lex.c (percent_table): Support `%locations'.
18882 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18883 with `locationsflag'.
18884 * doc/bison.texinfo: Document `--locations' and `%locations'.
18885 Sort the options.
18886 * tests/calc.m4: Test it.
18887
18888 For regularity of the names, replace each
18889 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18890 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18891 In addition replace each `flag' with `_flag'.
18892
d6c2cba0
AD
188932000-10-02 Akim Demaille <akim@epita.fr>
18894
18895 Also test parse error messages, including with YYERROR_VERBOSE.
18896
18897 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18898 associative).
18899 Use it to check the computations.
18900 Use it to check `nonassoc' is honored.
18901 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18902 `--yyerror-verbose'.
18903 (_AT_CHECK_CALC): Adjust to this option.
18904 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18905
5a35a6cb
AD
189062000-10-02 Akim Demaille <akim@epita.fr>
18907
18908 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18909 the latter demonstrates a flaw in the handling of non debugging
18910 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18911 was used in order to simplify:
18912
18913 #if YYDEBUG
18914 if (yydebug)
18915 {
18916 ...
18917 }
18918 #endif
18919
18920 into
18921
18922 if (yydebug)
18923 {
18924 ...
18925 }
18926
18927 unfortunately this leads to a CPP conflict when
18928 `--name-prefix=foo' is used since it produces `#define yydebug
18929 foodebug'.
18930
18931 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18932 (YYDPRINTF): New macro.
18933 Spread its use.
18934 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18935 the bison options.
18936 Also test `--verbose', `--defines' and `--name-prefix'.
18937
71da9eea
AD
189382000-10-02 Akim Demaille <akim@epita.fr>
18939
18940 Improve the readability of the produced parsers.
18941
18942 * src/bison.s1: Formatting changes.
18943 Improve the comment related to the `$' mark.
18944 (yydefault): Don't fall through to `yyresume': `goto' there.
18945 * src/output.c (output_parser): When the `$' is met, skip the end
18946 of its line.
18947 New variable, `number_of_dollar_signs', to check there's exactly
18948 one `$' in the parser skeleton.
18949
95e36146
AD
189502000-10-02 Akim Demaille <akim@epita.fr>
18951
18952 * lib/xstrdup.c: New file, from the fileutils.
18953 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18954 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18955 instead of strlen + xmalloc + strcpy.
18956 * src/symtab.c (copys): Remove, use xstrdup instead.
18957
d7020c20
AD
189582000-10-02 Akim Demaille <akim@epita.fr>
18959
18960 * src/gram.h (associativity): New enum type which replaces the
18961 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18962 `right_assoc', `left_assoc' and `non_assoc'.
18963 Adjust all dependencies.
18964 * src/reader.c: Formatting changes.
18965 (LTYPESTR): Don't define it, use it as a literal in
18966 `reader_output_yylsp'.
18967 * src/symtab.h (symbol_class): New enum type which replaces the
18968 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18969 `sunknown', `stoken and `snterm'.
18970
1916f98e
AD
189712000-10-02 Akim Demaille <akim@epita.fr>
18972
18973 * src/getargs.c (fixed_outfiles): Rename as...
18974 (yaccflag): for consistency and accuracy.
18975 Adjust dependencies.
18976
d7913476
AD
189772000-10-02 Akim Demaille <akim@epita.fr>
18978
18979 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18980 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18981 difficult and introduced a lot of core dump. It turns out that
18982 Bison used an implementation of `xmalloc' based on `calloc', and
18983 at various places it does depend upon the initialization to 0. I
18984 have not tried to isolate the pertinent places, and all the former
18985 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18986 someone should address this issue.
18987
18988 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18989 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18990 files.
18991 Adjust dependencies.
18992 * src/warshall.h: New file.
18993 Propagate.
18994
340ef489
AD
189952000-10-02 Akim Demaille <akim@epita.fr>
18996
18997 Various anti-`extern in *.c' changes.
18998
18999 * src/system.h: Include `assert.h'.
19000
b2ca4022
AD
190012000-10-02 Akim Demaille <akim@epita.fr>
19002
19003 * src/state.h (nstates, final_state, first_state, first_shift)
19004 (first_reduction): Move their exportation from here...
19005 * src/LR0.h: to here.
19006 Adjust dependencies.
19007 * src/getargs.c (statisticsflag): New variable.
19008 Add support for `--statistics'.
19009 Adjust dependencies.
19010
19011 Remove a lot of now useless `extern' statements in most files.
19012
403b315b
AD
190132000-10-02 Akim Demaille <akim@epita.fr>
19014
19015 * src/LR0.h: New file.
19016 Propagate its use.
19017
07a58c13
AD
190182000-10-02 Akim Demaille <akim@epita.fr>
19019
19020 * src/print.h: New file.
19021 Propagate its use.
19022 * src/print.c: Formatting and ordering changes.
19023 (verbose, terse): Replace with...
19024 (print_results): this new function.
19025 Adjust dependencies.
19026
0619caf0
AD
190272000-10-02 Akim Demaille <akim@epita.fr>
19028
19029 * src/conflicts.c (conflict_report): New function.
19030 (conflict_log, verbose_conflict_log): Replace with...
19031 (print_conflicts): this function.
19032 Adjust dependencies.
19033 * src/conflicts.h: New file.
19034 Propagate its inclusion.
19035
3519ec76
AD
190362000-10-02 Akim Demaille <akim@epita.fr>
19037
19038 * src/nullable.h: New file.
19039 Propagate its inclusion.
19040 * src/nullable.c: Formatting changes.
19041
015acc48
AD
190422000-10-02 Akim Demaille <akim@epita.fr>
19043
19044 * src/reduce.h: New file.
19045 Propagate its inclusion.
19046 * src/reduce.c: Topological sort and other formatting changes.
19047 (bool, TRUE, FALSE): Move their definition to...
19048 * src/system.h: here.
19049
8963a27b
AD
190502000-10-02 Akim Demaille <akim@epita.fr>
19051
19052 * src/files.c: Formatting changes.
19053 (tryopen, tryclose, openfiles): Rename as...
19054 (xfopen, xfclose, open_files): this.
19055 (stringappend): static.
19056 * src/files.h: Complete the list of exported symbols.
19057 Propagate its use.
19058
a70083a3
AD
190592000-10-02 Akim Demaille <akim@epita.fr>
19060
19061 * src/reader.h: New file.
19062 Propagate its use instead of tedious list of `extern' and
19063 prototypes.
19064 * src/reader.c: Formatting changes, topological sort,
19065 s/register//.
19066
abadc117
AD
190672000-10-02 Akim Demaille <akim@epita.fr>
19068
19069 * src/lex.h: Prototype `lex.c' exported functions.
19070 * src/reader.c: Adjust.
19071 * src/lex.c: Formatting changes.
19072 (safegetc): Rename as...
19073 (xgetc): this.
19074
720d742f
AD
190752000-10-02 Akim Demaille <akim@epita.fr>
19076
19077 * src/lalr.h: New file.
19078 Propagate its inclusion instead of prototypes and `extern'.
19079 * src/lalr.c: Formatting changes, topological sorting etc.
19080
f2acea59
AD
190812000-10-02 Akim Demaille <akim@epita.fr>
19082
19083 * src/output.c (token_actions): Introduce a temporary array,
19084 YYDEFACT, that makes it possible for this function to use
19085 output_short_table.
19086
d019d655
AD
190872000-10-02 Akim Demaille <akim@epita.fr>
19088
19089 `user_toknums' is output as a `short[]' in `output.c', while it is
19090 defined as a `int[]' in `reader.c'. For consistency with the
19091 other output tables, `user_toknums' is now defined as a table of
19092 shorts.
19093
19094 * src/reader.c (user_toknums): Be a short table instead of an int
19095 table.
19096 Adjust dependencies.
19097
19098 Factor the short table outputs.
19099
19100 * src/output.c (output_short_table): New function.
19101 * src/output.c (output_gram, output_stos, output_rule_data)
19102 (output_base, output_table, output_check): Use it.
19103
6c89f1c1
AD
191042000-10-02 Akim Demaille <akim@epita.fr>
19105
19106 * src/output.c (output): Topological sort of the functions, in
19107 order to get rid of the `static' prototypes.
19108 No longer use `register'.
19109 * src/output.h: New file.
19110 Propagate its inclusion in files explicitly prototyping functions
19111 from output.c.
19112
d9efd181
AD
191132000-09-21 Akim Demaille <akim@epita.fr>
19114
19115 * src/atgeneral.m4: Update from Autoconf.
19116
c29240e7 191172000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
19118
19119 * src/closure.h: New file.
19120 * src/closure.c: Formatting changes, topological sort over the
19121 functions, use of closure.h.
19122 (initialize_closure, finalize_closure): Rename as...
19123 (new_closure, free_closure): these. Adjust dependencies.
19124 * src/LR0.c: Formatting changes, topological sort, use of
19125 cloture.h.
19126 (initialize_states): Rename as...
19127 (new_states): this.
19128 * src/Makefile.am (noinst_HEADERS): Adjust.
19129
499daa50
AD
191302000-09-20 Akim Demaille <akim@epita.fr>
19131
19132 * src/acconfig.h: Don't protect config.h against multiple
19133 inclusion.
19134 Don't define PARAMS.
19135 * src/system.h: Define PARAMS.
19136 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19137 purpose of config.h. system.h must not try to fix wrong
19138 definitions in config.h.
19139
cc84fd5d
AD
191402000-09-20 Akim Demaille <akim@epita.fr>
19141
19142 * src/derives.h: New file.
19143 * src/main.c, src/derives.h: Use it.
19144 Formatting changes.
19145 * src/Makefile.am (noinst_HEADERS): Adjust.
19146
db5b3a89
AD
191472000-09-20 Akim Demaille <akim@epita.fr>
19148
19149 * tests/atgeneral.m4: Update from Autoconf.
19150 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19151 (AT_CHECK_CALC): New macros.
19152 Use these macros to test bison with options `', `--raw',
19153 `--debug', `--yacc', `--yacc --debug'.
19154
ceed8467
AD
191552000-09-19 Akim Demaille <akim@epita.fr>
19156
19157 * src/output.c: Formatting changes.
19158 * src/machine.h: Remove, leaving its contents in...
19159 * src/system.h: here.
19160 Include stdio.h.
19161 Adjust all dependencies on stdio.h and machine.h.
19162 * src/getargs.h: New file.
19163 Let all `extern' declarations about getargs.c be replaced with
19164 inclusion of `getargs.h'.
19165 * src/Makefile.am (noinst_HEADERS): Adjust.
19166
19167 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19168 scope.
19169 (yyerror): Returns void, not int.
19170 * doc/bison.texinfo: Formatting changes.
19171
05a1d24b
AD
191722000-09-19 Akim Demaille <akim@epita.fr>
19173
19174 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19175 portable.
19176
cbd25751
AD
191772000-09-18 Akim Demaille <akim@epita.fr>
19178
19179 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19180 * src/Makefile.am (INCLUDES): Don't.
19181 Be ready to fetch headers in lib/.
19182
13863333
AD
191832000-09-18 Akim Demaille <akim@epita.fr>
19184
19185 * doc/bison.texinfo: Update the copyright.
19186 ANSIfy and GNUify the examples.
19187 Remove the old menu.
19188
0d533154
AD
191892000-09-18 Akim Demaille <akim@epita.fr>
19190
19191 First set of tests: use the `calc' example from the documentation.
19192
19193 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19194 is defined only when YYDEBUG is.
19195 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19196 * src/files.c (tryopen, tryclose): Formatting changes.
19197 Move to the top and be static.
19198 * src/reader.c (read_signed_integer): Likewise.
19199 * tests/calc.m4: New file.
19200 * Makefile.am, suite.m4: Adjust.
19201 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19202
e79137ac
AD
192032000-09-18 Akim Demaille <akim@epita.fr>
19204
19205 Add support for an Autotest test suite for Bison.
19206
19207 * m4/m4.m4, m4/atconfig.m4: New files.
19208 * m4/Makefile.am (EXTRA_DIST): Adjust.
19209 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19210 files.
19211 * src/getargs.c: Display a more standard --version message.
19212 * src/reader.c (reader): Formatting changes.
19213 No longer depend upon VERSION_STRING.
19214 * configure.in: No longer use `dnl'.
19215 Set up the test suite and the new directory `tests/.
19216 (VERSION_STRING): Remove.
19217
27821bff
AD
192182000-04-14 Akim Demaille <akim@epita.fr>
19219
19220 * src/reader.c (copy_comment2): New function, same as former
19221 `copy_comment', but outputs into two FILE *.
19222 (copy_comment): Use it.
19223 (parse_union_decl): Use it.
19224 (get_type, parse_start_decl): Use the same `invalid' message.
19225 (parse_start_decl, parse_union_decl): Use the same `multiple'
19226 message.
19227 (parse_union_decl, copy_guard, copy_action): Use the same
19228 `unmatched' message.
19229 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19230
cfe5fbc0
AD
192312000-03-31 Akim Demaille <akim@epita.fr>
19232
19233 * src/files.c (tryopen, tryclose): Move to the top.
19234 Be static.
19235
cb7db13e
AD
192362000-03-31 Akim Demaille <akim@epita.fr>
19237
19238 * src/main.c (main): Don't call `done', exit does it.
19239
a0f6b076
AD
192402000-03-31 Akim Demaille <akim@epita.fr>
19241
36281465
AD
19242 * allocate.c: s/return (foo)/return foo/.
19243 * lalr.c: Likewise.
19244 * LR0.c: Likewise.
19245 * output.c: Likewise.
19246 * reader.c: Likewise.
19247 * symtab.c: Likewise.
19248 * vmsgetargs.c: Likewise.
19249
192502000-03-31 Akim Demaille <akim@epita.fr>
19251
19252 Clean up the error reporting functions.
a0f6b076
AD
19253
19254 * src/report.c: New file.
19255 * src/report.h: Likewise.
19256 * src/Makefile.am: Adjust.
19257 * m4/error.m4: New file.
19258 * m4/Makefile.am: Adjust.
19259 * configure.in (jm_PREREQ_ERROR): Call it.
19260 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19261 Remove.
19262 (fatal, fatals): Remove. All callers use complain.c::fatal.
19263 (warn, warni, warns, warnss, warnss): Remove. All callers use
19264 complain.c::complain.
19265 (toomany): Remove, use fatal instead.
19266 * src/files.c (done): No argument, use complain_message_count.
19267 * src/main.c (main): Register `done' to `atexit'.
19268
19269 * src/getargs.c (usage): More `fputs', less `fprintf'.
19270
18539825
AD
192712000-03-28 Akim Demaille <akim@epita.fr>
19272
19273 * lib/: New directory.
19274 * Makefile.am (SUBDIRS): Adjust.
19275 * configure.in: Adjust.
19276 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19277 useless.
19278 * src/alloca.c: Moved to lib/.
19279 * src/getopt.c: Likewise.
19280 * src/getopt1.c: Likewise.
19281 * src/getopt.h: Likewise.
19282 * src/ansi2knr.c: Likewise.
19283 * src/ansi2knr.1: Likewise.
19284 * src/Makefile.am: Adjust.
19285 * lib/Makefile.am: New file.
19286
9f306f2a
AD
192872000-03-28 Akim Demaille <akim@epita.fr>
19288
19289 * src/getargs.c (usage): Refresh the help message.
19290
0ba347b6
AD
192912000-03-17 Akim Demaille <akim@epita.fr>
19292
19293 * src/getopt1.c: Updated from textutils 2.0e
19294 * src/getopt.c: Likewise.
19295 * src/getopt.h: Likewise.
19296
dbe7f271
AD
192972000-03-17 Akim Demaille <akim@epita.fr>
19298
19299 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19300 the file name, not the whole `#line LINE FILE'.
19301
75bbe78d
AD
193022000-03-17 Akim Demaille <akim@epita.fr>
19303
19304 On syntax errors, report the token on which we choked.
19305
aa5fd0ee
AD
19306 * src/bison.s1 (yyparse): In the label yyerrlab, when
19307 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 19308
7b306f52
AD
193092000-03-17 Akim Demaille <akim@epita.fr>
19310
aa5fd0ee 19311 * src/reader.c (copy_at): New function.
7b306f52
AD
19312 (copy_guard): Use it.
19313 (copy_action): Use it.
19314
e87b5700
AD
193152000-03-17 Akim Demaille <akim@epita.fr>
19316
19317 Be kind to translators, save some useless translations.
19318
aa5fd0ee 19319 * src/main.c (banner): New function.
e87b5700
AD
19320 (fatal_banner): Use it.
19321 (warn_banner): Use it.
19322
ae3c3164
AD
193232000-03-17 Akim Demaille <akim@epita.fr>
19324
aa5fd0ee
AD
19325 * src/reader.c (copy_definition): Use copy_string and
19326 copy_comment. Removed now unused `match', `ended',
19327 `cplus_comment'.
ae3c3164
AD
19328 (copy_comment, copy_string): Moved, to be visible from
19329 copy_definition.
19330
4dc58e7c
AD
193312000-03-17 Akim Demaille <akim@epita.fr>
19332
aa5fd0ee
AD
19333 * src/reader.c (copy_string): Declare `static inline'. No
19334 problems with inline, since it is checked by configure.
4dc58e7c
AD
19335 (copy_comment): Likewise.
19336
0a6384c4
AD
193372000-03-17 Akim Demaille <akim@epita.fr>
19338
aa5fd0ee 19339 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 19340
3cef001a
AD
193412000-03-17 Akim Demaille <akim@epita.fr>
19342
aa5fd0ee 19343 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
19344 (copy_action): Use it. Removed now unused `match', `ended',
19345 `cplus_comment'.
19346 (copy_guard): Likewise.
19347
ca36d2ef
AD
193482000-03-17 Akim Demaille <akim@epita.fr>
19349
aa5fd0ee 19350 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
19351 (copy_action): Use it.
19352 (copy_guard): Likewise.
19353
6666f98f
AD
193542000-03-17 Akim Demaille <akim@epita.fr>
19355
19356 Change the handling of @s so that they behave exactly like $s.
19357 There is now a pseudo variable @$ (readble and writable), location
19358 of the lhs of the rule (by default ranging from the location of
19359 the first symbol of the rhs, to the location of the last symbol,
19360 or, if the rhs is empty, YYLLOC).
19361
19362 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19363 yyval.
19364 (yyparse): When providing a default semantic action, provide a
19365 default location action.
19366 (after the $): No longer change `*YYLSP', just stack YYLOC the
19367 same way you stack YYVAL.
19368 * src/reader.c (read_declarations): Use warns.
19369 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19370 (copy_action, case '@'): Likewise.
19371 Use a standard error message, to save useless work from
19372 translators.
19373
41aca2e0
AD
193742000-03-17 Akim Demaille <akim@epita.fr>
19375
aa5fd0ee
AD
19376 * src/bison.s1: Formatting and cosmetics changes.
19377 * src/reader.c: Likewise.
41aca2e0
AD
19378 Update the Copyright notice.
19379
dc08c1d5
AD
193802000-03-17 Akim Demaille <akim@epita.fr>
19381
aa5fd0ee
AD
19382 * src/bison.s1 (#line): All set to `#line' only, since the
19383 Makefile now handles them.
dc08c1d5 19384
9ee3c97b
AD
193852000-03-16 Akim Demaille <akim@epita.fr>
19386
19387 * src/output.c (output_rule_data): Output the documentation of
19388 some of the tables.
19389 (Copyright notice): Update.
19390 Formatting changes.
19391
0de741ca
AD
193922000-03-16 Akim Demaille <akim@epita.fr>
19393
19394 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19395 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19396 One `#if YYDEBUG' remains, since it uses variables which are
19397 defined only if `YYDEBUG != 0'.
19398
bb10be54
AD
193992000-03-16 Akim Demaille <akim@epita.fr>
19400
19401 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19402 and related variables so that the similarities are highlighted.
19403
b07b484a
AD
194042000-03-16 Akim Demaille <akim@epita.fr>
19405
19406 * src/bison.s1: Properly indent CPP directives.
19407
361f60b3
AD
194082000-03-16 Akim Demaille <akim@epita.fr>
19409
19410 * src/bison.s1: Properly indent the `alloca' CPP section.
19411
8c44d3ec
AD
194122000-03-16 Akim Demaille <akim@epita.fr>
19413
19414 Do not hard code values of directories in `configure.in'.
19415 Update the `configure' tool chain.
19416
19417 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19418 src/makefile.am.
19419 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19420 (AC_OUTPUT): Add m4/Makefile.
19421 Bump to bison 1.28a, 1.29 has never been released.
19422 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19423 handled via src/Makefile.am.
19424 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19425 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19426 autoheader.
19427 * Makefile.am (SUBDIRS): Add m4.
19428 (ACLOCAL_AM_FLAGS): New variable.
19429 (AUTOMAKE_OPTIONS): Add check-news.
19430 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19431 the proper line number and file name.
19432 (DEFS): Propagate the location of bison library files and of the
19433 locale files.
19434 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19435 builddir.
19436 * acinclude.m4: Remove, replaced by the directory m4.
19437 * m4/Makefile.am (EXTRA_DIST): New variable.
19438 * m4/gettext.m4: New file, from the fileutils.
19439 * m4/lcmessage.m4: Likewise
19440 * m4/progtest.m4: Likewise.
19441 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19442
f95997e7
AD
194432000-03-10 Akim Demaille <akim@epita.fr>
19444
19445 * src/closure.c:
19446 Formatting changes of various comments.
19447 Respect the GNU coding standards at various places.
19448 Don't use `_()' when no translation is needed.
19449
194501999-12-13 Jesse Thilo <jthilo@gnu.org>
19451
19452 * src/files.c:
19453 OS/2 honors TMPDIR environment variable.
19454
194551999-12-13 Jesse Thilo <jthilo@gnu.org>
19456
19457 * doc/bison.texinfo: Tweaked spelling and grammar.
19458 Updated ISBN.
19459 Removed reference to price of printed copy.
19460 Mention BISON_SIMPLE and BISON_HAIRY.
19461
194621999-12-13 Jesse Thilo <jthilo@gnu.org>
19463
19464 * configure.in, NEWS:
19465 Bison 1.29 released.
19466
194671999-10-27 Jesse Thilo <jthilo@gnu.org>
19468
19469 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19470 Added reference card.
19471
194721999-07-26 Jesse Thilo <jthilo@gnu.org>
19473
19474 * po/ru.po: Added Russian translation.
19475
194761999-07-26 Jesse Thilo <jthilo@gnu.org>
19477
19478 * configure.in: Added Russian translation.
19479
194801999-07-06 Jesse Thilo <jthilo@gnu.org>
19481
19482 * configure.in, NEWS, README:
19483 Released version 1.28.
19484
194851999-06-14 Jesse Thilo <jthilo@gnu.org>
19486
19487 * src/system.h:
19488 Squashed redefinition warning on some systems.
19489
19490 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19491 Have configure build version string instead of relying on ANSI string
19492 concatentation.
19493
194941999-06-14 Jesse Thilo <jthilo@gnu.org>
19495
19496 * po/POTFILES.in: Got rid of version.c.
19497
194981999-06-14 Jesse Thilo <jthilo@gnu.org>
19499
19500 * acconfig.h, configure.in:
19501 Have configure build version string instead of relying on ANSI string
19502 concatentation.
19503
195041999-06-08 Jesse Thilo <jthilo@gnu.org>
19505
19506 * doc/bison.1:
19507 Dropped mention of `+' for long-named options.
19508
195091999-05-30 Jesse Thilo <jthilo@gnu.org>
19510
19511 * src/files.c: Added <unistd.h> for unlink().
19512
19513 * src/Makefile.am, src/system.h:
19514 I18n fixes.
19515
195161999-05-30 Jesse Thilo <jthilo@gnu.org>
19517
19518 * README: Added a FAQ list.
19519
19520 * configure.in, acconfig.h:
19521 I18n fixes.
19522
195231999-05-30 Jesse Thilo <jthilo@gnu.org>
19524
19525 * doc/FAQ, doc/Makefile.am:
19526 Added a FAQ list.
19527
195281999-05-19 Jesse Thilo <jthilo@gnu.org>
19529
19530 * src/alloc.h, src/symtab.h, src/version.c:
19531 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19532
195331999-04-18 Jesse Thilo <jthilo@gnu.org>
19534
19535 * src/.cvsignore, src/Makefile.am:
19536 Reorganized: sources in `src', documentation in `doc'.
19537
19538 * src/lex.c (literalchar):
19539 fixed the code for escaping double quotes (thanks
19540 Jonathan Czisny.)
19541
195421999-04-18 Jesse Thilo <jthilo@gnu.org>
19543
19544 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19545 Adjusted paths to reflect directory reorganization.
19546
195471999-04-18 Jesse Thilo <jthilo@gnu.org>
19548
19549 * doc/.cvsignore, doc/Makefile.am:
19550 Reorganized: sources in `src', documentation in `doc'.
19551
195521999-04-18 Jesse Thilo <jthilo@gnu.org>
19553
19554 * configure.in:
19555 Updated AC_INIT file to reflect directory reorganization.
19556
19557 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19558 Reorganized: sources in `src', documentation in `doc'.
19559
195601999-04-13 Jesse Thilo <jthilo@gnu.org>
19561
19562 * src/allocate.c:
19563 Don't declare calloc() and realloc() if not necessary.
19564
195651999-04-13 Jesse Thilo <jthilo@gnu.org>
19566
19567 * configure.in, acconfig.h, acinclude.m4:
19568 Don't declare calloc() and realloc() if not necessary.
19569
195701999-03-23 Jesse Thilo <jthilo@gnu.org>
19571
19572 * po/.cvsignore: Added i18n support.
19573
195741999-03-23 Jesse Thilo <jthilo@gnu.org>
19575
19576 * acconfig.h, configure.in, Makefile.am:
19577 Added i18n support.
19578
195791999-03-22 Jesse Thilo <jthilo@gnu.org>
19580
19581 * src/bison.s1: Fixed #line numbers.
19582
195831999-03-15 Jesse Thilo <jthilo@gnu.org>
19584
19585 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19586 Added PO files from Translation Project.
19587
195881999-03-03 Jesse Thilo <jthilo@gnu.org>
19589
19590 * Makefile.am:
19591 Added support for non-ANSI compilers (ansi2knr).
19592
195931999-02-16 Jesse Thilo <jthilo@gnu.org>
19594
19595 * configure.in: Bumped version number to 1.27.
19596
19597 * Makefile.am:
19598 Added `bison.simple' to list of files removed by `make distclean'.
19599
196001999-02-12 Jesse Thilo <jthilo@gnu.org>
19601
19602 * src/files.c, src/files.h:
19603 Defined locations of parser files in config.h instead of Makefile.
19604
196051999-02-12 Jesse Thilo <jthilo@gnu.org>
19606
19607 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19608 Defined locations of parser files in config.h instead of Makefile.
19609
196101999-02-09 Jesse Thilo <jthilo@gnu.org>
19611
19612 * Makefile.am:
19613 Removed inappropriate use of $< macro.
19614
196151999-02-05 Jesse Thilo <jthilo@gnu.org>
19616
19617 * po/Makefile.in.in, po/POTFILES.in:
19618 Add `po' directory skeleton.
19619
196201999-01-27 Jesse Thilo <jthilo@gnu.org>
19621
19622 * README: Document help-bison list.
19623
19624 * configure.in: Add check for mkstemp().
19625
196261999-01-20 Jesse Thilo <jthilo@gnu.org>
19627
19628 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19629 Hush a few compiler warnings.
19630
19631 * src/files.c:
19632 Add tryclose(), which verifies that fclose was successful.
19633 Hush a couple of compiler warnings.
19634
196351999-01-20 Jesse Thilo <jthilo@gnu.org>
19636
19637 * Makefile.am, OChangeLog:
19638 ChangeLog is now automatically generated. Include the old version as
19639 OChangeLog.
19640
196411999-01-14 Jesse Thilo <jthilo@gnu.org>
19642
19643 * 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:
19644 Update FSF address.
19645
196461999-01-14 Jesse Thilo <jthilo@gnu.org>
19647
19648 * doc/bison.texinfo: Fix formatting glitch.
19649
19650 * doc/bison.texinfo: Update FSF address.
19651
196521999-01-14 Jesse Thilo <jthilo@gnu.org>
19653
19654 * acconfig.h: Update FSF address.
19655
196561999-01-08 Jesse Thilo <jthilo@gnu.org>
19657
19658 * src/system.h:
19659 Don't define PACKAGE here, since config.h defines it.
19660
196611998-12-30 Jesse Thilo <jthilo@gnu.org>
19662
19663 * src/reader.c: Update copyright date.
19664
19665 * src/main.c:
19666 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19667 favor of output directly to stderr (avoids buffer overruns).
19668
19669 * src/reader.c: Some checks for premature EOF.
19670
19671 * 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:
19672 Use prototypes if the compiler understands them.
19673
19674 * src/files.c: Honor TMPDIR on Unix hosts.
19675 Use prototypes if the compiler understands them.
19676
19677 * src/reader.c:
19678 Fix a couple of buffer overrun bugs.
19679 Use prototypes if the compiler understands them.
19680
19681 * src/system.h: Include unistd.h and ctype.h.
19682 Use #ifdef instead of #if for NLS symbols.
19683
196841998-12-30 Jesse Thilo <jthilo@gnu.org>
19685
19686 * doc/bison.texinfo:
19687 Delete comment "consider using @set for edition number, etc..." since
19688 we now are doing so.
19689
196901998-12-30 Jesse Thilo <jthilo@gnu.org>
19691
19692 * configure.in:
19693 Use prototypes if the compiler understands them.
19694
19695 * NEWS: Document 1.26 highlights.
19696
19697 * Makefile.am: Require Automake 1.3 or later.
19698
19699 * acconfig.h:
19700 Use prototypes if the compiler understands them.
19701
197021998-12-29 Jesse Thilo <jthilo@gnu.org>
19703
19704 * src/version.c:
19705 Use VERSION symbol from automake for version number.
19706
197071998-12-29 Jesse Thilo <jthilo@gnu.org>
19708
19709 * acconfig.h, configure.in, version.cin:
19710 Use VERSION symbol from automake for version number.
19711
197121998-11-28 Jesse Thilo <jthilo@gnu.org>
19713
19714 * Makefile.am:
19715 Distribute original version of simple parser (bison.s1), not built
19716 version (bison.simple).
19717
197181998-11-28 Jesse Thilo <jthilo@gnu.org>
19719
19720 * doc/bison.texinfo: Add info dir entry.
19721
19722 * doc/bison.texinfo:
19723 Let automake put version number into documentation.
19724
197251998-11-26 Jesse Thilo <jthilo@gnu.org>
19726
19727 * src/bison.cld, src/build.com, src/vmshlp.mar:
19728 Add non-RCS files from /gd/gnu/bison.
19729
197301998-11-26 Jesse Thilo <jthilo@gnu.org>
19731
19732 * doc/bison.1:
19733 Document the BISON_HAIRY and BISON_SIMPLE variables.
19734
197351998-11-25 Jesse Thilo <jthilo@gnu.org>
19736
19737 * src/version.c: Build version.c automatically.
19738
19739 * src/reader.c:
19740 Fix token numbering (used to start at 258, not 257).
19741
19742 * src/system.h: Include config.h.
19743
19744 * src/getargs.c: Update bug report address.
19745
19746 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19747 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19748
197491998-11-25 Jesse Thilo <jthilo@gnu.org>
19750
19751 * Makefile.am:
19752 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19753
19754 * configure.in, version.cin:
19755 Build version.c automatically.
19756
19757 * AUTHORS: Add AUTHORS file.
19758
19759 * README: Update bug report address.
19760
19761 * bison.simple:
19762 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19763
19764 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19765 Add automake stuff.
19766
197671998-11-25 Jesse Thilo <jthilo@gnu.org>
19768
19769 * doc/bison.texinfo: Clean up some formatting.
19770
197711998-05-05 Richard Stallman <rms@gnu.org>
19772
19773 * doc/bison.texinfo:
19774 Explain better why to make a pure parser.
19775
197761998-01-05 Richard Stallman <rms@gnu.org>
19777
19778 * src/files.c (openfiles):
19779 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19780 find a temporary directory, if possible. Do not unlink files while
19781 they are open.
19782
197831997-08-25 Richard Stallman <rms@gnu.org>
19784
19785 * src/reader.c (stack_offset;):
19786 Change some warni to warns.
19787
19788 * src/lex.c (literalchar): Use warns, not warni.
19789
197901997-06-28 Richard Stallman <rms@gnu.org>
19791
19792 * src/bison.s1: Add a Bison version comment.
19793
19794 * src/main.c (fatal, warn, berror):
19795 Use program_name.
19796
197971997-06-28 Richard Stallman <rms@gnu.org>
19798
19799 * Makefile.in (bison_version): New variable.
19800 (dist): Use that variable.
19801 (bison.s1): Substitute the Bison version into bison.simple.
19802
19803 * bison.simple: Add a Bison version comment.
19804
198051997-06-18 Richard Stallman <rms@gnu.org>
19806
19807 * src/main.c (fatal, warn, berror):
19808 Make error messages standard.
19809 (toomany): Improve error message text.
19810
19811 * 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:
19812 new.h renamed to alloc.h.
19813
198141997-06-18 Richard Stallman <rms@gnu.org>
19815
19816 * Makefile.in: new.h renamed to alloc.h.
19817
198181997-05-24 Richard Stallman <rms@gnu.org>
19819
19820 * src/lex.c (literalchar):
19821 Fix the code for escaping \, " and '.
19822
19823 (lex): Avoid trouble when there are many chars
19824 to discard in a char literal with just several chars in it.
19825
198261997-05-17 Richard Stallman <rms@gnu.org>
19827
19828 * src/bison.s1:
19829 Use malloc, if using alloca is troublesome.
19830 (YYSTACK_USE_ALLOCA): New flag macro.
19831 Define it for some systems and compilers.
19832 (YYSTACK_ALLOC): New macro.
19833 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19834 If it was malloc'd, free it.
19835
198361997-05-17 Richard Stallman <rms@gnu.org>
19837
19838 * bison.simple:
19839 Use malloc, if using alloca is troublesome.
19840 (YYSTACK_USE_ALLOCA): New flag macro.
19841 Define it for some systems and compilers.
19842 (YYSTACK_ALLOC): New macro.
19843 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19844 If it was malloc'd, free it.
19845
198461997-04-23 Richard Stallman <rms@gnu.org>
19847
19848 * src/bison.s1:
19849 (alloca) [__hpux]: Always define as __builtin_alloca.
19850
198511997-04-23 Richard Stallman <rms@gnu.org>
19852
19853 * bison.simple:
19854 (alloca) [__hpux]: Always define as __builtin_alloca.
19855
198561997-04-22 Richard Stallman <rms@gnu.org>
19857
19858 * src/bison.s1:
19859 [__hpux]: Include alloca.h (right for HPUX 10)
19860 instead of declaring alloca (right for HPUX 9).
19861
19862 * src/bison.s1 (__yy_memcpy):
19863 Declare arg `count' as unsigned int.
19864 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19865
198661997-04-22 Richard Stallman <rms@gnu.org>
19867
19868 * bison.simple:
19869 [__hpux]: Include alloca.h (right for HPUX 10)
19870 instead of declaring alloca (right for HPUX 9).
19871
19872 * bison.simple (__yy_memcpy):
19873 Declare arg `count' as unsigned int.
19874 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19875
198761997-01-03 Richard Stallman <rms@gnu.org>
19877
19878 * src/allocate.c: [__STDC__ or _MSC_VER]:
19879 Declare calloc and realloc to return void *.
19880
198811997-01-02 Richard Stallman <rms@gnu.org>
19882
19883 * src/system.h:
19884 [_MSC_VER]: Include stdlib.h and process.h.
19885 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19886
19887 * src/main.c (main): Return FAILURE as a value.
19888 (printable_version): Declare arg as int, not char.
19889
198901997-01-02 Richard Stallman <rms@gnu.org>
19891
19892 * Makefile.in (dist):
19893 Explicitly check for symlinks, and copy them.
19894
198951996-12-19 Richard Stallman <rms@gnu.org>
19896
19897 * src/files.c:
19898 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19899
199001996-12-18 Paul Eggert <eggert@gnu.org>
19901
19902 * src/bison.s1 (yyparse):
19903 If __GNUC__ and YYPARSE_PARAM are both defined,
19904 declare yyparse to have a void * argument.
19905
199061996-12-18 Paul Eggert <eggert@gnu.org>
19907
19908 * bison.simple (yyparse):
19909 If __GNUC__ and YYPARSE_PARAM are both defined,
19910 declare yyparse to have a void * argument.
19911
199121996-12-17 Richard Stallman <rms@gnu.org>
19913
19914 * src/reduce.c (nbits): Add some casts.
19915
199161996-08-12 Richard Stallman <rms@gnu.org>
19917
19918 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19919
199201996-08-12 Richard Stallman <rms@gnu.org>
19921
19922 * bison.simple: Test _MSDOS as well as _MSDOS_.
19923
199241996-07-31 Richard Stallman <rms@gnu.org>
19925
19926 * src/bison.s1:
19927 [__sun && __i386]: Include alloca.h.
19928
199291996-07-31 Richard Stallman <rms@gnu.org>
19930
19931 * bison.simple:
19932 [__sun && __i386]: Include alloca.h.
19933
199341996-07-30 Richard Stallman <rms@gnu.org>
19935
19936 * src/bison.s1: Comment change.
19937
19938 * src/bison.s1: Test _MSDOS_, not MSDOS.
19939
199401996-07-30 Richard Stallman <rms@gnu.org>
19941
19942 * bison.simple: Comment change.
19943
19944 * bison.simple: Test _MSDOS_, not MSDOS.
19945
199461996-06-01 Richard Stallman <rms@gnu.org>
19947
19948 * 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:
19949 Insert `_' macro around many string constants.
19950
19951 * src/main.c:
19952 Insert `_' macro around many string constants.
19953
19954 (main): Call setlocale, bindtextdomain and textdomain.
19955
19956 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19957 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19958 [ENABLE_NLS]: Include libintl.h.
19959 [ENABLE_NLS] (gettext): Define.
19960 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19961 (N_, PACKAGE, LOCALEDIR): New macros.
19962
199631996-06-01 Richard Stallman <rms@gnu.org>
19964
19965 * POTFILES.in: New file.
19966
19967 * Makefile.in (allocate.o):
19968 Define target explicitly.
19969
19970 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19971 (LDFLAGS): Set to @LDFLAGS@.
19972 (configure): Run autoconf only if preceding `cd' succeeds.
19973 (bison.s1): Redirect output to temporary file then move the
19974 temporary to the target, rather than redirecting directly to bison.s1.
19975 (clean): Remove config.status and config.log.
19976 (distclean): Don't remove config.status here.
19977
199781996-05-12 Richard Stallman <rms@gnu.org>
19979
19980 * src/bison.s1:
19981 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19982
199831996-05-12 Richard Stallman <rms@gnu.org>
19984
19985 * bison.simple:
19986 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19987
199881996-05-11 Richard Stallman <rms@gnu.org>
19989
19990 * src/bison.s1 (__yy_memcpy):
19991 Really reorder the args, as was supposedly done on Feb 14 1995.
19992 (yyparse): Calls changed accordingly.
19993
199941996-05-11 Richard Stallman <rms@gnu.org>
19995
19996 * Makefile.in (dist): Don't use $(srcdir).
19997
19998 * bison.simple (__yy_memcpy):
19999 Really reorder the args, as was supposedly done on Feb 14 1995.
20000 (yyparse): Calls changed accordingly.
20001
200021996-01-27 Richard Stallman <rms@gnu.org>
20003
20004 * src/output.c (output_rule_data):
20005 Test YYERROR_VERBOSE in the conditional
20006 around the definition of ttyname.
20007
200081995-12-29 Richard Stallman <rms@gnu.org>
20009
20010 * src/bison.s1:
20011 Fix line numbers in #line commands.
20012
200131995-12-29 Richard Stallman <rms@gnu.org>
20014
20015 * bison.simple:
20016 Fix line numbers in #line commands.
20017
200181995-12-27 Richard Stallman <rms@gnu.org>
20019
20020 * src/bison.s1 (YYPARSE_PARAM_DECL):
20021 In C++, make it always null.
20022 (YYPARSE_PARAM_ARG): New macro.
20023 (yyparse): Use YYPARSE_PARAM_ARG.
20024
200251995-12-27 Richard Stallman <rms@gnu.org>
20026
20027 * bison.simple (YYPARSE_PARAM_DECL):
20028 In C++, make it always null.
20029 (YYPARSE_PARAM_ARG): New macro.
20030 (yyparse): Use YYPARSE_PARAM_ARG.
20031
200321995-11-29 Richard Stallman <rms@gnu.org>
20033
20034 * doc/bison.texinfo:
20035 Describe literal string tokens, %raw, %no_lines, %token_table.
20036
200371995-11-29 Daniel Hagerty <hag@gnu.org>
20038
20039 * doc/bison.texinfo: Fixed update date
20040
200411995-10-16 Richard Stallman <rms@gnu.org>
20042
20043 * src/version.c: Version 1.25.
20044
200451995-10-16 Richard Stallman <rms@gnu.org>
20046
20047 * NEWS: *** empty log message ***
20048
200491995-10-16 Richard Stallman <rms@gnu.org>
20050
20051 * doc/bison.1, doc/bison.rnh:
20052 Add new options.
20053
200541995-10-15 Richard Stallman <rms@gnu.org>
20055
20056 * src/vmsgetargs.c, src/getargs.c:
20057 Added -n, -k, and -raw switches.
20058 (noparserflag, toknumflag, rawtoknumflag): New variables.
20059
20060 * src/symtab.h (SALIAS):
20061 New #define for adding aliases to %token.
20062 (struct bucket): Added `alias' field.
20063
20064 * src/reduce.c (reduce_grammar):
20065 Revise error message.
20066 (print_notices): Remove final `.' from error message.
20067
20068 * src/reader.c (reader_output_yylsp):
20069 New function.
20070 (readgram): Use `#if 0' around code that accepted %command
20071 inside grammar rules: The documentation doesn't allow it,
20072 and it will fail since the %command processors scan for the next %.
20073 (parse_token_decl): Extended the %token
20074 declaration to allow a multi-character symbol as an alias.
20075 (parse_thong_decl): New function.
20076 (read_declarations): Added %thong declarations.
20077 (read_declarations): Handle NOOP to deal with allowing
20078 % declarations as another means to specify the flags.
20079 (readgram): Allow %prec prior to semantics embedded in a rule.
20080 (skip_to_char, read_declarations, copy_definition)
20081 (parse_token_decl, parse_start_decl, parse_type_decl)
20082 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20083 (get_type_name, copy_guard, copy_action, readgram)
20084 (get_type, packsymbols): Revised most error messages.
20085 Changed `fatal' to `warnxxx' to avoid aborting for error.
20086 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20087 (read_declarations): Improve the error message for
20088 an invalid character. Do not abort.
20089 (read_declarations, copy_guard, copy_action): Use
20090 printable_version to avoid unprintable characters in printed output.
20091 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20092 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20093 Allow the type of a non-terminal can be given
20094 more than once, as long as all specifications give the same type.
20095
20096 * src/output.c:
20097 (output_headers, output_trailers, output, output_gram)
20098 (output_rule_data): Implement noparserflag variable.
20099 Implement toknumflag variable.
20100 (output): Call reader_output_yylsp to output LTYPESTR.
20101
20102 * src/main.c (main):
20103 If reader sees an error, don't process the grammar.
20104 (fatals): Updated to not use VARARGS1.
20105 (printable_version, int_to_string, warn, warni, warns, warnss)
20106 (warnsss): New error reporting functions. Avoid abort for error.
20107
20108 * src/lex.h:
20109 Added THONG and NOOP for alias processing.
20110 Added SETOPT for the new code that allows setting options with %flags.
20111
20112 * src/lex.c:
20113 Include getopt.h. Add some extern decls.
20114 (safegetc): New function to deal with EOF gracefully.
20115 (literalchar); new function to deal with reading \ escapes.
20116 (lex): Use literalchar.
20117 (lex): Implemented "..." tokens.
20118 (literalchar, lex, parse_percent_token): Made tokenbuffer
20119 always contain the token. This includes growing the token
20120 buffer while reading an integer.
20121 (parse_percent_token): Replaced if-else statement with percent_table.
20122 (parse_percent_token): Added % declarations as another
20123 way to specify the flags -n, -l, and -r. Also added hooks for
20124 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20125 major changes to files.c.
20126 (lex) Retain in the incoming stream a character following
20127 an incorrect '/'.
20128 (skip_white_space, lex): Revised most error messages
20129 and changed fatal to warn to avoid aborting.
20130 (percent_table): Added %thong declarations.
20131
20132 * src/gram.h: Comment changes.
20133
20134 * src/files.c (openfiles, open_extra_files, done):
20135 Add faction flag
20136 and actfile file. Handle noparserflag. Both for -n switch.
20137
20138 * src/conflicts.c (resolve_sr_conflict):
20139 Remove use of alloca.
20140
201411995-06-01 Jim Meyering <meyering@gnu.org>
20142
20143 * doc/bison.texinfo: *** empty log message ***
20144
201451995-05-06 Richard Stallman <rms@gnu.org>
20146
20147 * src/bison.s1: Comment change.
20148
201491995-05-06 Richard Stallman <rms@gnu.org>
20150
20151 * bison.simple: Comment change.
20152
201531995-05-03 Richard Stallman <rms@gnu.org>
20154
20155 * src/version.c: Version now 1.24.
20156
20157 * src/bison.s1: Change distribution terms.
20158
20159 * src/version.c: Version now 1.23.
20160
201611995-05-03 Richard Stallman <rms@gnu.org>
20162
20163 * doc/bison.texinfo:
20164 Rewrite "Conditions for Using Bison".
20165 Update version to 1.24.
20166
201671995-05-03 Richard Stallman <rms@gnu.org>
20168
20169 * bison.simple: Change distribution terms.
20170
201711995-02-23 Richard Stallman <rms@gnu.org>
20172
20173 * src/files.c: Test __VMS_POSIX as well as VMS.
20174
201751995-02-14 Jim Meyering <meyering@gnu.org>
20176
20177 * src/bison.s1 (__yy_memcpy):
20178 Renamed from __yy_bcopy to avoid
20179 confusion. Reverse FROM and TO arguments to be consistent with
20180 those of memcpy.
20181
201821995-02-14 Jim Meyering <meyering@gnu.org>
20183
20184 * bison.simple (__yy_memcpy):
20185 Renamed from __yy_bcopy to avoid
20186 confusion. Reverse FROM and TO arguments to be consistent with
20187 those of memcpy.
20188
201891994-11-10 David J. MacKenzie <djm@gnu.org>
20190
20191 * NEWS: reformat
20192
20193 * NEWS: New file.
20194
20195 * Makefile.in (DISTFILES): Include NEWS.
20196
20197 * Makefile.in (DISTFILES):
20198 Include install-sh, not install.sh.
20199
20200 * configure.in: Update to Autoconf v2 macro names.
20201
202021994-10-05 David J. MacKenzie <djm@gnu.org>
20203
20204 * Makefile.in: fix typo
20205
20206 * Makefile.in (prefix, exec_prefix):
20207 Let configure set them.
20208
202091994-09-28 David J. MacKenzie <djm@gnu.org>
20210
20211 * Makefile.in: Set datadir to $(prefix)/share.
20212
202131994-09-15 Richard Stallman <rms@gnu.org>
20214
20215 * src/bison.s1:
20216 Update copyright notice and GPL version.
20217
202181994-09-15 Richard Stallman <rms@gnu.org>
20219
20220 * bison.simple:
20221 Update copyright notice and GPL version.
20222
202231994-07-12 Richard Stallman <rms@gnu.org>
20224
20225 * src/reduce.c, src/reader.c:
20226 entered into RCS
20227
202281994-05-05 David J. MacKenzie <djm@gnu.org>
20229
20230 * Makefile.in: entered into RCS
20231
202321994-03-26 Richard Stallman <rms@gnu.org>
20233
20234 * src/bison.s1: entered into RCS
20235
202361994-03-26 Richard Stallman <rms@gnu.org>
20237
20238 * bison.simple: entered into RCS
20239
202401994-03-25 Richard Stallman <rms@gnu.org>
20241
20242 * src/main.c: entered into RCS
20243
202441994-03-24 Richard Stallman <rms@gnu.org>
20245
20246 * src/conflicts.c: entered into RCS
20247
202481994-01-02 Richard Stallman <rms@gnu.org>
20249
20250 * Makefile.in: *** empty log message ***
20251
202521993-11-21 Richard Stallman <rms@gnu.org>
20253
20254 * src/bison.s1: *** empty log message ***
20255
202561993-11-21 Richard Stallman <rms@gnu.org>
20257
20258 * doc/bison.texinfo: entered into RCS
20259
20260 * doc/bison.texinfo: *** empty log message ***
20261
202621993-11-21 Richard Stallman <rms@gnu.org>
20263
20264 * bison.simple: *** empty log message ***
20265
202661993-10-25 David J. MacKenzie <djm@gnu.org>
20267
20268 * doc/bison.texinfo: *** empty log message ***
20269
202701993-10-19 Richard Stallman <rms@gnu.org>
20271
20272 * src/bison.s1: *** empty log message ***
20273
202741993-10-19 Richard Stallman <rms@gnu.org>
20275
20276 * bison.simple: *** empty log message ***
20277
202781993-10-14 Richard Stallman <rms@gnu.org>
20279
20280 * src/bison.s1: *** empty log message ***
20281
202821993-10-14 Richard Stallman <rms@gnu.org>
20283
20284 * bison.simple: *** empty log message ***
20285
202861993-09-14 David J. MacKenzie <djm@gnu.org>
20287
20288 * doc/bison.texinfo: *** empty log message ***
20289
202901993-09-13 Noah Friedman <friedman@gnu.org>
20291
20292 * Makefile.in: *** empty log message ***
20293
202941993-09-10 Richard Stallman <rms@gnu.org>
20295
20296 * src/conflicts.c: *** empty log message ***
20297
20298 * src/system.h: entered into RCS
20299
203001993-09-10 Richard Stallman <rms@gnu.org>
20301
20302 * doc/bison.1: entered into RCS
20303
203041993-09-06 Noah Friedman <friedman@gnu.org>
20305
20306 * src/version.c: entered into RCS
20307
203081993-09-06 Noah Friedman <friedman@gnu.org>
20309
20310 * Makefile.in: *** empty log message ***
20311
203121993-07-30 David J. MacKenzie <djm@gnu.org>
20313
20314 * Makefile.in: *** empty log message ***
20315
203161993-07-24 Richard Stallman <rms@gnu.org>
20317
20318 * src/bison.s1: *** empty log message ***
20319
203201993-07-24 Richard Stallman <rms@gnu.org>
20321
20322 * bison.simple: *** empty log message ***
20323
203241993-07-08 David J. MacKenzie <djm@gnu.org>
20325
20326 * Makefile.in: *** empty log message ***
20327
203281993-07-04 Richard Stallman <rms@gnu.org>
20329
20330 * src/bison.s1: *** empty log message ***
20331
203321993-07-04 Richard Stallman <rms@gnu.org>
20333
20334 * bison.simple: *** empty log message ***
20335
203361993-06-26 David J. MacKenzie <djm@gnu.org>
20337
20338 * src/getargs.c: entered into RCS
20339
203401993-06-26 David J. MacKenzie <djm@gnu.org>
20341
20342 * doc/bison.texinfo: *** empty log message ***
20343
20344 * doc/bison.1: New file.
20345
203461993-06-25 Richard Stallman <rms@gnu.org>
20347
20348 * src/getargs.c: New file.
20349
203501993-06-16 Richard Stallman <rms@gnu.org>
20351
20352 * src/bison.s1: *** empty log message ***
20353
203541993-06-16 Richard Stallman <rms@gnu.org>
20355
20356 * bison.simple: *** empty log message ***
20357
203581993-06-03 Richard Stallman <rms@gnu.org>
20359
20360 * src/bison.s1: New file.
20361
203621993-06-03 Richard Stallman <rms@gnu.org>
20363
20364 * doc/bison.texinfo: *** empty log message ***
20365
203661993-06-03 Richard Stallman <rms@gnu.org>
20367
20368 * bison.simple: New file.
20369
203701993-05-19 Richard Stallman <rms@gnu.org>
20371
20372 * doc/bison.texinfo: New file.
20373
203741993-05-07 Noah Friedman <friedman@gnu.org>
20375
20376 * Makefile.in: *** empty log message ***
20377
203781993-04-28 Noah Friedman <friedman@gnu.org>
20379
20380 * src/reader.c: *** empty log message ***
20381
203821993-04-23 Noah Friedman <friedman@gnu.org>
20383
20384 * src/alloc.h: entered into RCS
20385
203861993-04-20 David J. MacKenzie <djm@gnu.org>
20387
20388 * src/version.c: *** empty log message ***
20389
20390 * src/files.c, src/allocate.c:
20391 entered into RCS
20392
20393 * src/reader.c: *** empty log message ***
20394
20395 * src/lex.c: entered into RCS
20396
20397 * src/conflicts.c: New file.
20398
20399 * src/symtab.c: entered into RCS
20400
20401 * src/alloc.h: New file.
20402
20403 * src/LR0.c: entered into RCS
20404
204051993-04-18 Noah Friedman <friedman@gnu.org>
20406
20407 * src/reader.c: New file.
20408
20409 * src/version.c: *** empty log message ***
20410
204111993-04-18 Noah Friedman <friedman@gnu.org>
20412
20413 * Makefile.in: *** empty log message ***
20414
204151993-04-17 Noah Friedman <friedman@gnu.org>
20416
20417 * Makefile.in: *** empty log message ***
20418
204191993-04-15 Richard Stallman <rms@gnu.org>
20420
20421 * src/main.c, src/files.c:
20422 New file.
20423
204241993-04-15 Noah Friedman <friedman@gnu.org>
20425
20426 * configure.in: entered into RCS
20427
20428 * configure.in: *** empty log message ***
20429
20430 * configure.in: New file.
20431
204321993-04-14 Richard Stallman <rms@gnu.org>
20433
20434 * Makefile.in: New file.
20435
204361993-04-13 Richard Stallman <rms@gnu.org>
20437
20438 * src/version.c: New file.
20439
204401993-03-25 Richard Stallman <rms@gnu.org>
20441
20442 * src/output.c: entered into RCS
20443
204441992-09-25 Richard Stallman <rms@gnu.org>
20445
20446 * configure.bat: entered into RCS
20447
204481992-06-22 Richard Stallman <rms@gnu.org>
20449
20450 * src/vmsgetargs.c: entered into RCS
20451
204521992-06-22 Richard Stallman <rms@gnu.org>
20453
20454 * doc/bison.rnh: entered into RCS
20455
204561992-04-20 David J. MacKenzie <djm@gnu.org>
20457
20458 * README: entered into RCS
20459
204601992-01-22 Richard Stallman <rms@gnu.org>
20461
20462 * src/machine.h: entered into RCS
20463
204641991-12-21 Richard Stallman <rms@gnu.org>
20465
20466 * src/lalr.c, src/closure.c:
20467 entered into RCS
20468
204691991-12-20 Richard Stallman <rms@gnu.org>
20470
20471 * src/state.h: entered into RCS
20472
204731991-12-18 Richard Stallman <rms@gnu.org>
20474
20475 * src/print.c, src/nullable.c, src/derives.c:
20476 entered into RCS
20477
204781991-11-03 David J. MacKenzie <djm@gnu.org>
20479
20480 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20481 entered into RCS
20482
204831988-09-09 Richard Stallman <rms@gnu.org>
20484
20485 * src/bison.hairy: entered into RCS
20486
204871987-12-16 Richard Stallman <rms@gnu.org>
20488
20489 * REFERENCES: entered into RCS
dc546b0f 20490
f294a2c2 20491
04098407 20492 -----
f294a2c2 20493
04098407 20494 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
95021767
JD
20495 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20496 Free Software Foundation, Inc.
f294a2c2 20497
04098407
PE
20498 Copying and distribution of this file, with or without
20499 modification, are permitted provided the copyright notice and this
20500 notice are preserved.
e9071366
AD
20501
20502$Id$