]> git.saurik.com Git - bison.git/blame - ChangeLog
* GNUmakefile: Update git-version-gen invocation so make dist
[bison.git] / ChangeLog
CommitLineData
0f664b89
JD
12008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * GNUmakefile: Update git-version-gen invocation so make dist
4 succeeds.
5
1cfe6375
JD
62008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
7
8 Update to the current gnulib CVS repository, and fix trigraph handling
9 in Bison.
10 * bootstrap: Update gnulib CVS repository URL.
11 (symlink_to_dir): Encapsulate the code that guarantees the destination
12 directory exists into...
13 (check_dst_dir): ... this new function, and...
14 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
15 fail when copying files into lib/uniwidth/.
16 * src/output.c (prepare_symbols): When writing yytname muscles, where
17 symbol names will be encoded in C-string literals, tell quotearg to
18 escape trigraphs. This used to be the default in gnulib.
19 * tests/regression.at (Token definitions): Because of the change in
20 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
21 escapes trigraphs in symbol names. Thus, yytname no longer has
22 trigraphs unnecessarily doubly escaped. Update test case output.
23 Extend test case to be sure Bison's own error messages will no longer
24 have trigraphs in symbol names unnecessarily escaped once.
25
74c52fc8
JD
262008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
27
28 Fix make dist infinite loop reported by Juan Manuel Guerrero at
29 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
30 * .cvsignore: Add .version.
31 * .version.in: New.
32 * bootstrap.conf (gnulib_modules): Add git-version-gen.
33 * configure.ac (AC_CONFIG_FILES): Add .version.
34 * build-aux/.cvsignore: Add git-version-gen.
35
8e55b3aa
JD
362008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
37
38 * NEWS (2.3a+): Mention that -g now takes an argument.
39 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
40 consistency. Update the -g and -x entries now that they take
41 arguments. Use brackets to indicate optional arguments.
42 * src/getargs.c (usage): Explain the relationship between arguments of
43 long and short options more completely. Document --defines and -d
44 separately since the former takes an argument but, for POSIX Yacc, the
45 latter does not.
46 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 47 (getargs): Sort cases.
8e55b3aa 48
59c5ac72
AD
492008-02-28 Akim Demaille <demaille@gostai.com>
50
51 * doc/bison.texinfo: Fix a few typos.
52
118d4978
AD
532008-02-28 Akim Demaille <akim@epita.fr>
54
55 * doc/bison.texinfo (Bison Options): Document -W.
56 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
57
7020f1e9
AD
582008-02-28 Akim Demaille <akim@epita.fr>
59
60 * src/getargs.c (short_options): Split and sort for readability.
61 -g and -x take optional arguments, just like their long options.
62 * build-aux/cross-options.pl: Use /x to make the regexp easier to
63 understand.
64 Fix the handling of $opt which resulted in all the argument to be
65 considered as optional.
66
59da312b
JD
672008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
68
69 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
70 say its interface is experimental.
71 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
72 Java.
73 (Bison Options): In the -L and --language entry, mention Java.
74 (Java Bison Interface): Say the interface is experimental.
75 * src/getargs.c (usage): Mention -L and --language.
76
77 * NEWS (2.3a+): Say the push parsing interface is experimental.
78 * doc/bison.texinfo (Push Decl): Likewise.
79 (Decl Summary): Likewise in the "%define api.push_pull" entry.
80 (Push Parser Function): Likewise.
81 (Pull Parser Function): Likewise.
82 (Parser Create Function): Likewise.
83 (Parser Delete Function): Likewise.
84 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
85 yypull_parse, and yypush_parse entries.
86
87 * NEWS (2.3a+): Mention XML support, and say the schema is
88 experimental.
89 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
90 * src/getargs.c (usage): Say the XML schema is experimental.
91
92 * NEWS (2.3a+): Say option instead of flag.
93
2bb3ebec
WP
942008-02-21 Wojciech Polak <polak@gnu.org>
95
96 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
97 text.
98
333e670c
JD
992008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
100
101 Fix impure push parser compile error reported by Bob Rossi at
102 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
103 * data/yacc.c: Clean up whitespace in the output a little.
104 (yypstate_allocated): Define for impure push parsers regardless of
105 whether the pull interface is also requested.
106 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
107 check impure push parsers without the pull interface.
108
109 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
110 yyerror takes arguments specified by %parse-param while yypstate_new
111 does not.
112 * doc/bison.texinfo (Parser Create Function): Document that
113 yypstate_new returns 0 for multiple impure parser instances.
114 * tests/push.at (Push Parsing: Multiple impure instances): Update
115 expected stderr output.
116
798096e1
JD
1172008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
118
119 * runtime-po/POTFILES.in (push.c): Remove.
120
9ca7f077
JD
1212008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
122
123 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
124 * data/push.c: Rename to...
125 * data/yacc.c: ... this, overwriting it.
126 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
127 `%push-pull-parser' -> `%define api.push_pull "both"'.
128 Remove old yacc.c tests, and update push.c tests to yacc.c.
129
42ee26bb
JD
1302008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
131
132 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
133 `"%code top" blocks' instead of `%code "top" blocks'.
134 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
135 Clean up whitespace in the output a little.
136
b1cc23c4
JD
1372008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
138
139 Fix documentation problems reported by Tim Josling at
140 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
141 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
142 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
143 integers. Explain the effect of literal string aliases on error
144 messages. Copy token 0 documentation from the C++ skeleton
145 documentation.
146
ab7f29f8
JD
1472008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
148
149 Accept a token number in a %left, %right, or %nonassoc for POSIX
150 conformance. Reported by Tim Josling at
151 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
152 * NEWS (2.3a+): Mention.
153 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
154 and code numbers are treated by precedence declarations.
155 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
156 of symbols.1.
157 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
158 of symbol.
159 (symbol.prec): New, just like symbol but allows INT.
160 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
161 longer holds.
162 * tests/regression.at (Token number in precedence declaration): New
163 test case.
164
a924ef36
JMG
1652008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
166
167 DJGPP specific issues.
168 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
169 be changed. Copyright timestamp adjusted.
170 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
171 be changed. Copyright timestamp adjusted.
172 * djgpp/config.site: Copyright timestamp adjusted.
173 * djgpp/config_h.sed: Copyright timestamp adjusted.
174 * djgpp/djunpack.bat: Copyright timestamp adjusted.
175 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
176 filename translation list.
177 * djgpp/subpipe.c (init_subpipe): Check the environment variables
178 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
179 files shall be created. Before trying to use the temp dir where the
180 environment variable points to check that the dir really exists. If
181 not default to the cwd as temp dir. Copyright timestamp adjusted.
182 * djgpp/subpipe.h: Copyright timestamp adjusted.
183 * djgpp/testsuite.sed: Copyright timestamp adjusted.
184
389c8cfd
PE
1852008-01-30 Paul Eggert <eggert@cs.ucla.edu>
186
187 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
188
5d1cfef4
PE
1892008-01-09 Paul Eggert <eggert@cs.ucla.edu>
190
191 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
192 Problem reported by Claudio Saavedra in
193 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
194
e2dcf996
WP
1952008-01-05 Wojciech Polak <polak@gnu.org>
196
197 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
198 document's title with the input grammar file name.
199
da730230
JD
2002007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
201
202 Automate regression testing of the XML/XSLT implementation. Discussed
203 starting at
204 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
205 * configure.ac (XSLTPROC): New substitution.
206 * Makefile.am (maintainer-xml-check): New phony target invoking...
207 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
208 invoking make maintainer-check with BISON_TEST_XML=1.
209 * tests/atlocal.in (XSLTPROC): New.
210 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
211 not to report reachable memory when Bison is expected to have a
212 non-zero exit status and (2) to compare XML/XSLT output with --graph
213 and --report=all output for every working grammar when
214 BISON_TEST_XML=1.
215 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
216 (AT_BISON_CHECK_XML): New.
217 (AT_QUELL_VALGRIND): New.
218 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
219 (AT_CHECK): ... don't redefine this since this was the old way to
220 quell Valgrind.
221 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
222 AT_BISON_CHECK invocations.
223 * tests/c++.at: Likewise.
224 * tests/calc.at: Likewise.
225 * tests/conflicts.at: Likewise.
226 * tests/cxx-type.at: Likewise.
227 * tests/existing.at: Likewise.
228 * tests/glr-regression.at: Likewise.
229 * tests/headers.at: Likewise.
230 * tests/input.at: Likewise.
231 * tests/java.at: Likewise.
232 * tests/output.at: Likewise.
233 * tests/push.at: Likewise.
234 * tests/reduce.at: Likewise.
235 * tests/regression.at: Likewise.
236 * tests/sets.at: Likewise.
237 * tests/skeletons.at: Likewise.
238 * tests/synclines.at: Likewise.
239 * tests/torture.at: Likewise.
240 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
241 tends to hang xsltproc.
242 (Big horizontal): Likewise.
243
408476bc
JD
2442007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
245
246 In XML output, remove redundant class attribute on symbol element.
247 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
248 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
249 look up a symbol to determine whether it's a nonterminal or terminal.
250 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
251 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
252
253 Add prec/assoc information to XML output.
254 * src/gram.c (grammar_rules_print_xml): For each rule that has a
255 %prec, add a percent_prec attribute.
256 * src/print-xml.c (print_grammar): For each terminal that has a
257 precedence or associativity, add a prec or assoc attribute.
258 (xml_indent): New.
259 (xml_puts): Use xml_indent.
260 (xml_printf): Use xml_indent.
261 * src/print-xml.h (xml_indent): Prototype.
262
263 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
264 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
265
d4a26c48
JD
2662007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
267
268 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
269 (bison:ruleByNumber): ... this for clarity.
270 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
271 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
272 (xsl:template match="reduction"): Update.
273 (xsl:template match="item"): Update.
274 (xsl:template match="reduction"): Update.
275
276 In the XML output, don't print the list of rules where symbols appear.
277 Compute it in XSLT instead. Discussed at
278 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
279 * data/xslt/bison.xsl (bison:ruleByLhs): New.
280 (bison:ruleByRhs): New.
281 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
282 bison:ruleByRhs.
283 (xsl:template match="terminal/rule"): Remove.
284 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
285 bison:ruleByRhs.
286 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
287 Remove.
288 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
289 bison:ruleByRhs and mode="number-link" for rule template.
290 (xsl:template match="terminal/rule"): Remove.
291 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
292 bison:ruleByRhs and mode="number-link" for rule template.
293 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
294 Rewrite as...
295 (xsl:template match="rule" mode="number-link"): ... this.
296 * src/print-xml.c (print_grammar): Don't print the list of rules.
297
ef1b4273
JD
2982007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
299
300 Don't let --report affect XML output; always print all information.
301 Discussed at
302 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
303 * src/conflicts.c (log_resolution): Implement.
304 * src/print-xml.c (print_core): Implement.
305 (print_state): Implement.
306 (print_xml): Implement.
307
308 * NEWS (2.3a+): Fix quotes.
309 * src/parse-gram.y (prologue_declaration): For consistency with -v,
310 don't let %verbose clear the list specified by --report.
311
0f6cd9e3
AD
3122007-11-26 Akim Demaille <akim@epita.fr>
313
314 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
315
d80fb37a
JD
3162007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
317
318 In the XML output, list useless and unused symbols and rules with the
319 useful ones and add a "usefulness" attribute. Discussed starting at
320 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
321 * src/gram.c (grammar_rules_partial_print_xml): Remove.
322 (grammar_rules_print_xml): Print all rules instead of just those
323 useful in the grammar, and add a "usefulness" attribute.
324 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
325 * src/print-xml.c (print_rules_useless_in_parser): Remove.
326 (print_grammar): Print all nonterminals instead of just useful ones,
327 and add a "usefulness" attribute to nonterminals and terminals.
328 (print_xml): Don't print a separate "reductions" or
329 "rules-useless-in-parser" element.
330 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
331 (reduce_xml): Remove.
332 (reduce_token_unused_in_grammar): New.
333 (reduce_nonterminal_useless_in_grammar): New.
334 * src/reduce.h (reduce_xml): Remove prototype.
335 (reduce_token_unused_in_grammar): Add prototype.
336 (reduce_nonterminal_useless_in_grammar): Add prototype.
337 * data/xslt/xml2text.xsl: Update for XML changes.
338 * data/xslt/xml2xhtml.xsl: Update for XML changes.
339 * tests/reduce.at (Useless Terminals): Update output.
340 (Useless Rules): Update output.
341 (Reduced Automaton): Update output.
342
343 Say "Terminals unused in grammar" instead of "Unused terminals".
344 * NEWS (2.3a+): Update.
345 * doc/bison.texinfo (Understanding): Update example output.
346 * src/reduce.c (reduce_output): Implement.
347 * data/xslt/xml2text.xsl: Implement.
348 * data/xslt/xml2xhtml.xsl: Implement.
349
1bb2bd75
JD
3502007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
351
352 Accept --report-file=FILE to override the default `.output' filename.
353 * NEWS (2.3a+): Mention.
354 * doc/bison.texinfo (Bison Options): Add an entry.
355 * src/files.c (compute_output_file_names): Don't override
356 spec_verbose_file if already set.
357 * src/getargs.c (usage): Document --report-file.
358 (REPORT_FILE_OPTION): New anonymous enum member.
359 (long_options): Add entry for it.
360 (getargs): Add case for it setting spec_verbose_file.
361
362 * build-aux/cross-options.pl: Don't record a short option just because
363 there's an arg.
364 * doc/.cvsignore: Add yacc.1.
365
a005a9c4
AD
3662007-11-14 Akim Demaille <akim@epita.fr>
367
368 * doc/yacc.1.in: New.
369 * configure.ac, doc/Makefile.am: Adjust.
370 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
371 config.h symbol.
372 Use AC_SUBST for assignments too.
373 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
374
cff03fb2
JD
3752007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
376
377 * src/gram.c: Remove comments that duplicate comments in gram.h.
378
379 When reporting useless rules and nonterminals, say "useless in grammar"
380 instead of "useless", and say "useless in parser" instead of "never
381 reduced". Discussed starting at
382 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
383 * NEWS (2.3a+): Mention this change.
384 * data/xslt/xml2text.xsl: Update output text and expected input XML
385 element names to match changes below.
386 * data/xslt/xml2xhtml.xsl: Likewise.
387 (xsl:template match="bison-xml-report"): Add missing entry in Table of
388 Contents: "Rules useless in parser due to conflicts".
389 * doc/bison.texinfo (Decl Summary): Reword a little.
390 (Understanding): Update example output for changes below.
391 * src/gram.c: (rule_useful_p): Rename to...
392 (rule_useful_in_grammar_p): ... this.
393 (rule_useless_p): Rename to...
394 (rule_useless_in_grammar_p): ... this.
395 (rule_never_reduced_p): Rename to...
396 (rule_useless_in_parser_p): ... this.
397 (grammar_rules_print): Update for renames.
398 (grammar_rules_print_xml): Update for renames.
399 (grammar_rules_never_reduced_report): Rename to...
400 (grammar_rules_useless_report): ... this since it is used for either
401 kind of useless rule.
402 * src/gram.h: Reword comments and update function names in prototypes.
403 * src/main.c (main): Say "rule useless in parser due to conflicts".
404 * src/print-xml.c (print_rules_never_reduced): Rename to...
405 (print_rules_useless_in_parser): ... this, and rename output XML
406 element "rules-never-reduced" to "rules-useless-in-parser".
407 (print_xml): Update for rename.
408 * src/print.c (print_results): Say "Rules useless in parser due to
409 conflicts".
410 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
411 (nonterminals_reduce): Say "nonterminal useless in grammar".
412 (reduce_output): Say "Nonterminals useless in grammar".
413 Say "Rules useless in grammar".
414 (reduce_xml): Rename output XML element "useless" to
415 "useless-in-grammar".
416 (reduce_print): Don't report the count of grammatically useless rules
417 as "rules never reduced" just because %yacc is specified.
418 In the correct report of this count, say nonterminal(s) and rule(s)
419 "useless in grammar".
420 * tests/conflicts.at (S/R in initial): Update expected output.
421 (Defaulted Conflicted Reduction): Likewise.
422 (Unreachable States After Conflict Resolution): Likewise.
423 * tests/existing.at (GNU pic Grammar): Likewise.
424 * tests/reduce.at (Useless Nonterminals): Likewise.
425 (Useless Rules): Likewise.
426 (Reduced Automaton): Likewise.
427 (Underivable Rules): Likewise.
428 (Empty Language): Likewise.
429
66f0441d
JD
4302007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
431
432 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
433 here document and before the EOF so that BSD's implementation of Bourne
434 shell doesn't parse the delimiter as part of the here document.
435 * doc/.cvsignore: Add cross-options.texi.
436 * src/getargs.c (usage): Add a blank line after the warning categories.
437
d0ee4105
PB
4382007-11-08 Paolo Bonzini <bonzini@gnu.org>
439
440 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
441
e8b1fb9b
AD
4422007-11-05 Akim Demaille <akim@epita.fr>
443
444 Remove Id: from bison.1.
445 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
446 (perl -0777 -pi -e 's/\.PP\nId): New.
447 (.x.1): Use it to ignore the version control revision.
448
2f7a96b5
AD
4492007-11-05 Akim Demaille <demaille@gostai.com>
450
451 * build-aux/Makefile.am: Ship cross-options.pl.
452 * doc/Makefile.am: Always refer to cross-options.texi with
453 $(srcdir).
454 (MAINTAINERCLEANFILES): Add it.
455
f4101aa6
AD
4562007-11-04 Akim Demaille <demaille@gostai.com>
457
458 Generate the long/short option cross-table.
459 * build-aux/cross-options.pl: New.
460 * doc/Makefile.am (cross-options.texi): New.
461 * doc/bison.texinfo: Use it.
462
727a1401
AD
4632007-11-04 Akim Demaille <demaille@gostai.com>
464
465 Generate bison.1 using help2man.
466 * doc/common.x, doc/bison.x: New.
467 * doc/Makefile.am (bison.1, .x.1): New.
468 The code is taken from autoconf-2.61/man/Makefile.am.
469 * configure.ac: Look for help2man.
470
6aeb9c57
AD
4712007-11-04 Akim Demaille <demaille@gostai.com>
472
473 Complete --help.
474 * src/getargs.c (usage): Document -W, make it clear that -d,
475 -g and -x have optional arguments.
476
d7be4085
AD
4772007-11-04 Akim Demaille <demaille@gostai.com>
478
479 Find sha1sum when named gsha1sum.
480 * bootstrap (find_tool): New.
481 ($SHA1SUM): New.
482
d9df47b6
JD
4832007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
484
485 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
486 at
487 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
488 * NEWS (2.3a+): Mention.
489 * data/bison.m4 (b4_pure_if): Don't define it here.
490 * data/c.m4 (b4_identification): Depend on individual skeletons to
491 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
492 values of the %define variables api.pure or api.push_pull. Define
493 YYPURE, YYPUSH, and YYPULL accordingly.
494 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
495 glr.cc has already defined b4_pure_flag.
496 * data/push.c: Define b4_pure_if based on `%define api.pure'.
497 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 498 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
499 * doc/bison.texinfo (Pure Decl): Update.
500 (Push Decl): Update.
501 (Decl Summary): Add api.pure to %define entry.
502 In %pure-parser entry, say it's deprecated and reference %define.
503 (Pure Calling): Update.
504 (Error Reporting): Update.
505 (C++ Scanner Interface): Update.
506 (How Can I Reset the Parser): Update.
507 (Table of Symbols): In %pure-parser entry, say it's deprecated and
508 reference %define.
509 * src/getargs.c (pure_parser): Remove global variable.
510 * src/getargs.h (pure_parser): Remove extern.
511 * src/output.c (prepare): Don't define pure_flag muscle.
512 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
513 wrapper around `%define api.pure'.
514 * tests/calc.at (Simple LALR Calculator): Update.
515 (Simple GLR Calculator): Update.
516 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
517 Update.
518 (GLR: Resolve ambiguity, pure, locations): Update.
519 (GLR: Merge conflicting parses, pure, no locations): Update.
520 (GLR: Merge conflicting parses, pure, locations): Update.
521 * tests/glr-regression.at (Uninitialized location when reporting
522 ambiguity): Update
523 * tests/input.at (Unused %define api.pure): New test case.
524 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
525 AT_PURE_IF and AT_PURE_AND_LOC_IF.
526 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
527
c373bf8b
JD
5282007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
529
530 %define push_pull -> %define api.push_pull. Discussed starting at
531 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
532 * data/push.c: Expect the new name.
533 * data/yacc.c: Likewise.
534 * doc/bison.texinfo (Push Decl): Update.
535 (Decl Summary): Update %define entry.
536 (Push Parser Function): Update.
537 (Pull Parser Function): Update.
538 (Parser Create Function): Update.
539 (Parser Delete Function): Update.
540 * tests/calc.at (Simple LALR Calculator): Update.
541 * tests/input.at (%define enum variables): Update.
542 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
543 (Push Parsing: Multiple impure instances): Update.
544 (Push Parsing: Unsupported Skeletons): Update.
545 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
546 (Exploding the Stack Size with Malloc): Update.
547
548 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
549 other entries some.
550
32f19b6b
JD
5512007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
552
553 For the XML output's terminal element, rename @number to @token-number,
554 and add @symbol-number. In the nonterminal element, rename @number to
555 @symbol-number. Discussed starting at
556 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
557 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
558 renames.
559 (xsl:template match="nonterminal"): Likewise.
560 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
561 (xsl:template match="nonterminal"): Likewise.
562 * src/print-xml.c (print_grammar): Implement.
563
255a6b90
JD
5642007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
565
566 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
567 2007-10-11 change, the child elements here are items not rules.
408476bc 568 (xsl:template match="item"): New.
255a6b90
JD
569 (xsl:template match="rule"): Update for new reduced itemset.
570 (xsl:template match="point"): Remove.
571 (xsl:template match="empty"): For consistency with --graph, don't
572 output "/* empty */".
573 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
574 line-wrap, don't pass a negative value as first-line-length since this
575 won't work with the following changes.
576 (xsl:template name="line-wrap"): Simplify slightly.
577 (xsl:template name="ws-search"): Eliminate recursion.
578 * src/print_graph.c (print_core): Don't print a reduction's lookahead
579 set next to an item whose dot is not at the end of the RHS even if it
580 happens to be associated with the same rule.
581
88c78747
JD
5822007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
583
31984206
JD
584 Add %define lr.keep_unreachable_states.
585 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
586 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
587 * src/main.c (main): Implement it.
588 * tests/conflicts.at (Unreachable States After Conflict Resolution):
589 Extend to test it, and fix a typo.
590
5912007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
592
593 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
594 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
595 the example .output text.
596 * tests/regression.at (Extra lookahead sets in report): Improve wording
597 of comments.
598
b7a70162
WP
5992007-10-17 Wojciech Polak <polak@gnu.org>
600
601 * src/print-xml.c (print_grammar): Renamed
602 <terminal> and <nonterminal> attributes:
603 "type" to "number" and "symbol" to "name".
604 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
605 Use new attribute names.
606 (xsl:template match="nonterminal"): Likewise.
607 * data/xslt/xml2xhtml.xsl: Likewise.
608
a0de5091
JD
6092007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
610
611 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
612 (Option Cross Key): Likewise.
613
614 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
615 next to an item whose dot is not at the end of the RHS even if it
616 happens to be associated with the same rule.
617 * src/print.c (print_core): Likewise.
618 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
619 (Resolved SR Conflicts): Update output.
620 * tests/regression.at (Extra lookahead sets in report): New test case.
621
4c20d18d
WP
6222007-10-11 Wojciech Polak <polak@gnu.org>
623
624 * src/print-xml.c (print_core): Remove item set
625 redundancy.
626 * data/xslt/bison.xsl (bison:ruleNumber): New key.
627 Improve processing time. Suggested by Joel E. Denny.
628 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
629 Write xsl:param "required" attribute as comment.
630 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
631 (xsl:template match="rule"): Support new reduced itemset.
632 (xsl:template match="point"): Remove.
633 * data/xslt/xml2xhtml.xsl: Likewise.
634
f506ad1c
JD
6352007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
636
637 * src/getargs.c (version): Update copyright year.
638
21f1b063
JD
6392007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
640
641 Make xml2dot.xsl and --graph produce the same output.
642 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
643 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
644 escaped later.
645 (xsl:template name="output-node"): Use the new escape template instead
646 of the string-replace template directly.
647 (xsl:template name="output-edge"): Likewise.
648 (xsl:template name="escape"): New, escapes backslashes and newlines in
649 addition to quotation marks.
650 * src/graphviz.c (start_graph, output_node, output_edge): Add
651 whitespace to output for legibility.
652
653 Make xml2text.xsl and --report produce the same output, and remove the
654 XML "conflicts" element since a conflict summary is easily extracted
655 from the automaton.
656 * data/xslt/bison.xsl: New.
657 (xsl:template match="state" mode="bison:count-conflicts): New.
658 * data/xslt/xml2text.xsl: Import bison.xsl.
659 (xsl:template match="bison-xml-report"): Instead of styling the
660 "conflicts" element, style the "automaton" element with mode
661 "conflicts". Unlike the former, the latter lists S/R and R/R
662 conflicts for a state on the same line.
663 (xsl:template match="conflicts"): Remove.
664 (xsl:template match="conflict"): Remove.
665 (xsl:template match="terminal"): Line-wrap the list of rules in which
666 the terminal is used.
667 (xsl:template match="nonterminal"): Likewise for nonterminals.
668 (xsl:template match="automaton" mode="conflicts"): New.
669 (xsl:template match="state" mode="conflicts"): New.
670 (xsl:template name="line-wrap"): New.
671 (xsl:template name="ws-search"): New.
672 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
673 (xsl:template match="bison-xml-report"): Instead of styling the
674 "conflicts" element, style the "automaton" element with mode
675 "conflicts."
676 (xsl:template match="conflicts"): Remove.
677 (xsl:template match="conflict"): Remove.
678 (xsl:template match="automaton" mode="conflicts"): New.
679 (xsl:template match="state" mode="conflicts): New.
680 * src/conflicts.c (conflicts_output_xml): Remove.
681 * src/conflicts.h (conflicts_output_xml): Remove prototype.
682 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
683 * src/print.c (print_grammar): Consistently wrap at the 66th column so
684 the corresponding XSLT is easier. Also, never wrap between a word and
685 the comma that follows it.
686
793fbca5
JD
6872007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
688
689 Improve C++ namespace support. Discussed starting at
690 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
691 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
692 b4_namespace_close): New macros that interpret the %define variable
693 "namespace" so its value can contain "::" to indicate nested
694 namespaces.
695 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
696 the above macros.
697 * data/lalr1.cc (b4_namespace): Likewise.
698 * data/location.cc (b4_namespace): Likewise.
699 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
700 inside a new table in the general %define entry. Document `%define
701 namespace' there as well. Point the %name-prefix entry to it since it
702 explains it more completely in the case of C++.
703 (C++ Bison Interface): Mention `%define namespace' instead of
704 %name-prefix.
705 (Table of Symbols): Remove the `%define push_pull' entry. The %define
706 entry suffices.
707 * tests/c++.at (Relative namespace references): New test case.
708 (Absolute namespace references): New test case.
709 (Syntactically invalid namespace references): New test case.
710 * tests/input.at (C++ namespace reference errors): New test case.
711
35b8730d
JD
7122007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
713
714 Add syncline support and location accessor to internal %define
715 interfaces.
716 * data/bison.m4 (b4_percent_define_get_loc): New.
717 (b4_percent_define_get_syncline): New.
718 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
719 (b4_percent_define_default): Record defining location as line 1 rather
720 than 0 for the sake of synchronizing #line's, and define
721 b4_percent_define_syncline(VARIABLE).
722 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
723 * src/muscle_tab.c (muscle_syncline_grow): New.
724 (muscle_code_grow): Use muscle_syncline_grow.
725 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
726 define b4_percent_define_syncline(VARIABLE).
727 (muscle_percent_define_get_loc): New.
728 (muscle_percent_define_get_syncline): New.
729 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
730 remove some unused variables.
731 (muscle_percent_define_default): Record defining location as line 1
732 rather than 0 for the sake of synchronizing #line's, and define
733 b4_percent_define_syncline(VARIABLE).
734 (muscle_percent_define_check_values): Use
735 muscle_percent_define_get_loc.
736 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
737 (muscle_percent_define_get_syncline): Prototype.
738 * tests/skeletons.at (%define Boolean variables: invalid skeleton
739 defaults): Update output for location change.
740 (Complaining during macro argument expansion): Extend to test
741 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
742
7dc4a694
JD
7432007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
744
745 Fix some error-reporting macro bugs.
746 * data/bison.m4 (b4_cat): New.
747 (b4_error, b4_error_at): Use b4_cat to send error directives directly
748 to stdout so they don't become arguments to other macros. Update
749 comments and add examples.
750 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
751 add examples.
752 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
753 after printing the error directive so that M4 doesn't report subsequent
754 problems that are induced by this problem.
755 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
756 instead of just in them. Recognize @\n in both places. Both expand to
757 the empty string. Needed by b4_cat.
758 * tests/skeletons.at (Complaining during macro argument expansion):
759 New test case.
760 (Fatal errors make M4 exit immediately): New test case.
761
d4bd2295
JD
7622007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
763
764 Implement --print-datadir.
765 * src/getargs.c (usage): Mention.
766 (PRINT_DATADIR_OPTION): New anonymous enum member.
767 (long_options): Add entry for it.
768 (getargs): Add case for it calling compute_pkgdatadir.
769 * src/output.c (output_skeleton): Encapsulate data directory
770 computation from here...
771 (prepare): ... and from here...
772 (compute_pkgdatadir): ... into this new function.
773 * src/output.h (compute_pkgdatadir): Prototype.
774
34cdeddf
JD
7752007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
776
777 * src/print-xml.c (escape_bufs): New static global variable
778 replacing...
779 (xml_escape_n): ... the static local variable buf here.
780 (print_xml): Free memory for escape_bufs.
781 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
782
d782395d
JD
7832007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
784
785 Replace `%push-parser' and `%push-pull-parser' with
786 `%define push_pull "push"' and `%define push_pull "both"'.
787 `%define push_pull "pull"' is the default.
788 * doc/bison.texinfo (Push Decl, Push Parser Function,
789 Pull Parser Function, Parser Create Function, Parser Delete Function):
790 Update declarations.
791 (Decl Summary, Table of Symbols): Replace %push-parser and
792 %push-pull-parser entries with a %define push_pull entry.
793 * data/bison.m4 (b4_percent_define_check_values): New macro.
794 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
795 definitions...
796 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
797 definitions...
798 * data/push.c: ... to here and compute them from the value of the
799 %define variable push_pull.
800 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
801 parsing requests here...
802 * data/yacc.c: ... hack this to switch to push.c any time
803 b4_use_push_pull_flag or the %define variable push_pull is set. This
804 will go away when we mv push.c yacc.c.
805 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
806 push parsing is not supported since unused %define variables are
807 reported anyway.
808 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
809 * src/muscle_tab.h (muscle_percent_define_check_values): Update
810 comments for consistency with b4_percent_define_check_values.
811 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
812 muscles.
813 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
814 Remove.
815 (prologue_declaration): Remove %push-parser and %push-pull-parser
816 rules.
817 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
818 * tests/calc.at: Update declarations.
819 * tests/input.at (%define enum variables): New test case.
820 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
821 declaration.
822 (Push Parsing: Multiple impure instances): Update declaration.
823 (Push Parsing: Unsupported Skeletons): New test case.
824 * tests/torture.at (Exploding the Stack Size with Alloca): Update
825 declaration.
826 (Exploding the Stack Size with Malloc): Update declaration.
827
3f999f78
WP
8282007-09-24 Wojciech Polak <polak@gnu.org>
829
830 Add XSLT transformations.
831
832 * data/xslt/xml2dot.xsl: Transform XML into DOT.
833 * data/xslt/xml2text.xsl: Transform XML into plain text.
834 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
835 * data/Makefile.am (xsltdir): New variable.
836 (dist_xslt_DATA): Add xslt/*.xsl files.
837
a4f75309
PE
8382007-09-23 Paul Eggert <eggert@cs.ucla.edu>
839
840 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
841 Problem reported by Wojciech Polak.
842 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
843 (xml_printf): Undo change I made on 21 September; that is,
844 indent 2 spaces, not 1.
845
ad5feac4
JD
8462007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
847
848 Pacify ./configure --enable-gcc-warnings.
849 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
850 `char const *' instead of `char *'.
851 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
852 local variable `sep'.
853
41d7a5f2
PE
8542007-09-21 Paul Eggert <eggert@cs.ucla.edu>
855
856 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
857 elsewhere.
858 * src/print-xml.c: Prefer "const" after types; that's more consistent.
859 (xml_printf): Indent just 1 space for level.
860 (e_char, xlate_char): Remove.
861 (xml_escape_string): Rewrite to avoid undefined behavior (used
862 storage that was freed from the stack).
863 (xml_escape_n): Don't bother checking for subscript error.
864
3f999f78
WP
8652007-09-21 Wojciech Polak <polak@gnu.org>
866
867 Add Bison XML Automaton Report.
41d7a5f2
PE
868
869 Add support for an -x option to generate an XML report.
870 It is not documented yet.
871 * src/print-xml.c: New file.
872 * src/print-xml.h: Likewise.
873 * lib/timevar.def (TV_XML): New var.
874 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
875 * src/conflicts.c: Include print-xml.h.
876 (solved_conflicts_xml_obstack): New var.
877 (log_resolution, conflicts_solve, conflicts_free):
878 Add support for XML report.
879 (conflicts_output_val): New function.
880 * src/conflicts.h (conflicts_output_val): New decl.
881 * src/files.c (spec_xml_file): New var.
882 (compute_output_file_names, output_file_names_free): Add XML support.
883 * src/files.h (spec_xml_file): New decl.
884 * src/getargs.c (xml_flag): New var.
885 (usage, short_options, long_options, getargs): Add XML support.
886 * src/getargs.h (xml_flag): New decl.
887 * src/gram.c: Include print-xml.h.
888 (rule_lhs_print_xml, rule_rhs_print_xml):
889 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
890 New functions.
891 * src/gram.h: Declare external ones.
892 * src/main.c: Include print-xml.h.
893 (main): Add XML support.
894 * src/reduce.c: Include print-xml.h.
895 (reduce_xml): New function.
896 * src/reduce.h: Declare it.
897 * src/state.c: Include print-xml.h.
898 (state_new): Add XML support.
899 (state_rule_lookahead_tokens_print_xml): New function.
900 * src/state.h: Declare it.
901 (struct state): New member solved_conflicts_xml.
902 * src/symtab.c (symbol_class_get_string): New function.
903 * src/symtab.h: Declare it.
904
6d8e724d
PE
9052007-09-21 Paul Eggert <eggert@cs.ucla.edu>
906
907 * GNUmakefile: Switch to coreutils's version.
908 * bootstrap: Likewise.
909 * Makefile.cfg: Adjust to new GNUmakefile.
910 * README-hacking: Likewise.
911
912 Import from gnulib:
913
914 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
915 Bruno Haible <bruno@clisp.org>
916
917 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
918 and is a script that invokes bison. Tighten the code. Add comments.
919
922bdd7f
JD
9202007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
921
922 Spell "boolean" as "Boolean". Reported by Akim Demaille.
923 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
924 * doc/bison.texinfo (Decl Summary): Fix.
925 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
926 * tests/input.at (Boolean %define variables): Update output.
927 * tests/skeletons.at (%define boolean variables: invalid skeleton
928 defaults): Rename to...
929 (%define Boolean variables: invalid skeleton defaults): ... this and
930 update output.
931
1b17b01d
JD
9322007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
933
934 In impure push mode, don't allow more than one yypstate to be allocated
935 since multiple impure parsers would corrupt yynerrs.
936 * data/push.c (yypstate_allocated): New static global variable
937 initialized to 0.
938 (yypull_parse): If yypstate_new returns 0, don't report it as memory
939 exhaustion if yypstate_allocated is 1, but still return 2.
940 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
941 already 1. Otherwise, set it to 1.
942 (yypstate_delete): Set it to 0.
943 * tests/push.at (Push Parsing: Multiple impure instances): New test
944 case.
945
9987d1b3
JD
9462007-08-17 Bob Rossi <bob@brasko.net>
947
948 * doc/bison.texinfo (Push Decl): Document the push parser.
949 (Table of Symbols): Ditto.
950 (Pure Decl): Ditto.
951 (Decl Summary): Ditto.
952 (Multiple Parsers, Push Parser Function, Pull Parser Function,
953 Parser Create Function, Parser Delete Function):
954 Add new push parser symbols.
955 (Table of Symbols): Document push-parser, push-pull-parser,
956 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
957
f16b0819
PE
9582007-08-15 Paul Eggert <eggert@cs.ucla.edu>
959
960 Update to GPLv3.
961 * doc/gpl-3.0.texi: New file.
962 * doc/gpl.texi: Remove.
963 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
964 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
965 * README-hacking, TODO, bootstrap, bootstrap.conf:
966 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
967 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
968 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
969 * data/lalr1.cc, data/lalr1.java, data/location.cc:
970 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
971 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
972 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
973 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
974 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
975 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
976 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
977 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
978 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
979 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
980 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
981 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
982 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
983 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
984 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
985 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
986 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
987 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
988 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
989 * src/complain.c, src/complain.h, src/conflicts.c:
990 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
991 * src/files.h, src/flex-scanner.h, src/getargs.c:
992 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
993 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
994 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
995 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
996 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
997 * src/print.c, src/print.h, src/print_graph.c:
998 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
999 * src/reduce.h, src/relation.c, src/relation.h:
1000 * src/revision.h, src/scan-code.h, src/scan-code.l:
1001 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1002 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1003 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1004 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1005 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1006 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1007 * tests/existing.at, tests/glr-regression.at:
1008 * tests/headers.at, tests/input.at, tests/java.at:
1009 * tests/local.at, tests/output.at, tests/push.at:
1010 * tests/reduce.at, tests/regression.at, tests/sets.at:
1011 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1012 * tests/torture.at:
1013 Update to GPLv3.
1014
728c4be2
JD
10152007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1016
1017 Get rid of broken %no-parser, -n, and --no-parser implementation and
1018 documentation.
1019 * TODO: Don't mention them.
1020 * doc/bison.1: Likewise.
1021 * doc/bison.texinfo (Decl Summary): Likewise.
1022 (Bison Options): Likewise.
1023 (Option Cross Key): Likewise.
1024 * src/getargs.c (no_parser_flag): Remove global variable.
1025 (usage): Don't print description of -n and --no-parser.
1026 (long_options): Remove --no-parser entry here.
1027 (getargs): Remove -n case in the switch here.
1028 * src/getargs.h (no_parser_flag): Remove extern.
1029 * tests/regression.at (Web2c Actions): Remove comment that mentions
1030 --no-parser.
1031
5d31a216
JD
10322007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1033
1034 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1035 name user variables starting with `yy'. Just pass NULL instead of a
1036 dummy local &yylval to yypush_parse.
1037 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1038 starting with `yy'.
1039
a2ea208d
JD
10402007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1041
1042 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1043 true since it's then always used regardless of whether yyoverflow is
1044 defined. Reported by Christian Burger at
1045 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1046 * THANKS: Add Christian Burger.
1047
91661ebb
JD
1048 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1049 node names: say "Decl Summary" not "Bison Declaration Summary".
1050
cbd50549
JD
10512007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1052
1053 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1054 determine whether this function has already complained about an invalid
1055 value for a %define boolean variable, don't check whether Bison has
1056 ever examined the value. As written, the check was a tautology.
1057 Instead, record and check for this complaint using a separate muscle.
1058
eb1b0740
JD
10592007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1060
1061 Fix push parsing memory leak reported by Brandon Lucia at
1062 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1063 * THANKS: Add Brandon Lucia.
1064 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1065 but the parse never completed and thus freed it.
1066 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1067 * tests/testsuite.at: Include push.at.
1068 * test/push.at: New.
1069 (Push Parsing: Memory Leak for Early Deletion): New test case.
1070
9d774aff
JD
10712007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1072
1073 Improve handling of multiple S/R conflicts in the same state and of S/R
1074 conflicts involving multiple reductions.
1075 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1076 set for a state here or Bison will abort if it is reassigned on a
1077 later conflicted reduction in the same state.
1078 Similarly, don't finalize and assign the solved conflicts report here
1079 or it will be lost if it is reassigned on a later conflicted reduction
1080 in the same state.
1081 (set_conflicts): Instead, assign them both here after all S/R conflicts
1082 in the state have been fully examined.
1083 * src/print.c (shift_set): Rename to...
1084 (no_reduce_set): ... this.
1085 (print_reductions): Update for rename, and add %nonassoc error action
1086 tokens to no_reduce_set so that, when printing the first remaining
1087 reduction on an error action token, the reduction is enclosed in
1088 brackets.
1089 (print_results): Update for rename.
1090 * tests/conflicts.at (Solved conflicts report for multiple reductions
1091 in a state): New test case.
1092 (%nonassoc error actions for multiple reductions in a state): New test
1093 case.
1094
1095 * src/main.c (main): Don't depend on C99 features.
1096
10159d2a
JD
10972007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1098
1099 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
1100 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1101 uniwidth.
10159d2a 1102
953b3935
JD
11032007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1104
1105 * bootstrap (slurp): Create target directories that don't exist.
1106 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1107
6ce2d93a
JD
11082007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1109
1110 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1111 than item number.
1112 * closure.c (closure): Likewise.
1113 * state.h (reductions): Comment sorting of rules.
1114 (state): Comment sorting of items.
1115
ce3448d5
JD
11162007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1117
1118 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1119 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1120 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1121 definition in order to avoid Gnulib headers since we don't use config.h
1122 here.
1123 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1124 rather than AT_DATA so that config.h is included.
1125
8a86eef0
JD
11262007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1127
1128 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1129 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1130 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1131 and so that YYFPRINTF is guaranteed to be defined here.
1132
b1a81613
JD
11332007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1134
1135 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1136 with...
1137 (muscle_percent_define_check_values): ... this more helpful function.
1138 Again, it's not used yet, but it will be.
1139 * src/muscle_tab.h: Likewise.
1140
71b61d4d
JD
1141 Improve some comments in parser table construction.
1142 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1143 (generate_states): Don't mention ruleset, which is internal to closure.
1144 * src/closure.c (closure): Explain sorting of core and itemset, which
1145 is required for this function to behave correctly.
1146 * src/closure.h (closure): Mention sorting.
1147
2a6b783d
JD
11482007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1149
1150 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1151 move the check for disabled transitions to an aver since conflict
1152 resolution hasn't happened yet.
1153
1154 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1155 labels a state as inconsistent just because it has error transitions.
1156 The original form of this check appeared in revision 1.1 of lalr.c,
1157 which was committed on 1991-12-21. Now (at least), changing the
1158 consistency label on such a state appears to have no useful effect in
1159 any of the places it is examined, which I enumerate below. The key
1160 point to understanding each item in this enumeration is that a state
1161 with an error transition is labelled consistent in the first place only
1162 if it has no rules, so the check cannot matter for states that have
1163 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1164 to try to identify its conflicts, and a state must have *rules* to have
1165 conflicts. (2) Labelling a state as inconsistent will affect how
1166 action_row sets the default *rule* for the state. (3) Labelling a
1167 state as inconsistent will cause build_relations to add lookback edges
1168 to *rules* in that state.
1169 * src/state.h (struct state): Word the comment for member consistent
1170 more carefully.
1171
14462c2b
JD
11722007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1173
1174 Don't depend on C99 features.
1175 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1176 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1177 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1178 * src/state.c (state_mark_reachable_states): Fix for-loop.
1179 (state_remove_unreachable_states): Fix for-loop.
1180
1181 Don't widen struct state with member reachable just to temporarily
1182 record reachability. Instead, use a local bitset.
1183 * src/state.h (struct state): Remove member.
1184 * src/state.c (state_new): Don't initialize it.
1185 (state_mark_reachable_states): Rename to...
1186 (state_record_reachable_states): ... this, and use bitset.
1187 (state_remove_unreachable_states): Use bitset.
1188
5a43d418
JD
11892007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1190
1191 * src/Makefile.am (yacc): Quote target action commands properly so
1192 that the yacc script isn't corrupt. Reported by Hans Aberg at
1193 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1194
0c650a20
JD
1195 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1196 the case of pure parsers. Reported by Frans Englich at
1197 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1198 * THANKS: Add Frans Englich.
1199
61fee93e
JD
1200 * NEWS (2.3a+): In the %code entry, reference section `Bison
1201 Declaration Summary' from the manual now since the %code summary has
1202 moved there.
1203 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1204 in the rules section must be terminated by semicolons.
1205
f124d423
JD
12062007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1207
1208 Extend the front-end API for %define variables to more completely
1209 mirror the back-end. This will be useful in the future.
1210 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1211 Update comments to mention the new front-end counterparts of these
1212 macros.
1213 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1214 for muscle_string_decode and muscle_location_decode.
1215 (muscle_string_decode): New static function.
1216 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1217 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1218 functions.
1219 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1220 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1221 implementation more closely.
1222 (muscle_percent_define_invalid_value): New function.
1223 * src/muscle_tab.h (muscle_percent_define_get,
1224 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1225 Prototype.
1226
75ad86ee
JD
12272007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1228
1229 * NEWS (2.3a+): Mention yesterday's state-removal change.
1230 (2.3a): Remove the %language entry, which was added after 2.3a.
1231 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1232 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1233 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1234 tests/existing.at: Update copyright date.
1235
5967f0cf
JD
12362007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1237
1238 If conflict resolution makes states unreachable, remove those states,
1239 report rules that are then unused, and don't report conflicts in those
1240 states.
1241 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1242 New global function.
1243 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1244 function.
1245 * src/main.c (main): After conflict resolution, remove the unreachable
1246 states and update all data structures that reference states by number.
1247 * src/state.c (state_new): Initialize each state's reachable member to
1248 false.
1249 (state_mark_reachable_states): New static function.
1250 (state_remove_unreachable_states): New global function.
1251 * src/state.h (struct state): Add member bool reachable.
1252 (state_remove_unreachable_states): Prototype.
1253 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1254 New test case.
1255 * tests/existing.at (GNU pic Grammar): Update test case output now that
1256 an unused rule is discovered.
1257
b09f4f48
JD
12582007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1259
1260 Minor code cleanup in parser table construction.
1261 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1262 (new_itemsets, save_reductions): Update for rename to nitemset.
1263 * src/closure.c (nritemset): Rename to...
1264 (nitemset): ... this since the "r" appears to meaningless and isn't
1265 used in the comments.
1266 (closure): Update for rename.
1267 * src/closure.h (nritemset): Update extern to...
1268 (nitemset): ... this.
1269 * src/lalr.c (LA): Fix a typo in comments.
1270 * src/print.c (print_core): Update for rename to nitemset.
1271 * src/print_graph.c (print_graph): Likewise.
1272 * src/state.h: Fix some typos in header comments.
1273
bbb44d83
PE
12742007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1275
9b33de72
PE
1276 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1277 still sticks to ASCII. Sorry!
1278
bbb44d83
PE
1279 * README-hacking: New file, taken mostly from coreutils, with changes
1280 for Bison. Contains much of the contents of:
1281 * README-cvs: Remove.
1282 * bootstrap: Sync from gnulib.
1283 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1284 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1285
29553547
JD
12862007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1287
1288 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1289 Setzer.
1290 (Java Differences): Fix some typos.
1291 * THANKS: Add Sebastian Setzer.
1292
01b477c6
PB
12932007-03-07 Paolo Bonzini <bonzini@gnu.org>
1294
730739e4
AD
1295 * data/java.m4 (b4_single_class_if): Remove.
1296 (b4_abstract_if): Look at "%define abstract".
1297 (b4_lexer_if): New.
1298 (b4_union_name): Rename...
1299 (b4_yystype): ... to this. Map to "%define stype".
1300 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1301 b4_maybe_throws): Fix quoting.
1302 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1303 * data/lalr1.java (Lexer interface): Always define.
1304 (Lexer interface within parser class): Remove.
1305 (YYLexer class): New, used when "%code lexer" is present.
1306 (constructor): When "%code lexer" is used, pass %lex-param
1307 to the lexer constructor.
1308 (yylex, yyparse): Remove %lex-param from method invocations
1309 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1310
1311 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1312 abstract". Rename "%define union_name" to "%define stype".
1313 Rename method names according to previous patch.
1314 (Java Scanner Interface): Describe "%code lexer" instead of
1315 "%pure-parser" and "%define single_class".
1316 (Java Differences): Mention "%code lexer".
1317
1318 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1319 Include scanner here, using macros from tests/local.at.
1320 (AT_DATA_CALC_Y): Remove final argument.
1321 (_AT_CHECK_JAVA_CALC): Likewise.
1322 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1323 of %locations and %error-verbose.
1324 (main): Test with and without %lex-param.
1325 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1326 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 1327
122bea3a
JMG
13282007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1329
1330 DJGPP spefic issue. Inhibit the use of disallowed characters for
1331 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1332 and concern testsuite case 46.
1333 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1334 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1335 * djgpp/config.bat: Inhibit the use of disallowed characters.
1336
9611cfa2
JD
13372007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1338
1339 Miscellaneous %define and %code cleanup.
1340 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1341 values are interpreted.
1342 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1343 documentation a little more.
1344 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1345 muscle_percent_define_insert, muscle_percent_code_grow): New
1346 functions/macros.
1347 * src/muscle_tab.h (muscle_percent_define_insert,
1348 muscle_percent_code_grow): Prototype.
1349 * src/parse-gram.y (prologue_declaration): Use
1350 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1351 %define and %code directives.
1352
1353 Make it easy to share %define boolean variables between the front-end
1354 and back-end. Though not used yet, this will be useful in the future.
1355 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1356 Bison uses of names rather than just skeleton uses of names.
1357 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1358 b4_percent_define_skeleton_variables(VARIABLE) to
1359 b4_percent_define_bison_variables(VARIABLE).
1360 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1361 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1362 b4_percent_code_bison_qualifiers(QUALIFIER).
1363 (b4_check_user_names_wrap): Update for renames.
1364 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1365 muscle_percent_define_default): New functions mimicking
1366 b4_percent_define_flag_if and b4_percent_define_default.
1367
1368 For %define variables, report locations for invalid values and
bbb44d83 1369 redefinitions.
9611cfa2
JD
1370 * data/bison.m4 (b4_percent_define_flag_if): Read
1371 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1372 value for VARIABLE.
1373 (b4_percent_define_default): Save a special location in
1374 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1375 must later be reported as invalid.
1376 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1377 functions.
1378 (muscle_percent_define_insert): Record the location of VARIABLE in
1379 muscle percent_define_loc(VARIABLE), and use it to report the previous
1380 location for a redefinition.
1381 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1382 (muscle_percent_define_default): Update like b4_percent_define_default.
1383 (muscle_grow_user_name_list): Rename to...
1384 (muscle_user_name_list_grow): ... this for consistency and use
1385 muscle_location_grow.
1386 * src/muscle_tab.h (muscle_location_grow): Prototype.
1387 * tests/input.at (%define errors): Update expected output.
1388 * tests/skeletons.at (%define boolean variables: invalid skeleton
1389 defaults): New test case.
1390
0bf92491
JD
13912007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1392
1393 * src/print.c (lookahead_set, state_default_rule): Remove.
1394 (print_reductions): Replace state_default_rule invocation with
1395 equivalent use of yydefact, which was computed in token_actions in
1396 tables.c.
1397 (print_results): Don't allocate lookahead_set.
1398
d3b12988
PB
13992007-02-27 Paolo Bonzini <bonzini@gnu.org>
1400
1401 * data/lalr1.java: Prefix all private members with yy.
1402
f57a7536
JD
14032007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1404
1405 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 1406 Sebastien Fricker at
f57a7536 1407 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 1408 * THANKS: Add Sebastien Fricker.
f57a7536
JD
1409 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1410 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1411 accept a variable number of arguments.
1412
6404a5bf
JD
14132007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1414
1415 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1416
e4e09639
JMG
14172007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1418
1419 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1420 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1421 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1422
d7e0a1a7
PE
14232007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1424
1425 Undo my 2007-02-07 change, switching back to the c-strcase module
1426 introduced in the 2007-02-03 change. Bruno Haible reported that
1427 the 2007-02-07 change would be dangerous in Turkish if we add a
1428 language whose name contains "i", since "i" is not lowercase "I"
1429 in Turkish.
1430 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1431 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1432 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1433 * m4/.cvsignore: Remove strcase.m4.
1434 * src/getargs.c: Revert 2007-02-07 change, as follows.
1435 Include c-strcase.h.
1436 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1437
deee93a1
JD
14382007-02-11 Bruno Haible <bruno@clisp.org>
1439
1440 Enable the Java related testsuite tests when the only Java compiler
1441 found is a gcj < 4.3. Discussed at
1442 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1443 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1444
574add85
JD
14452007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1446
1447 * data/Makefile.am: Update copyright date.
1448 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1449 yypstate_new returns NULL.
1450 (yypstate_new): Return NULL if malloc does.
1451 * src/reader.c (packgram): Move translation of rule actions from the
1452 beginning of packgram to...
1453 (check_and_convert_grammar): ... here right before packgram is invoked
1454 so it's easier to write more complete comments, and remove redundant
1455 code.
1456
e785ccf7
JD
14572007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1458
1459 As in semantic actions, make @$ in %initial-action, %destructor, and
1460 %printer imply %locations.
1461 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1462 scanning @$.
1463 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1464 (@$ in %initial-action implies %locations,
1465 @$ in %destructor implies %locations,
1466 @$ in %printer implies %locations): ... these new test cases.
1467
1cfe1ed7
PE
14682007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1469
1470 Undo most of the 2007-02-03 change, switching to the strcase module
1471 now that gnulib strcase has been fixed.
1472 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1473 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1474 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1475 * m4/.cvsignore: Add strcase.m4.
1476 * src/getargs.c: Revert 2007-02-03 change, as follows.
1477 Don't include c-strcase.h.
1478 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1479 strcasecmp has "unspecified behavior" outside the POSIX locale,
1480 but it works fine in practice if at least one argument is ASCII,
1481 as is the case in Bison.
1482
0049ec86
PB
14832007-02-07 Paolo Bonzini <bonzini@gnu.org>
1484
1485 * tests/java.at: Skip tests if only one of javac/java is present.
1486 Reported by Joel E. Denny.
1487 * tests/atlocal.in: Adjust copyright years.
1488
14892007-02-05 Paolo Bonzini <bonzini@gnu.org>
1490
1491 * data/lalr1.java (Stack): Work around old verifiers that disallow
1492 access to the private fields of an inner class, from the outer class.
1493 We can make Stack's fields public because user code doesn't have access
1494 to the instance of Stack used by parse(). Reported by Paul Eggert.
1495
2c2b7220
PE
14962007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1497
1498 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1499 the right spot for these files?
1500 * bootstrap.conf (gnulib_modules): Add c-strcase.
1501 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1502 c-strncasecmp.c.
1503 * src/getargs.c: Include c-strcase.h.
1504 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1505 to avoid unspecified behavior.
1506
b2b81dae
JD
15072007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1508
1509 * doc/bison.texinfo (Decl Summary): Correct typo.
1510
c1d19e10
PB
15112007-01-30 Paolo Bonzini <bonzini@gnu.org>
1512
1513 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1514 Complain if the value does not match empty, "true" or "false".
1515 * data/c++.m4: Adjust default definitions of %define variables.
1516 * data/java.m4: Adjust default definitions of %define variables.
1517 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1518 to above behavior.
1519 * tests/input.at (Boolean %define variables): Test new behavior.
1520
8405b70c
PB
15212007-01-29 Paolo Bonzini <bonzini@gnu.org>
1522
1523 * NEWS: Mention java.
1524 * TODO: Remove things that are done.
1525 * bootstrap.conf: Add javacomp-script and javaexec-script.
1526 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1527
1528 * data/Makefile.am: Add new files.
1529 * data/java-skel.m4: New.
1530 * data/java.m4: New.
1531 * data/lalr1.java: New.
1532
1533 * doc/bison.texinfo: Put "A Complete C++ Example" under
1534 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1535 under Other Languages.
1536
1537 * src/getargs.c (valid_languages): Add Java.
1538 * src/getargs.h (struct bison_language): Update size of string fields.
1539
1540 * tests/Makefile.am: Add java.at.
1541 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1542 * tests/java.at: New.
1543 * tests/testsuite.at: Include it.
1544
3eb82471
JD
15452007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1546
1547 Clean up.
1548 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1549 at_directive_argv arguments so these no longer have to be global
1550 variables. Also, update the implementation for the following changes.
1551 (fail_for_at_directive_too_many_args,
1552 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1553 (at_directive_name): Remove as at_directive_argv[0] will be used for
1554 this now.
1555 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1556 for the directive name.
1557 (at_directive_argc, at_directive_argv): Make these local within
1558 skel_lex instead of global.
1559 (INITIAL): Update directive start action for above changes.
1560 (SC_AT_DIRECTIVE_ARG): Rename to...
1561 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1562 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1563 (scan_skel): Move yylex_destroy to...
1564 (skel_scanner_free): ... here.
1565 * tests/skeletons.at (installed skeleton file name): Rename to...
1566 (installed skeleton file names): ... this.
1567
148d66d8
JD
15682007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1569
1570 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1571 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1572 Summary" not "Directives".
1573 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1574 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1575 since the former is now the more complete one.
1576 (Prologue Alternatives): Likewise and do the same for %defines.
1577 (Table of Symbols): Add summary of %code, add summary of %define, and
1578 move full %code documentation to...
1579 (Decl Summary): ... here for consistency with other entries in these
1580 sections.
1581 Move %define entry in order to keep this list alphabetized.
1582 Reword %define entry a little to put less emphasis on the skeleton
1583 concept, which most users shouldn't have to think about.
1584
665f0c24
PE
15852007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1586
1587 Adjust to recent gnulib changes.
1588 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1589 Add string.h, string_.h, unistd_.h, wchar_.h.
1590 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1591 * src/system.h: Don't include <stpcpy.h>; this is now done by
1592 <string.h>.
1593
592d0b1e
PB
15942007-01-23 Paolo Bonzini <bonzini@gnu.org>
1595
1596 Simplify implementation of unqualified %code, implement macros for
1597 uniform treatment of boolean %define flags. Document %define.
1598 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1599 b4_percent_code_ifdef): New.
1600 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1601 * data/c++.m4: Define default value for global_tokens_and_yystype.
1602 * data/glr.cc: Likewise.
1603 * data/location.cc: Use b4_percent_define_flag_if.
1604
148d66d8 1605 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
1606
1607 * src/parse-gram.y (Unqualified %code): Change muscle name to
1608 b4_percent_code().
1609 (content.opt): Default to empty.
1610
a7867f53
JD
16112007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1612
1613 Implement support for relative and absolute skeleton file names.
1614 Discussed starting at
1615 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1616 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1617 (Bison Options): Document in --skeleton entry.
1618 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1619 full_skeleton can't necessarily hold all of pkgdatadir.
1620 If the specified skeleton file name contains a `/', don't prepend
1621 pkgdatadir.
1622 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1623 file name contains a `/', prepend the grammar file directory.
1624 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1625 * skeletons.at: New file.
1626 (relative skeleton file names): New test case.
1627 (installed skeleton file names): New test case.
1628 * tests/testsuite.at: Include skeletons.at.
1629
1630 * bootstrap: Update copyright to 2007.
1631
830c9b18
PB
16322007-01-17 Paolo Bonzini <bonzini@gnu.org>
1633
1634 * bootstrap: Remove occurrences of .#bootmp from the files.
1635
a8c2e813
AD
16362007-01-17 Akim Demaille <akim@epita.fr>
1637
1638 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1639 nonterminals.
1640 Use per-type %printer.
1641
279cabb6
JD
16422007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1643
1644 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1645 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1646 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1647 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1648 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1649 tests/glr-regression.at, tests/input.at, tests/local.at,
1650 tests/output.at, tests/torture.at: Update copyright to 2007.
1651
bb32f4f2
AD
16522007-01-16 Akim Demaille <akim@epita.fr>
1653
1654 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1655 error code.
1656 (Calc++ Scanner): Exit with failure if we can't open the input
1657 file.
1658 Accept "-" standing for stdin.
1659 (Calc++ Top Level): Print the result only if the parsing was
1660 successful.
1661
7cff04b5
AD
16622007-01-16 Akim Demaille <akim@epita.fr>
1663
1664 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1665
a4e25e1d
JD
16662007-01-15 Paolo Bonzini <bonzini@gnu.org>
1667 and Joel E. Denny <jdenny@ces.clemson.edu>
1668
1669 Clean up %define and %code implementation in M4 some. Most
1670 importantly, rename all related macros to be in the b4_percent_define
1671 and b4_percent_code namespaces. Also, complete support for `.' in
1672 %define variable names and %code qualifiers.
1673 * data/bison.m4 (b4_check_user_names): Check for special
1674 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1675 m4_foreach loops.
1676 (b4_get_percent_define, b4_get_percent_code): Rename to...
1677 (b4_percent_define_get, b4_percent_code_get): ... these.
1678 Extend documentation with examples.
1679 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1680 b4_percent_define_skeleton_variables and
1681 b4_percent_code_skeleton_qualifiers.
1682 Expect any value for the %define variable `foo' to be stored in the
1683 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1684 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1685 expect any unqualified %code blocks to be stored in a macro named
1686 `b4_percent_code_unqualified'.
1687 Use m4_indir so that %define variable names and %code qualifiers can
1688 contain `.', which is allowed by the grammar parser.
1689 (b4_percent_define_default): New macro to set a default value for a
1690 %define variable.
1691 (m4_wrap): Update wrapped code, and fix some underquoting.
1692 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1693 Expect grammar uses of %define variables and %code qualifiers to be
1694 defined in b4_percent_define_user_variables and
1695 b4_percent_code_user_qualifiers.
1696 * data/c++.m4: Use b4_percent_define_default rather than
1697 m4_define_default. Fix some underquoting. Skeleton usage of %define
1698 variable define_location_comparison now implies skeleton usage of
1699 %define variable filename_type.
1700 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1701 data/push.c, data/yacc.c: Update macro names.
1702 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1703 muscle names.
1704
e37c665c
JMG
17052007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1706
1707 DJGPP specific issues.
1708
1709 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1710 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1711
7d2d521f
JD
17122007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1713
1714 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1715 run parsers in all tests so that Valgrind is invoked during
1716 maintainer-check-valgrind.
1717 (Duplicate representation of merged trees): Free all semantic values.
1718 (Duplicated user destructor for lookahead): Likewise.
1719
e0ac9b4b
JD
17202007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1721
1722 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1723 command-line prefix.
1724 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1725 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1726 miss Valgrind messages.
1727 (Exploding the Stack Size with Malloc): Likewise.
1728
78143faa
JD
17292007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1730
1731 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1732 locals. Reported by Juan Manuel Guerrero at
1733 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1734 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1735 Fix some indentation also.
1736 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1737 explaining this issue.
1738
7ecec4dd
JD
17392007-01-09 Paolo Bonzini <bonzini@gnu.org>
1740 and Joel E. Denny <jdenny@ces.clemson.edu>
1741
1742 Simplify union and prologue handling, and escape union and lex/parse
1743 params with digraphs.
1744 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1745 values to the empty string since these are no longer guaranteed
1746 initialized by the front-end.
1747 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1748 braces around b4_user_stype since this is no longer done by the
1749 front-end.
1750 * src/files.c, src/files.h (pre_prologue_obstack,
1751 post_prologue_obstack): Remove.
1752 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1753 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1754 with digraphs. This fixes lex params and parse params.
1755 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1756 * src/output.c (prepare): Remove muscle insertion of the prologues.
1757 (output): Remove freeing of pre_prologue_obstack and
1758 post_prologue_obstack.
1759 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1760 than prologue_augment for prologue parsing so you don't need prologue
1761 obstacks.
5c80250c
JD
1762 (grammar_declaration): For %union RHS, use `braceless' instead of
1763 "{...}" so that braces are already stripped and code is escaped with
1764 digraphs.
7ecec4dd
JD
1765 * src/reader.c (prologue_augment): Remove.
1766 (reader): Remove initialization of pre_prologue_obstack and
1767 post_prologue_obstack.
1768 * src/reader.h (prologue_augment): Remove.
1769
1770 * data/c.m4: Remove stray parenthesis.
1771
16dc6a9e
JD
17722007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1773
1774 Remove quotes from variables names in %define directives and from
1775 qualifiers in %code directives, and restrict the characters that are
1776 allowed in them to M4-friendly ones. For %define, continue to support
1777 the quoted form as a deprecated feature. Discussed starting at
1778 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1779 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1780 %code.
1781 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
1782 (Decl Summary): In %defines entry, update mention of `%code requires'
1783 and `%code provides'.
16dc6a9e
JD
1784 (C++ Location Values): Update %define uses.
1785 (Calc++ Parser Interface): Likewise.
1786 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 1787 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
1788 * src/parse-gram.y (prologue_declaration): For %define variables, use
1789 `variable' instead of `STRING'.
1790 (grammar_declaration): For %code qualifiers, use `ID' instead of
1791 `STRING'.
1792 (variable): New nonterminal that takes an `ID' or a `STRING'.
1793 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1794 and %define uses.
1795 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1796 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1797 (%define errors): Update %define uses.
1798
e9813cd4
JD
17992007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1800
1801 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1802 instead of muscle_insert for %define values so that M4-special
1803 characters are replaced with digraphs.
1804 * tests/input.at (%define errors): Extend to check weird values.
1805
6afc30cc
JD
18062007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1807
1808 Instead of having skeletons declare all valid %define variables and
1809 %code qualifiers, provide macros that retrieve the associated values
1810 and build these lists automatically. Thus Bison will now warn when a
1811 variable or qualifier is not used by the skeleton in the current
1812 invocation regardless of whether it might sometimes be used by that
1813 skeleton in other invocations. Also, move all %define value macros to
1814 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1815 form, which is replaced by %code.
1816 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1817 (b4_check_user_names): ... this, and change the series of valid name
1818 arguments to a single list argument for names used in the skeleton
1819 similar to the existing list argument for names used in the grammar.
1820 Warn instead of complaining.
1821 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1822 values and %code code, to format %code code properly, and to build
1823 lists of all %define variables and %code qualifiers used in the
1824 skeleton: b4_skeleton_percent_define_variables and
1825 b4_skeleton_percent_code_qualifiers.
1826 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1827 Remove, and...
1828 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1829 the skeleton names lists can finish building first. In place of
1830 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1831 expect the lists b4_user_percent_define_variables and
1832 b4_user_percent_code_qualifiers.
1833 * data/c++.m4: Where setting default values for b4_parser_class_name,
1834 b4_location_type, b4_filename_type, b4_namespace, and
1835 b4_define_location_comparison, update their names to the
1836 b4_percent_define_ namespace.
1837 * data/glr.c: Don't use b4_check_percent_define_variables and
1838 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1839 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1840 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 1841 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
1842 * data/location.cc: Use b4_get_percent_define.
1843 * data/push.c: Don't use b4_check_percent_define_variables and
1844 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1845 * data/yacc.c: Likewise, and don't call m4_exit in
1846 b4_use_push_for_pull_if or m4_wrap code will never execute.
1847 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1848 Rename to...
1849 (muscle_grow_user_name_list): ... this for consistency with the
1850 terminology used in bison.m4.
1851 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1852 %define variable names, and rename muscle used_percent_define_variables
1853 to user_percent_define_variables.
1854 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1855 user_percent_code_qualifiers.
1856 (content): Remove.
1857 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1858 {CODE} form is no longer accepted.
1859 * tests/input.at (Reject bad %code qualifiers): Rename to...
1860 (Reject unused %code qualifiers): ... this, and update test output.
1861 (%define error): Update test output.
1862
7eb8a0bc
JD
18632007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1864
1865 Check for unrecognized %define variables similar to checking for
1866 unrecognized %code qualifiers. Check for redefined %define variables.
1867 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1868 generalizes...
1869 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1870 (b4_check_percent_define_variables): New, also wraps it.
1871 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1872 variables using b4_check_percent_define_variables.
1873 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1874 all those exercised in the test suite and all those listed in the
1875 `Default values' section of c++.m4. Are there others?
1876 * data/push.c, data/yacc.c: Declare no valid %define variables.
1877 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1878 similar to muscle_find, but it works even when the muscle stores a
1879 const value.
1880 (muscle_grow_used_name_list): New function for constructing the used
1881 name list muscles that b4_check_for_unrecognized_names requires.
1882 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1883 %define'd more than once. Define the b4_used_percent_define_variables
1884 muscle with muscle_grow_used_name_list.
1885 (grammar_declaration): Abbreviate %code code with
1886 muscle_grow_used_name_list.
1887 * tests/input.at (%define errors): New.
1888
3fc65ead
JD
18892007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1890
1891 Provide warn_at, complain_at, and fatal_at function callbacks to the
1892 skeletons, and use this for %code qualifier complaints.
1893 * data/bison.m4 (b4_error_at): New, invoked by...
1894 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1895 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1896 @fatal_at(...@) directives.
1897 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1898 qualifiers in b4_used_percent_code_qualifiers and to use
1899 b4_complain_at.
1900 * src/location.c, src/location.h (boundary_set_from_string): New global
1901 function.
1902 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1903 function.
1904 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1905 to b4_used_percent_code_qualifiers.
1906 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1907 function.
1908 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1909 (lineno): Rename to...
1910 (out_lineno): ... this so I don't misunderstand it again.
1911 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1912 here; these newlines are in the input but not the output file.
1913 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1914 (at_directive_perform): ... this new static function, and add handling
1915 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1916 directives.
1917 * tests/input.at (Reject bad %code qualifiers): Update test output with
1918 locations and extend.
1919
1920 * tests/output.at (Output file name: [, Output file name: ]): Remove
1921 bogus comment about these tests failing.
1922
1c7b7e1d
JD
19232007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1924
1925 Clean up b4_check_percent_code_qualifiers a little.
1926 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1927 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1928 documentation and add examples.
1929 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1930 qualifiers here.
1931
08af01c2
JD
19322007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1933
1934 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1935 unreliable -- especially when they're hidden inside another macro.
1936 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1937 data/c.m4: Remove m4_divert(-1).
1938 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1939 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1940 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 1941 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
1942 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1943 pushed and popped by m4sugar, should be first on the stack.
1944
1945 Provide warn, complain, and fatal function callbacks to the skeletons.
1946 This provides more flexibility than m4_fatal, improves the error
1947 message format, and captures messages for translation. Discussed
1948 starting at
1949 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1950 * data/bison.m4 (b4_error): New, invoked by...
1951 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1952 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1953 directives. Because these M4 macros might be called when the current
1954 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1955 the previous removal of uses of m4_divert, which caused trouble.
1956 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1957 m4_fatal to report unrecognized %code qualifiers.
1958 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1959 push parser requests.
1960 * data/glr.c: Use b4_complain instead of m4_fatal to report
1961 non-deterministic push parser requests.
1962 Update @output usage to @output(...@) form.
1963 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1964 report missing %defines. Update @output usage to @output(...@) form.
1965 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1966 @output(...@) form.
1967 * src/main.c (main): Invoke skel_scanner_free.
1968 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1969 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1970 obstack_for_string from flex-scanner.h.
1971 (YY_DECL): Use to declare skel_lex static.
1972 (decode_at_digraphs): Remove; now handled in the new
1973 SC_AT_DIRECTIVE_ARG start condition.
1974 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1975 functions.
1976 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1977 at_directive_argv): New static globals.
1978 (INITIAL): Use fail_for_invalid_at.
1979 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1980 recognize the start of a generalized `@directive(...@)' form and
1981 start...
1982 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1983 directive args (using the new obstack_for_string), to decode the
1984 contained @ diagraphs, and to perform the directive. It recognizes
1985 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1986 @output(...@).
1987 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1988 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1989 `@,'.
1990 (scan_skel): Initialize obstack_for_string on the first call.
1991 (skel_scanner_free): New function to free obstack_for_string.
1992 * tests/input.at (Reject bad %code qualifiers): Update test output.
1993
8e0a5e9e
JD
19942007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1995
1996 Consolidate the 4 prologue alternative directives (%code, %requires,
1997 %provides, and %code-top) into a single %code directive with an
1998 optional qualifier field. Discussed at
1999 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2000 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2001 alternatives.
2002 * doc/bison.texinfo (Prologue Alternatives): Update.
2003 (Decl Summary): Update to %code "requires" and %code "provides".
2004 (Calc++ Parser): Update to %code "requires".
148d66d8 2005 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
2006 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2007 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2008 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2009 which are skeleton-specific.
2010 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2011 declare what %code qualifiers it supports and to complain if any other
2012 qualifiers were used in the grammar.
2013 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2014 and b4_user_code([b4_percent_code_provides]) in place of
2015 b4_user_requires and b4_user_provides.
2016 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2017 Add b4_user_code([b4_percent_code_top]) and
2018 b4_user_code([b4_percent_code]).
2019 Invoke b4_check_percent_code_qualifiers.
2020 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2021 PERCENT_REQUIRES): Remove.
2022 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2023 %requires. Rewrite the %code RHS as the unqualified form defining the
2024 muscle b4_percent_code. Add another RHS for the qualified %code form,
2025 which defines muscles of the form b4_percent_code_QUALIFIER and the
2026 b4_used_percent_code_qualifiers muscle.
2027 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2028 PERCENT_REQUIRES): Remove.
2029 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2030 %code "requires" and %code "provides".
2031 * tests/input.at (Reject bad %code qualifiers): New.
2032
95021767
JD
20332007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2034
2035 Use the new code_props interface for destructors and printers.
2036 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2037 printer_location members, and change the type of the destructor and
2038 printer members to code_props.
2039 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2040 symbol_printer_get, semantic_type_destructor_set,
2041 semantic_type_printer_set, default_tagged_destructor_set,
2042 default_tagless_destructor_set, default_tagged_printer_set,
2043 default_tagless_printer_set): Use code_props in arguments and return
2044 types in place of char const * and location.
2045 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2046 since the locations are now contained in the return of
2047 symbol_destructor_get and symbol_printer_get.
2048 * src/output.c (symbol_destructors_output, symbol_printers_output):
2049 Replace with...
2050 (symbol_code_props_output): ... this to eliminate duplicate code.
2051 (output_skeleton): Update to use symbol_code_props_output.
2052 * src/reader.c (symbol_should_be_used): Update use of
2053 symbol_destructor_get.
2054 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2055 Update uses of the various _destructor_set and _printer_set functions.
2056 * src/symtab.c: (default_tagged_destructor_location,
2057 default_tagless_destructor_location, default_tagged_printer_location,
2058 default_tagless_printer_location): Remove since we...
2059 (default_tagged_destructor, default_tagless_destructor,
2060 default_tagged_printer, default_tagless_printer): ... change the type
2061 of these to code_props.
2062 (symbol_new, semantic_type_new, symbol_destructor_set,
2063 semantic_type_destructor_set, symbol_destructor_get,
2064 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2065 symbol_check_alias_consistency, default_tagged_destructor_set,
2066 default_tagless_destructor_set, default_tagged_printer_set,
2067 default_tagless_printer_set): Update.
2068 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2069 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2070 code_props members.
2071 (symbol_print): Use SYMBOL_CODE_PRINT.
2072
f6857bbf
JD
20732007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2074
2075 Use the new code_props interface for rule actions.
2076 * src/symlist.h (symbol_list): Replace action, action_location, and
2077 used members with a code_props action_props member.
2078 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2079 grammar_midrule_action, grammar_current_rule_merge_set,
2080 grammar_current_rule_symbol_append, packgram): Update.
2081 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2082 * src/scan-code.l (handle_action_dollar): Update.
2083 (translate_rule_action): Remove, no longer used.
2084 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2085
7c0c6181
JD
20862007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2087
2088 Use the new code_props interface in parse-gram.y.
2089 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2090 Update all uses of translate_* functions to use the new code_props
2091 interface and to use gram_scanner_last_string_free and
2092 code_scanner_last_string_free where possible.
2093 (grammar_declaration): symbol_list_destructor_set and
2094 symbol_list_printer_set now perform the translation, so don't do it
2095 here. Use gram_scanner_last_string_free where possible.
2096 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2097 translate_code): Remove, no longer used.
2098 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2099 symbol_list_printer_set): Perform code translation here rather than
2100 depending on the caller to do so.
2101
2102 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2103 * src/scan-gram.h (gram_last_string): Remove declaration.
2104 * src/scan-gram.l (last_string): Declare it static.
2105
28e52c0d
JD
21062007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2107
2108 Encapsulate code properties and related functionality for the various
2109 destructors, printers, and actions into a code_props structure and
2110 interface. This patch merely implements code_props in scan-code.h and
2111 scan-code.l. Future patches will rewrite other modules to use it.
2112 Discussed starting at
2113 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2114 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2115 consistently initialize const structs that have an empty location
2116 field.
2117 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2118 to ensure consistency.
2119 * src/scan-code.h (code_props): New structure.
2120 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2121 function, macro, and const global variable for initializing a
2122 code_props with no code.
2123 (code_props_plain_init, code_props_symbol_action_init,
2124 code_props_rule_action_init, code_props_translate_code): The rest of
2125 the new code_props functional interface. Among other things, the init
2126 functions set the code_props kind field so that
2127 code_props_translate_code will know whether to behave like
2128 translate_symbol_action, translate_rule_action, or translate_code.
2129 These old translate functions must remain until all other modules are
2130 updated to use the new code_props interface.
2131 (code_scanner_last_string_free): New function similar to
2132 gram_scanner_last_string_free.
2133 (code_scanner_free): Add documentation.
2134 * src/scan-code.l: Implement the new interface.
2135 (code_lex): Make it static, add a code_props* argument, and remove the
2136 rule argument.
2137 (last_string): New static global similar to the one in scan-gram.l.
2138 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2139 instead of rule.
2140 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2141 code_props since Bison may one day use this information for destructors
2142 and printers.
2143 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2144 (handle_action_dollar): Use symbol_list_n_get and set used flag
2145 directly since symbol_list_n_used_set is removed.
2146 (translate_action): Add a code_props* argument and remove the rule,
2147 action, and location arguments. Pass the code_props* on to code_lex.
2148 (translate_rule_action, translate_symbol_action, translate_code):
2149 Rewrite as wrappers around the new code_props interface.
2150 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2151 it would eventually need to break the encapsulation of code_props.
2152
96034983
JD
21532007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2154
2155 * etc/.cvsignore: New.
2156
945e396c
JD
21572007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2158
2159 Add maintainer-push-check to run maintainer-check using push parsing in
2160 place of pull parsing where available.
2161 * Makefile.am (maintainer-push-check): New.
2162 * data/bison.m4 (b4_use_push_for_pull_if): New.
2163 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2164 appropriately based on their existing values.
2165 (yypush_parse): Don't print push-parser-specific diagnostics if push
2166 parsing is being used in place of pull parsing.
2167 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2168 push.c.
2169 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2170 variable, and insert b4_use_push_for_pull_flag into muscles.
2171 * tests/Makefile.am (maintainer-push-check): New.
2172
7d596384
JD
21732006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2174
2175 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2176 (whether successful or failed) so that yypush_parse can be invoked
2177 again to start a new parse using the same yypstate.
2178 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2179 check multiple yypull_parse invocations on the same yypstate. For pull
2180 mode, extend to check multiple yyparse invocations.
2181 (Exploding the Stack Size with Alloca): Extend to try with
2182 %push-pull-parser.
2183 (Exploding the Stack Size with Malloc): Likewise.
2184
2185 * tests/calc.at (Simple LALR Calculator): Don't specify
2186 %skeleton "push.c" since %push-pull-parser implies that now.
2187 * tests/headers.at (export YYLTYPE): Don't check for the push
2188 declarations. Otherwise, this test case can't be used to see if push
2189 mode can truly emulate pull mode.
2190 * tests/input.at (Torturing the Scanner): Likewise.
2191 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2192 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2193 AT_YACC_IF, which now includes the case of push mode since %skeleton
2194 need not be used for push mode. This will be more intuitive once
2195 push.c is renamed to yacc.c.
2196
7172e23e
JD
21972006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2198
2199 For push mode, convert yyparse from a macro to a function, invoke yylex
2200 instead of passing a yylexp argument to yypull_parse, and don't
2201 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2202 Discussed starting at
2203 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2204 * data/bison.m4 (b4_pull_if): New.
2205 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2206 * data/push.c: Improve M4 quoting a little.
2207 (b4_generate_macro_args, b4_parenthesize): Remove.
2208 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2209 any time a pull parser is requested.
2210 Don't #define this as a wrapper around yypull_parse. Instead, when
2211 both push and pull are requested, make it a function that does that
2212 same thing.
2213 (yypull_parse): If there's a b4_prefix, #define this to
2214 b4_prefix[pull_parse] when both push and pull are requested.
2215 Don't define this as a function unless both push and pull are
2216 requested.
2217 Remove the yylexp argument and hard-code yylex invocation instead.
2218 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2219 %push-parser.
2220 * src/getargs.c (pull_parser): New global initialized to true.
2221 * getargs.h (pull_parser): extern it.
2222 * src/output.c (prepare): Insert pull_flag muscle.
2223 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2224 (prologue_declaration): Set both push_parser and pull_parser = true for
2225 %push-pull-parser. Set push_parser = true and pull_parser = false for
2226 %push-parser.
2227 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2228 %push-parser since there's no backward-compatibility concern here.
2229 Scan %push-pull-parser.
2230 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2231 instead of %push-parser.
2232 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2233 prototype it in the module that calls yyparse.
2234 * tests/input.at (Torturing the Scanner): Likewise.
2235 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2236
2e7944cb
JD
22372006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2238
2239 Update etc/bench.pl. Optimize push mode a little (the yyn change
2240 deserves most of the credit).
2241 * Makefile.am (SUBDIRS): Add etc subdirectory.
2242 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2243 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2244 yytoken, yyval, and yyloc declarations to...
2245 (yyparse or yypush_parse): ... here to improve performance. For
2246 yypush_parse invocations after the first, be sure to assign yyn its old
2247 value again.
2248 (yypstate_new): Don't bother initializing the yyresult field since the
2249 initial value isn't used.
2250 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2251 remove the #define that, in push mode, set it to yyps->NAME.
2252 * etc/Makefile.am: New.
2253 * etc/bench.pl: Remove and build it instead from...
2254 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2255 "tests/bison" from the build directory by default rather than just
2256 invoking "bison" from $PATH.
2257 (calc_grammar): Update push parser code: don't declare yylval globally,
2258 don't define yyparse_wrapper, and don't #define yyparse.
2259 (bench_grammar): Update to check all working combinations of yacc.c,
2260 push.c, impure, pure, pull, and push.
2261
c3d50342
JD
22622006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2263
2264 For push mode, add pull wrappers around yypush_parse.
2265 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2266 (yypull_parse): New function wrapping yypush_parse.
2267 (yyparse): New #define wrapping yypull_parse.
2268 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2269 is declared.
2270 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2271 prototype yylex in the module that calls yyparse, and don't prototype
2272 yyparse there. Otherwise, the yyparse expansion won't compile.
2273 * tests/input.at (Torturing the Scanner): Likewise.
2274
94ebeba5
JD
22752006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2276
2277 Enable push parsers to operate in impure mode. Thus, %push-parser no
2278 longer implies %pure-parser. The point of this change is to move
2279 towards being able to test the push parser code by running the entire
2280 test suite as if %push-parser had been declared.
2281 * data/push.c (yypush_parse): For impure mode, remove the
2282 yypushed_char, yypushed_val, and yypushed_loc arguments.
2283 Instead, declare these as local variables initialized to the global
2284 yychar, yylval, and yylloc.
2285 For the first yypush_parse invocation only, restore the initial values
2286 of these global variables when it's time to read a token since they
2287 have been overwritten.
2288 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2289 %push-parser.
2290 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2291 %pure-parser along with %push-parser since this test case was designed
2292 for pure push parsers.
2293 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2294 (AT_YACC_OR_PUSH_IF): New.
2295 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2296 add a note that it's still wrong for some cases (as it has been for a
2297 while).
2298 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2299 %push-parser no longer implies %pure-parser.
2300
a0633178
JD
23012006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2302
2303 Remove some unnecessary differences between the pull parser code and
2304 the push parser code. This patch enables yynerrs in push mode.
2305 * data/push.c: Reformat M4 a little.
2306 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2307 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2308 because push mode is on. Instead, if pure mode is on, move yynerrs
2309 to...
2310 (b4_declare_parser_state_variables): ... here.
2311 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2312 to yyps->NAME so it can be used in yypush_parse.
2313 (yypush_parse): Don't omit uses of yynerrs in push mode.
2314
8646b6a3
JD
23152006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 Fix bug such that the first pushed token's value and location are
2318 sometimes overwritten (sometimes by %initial-action) before being used.
2319 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2320 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2321 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2322 more closely mimic the pull parser logic.
2323 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2324 time to read a token, which is after any initialization of yylval and
2325 yylloc.
2326 (gottoken): Rename label to...
2327 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2328 user namespace.
2329
9baf4d74
JD
23302006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2331
2332 Rearrange initialization of the parser state variables so that the
2333 skeleton doesn't have to have a copy for pull mode and another for push
2334 mode. This patch also fixes at least a bug such that yylloc was not
2335 initialized (with b4_location_initial_line and
2336 b4_location_initial_column) upon calling yypush_parse. However, that
2337 initialization now overwrites the first token's location;
2338 %initial-action assigning @$ already did the same thing, and both bugs
2339 will be fixed in a later patch.
2340 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2341 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2342 yyss, yyvs, yyls, and yystacksize.
2343 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2344 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2345 yylsp.
2346 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2347 yyps->NAME so it can be used in yypush_parse.
2348 (yyparse or yypush_parse): For yypush_parse, don't print the
2349 "Starting parse" diagnostic for invocations after the first.
2350 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2351 yypush_parse, only do it for the first invocation.
2352 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2353 initialization to occur in yypush_parse but only on the first
2354 invocation.
2355
23522164
JD
23562006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2357
2358 * data/push.c: Add CPP guards around push parser declarations in both
2359 the header and the code file.
2360 In the code file, move the push parser declarations to the same place
2361 they appear in the header file.
2362 Clean up the M4 some, especially the inconsistent underquoting in
2363 some b4_c_function_def and b4_c_function_decl uses.
2364
bb010fe5
JD
23652006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2366
2367 Encapsulate the push parser state variables into an M4 macro so the
2368 push skeleton doesn't have to list them again for pull mode's yyparse.
2369 For push mode, remove yypush_parse's local equivalents of these
2370 variables to eliminate unnecessary copying between the two sets at
2371 run-time. This patch also fixes at least a bug related to multiple
2372 %initial-action invocations in push mode.
2373 * data/push.c (b4_declare_parser_variables): Rename to...
2374 (b4_declare_scanner_communication_variables): ... this for clarity and
2375 update both uses.
2376 (b4_declare_yyparse_variables): Remove and move its contents to the one
2377 spot where it was invoked.
2378 (b4_declare_parser_state_variables): New macro containing the parser
2379 state variables required by push mode.
2380 (struct yypstate): Replace all fields but yynew with
2381 b4_declare_parser_state_variables.
2382 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2383 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2384 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2385 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2386 parser state variable declarations with
2387 b4_declare_parser_state_variables.
2388 Don't initialize parser state variables when calling yypush_parse since
2389 yypstate_new already does that.
2390 Invoke the user's initial action only upon the first yypush_parse
2391 invocation.
2392 Remove all code that copies between the local parser state variables
2393 and the yypstate.
2394
2d212f8c
JD
23952006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2396
2397 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2398 prevent a name collision in a future patch where these names will
2399 sometimes be #define'd.
2400 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2401 since it no longer has the same name as the existing argument.
2402 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2403
e6e704dc
JD
24042006-12-19 Paolo Bonzini <bonzini@gnu.org>
2405 and Joel E. Denny <jdenny@ces.clemson.edu>
2406
2407 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2408 that the argument is case-insensitive, and there's no `=' here.
2409 For the %skeleton entry, mention that %language is better.
2410 (Bison Options): Likewise for --language and --skeleton. Move the
2411 --skeleton entry so that the `Tuning the parser' section is sorted
2412 alphabetically on long options.
2413 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2414 %language directive in detail here; cross-reference the %language
2415 documentation instead.
2416 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2417 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 2418 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
2419 * examples/extexi (normalize): Instead of replacing every %require
2420 argument with the current Bison version, just substitute for
2421 `@value{VERSION}'. This guarantees that we're testing what actually
2422 appears in the documentation.
2423 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2424 rather than `@VERSION@'.
2425
0e021770
PE
24262006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2427
fd575f05
PE
2428 * NEWS: Reword the %language news a bit, and put it earlier.
2429
0e021770
PE
2430 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2431 Rewrite to simplify the logic.
2432 (language_argmatch): Likewise.
fd575f05
PE
2433 (program_name): We now own this var.
2434 * src/getargs.h (struct bison_language): Use char[] rather than
2435 const char *.
0e021770
PE
2436
2437 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2438 Java is supported.
2439 * src/complain.c (program_name): Remove decl; no longer needed.
2440 * src/main.c (program_name): Remove; now belongs to getargs.
2441
24422006-12-18 Paolo Bonzini <bonzini@gnu.org>
2443
2444 * NEWS: Document %language.
2445
2446 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2447
2448 * data/c-skel.m4, data/c++-skel.m4: New files.
2449 * data/glr.c: Complain on push parsers.
2450
2451 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2452 over %skeleton.
148d66d8 2453 (Decl Summary): Document %language and %skeleton.
0e021770
PE
2454 (Command line): Document -L.
2455
2456 * examples/extexi: Rewrite %require directive.
2457 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2458
2459 * src/files.c (compute_exts_from_gc): Look in language structure
2460 for .y extension.
2461 (compute_file_name_parts): Check whether .tab should be added.
2462 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2463 (language, skeleton_arg, language_argmatch): New.
2464 (long_options): Add --language.
2465 (getargs): Use skeleton_arg, add -L/--language.
2466 * src/getargs.h: Include location.h.
2467 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2468 * src/output.c (prepare): Pick default skeleton from struct language.
2469 Don't dispatch C skeletons here.
2470 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2471 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2472 * src/scan-gram.l ("%language"): New rule.
2473
2474 * tests/calc.at: Test %skeleton and %language.
2475 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2476 (AT_GLR_IF): Look for %skeleton "glr.cc".
2477 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2478 (AT_YACC_IF): Reject %language.
2479
5691bf57
PE
24802006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2481
db06f0ce
PE
2482 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2483 since it wasn't used; only the typedef name 'semantic_type' is needed.
2484 Also, omit trailing white space.
2485
5691bf57
PE
2486 * bootstrap: Sync from coreutils.
2487 (gnulib_extra_files): Add build-aux/announce.gen.
2488 (slurp): Adjust .gitignore files like .cvsignore files.
2489 * build-aux/announce-gen: Remove from CVS, since bootstrap
2490 now creates this.
2491
791934e4
JD
24922006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2493
2494 Make %push-parser imply %pure-parser. This fixes several bugs; see
2495 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2496 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2497 pure_parser = true.
2498 * data/push.c: Don't bother testing b4_push_if when deciding whether
2499 to expand b4_declare_parser_variables globally.
2500 (yypush_parse): Likewise in here.
2501
2502 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2503 (yy_reduce_print): Reformat M4 for readability.
2504
ee5abb37
JD
25052006-12-15 Bob Rossi <bob@brasko.net>
2506 and Joel Denny <jdenny@ces.clemson.edu>
2507
2508 * data/push.c (yypstate): Add typedef, and update all uses of
2509 struct yypstate to just yypstate.
2510 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2511
16ca01f9
JD
25122006-12-14 Bob Rossi <bob@brasko.net>
2513
2514 * data/push.c (yypush_parse): Declare prototype regardless of
2515 %locations option.
2516
ab8e7e1a
JD
25172006-12-14 Bob Rossi <bob@brasko.net>
2518
2519 * data/push.c (yyparse): Remove the prototype and the #define when in
2520 push-parser mode.
2521
9bf32be3
JD
25222006-12-13 Bob Rossi <bob@brasko.net>
2523
2524 * data/push.c (yypstate_init): Rename to...
2525 (yypstate_new): ... this and use b4_c_function_def.
2526 (yypstate_delete): New.
2527 (yypush_parse): Change parameters yynval and yynlloc to be const.
2528 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2529 yypstate_delete functions.
2530
f02e2948
JD
25312006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2532
2533 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2534 strange test case titles. Reported by Bob Rossi.
2535
38eb7751
PE
25362006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2537
2538 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2539 of potential ambiguities in GLR grammers.
2540
bd9d212b
JD
25412006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2542
2543 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2544 `bison ', use m4_index instead of m4_substr since chopping up a string
2545 containing M4-special characters causes problems here.
2546
2547 Fix a couple of bugs related to special characters in user-specified
2548 file names, and make it easier for skeletons to compute output file
2549 names with the same file name prefix as Bison-computed output file
2550 names.
2551 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2552 b4_parser_file_name and b4_spec_defines_file instead of
2553 @output_parser_name@ and @output_header_name@, which are now redundant.
2554 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2555 b4_parser_file_name, b4_spec_defines_file, and the new
2556 @basename(FILENAME@) instead of @output_parser_name@ and
2557 @output_header_name@, which inappropriately escaped the file names as
2558 C string literals.
2559 * src/files.c (all_but_ext): Remove static qualifier.
2560 (compute_output_file_names): Move `free (all_but_ext)' to...
2561 (output_file_names_free): ... here since all_but_ext is needed later.
2562 * src/files.h (all_but_ext): Extern.
2563 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2564 exactly what MUSCLE_INSERT_STRING used to do.
2565 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2566 characters are escaped properly.
2567 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2568 all_but_ext.
2569 For pkgdatadir muscle, maintain previous functionality by using
2570 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2571 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2572 digraphs would never be expanded. Hopefully no one has M4-special
2573 characters in his Bison installation path.
2574 * src/scan-skel.l: Don't parse @output_header_name@ and
2575 @output_parser_name@ anymore since they're now redundant.
2576 In @output, use decode_at_digraphs.
2577 Parse a new @basename command that invokes last_component.
2578 (decode_at_digraphs): New.
2579 (BASE_QPUTS): Remove unused.
2580 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2581 (Output file name): New tests.
2582
3f7ca628
JD
25832006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2584
2585 Warn about output files that are generated by the skeletons and that
2586 conflict with other output files.
2587 * data/glr.c: Don't generate the header file here when glr.cc does.
2588 * src/files.c (file_names, file_names_count): New static globals.
2589 (compute_output_file_names): Invoke output_file_name_check for files
2590 not generated by the skeletons and remove existing checks.
2591 (output_file_name_check): New function that warns about conflicting
2592 output file names.
2593 (output_file_names_free): Free file_names.
2594 * src/files.h (output_file_name_check): Declare.
2595 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2596 the skeletons.
2597 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2598 (Conflicting output files): New tests.
2599
178e123e
PE
26002006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2601
2602 * doc/bison.texinfo: Fix a couple of typos.
2603
26042006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
2605
2606 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2607 Rename to...
2608 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2609 update all uses.
2610 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2611 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2612 local pv.
2613 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2614 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2615
ea17f233
JD
26162006-12-07 Bob Rossi <bob@brasko.net>
2617 and Joel Denny <jdenny@ces.clemson.edu>
2618
2619 * data/push.c (yypvarsinit): Change return type from void* to struct
2620 yypvars*. No longer cast to void* on return.
2621 (struct yypvars): Remove yylen since it need not be remembered between
2622 yypushparse invocations.
2623 (yypushparse): Don't copy between yylen and pv->yylen.
2624
55a30bda
JD
26252006-12-05 Bob Rossi <bob@brasko.net>
2626
2627 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2628 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2629 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2630 (struct yypvars): Remove b4_declare_parser_variables.
2631 (yypvarsinit): Remove init code for removed variables.
2632 (global scope): Do not declare b4_declare_parser_variables if
2633 push or pure mode.
2634 (yypushparse): Add b4_declare_parser_variables.
2635 Init new local variables, and remove init code for removed
2636 yypvars variables.
2637 (yyparse): Delete.
2638 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2639 and yyparse for other modes.
2640 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2641 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2642 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2643 (AT_PURE_LEX_IF): True if pure or push parser.
2644
85894313
JD
26452006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2646
2647 Document Yacc prologue alternatives and default %destructor's and
2648 %printer's as experimental. Don't mention Java yet. Discussed at
2649 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2650 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2651 (2.3a): Annotate this entry to say the old forms of these features were
2652 also experimental.
2653 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 2654 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
2655 of Java (we'll want this back eventually).
2656
02975b9a
JD
26572006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2658
2659 Support a file name argument to %defines. Deprecate `=' in
2660 %file-prefix, %name-prefix, and %output. Discussed at
2661 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2662 * NEWS (2.3a+): Mention.
148d66d8 2663 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
2664 form of %defines, and remove `=' from entries for %file-prefix,
2665 %name-prefix, and %output.
2666 * src/parse-gram.y (prologue_declaration): Implement.
2667 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2668 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2669 all but one occurrence of %name-prefix.
2670 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2671 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2672 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2673 occurrence of each of %file-prefix and %output. Add check for %defines
2674 with argument.
2675 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2676 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2677 Remove the `=' from %output.
2678
287b314e
JD
26792006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2680
2681 Don't escape $ in test case titles since Autoconf 2.61 now does that
2682 correctly.
2683 * tests/actions.at (Default %printer and %destructor are not for error
2684 or $undefined): Here.
2685 (Default %printer and %destructor are not for $accept): Here.
2686 * tests/input.at (Invalid $n and @n): Here.
2687
3ebecc24
JD
26882006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2689
2690 Rename <!> to <>. Discussed starting at
2691 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2692 * NEWS (2.3a+): Update.
148d66d8 2693 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
2694 Update.
2695 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2696 * src/scan-gram.l (INITIAL): Implement.
2697 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2698 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2699 comment.
2700 * tests/actions.at (Default tagless %printer and %destructor,
2701 Default tagged and per-type %printer and %destructor,
2702 Default %printer and %destructor are not for error or $undefined,
2703 Default %printer and %destructor are not for $accept,
2704 Default %printer and %destructor for mid-rule values): Update.
2705 * tests/input.at (Default %printer and %destructor redeclared,
2706 Unused values with default %destructor): Update.
2707
26b8a438
JD
27082006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2709
2710 Don't let %prec take a nonterminal.
2711 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2712 token.
2713 * tests/input.at (%prec takes a token): New test checking that %prec
2714 won't take a nonterminal.
2715
07c39ae9
JD
27162006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2717
405d53b7
JD
2718 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2719 it was double-quoted.
07c39ae9
JD
2720 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2721 grammar is maintained with Bison's highest standards.
2722 * src/getargs.c: Fix some typos in Doxygen comments.
2723
580b8926
JD
27242006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2725
2726 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2727 later. Reported by Paul Eggert in
2728 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2729 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2730 * src/scan-code.l (translate_action): Don't bother invoking
2731 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2732 (code_scanner_free): Instead of invoking
2733 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2734 which frees more.
2735 * src/scan-gram.l (gram_scanner_free): Likewise.
2736 * src/scan-skel.l (scan_skel): Likewise.
2737
4502eadc
JD
27382006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2739
2740 * src/files.c (tr): Change return type to void.
2741 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2742 has been called previously for the same key.
2743 (muscle_find): Return storage instead of value so that
2744 --enable-gcc-warnings doesn't produce warnings that the return discards
2745 const. aver that the value and storage are the same since storage
2746 could potentially be NULL when value is not.
2747 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2748 same as 0.
2749
7746c8f6
PE
27502006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2751
2752 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2753 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2754 us a slightly cleaner distribution, and also works.
2755 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2756 gnulib changes.
2757
eb095650
PE
27582006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2759 and Paul Eggert <eggert@cs.ucla.edu>
2760
2761 Don't let Bison leak memory except when it complains.
2762 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2763 (spec_defines_file, dir_prefix): Now char *, not const char *,
2764 since they are freed.
2765 * src/files.c: Likewise.
2766 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2767 Likewise.
2768 (tr): Now operates in-place. All uses changed.
2769 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2770 values.
2771 (compute_file_name_parts, compute_output_file_names): Don't store
2772 read-only data in variables that will be freed.
2773 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2774 src_extension, and header_extension.
2775 (output_file_names_free): New public function to free
2776 spec_verbose_file, spec_graph_file, spec_defines_file,
2777 parser_file_name, and dir_prefix.
2778 * src/getargs.c (getargs): Don't store read-only data in variables that
2779 will be freed.
2780 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2781 (which previously existed but was unused), and quotearg_free.
2782 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2783 * src/muscle_tab.c: Likewise.
2784 (muscle_entry): Make the value char const *,
2785 and add a new storage member that is char * and can be freed.
2786 (muscle_entry_free): New private function.
2787 (muscle_init): Use it instead of free.
2788 (muscle_insert, muscle_grow): Update and use new storage member.
2789 (muscle_code_grow): Free the string passed to muscle_grow
2790 since it's not needed anymore.
2791 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2792 add a new `char *code' member.
2793 ("{...}"): Declare semantic type as code.
2794 * src/scan-code.h (translate_rule_action):
2795 (translate_symbol_action, translate_code, translate_action): Return
2796 `char const *' rather than `char *' since external code should not free
2797 these strings.
2798 * src/scan-code.l: Likewise.
2799 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2800 which is "{...}" in the parser.
2801 * tests/Makefile.am (maintainer-check-valgrind): Set
2802 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2803 Valgrind.
2804 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2805 complain.
2806 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2807 expecting a non-zero exit status sets --leak-check=summary and
2808 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2809 this case, and we don't want to hear about it.
2810
ac564be4
PE
28112006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2812
2813 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2814 instead of from the template, to simplify configuration a bit.
2815 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2816 and m4/wint_t.m4, as they are needed with the latest gnulib.
2817
17bd8a73
JD
28182006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2819
2820 Disable unset/unused mid-rule value warnings by default, and recognize
2821 --warnings=midrule-values to enable them. Discussed starting at
2822 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2823 * NEWS (2.3a+): Mention.
2824 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2825 warnings): Add entry for midrule-values subargument.
2826 * src/reader.c (symbol_should_be_used): Don't return true just because
2827 the value is a set/used mid-rule value unless
2828 --warnings=midrule-values was specified.
2829 * tests/input.at (Unused values, Unused values before symbol
2830 declarations): Run tests with and without --warnings=midrule-values.
2831
2832 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2833 than LIST_FREE directly.
2834
89eb3c76
JD
28352006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2836
2837 Finish implementing --warnings=error, which should not be implied by
2838 --warnings=all (or by its synonyms -W and --warnings without
2839 subarguments).
2840 * src/complain.c (set_warning_issued): New function to report that
2841 warnings are being treated as errors and to record an error if so.
2842 Invoke...
2843 (warn_at, warn): ... here.
2844 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2845 "error - warnings are errors" does not appear above "all - all of the
2846 above".
2847 (getargs): For -W and --warnings without subarguments, don't let
2848 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2849 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2850
ba7560e2
JD
28512006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2852
2853 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2854 empty subargument list. For example: `bison --warnings= parser.y'.
2855
31283fc3
JD
28562006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2857
2858 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2859 the parser header file so that gcc doesn't warn.
2860
12e35840
JD
28612006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2862
2863 Split the default %destructor/%printer into two kinds: <*> and <!>.
2864 Discussed starting at
2865 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2866 * NEWS (2.3a+): Mention.
2867 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2868 previous change today related to mid-rules.
148d66d8 2869 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 2870 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
2871 (TYPE_TAG_ANY): Add as <*>.
2872 (TYPE_TAG_NONE): Add as <!>.
2873 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2874 for <*> and <!>.
2875 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2876 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2877 * src/symlist.c (symbol_list_default_new): Split into tagged and
2878 tagless versions.
2879 (symbol_list_destructor_set, symbol_list_printer_set): Split
2880 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2881 SYMLIST_DEFAULT_TAGLESS.
2882 * src/symlist.h: Update symbol_list_default*_new prototypes.
2883 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2884 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2885 * src/symtab.c (default_destructor, default_destructor_location,
2886 default_printer, default_printer_location): Split each into tagged and
2887 tagless versions.
2888 (symbol_destructor_get, symbol_destructor_location_get,
2889 symbol_printer_get, symbol_printer_location_get): Implement tagged
2890 default and tagless default cases.
2891 (default_destructor_set, default_printer_set): Split each into tagged
2892 and tagless versions.
2893 * src/symtab.h: Update prototypes.
2894 * tests/actions.at (Default %printer and %destructor): Rename to...
2895 (Default tagless %printer and %destructor): ... this, and extend.
2896 (Per-type %printer and %destructor): Rename to...
2897 (Default tagged and per-type %printer and %destructor): ... this, and
2898 extend.
2899 (Default %printer and %destructor for user-defined end token): Extend.
2900 (Default %printer and %destructor are not for error or $undefined):
2901 Update.
2902 (Default %printer and %destructor are not for $accept): Update.
2903 (Default %printer and %destructor for mid-rule values): Extend.
2904 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2905 (Unused values with default %destructor): Extend.
2906
f91b1629
JD
29072006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2908
2909 Don't apply the default %destructor/%printer to an unreferenced midrule
2910 value. Mentioned at
2911 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2912 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2913 like $@n instead of just @n so that the default %destructor/%printer
2914 logic doesn't see them as user-defined symbols.
2915 (symbol_is_dummy): Check for both forms of the name.
2916 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2917 name for which the midrule value is referenced in any action.
2918 * tests/actions.at (Default %printer and %destructor for mid-rule
2919 values): New test.
2920 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2921 for change to dummy symbol names.
2922
519d0004
JD
29232006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2924
2925 Warn about unset midrule $$ if the corresponding $n is used.
2926 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2927 $n usage.
2928 (packgram): Before invoking grammar_rule_check on any rule, make sure
2929 all actions have already been scanned in order to set `used' flags.
2930 Otherwise, checking that a midrule's $$ is set will not always work
2931 properly because the midrule check must forward-reference the midrule's
2932 parent rule.
2933 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2934 warning.
2935
a501eca9
JD
29362006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2937
2938 More improvements to the documentation of the prologue alternatives:
2939 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2940 Bison manual.
2941 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2942 some text to clarify the relative importance of the new directives and
2943 to show how these directives may be viewed as code labels.
2944
2cbe6b7f
JD
29452006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2946
2947 Similar to the recently removed %before-header, add %code-top as the
2948 alternative to the pre-prologue. Mentioned at
2949 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2950 Also, let the prologue alternatives appear in the grammar section.
2951 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2952 (prologue_declaration): Move the existing prologue alternatives to...
2953 (grammar_declaration): ... here and add %code-top.
2954 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2955
2956 Clean up and extend documentation for the prologue alternatives.
2957 * NEWS (2.3a+): Describe prologue alternatives.
2958 * doc/bison.texinfo (Prologue): Move discussion of prologue
2959 alternatives to...
2960 (Prologue Alternatives): ... this new section, and extend it to discuss
2961 all 4 directives in detail.
148d66d8
JD
2962 (Table of Symbols): Clean up discussion of prologue alternatives and
2963 add %code-top.
2cbe6b7f 2964
e557d3ea
JMG
29652006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2966
2967 DJGPP specific issues.
2968
2969 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2970 config.bat accordingly.
2971 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2972 * djgpp/config.site: Likewise.
2973
136a0f76
PB
29742006-10-16 Paolo Bonzini <bonzini@gnu.org>
2975
27bd5d67
PB
2976 Replace %*-header with %provides, %requires, %code. See discussion at
2977 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2978
136a0f76
PB
2979 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2980 (b4_user_start_header): Remove.
2981 * data/glr.c: Use new macros instead of b4_*start_header
2982 and b4_*end_header.
2983 * data/glr.cc: Likewise.
2984 * data/lalr1.cc: Likewise.
2985 * data/push.c: Likewise.
2986 * data/yacc.c: Likewise.
2987
2988 * doc/bison.texinfo: Remove %before-header, rename
2989 %{start,end,after}-header to %requires, %provides, %code.
2990
2991 * src/parse-gram.y: Likewise (also rename token names accordingly).
2992 * src/scan-gram.l: Likewise.
2993 * tests/actions.at: Likewise.
2994
10f429ef
PE
29952006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2996
2997 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2998 Problem reported by Joel E. Denny.
2999
30002006-10-14 Jim Meyering <jim@meyering.net>
3001
3002 (Sync from coreutils.)
3003 Work also when the working directory (with e.g. coreutils sources)
3004 is version controlled with git, rather than CVS.
3005 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3006 rather than CVS.
3007 In messages and comments, say e.g., "checked-out sources",
3008 rather than "CVS sources".
3009 (version_controlled_file): New function. Work for git as well as
3010 for CVS. Don't use grep's -q option.
3011 (slurp): Call it here, in place of CVS-specific code.
3012
c4bd5bf7
JD
30132006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3014
3015 Fix testsuite for ./configure --enable-gcc-warnings:
3016 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3017 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3018 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3019 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3020 * test/regression.at (Diagnostic that expects two alternatives):
3021 Likewise.
3022
46356ea4
PE
30232006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3024
231ed89a
PE
3025 * bootstrap.conf (gnulib_modules): Add config-h.
3026 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3027 worry about HAVE_CONFIG_H.
3028 * lib/abitset.c: Likewise.
3029 * lib/bitset.c: Likewise.
3030 * lib/bitset_stats.c: Likewise.
3031 * lib/bitsetv-print.c: Likewise.
3032 * lib/bitsetv.c: Likewise.
3033 * lib/ebitset.c: Likewise.
3034 * lib/get-errno.c: Likewise.
3035 * lib/lbitset.c: Likewise.
3036 * lib/subpipe.c: Likewise.
3037 * lib/timevar.c: Likewise.
3038 * lib/vbitset.c: Likewise.
3039 * lib/bitset.c: Include "bitset.h" first, to test interface.
3040 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3041 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3042 * lib/bitsetv.c: Include "bitsetv.h" first.
3043 * lib/get-errno.c: Include "get-errno.h" first.
3044 * m4/.cvsignore: Add config-h.m4.
3045 * tests/actions.at (Default %printer and %destructor for ...):
3046 Adjust expected line numbers in output to reflect removal of #if
3047 HAVE_CONFIG_H lines.
3048 * tests/glr-regression.at (Missed %merge type warnings when ...):
3049 Likewise.
3050 * tests/regression.at (Braced code in declaration in rules section):
3051 Likewise.
3052 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3053 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3054 Include <config.h> unconditionally.
3055
46356ea4
PE
3056 * bootstrap: Sync from coreutils, as follows:
3057
3058 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3059
3060 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3061 variable was sometimes used without being initialized. This
3062 messed up the installation of the INSTALL file in some cases.
3063
3064 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3065
3066 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3067 --copy. Inspired by a suggestion from Bruno Haible.
3068
3069 2006-10-03 Jim Meyering <jim@meyering.net>
3070
3071 * bootstrap: Undo last change to this file, since now gnulib-tool
3072 sticks with the automake default in generating dependencies.
3073
dd4bf078
PE
30742006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3075
cf2a5f7c
PE
3076 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3077 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3078
3079 * doc/bison.1: Add copyright notice.
3080
3081 * data/glr.c: Don't include <stdarg.h>; not used.
3082
35fe0834
PE
3083 * NEWS: The -g and --graph options now output graphs in Graphviz
3084 DOT format, not VCG format.
3085 * doc/bison.1: Likewise.
3086 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
3087 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3088 of this change in
3089 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
3090 * TODO: Remove Graphviz entry.
3091 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3092 remove vcg.c, vcg.h, vcg_defaults.h.
3093 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3094 * src/graphviz.c, src/graphviz.h: New files.
3095 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3096 * src/files.h: Make comment more generic.
3097 * src/main.c (main): Likewise.
3098 * src/print_graph.h: Likewise.
3099 * src/getargs.c (usage): Make usage description more generic.
3100 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3101 (static_graph, fgraph): Remove. All uses changed to pass
3102 arguments instead of sharing a static var.
3103 (print_core, print_actions, print_state, print_graph):
3104 Output graphviz format rather than VCG format.
3105 * tests/.cvsignore: Remove *.vcg; add *.dot.
3106 * tests/output.at: Expect *.dot files, not *.vcg files.
3107
dd4bf078
PE
3108 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3109 accommodates the 2006-10-08 change.
3110
efdd7421
PE
31112006-10-11 Bob Rossi <bob@brasko.net>
3112
3113 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3114 (b4_yyssa, b4_yyerror_range): New macros.
3115 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3116 (yypvarsinit): Remove init of removed fields.
3117 (yypushparse): Remove use of removed fields; use new macros instead.
3118
96a1981a
PE
31192006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3120
3121 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3122 in a push parser. Reindent slightly to match yacc.c better.
3123
31242006-10-11 Bob Rossi <bob@brasko.net>
3125
46356ea4
PE
3126 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3127 yymsg_alloc fields.
3128 (yypvarsinit, yypushparse): Remove init of removed fields.
3129 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 3130
c1630a8b
PE
31312006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3132
3133 * THANKS: Add Paolo Bonzini and Bob Rossi.
3134
90b9908d
PB
31352006-10-08 Paolo Bonzini <bonzini@gnu.org>
3136
3137 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3138 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3139 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3140 b4_define_user_cde and uses): Remove.
3141 (b4_comment, b4_prefix, b4_sync_start): New.
3142 * data/bison.m4: New file, with most of the content removed from c.m4.
3143 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3144 * src/output.c (output_skeleton): Pass bison.m4.
3145 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3146 only if specified.
3147
cf806753
PE
31482006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3149
3150 Fix test failure reported by Tom Lane in
3151 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3152 and try to make such failures easier to catch in the future.
3153 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3154 that's now the caller's responsibility.
3155 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3156 Set yychar = YYEOF if it's negative.
3157 * tests/actions.at (yylex): Abort if asked to read past EOF.
3158 * tests/conflicts.at (yylex): Likewise.
3159 * tests/cxx-type.at (yylex): Likewise.
3160 * tests/glr-regression.at (yylex): Likewise.
3161 * tests/input.at (yylex): Likewise.
3162 * tests/regression.at (yylex): Likewise.
3163 * tests/torture.at (yylex): Likewise.
3164
0e2f006a
PE
31652006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3166
3167 Fix problems with translating English-language diagnostics.
3168 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3169 respect to bison-runtime pot generation. The YY_ stuff
3170 wasn't being captured.
3171 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3172 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3173 * runtime-po/POTFILES.in: Add data/push.c.
3174
e3ddc1e3
PE
31752006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3176
3177 Merge bootstrap changes from coreutils.
3178
3179 2006-09-28 Jim Meyering <jim@meyering.net>
3180
3181 Automatically generated dependencies are important even
3182 when all of the sources in a directory come from gnulib.
3183 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3184 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3185
3186 2006-09-23 Jim Meyering <jim@meyering.net>
3187
3188 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3189
3190 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3191
3192 * bootstrap: Add support for --force.
3193 (usage): New function. Describe usage less tersely.
3194 (CVS_only_file): New var.
3195
01e972b3
PE
31962006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3197
3198 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3199 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3200 Adjust white space and comments to match GNU style better.
3201
c63d3e90
PE
32022006-09-20 Bob Rossi <bob@brasko.net>
3203
3204 * data/push.c (yyresult_get): Remove function.
3205 (YYPUSH_MORE): Add #define.
3206 (yypushparse): Modify return value.
3207
e70f46d1
PE
32082006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3209
3210 * stamp-h.in: Remove; no longer needed.
3211 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3212 Remove config.h, config.hin, intl (no longer created).
3213 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3214 stamp-h1.
3215
3216 Sync bootstrap from coreutils, as follows:
3217
3218 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3219
3220 * bootstrap (symlink_to_gnulib): New function.
3221 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3222 to copies-of-gnulib.
3223 (cp_mark_as_generated, slurp, gnulib_files):
3224 Avoid making a copy if it's the same as the old version.
3225 (gnulib_files): Add support for this variable (used by Bison).
3226
a92be413
PE
32272006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3228
3229 * src/getargs.c (usage): Rework to use conventions similar to
3230 coreutils, to make translation a bit easier and the code a bit
3231 smaller. Problem reported by Tim Van Holder.
3232
4f82b42a
PE
32332006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3234
3b2942e6
PE
3235 Use some of gnulib's new modules, taken from coreutils.
3236
3237 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3238 * bootstrap.conf: New file.
3239 (gnulib_modules): Add configmake, inttypes, unistd.
3240 (XGETTEXT_OPTIONS): Add complain, complain_at,
3241 fatal, fatal_at, warn, warn_at, unexpected_end.
3242 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3243 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3244 (gl_EARLY): Add.
3245 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3246 (gl_INIT): Add
3247 (GNULIB_AUTOCONF_SNIPPET): Remove.
3248 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3249 the pickiest.
3250 * lib/.cvsignore: Add inttypes_.h.
3251 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3252 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3253 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3254 no-longer-necessary initializations.
3255 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3256 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3257 use the unistd module.
3258 * src/system.h: Likewise.
3259 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3260 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3261 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3262 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3263 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3264 * src/system.h: Include inttypes.h unconditionally, now that we
3265 use the inttypes module. Don't bother to include stdint.h, since
3266 inttypes.h now does that for us.
3267 (LOCALEDIR): Remove, now that we use the configmake module.
3268 * src/getargs.c: Include configmake.h.
3269 * src/main.c: Likewise.
3270 * src/output.c: Likewise.
3271 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3272 not from $abs_top_builddir, since config.h moved.
3273
3274
4f82b42a
PE
3275 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3276 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3277
3278 * src/parse-gram.y (symbol_declaration): Don't put statements
3279 before declarations; it's not portable to C89.
3280 * src/scan-code.l (handle_action_at): Likewise.
3281
3282 * src/scan-code.l: Always initialize braces_level; the old code
3283 left it uninitialized and therefore had undefined behavior.
3284
3285 Don't attempt to redefine 'assert', since it runs afoul of
3286 systems where standard headers (mistakenly) include <assert.h>.
3287 Instead, define and use our own alternative, called 'aver'.
3288 * src/reader.c: Don't include assert.h, since we no longer
3289 use assert.
3290 * src/scan-code.l: Likewise.
3291 * src/system.h (assert): Remove, replacing with....
3292 (aver): New function, taking a bool arg. All uses changed.
3293 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3294 not merely an integer.
3295
31c10e38
PE
32962006-09-15 Bob Rossi <bob@brasko.net>
3297
3298 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3299 * data/c.m4 (YYPUSH): New.
3300 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3301 * src/getargs.c (push_parser): New var.
3302 * src/getargs.h (push_parser): New declaration.
3303 * src/output.c (prepare): Add macro insertion of `push_flag'.
3304 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3305 (prologue_declaration): Parse %push-parser.
3306 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3307 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3308 list of removed lines from the traces observed.
3309 (AT_CHECK_CALC_LALR): Added push parser tests.
3310
fa7b79c0
PE
33112006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3312
21fe08ca
PE
3313 * NEWS: Version 2.3a.
3314 * configure.ac (AC_INIT): Likewise.
3315
e8ec4d9b
PE
3316 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3317 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3318 due to header ordering dependencies. I don't know why the #define
3319 was there.
3320
fa7b79c0
PE
3321 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3322 runtime cost when YYDEBUG is not defined, and so that some tests
3323 that used to fail now work. Problem and initial suggestion by
3324 Paolo Bonzini.
3325 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3326 * data/glr.cc (b4_parser_class_name):
3327 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3328 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3329 (yydebug_) [YYDEBUG]: New member.
3330 (yycdebug_): Now defined only if YYDEBUG.
3331 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3332 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3333 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3334 if YYYDEBUG.
3335 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3336 Define only if YYDEBUG.
3337 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3338 set_debug_level.
3339 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3340 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3341 AT_CHECK_CALC_GLR_CC that are working now.
3342
4ec13d60
PE
33432006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3344
3345 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3346 We don't need them in glr.cc, and glr.c defines them.
3347 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3348 assumes that defining it to anything is the same as defining
3349 it to 1. Problem reported by Paolo Bonzini.
3350
8e1687ae
PE
33512006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3352
3353 * data/c.m4 (b4_null, b4_case): Define.
3354 * src/output.c (prepare_symbols): Use b4_null.
3355 (user_actions_output): Use b4_case.
3356
3dc5e96b
PE
33572006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3358
aef3da86
PE
3359 * data/glr.c (b4_shared_declarations): Put start-header first,
3360 before any #includes that we generate, so that feature-test
3361 macros work. Problem reported by Michael Deutschmann in
3362 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3363 * data/lalr1.cc: Likewise.
3364 * doc/bison.texinfo (Prologue): Document that feature-test macros
3365 should be defined before any Bison declarations.
3366 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3367 that depend on location.hh after, not before, Bison decls, since
3368 we now include location.hh after the first user prologue.
3369
3dc5e96b
PE
3370 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3371 Sander Brandenburg in
3372 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3373 Also, fix minor white space and comment issues.
aef3da86
PE
3374 (Prologue): Mention that it's better to define feature-test macros
3375 before Bison declarations. Problem reported by Michael Deutschmann.
3376
3377 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3378 by Jim Meyering.
3379 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3380 This adjusts to recent gnulib changes.
3dc5e96b 3381
b2a0b7ca
JD
33822006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3383
3384 Finish implementation of per-type %destructor/%printer. Discussed
3385 starting at
3386 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3387 and
3388 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3389 * NEWS (2.3+): Add a description of this feature to the default
3390 %destructor/%printer description.
3391 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3392 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3393 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3394 list node contains a semantic type.
3395 * src/symtab.c, src/symtab.h: Extend with a table that associates
3396 semantic types with their %destructor's and %printer's.
3397 (semantic_type_from_uniqstr, semantic_type_get,
3398 semantic_type_destructor_set, semantic_type_printer_set): New functions
3399 composing the public interface of that table.
3400 (symbol_destructor_get, symbol_destructor_location_get,
3401 symbol_printer_get, symbol_printer_location_get): If there's no
3402 per-symbol %destructor/%printer, look up the per-type before trying
3403 the default.
3404 * tests/actions.at (Per-type %printer and %destructor): New test case.
3405 * tests/input.at (Default %printer and %destructor redeclared):
3406 Extend to check that multiple occurrences of %symbol-default in a
3407 single %destructor/%printer declaration is an error.
3408 (Per-type %printer and %destructor redeclared, Unused values with
3409 per-type %destructor): New test cases.
3410
3be03b13
JD
34112006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3412
3413 Require default %destructor/%printer to be declared using
3414 %symbol-default instead of an empty symbol list, and start working on
3415 new per-type %destructor/%printer. Discussed at
3416 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3417 * NEWS (2.3+): Add %symbol-default to example.
3418 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 3419 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
3420 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3421 (generic_symlist, generic_symlist_item): New nonterminals for creating
3422 a list in which each item is a symbol, semantic type, or
3423 %symbol-default.
3424 (grammar_declaration): Use generic_symlist in %destructor and %printer
3425 declarations instead of symbols.1 or an empty list.
3426 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3427 for changes to symbol_list.
3428 * src/reader.c: Update for changes to symbol_list.
3429 * src/scan-code.l: Likewise.
3430 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3431 * src/symlist.c, src/symlist.h: Extend such that a list node may
3432 represent a semantic type or a %symbol-default in addition to just an
3433 ordinary symbol. Add switched functions for setting %destructor's and
3434 %printer's.
3435 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3436 %destructor/%printer declarations.
3437
3508ce36
JD
34382006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3439
3440 Whether the default %destructor/%printer applies to a particular symbol
3441 isn't a question of whether the user *declares* that symbol (in %token,
3442 for example). It's a question of whether the user by any means
3443 *defines* the symbol at all (by simply using a char token, for
3444 example). $end is defined by Bison whereas any other token with token
3445 number 0 is defined by the user. The error token is always defined by
3446 Bison regardless of whether the user declares it with %token, but we
3447 may one day let the user define error as a nonterminal instead.
3448 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3449 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3450 the meaning of "user-defined".
3451 * tests/actions.at (Default %printer and %destructor for user-declared
3452 end token): Rename to...
3453 (Default %printer and %destructor for user-defined end token): ...
3454 this.
3455
3456 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3457 computation of whether to apply the default, don't maintain a list of
3458 every Bison-defined symbol. Instead, just check for a first character
3459 of '$', which a user symbol cannot have, and check for the error token.
3460
9350499c
JD
34612006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3462
3463 Don't apply the default %destructor or %printer to the error token,
3464 $undefined, or $accept. This change fits the general rule that the
3465 default %destructor and %printer are only for user-declared symbols,
3466 and it solves several difficulties that are described in the new test
3467 cases listed below.
3468 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3469 * tests/actions.at (Default %printer and %destructor are not for error
3470 or $undefined, Default %printer and %destructor are not for $accept):
3471 New test cases.
3472
4d7370cb
JD
34732006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3474
3475 Allow %start after the first rule.
3476 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3477 when parsing the first rule.
3478 (check_and_convert_grammar): Search for it here after all grammar
3479 declarations have been parsed. Skip midrules, which have dummy LHS
3480 nonterminals.
3481 * src/symtab.c (symbol_is_dummy): New function.
3482 * src/symtab.h (symbol_is_dummy): Declare it.
3483 * tests/input.at (%start after first rule): New test.
3484
6d0ef4ec
JD
34852006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3486
3487 Redo some of the previous commit: add back the ability to use
3488 non-aliased/undeclared string literals since it might be useful to
3489 those declaring %token-table.
3490 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3491 commit: don't worry about complaints from symbols_pack.
3492 * src/symtab.c (symbol_new, symbol_class_set,
3493 symbol_check_alias_consistency): Undo changes in previous commit: count
3494 each string literal as a new symbol and token, assign it a symbol
3495 number, and don't complain about non-aliased string literals.
3496 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3497 and token counts but does still set aliased tokens to the same number,
3498 symbol_pack_processor now leaves empty slots in the symbols array.
3499 Remove those slots.
3500 * tests/regression.at (Undeclared string literal): Remove test case
3501 added in previous commit since non-aliased string literals are allowed
3502 again.
3503 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3504 remove unnecessary string literal declarations.
3505 * tests/sets.at (Firsts): Likewise.
3506
965537bc
JD
35072006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3508
3509 Don't allow an undeclared string literal, but allow a string literal to
3510 be used before its declaration.
3511 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3512 symbols_pack complained.
3513 * src/symtab.c (symbol_new): Don't count a string literal as a new
3514 symbol.
3515 (symbol_class_set): Don't count a string literal as a new token, and
3516 don't assign it a symbol number since symbol_make_alias does that.
3517 (symbol_make_alias): It's not necessary to decrement the symbol and
3518 token counts anymore. Don't assume that an alias declaration occurs
3519 before any uses of the identifier or string, and thus don't assert that
3520 one of them has the highest symbol number so far.
3521 (symbol_check_alias_consistency): Complain if there's a string literal
3522 that wasn't declared as an alias.
3523 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3524 symbol_pack asserts that every token has been assigned a symbol number
3525 although undeclared string literals have not.
3526 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 3527 string literal): New test cases.
965537bc
JD
3528 (Characters Escapes, Web2c Actions): Declare string literals as
3529 aliases.
3530 * tests/sets.at (Firsts): Likewise.
3531
47aee066
JD
35322006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3533
3534 In the grammar scanner, STRING_FINISH unclosed constructs and return
3535 them to the parser in order to improve error messages.
3536 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3537 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3538 * tests/input.at (Unclosed constructs): New test case.
3539 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3540 seen.
3541
3542 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3543 unused global.
3544
1f6b3679
JD
35452006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3546
3547 Handle string aliases for character tokens correctly.
3548 * src/symtab.c (symbol_user_token_number_set): If the token has an
3549 alias, check and set its alias's user token number instead of its own,
3550 which is set to indicate the alias. Previously, every occurrence of
3551 the character token in the grammar overwrote that alias indicator with
3552 the character code.
3553 * tests/input.at (String aliases for character tokens): New test.
3554
219741d8
JD
35552006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3556
3557 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3558
11daa4e7
PE
35592006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3560
3561 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3562 to prevent failures when building on older platforms.
3563 Check for autopoint failure.
3564 Set XGETTEXT_OPTIONS to values that check for C format strings,
3565 so that translators are warned about them (this also helps
3566 prevent core dumps).
3567
3568 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3569 function, since it simplifies our code a bit.
3570
3571 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3572 rather than -W, so we don't get bogus warnings about sign comparisons.
3573 Add -Wpointer-arith, since that warning is useful (it reports code
3574 that does not conform to C89 and that some compilers reject).
3575 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3576 since it's no longer needed.
3577
f9bfc42a
JD
35782006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3579
3580 Clean up scanners a bit.
3581 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3582 definitions so gcc won't warn when obstack_for_string is unused.
3583 * src/scan-code.l: config.h and system.h are already #include'd by
3584 scan-code-c.c, so get rid of them here.
3585 * src/scan-gram.l: Likewise.
3586 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3587 definitions rather than duplicating the rest of it.
3588 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3589
06e8700a
JD
35902006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3591
3592 Suppress signed/unsigned comparison warnings for yycheck.
3593 * data/c.m4 (b4_safest_int_type): New macro.
3594 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3595 a signed int type, cast it to b4_safest_int_type first.
3596 * data/yacc.c: Likewise.
3597 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3598 also overwritten.
3599
9c437126
PE
36002006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3601
3602 * doc/bison.texinfo: Fix some typos.
3603
284d8a13
PE
36042006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3605
3606 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3607 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3608
3609 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3610 the latest gnulib does this a different way.
3611 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3612 translation was patched, so stop omitting it.
3613
ec5479ce
JD
36142006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3615
3616 Enable declaration of default %printer/%destructor. Make the parser
3617 use these for all user-declared grammar symbols for which the user does
3618 not declare a specific %printer/%destructor. Thus, the parser uses it
3619 for token 0 if the user declares it but not if Bison generates it as
3620 $end. Discussed starting at
3621 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3622 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3623 and
3624 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3625 * NEWS (2.3+): Mention.
3626 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3627 declare a %destructor for a mid-rule's semantic value. It's just
3628 impossible to declare one specific to it.
3629 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3630 code. Describe default %destructor form.
3631 * src/parse-gram.y (grammar_declaration): Parse default
3632 %printer/%destructor declarations.
3633 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3634 and symbol_destructor_location_get rather than accessing the destructor
3635 and destructor_location members of struct symbol.
3636 (symbol_printers_output): Likewise but for %printer's.
3637 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3638 again.
3639 * src/symtab.c (default_destructor, default_destructor_location,
3640 default_printer, default_printer_location): New static global
3641 variables to record the default %destructor and %printer.
3642 (symbol_destructor_get, symbol_destructor_location_get,
3643 symbol_printer_get, symbol_printer_location_get): New functions to
3644 compute the appropriate %destructor and %printer for a symbol.
3645 (default_destructor_set, default_printer_set): New functions to set the
3646 default %destructor and %printer.
3647 * src/symtab.h: Prototype all those new functions.
3648 * tests/actions.at (Default %printer and %destructor): New test to
3649 check that the right %printer and %destructor are called, that they're
3650 not called for $end, and that $$ and @$ work correctly.
3651 (Default %printer and %destructor for user-declared end token): New
3652 test to check that the default %printer and %destructor are called for
3653 a user-declared end token.
3654 * tests/input.at (Default %printer and %destructor redeclared, Unused
3655 values with default %destructor): New tests to check related grammar
3656 warnings and errors.
3657
868d2d96
JD
36582006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3659
3660 Clean up handling of %destructor for the end token (token 0).
3661 Discussed starting at
3662 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3663 and
3664 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3665
3666 Make the skeletons consistent in how they pop the end token and invoke
3667 its %destructor.
3668 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3669 state, which has token number 0, since this would invoke the
3670 %destructor for the end token.
3671 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3672 until after shifting the end token, or else it won't be popped.
3673 * data/yacc.c (yyparse): Likewise.
3674
3675 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3676 it's the end token. Upon termination, destroy an unshifted lookahead
3677 even when it's the end token.
3678 * data/lalr1.cc (yy::parser::parse): Likewise.
3679 * data/yacc.c (yyparse): Likewise.
3680
3681 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3682 value warnings for the end token when the user gives the end token a
3683 %destructor.
3684
3685 * tests/actions.at (Printers and Destructors): Test all the above.
3686
62a9592d
PE
36872006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3688
3689 Update to latest gnulib and gettext versions.
3690 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3691 Add fopen-safer.
3692 (gnulib_files): Add m4/warning.m4. Don't worry about files
3693 overwritten by autopoint.
3694 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3695 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3696 rejects them.
3697 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3698 so that we can remove the intl files at a better time.
3699 (intl_files_to_remove): Remove aclocal.m4, since it gets
3700 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3701 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3702 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3703 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3704 Remove datarootdir hack; no longer needed.
3705 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3706 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3707 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3708 strdup.h.
3709 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3710 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3711
10d6970f
PE
37122006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3713
3714 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3715 it with --assume-autoconf='latest-stable'.
3716
50a33993
JD
37172006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3718
3719 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3720 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3721 YYSTYPE' and `{'.
3722 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3723 those from muscle_tab.c since the old ones are misleading.
3724
2ce4ed68
AD
37252006-07-13 Akim Demaille <akim@epita.fr>
3726
3727 Support %define "KEY" {VALUE}.
3728 * src/scan-code.h, src/scan-code.l (translate_action)
3729 (translate_rule_action, translate_symbol_action, translate_code):
3730 Return char *, not const char *.
3731 * src/parse-gram.y (declaration): Rename as...
3732 (prologue_declaration): this.
3733 (string_content): Remove this nonterminal, use STRING.
3734 (braceless, content, content.opt): New nonterminal.
3735 Use them.
3736 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3737 as value.
3738 * src/scan-gram.l (getargs.h): Don't include it.
3739
db7e5eb5
PE
37402006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3741
3742 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3743 rather than a for-loop that declares a local bool variable. This
3744 should work around a compatibility problem with a Cray x1e C++
3745 compiler reported by Hung Nguyen in
3746 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3747 The for-loop was introduced in the 2004-11-17 change but I don't
3748 know why it was needed.
3749
a5d80ba5
AD
37502006-07-12 Akim Demaille <akim@epita.fr>
3751
3752 * data/c.m4: Comment changes.
3753
23eb2a69
AD
37542006-07-10 Akim Demaille <akim@lrde.epita.fr>
3755
3756 * src/complain.c (error_message, ERROR_MESSAGE): New.
3757 To factor...
3758 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3759 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3760
ddc8ede1
PE
37612006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3762
3763 * NEWS: Instead of %union, you can define and use your own union type
3764 YYSTYPE if your grammar contains at least one <type> tag.
3765 Your YYSTYPE need not be a macro; it can be a typedef.
3766 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3767 (Union Decl, Decl Summary): Document this.
3768 * data/glr.c (YYSTYPE): Implement this.
3769 * data/glr.cc (YYSTYPE): Likewise.
3770 * data/lalr1.cc (YYSTYPE): Likewise.
3771 * data/yacc.c (YYSTYPE): Likewise.
3772 * src/output.c (prepare): Output tag_seen_flag.
3773 * src/parse-gram.y (declaration, grammar_declaration):
3774 Use 'union_seen' rather than 'typed' to determine whether
3775 %union has been seen, since grammars can now be typed without
3776 %union.
3777 (symbol_declaration, type.opt, symbol_def):
3778 Keep track of whether a tag has been seen.
3779 * src/reader.c (union_seen, tag_seen): New vars.
3780 (typed): remove.
3781 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3782 * src/scan-code.l (untyped_var_seen): New variable.
3783 (handle_action_dollar): Adjust to above changes.
3784 (handle_action_dollar, handle_action_at):
3785 Improve overflow checking for outlandish numbers.
3786 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3787 avoid new diagnostics generated by above changes.
3788 * tests/regression.at (YYSTYPE typedef): Add test to check
3789 for type tags without %union.
3790
3791 * src/symlist.c (symbol_list_length): Return int, not unsigned
3792 int, since callers expect int. This may need to get revisited
3793 once we have proper integer overflow checking.
3794
3795 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3796 object is now static.
3797
3798 * src/getargs.c (flags_argmatch): Return void, not int,
3799 to pacify ./configure --enable-gcc-warnings.
3800
3801 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3802 since last_string is already defined to FLEX_PREFIX (last_string).
3803
7b42569e
AD
38042006-07-09 Akim Demaille <akim@lrde.epita.fr>
3805
3806 Implement --warnings/-W.
3807 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3808 replaced by...
3809 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3810 Adjust callers.
3811 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3812 (warnings_args, warnings_types): New.
3813 (getargs, short_options, long_options): Accept -W/--warnings.
3814 Sort the options by alphabetical order, upper case letter right
3815 before its lower case.
3816
3b452f4e
JD
38172006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3818
3819 Change %merge result type clash warnings to errors. Discussed at
3820 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3821 * src/reader.c (record_merge_function_type): Use complain_at.
3822 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3823 declared later): Update test case results.
3824
b8a41559
AD
38252006-07-09 Akim Demaille <akim@lrde.epita.fr>
3826
3827 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3828 to be in alphabetical order.
3829 (trace_args): Spelling fixes.
3830
cd9e1ba2
PE
38312006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3832
3833 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3834 so they don't collide with user-defined macros.
3835 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3836 this was never guaranteed, and now that we're using gnulib stdint,
3837 which defines int_fast16_t to long int, the problem is exposed.
3838
cb48f191
PE
38392006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3840
b8445a15
PE
3841 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3842 need the full POSIX semantics (and weren't implementing them
3843 anyway).
3844
cb48f191
PE
3845 Adjust to Autoconf 2.60 and today's gnulib.
3846 * bootstrap (gnulib_modules): Add stdint.
3847 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3848 no longer copies it.
3849 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3850 since stdint needs the former and wcwidth (which is now required
3851 by mbswidth) needs the latter.
3852 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3853 work around a compatibility glitch between gettext 0.14.6 and
3854 Autoconf 2.60.
3855 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3856 Do not check for uintptr_t, since new stdint module does the right
3857 thing.
3858 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3859 Add stdint.h, stdint_.h, wcwidth.h.
3860 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3861 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3862 stdint.m4, wchar_t.m4, wcwidth.m4.
3863 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3864 usual order for ../lib/*.h files.
3865 (file_name_split): Use last_component, not base_name, to adjust
3866 to gnulib changes.
3867 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3868 for ../lib/*.h files.
3869 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3870 Define unconditionally, since we now assume the stdint module.
3871 * src/scan-skel.l: Include <dirname.h>.
3872 (BASE_QPUTS): Use last_component, not base_name.
3873 * src/system.h: Include <unlocked-io.h> in the usual order
3874 for ../lib/*.h files. Include <stdint.h> unconditionally,
3875 since we now use the stdint module.
3876 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3877 HAVE_UINTPTR_T, since we now use the stdint module.
3878 (base_name): Remove decl, since files now include <dirname.h>
3879 to get the decl.
3880
cd48d21d
AD
38812006-07-08 Akim Demaille <akim@lrde.epita.fr>
3882
3883 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3884 New, default to 1.
3885 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3886 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3887 default.
3888 * tests/calc.at: Adjust.
3889
8ec0a172
AD
38902006-07-08 Akim Demaille <akim@lrde.epita.fr>
3891
b8445a15 3892 * data/c.m4 (b4_basename): New.
8ec0a172
AD
3893 (b4_syncline): Also output the location of its invocation (from
3894 the skeleton).
3895 (b4_user_action, b4_define_user_action, b4_user_actions)
3896 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3897 (b4_user_stype): New.
3898 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3899
4a678af8
JD
39002006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3901
3902 In the grammar file, the first column is 1 not 0 on the first line as
3903 on every other line.
3904 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3905 * tests/input.at (Torturing the Scanner): Update output.
3906
3907 * src/scan-gram.l (scanner_cursor): Declare it static.
3908
dd60572a
JD
39092006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3910
3911 In warnings, say "previous declaration" rather than "first
3912 declaration".
3913 * src/symtab.c (redeclaration): Do that here.
3914 * src/reader.c (record_merge_function_type): In the case of a result
3915 type clash, report the previous declaration rather than the very first
3916 one in the grammar file.
3917 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3918 declared later): Add a third declaration to check this behavior.
3919 * tests/input.at (Incompatible Aliases): Update output.
3920
2073e1b6
AD
39212006-06-27 Akim Demaille <akim@epita.fr>
3922
3923 * doc/Doxyfile.in: New.
3924 * doc/Makefile.am: Use it.
3925 * src/lalr.h, src/symtab.h: Initial doxygenation.
3926
8ee5b538
JD
39272006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3928
3929 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
3930 declared after the %merge. This continues the effort of the previous
3931 patch.
8ee5b538
JD
3932 * src/reader.c (get_merge_function): Don't set the merger type yet.
3933 (record_merge_function_type): New function for setting the merger type
3934 and checking for clashes.
3935 (grammar_current_rule_merge_set): Set the location of the %merge for
3936 the current rule.
3937 (packgram): Invoke record_merge_function_type for each rule now that
3938 all symbol type declarations have been parsed.
3939 * src/reader.h (merger_list.type_declaration_location): New member
3940 storing the location of the first %merge from which the type for this
3941 merging function was derived.
3942 * src/symlist.h (symbol_list.merger_declaration_location): New member
3943 storing the location of a rule's %merge, if any.
3944 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3945 declared later): New test to catch the error fixed by the above patch.
3946
ffa4ba3a
JD
39472006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3948
3949 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
3950 declarations appear after the rules. Discussed at
3951 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3952 and
3953 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3954 Don't mistake the type of $$ in a midrule to be that of its parent
3955 rule's $$.
ffa4ba3a
JD
3956 * src/reader.c (grammar_current_rule_end): Don't invoke
3957 grammar_rule_check yet since not all symbol declarations may have been
3958 parsed yet.
3959 (grammar_midrule_action): Likewise.
3960 Don't record whether the midrule's $$ has been used yet since actions
3961 haven't been translated yet.
3962 Record the midrule's parent rule and its RHS index within the parent
3963 rule.
3964 (grammar_current_rule_action_append): Don't translate the action yet
3965 since not all symbol declarations may have been parsed yet and, thus,
3966 warnings about types for $$, $n, @$, and @n can't be reported yet.
3967 (packgram): Translate the action and invoke grammar_rule_check now that
3968 all symbol declarations have been parsed.
3969 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3970 after parsing the entire grammar file, the symbol list here in the case
3971 of a midrule is actually the midrule's empty RHS, so reference its
3972 parent rule's RHS where necessary.
3973 On the other hand, now that you can already know it's a midrule, you
3974 aren't forced to think $$ has the same type as its parent rule's $$.
3975 (handle_action_at): In the case of a midrule, reference the parent rule
3976 where necessary.
3977 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3978 members.
3979 (symbol_list_length): Now that this is invoked after all rules have
3980 been parsed, a NULL symbol (rather than a NULL symbol list node)
3981 terminates a rule. symbol_list_print already does this correctly.
3982 * src/symlist.h (symbol_list.midrule_parent_rule,
3983 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3984 remember their relationships with their parents.
3985 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3986 fixed by the above patch.
3987 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3988 implementing...
3989 (Unused values): ... this old test case and...
3990 (Unused values before symbol declarations): ... this new test case.
3991 This one is the same as `Unused values' except that all symbol
3992 declarations appear after the rules in order to catch the rest of the
3993 errors fixed by the above patch.
3994
e256e17f
JD
39952006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3996
300a1930
JD
3997 More cleanup.
3998 * src/reader.c (current_rule): Declare it static since it's no longer
3999 used outside this file.
4000 (grammar_current_rule_action_append): Remove redundant arguments from
4001 translate_rule_action invocation.
4002 * src/reader.h (current_rule): Remove this unused extern.
4003 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4004 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 4005
381ecb06
JD
40062006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4007
4008 Clean up yesterday's patch.
4009 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4010 to...
4011 * src/reader.c (grammar_current_rule_action_append): ... here for
4012 consistency with grammar_current_rule_symbol_append.
4013 * tests/regression.at (Braced code in declaration in rules section):
4014 Make yyerror and yylex static as usual.
4015
4210cd0b
JD
40162006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4017
4018 Fix bug that mistakes braced code in a declaration in the rules section
4019 to be a rule action. Mentioned at
4020 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4021 * src/scan-gram.l: Move midrule action detection from the start of the
4022 scanning of any braced code to...
4023 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4024 action. For readability, use $2 and @2 rather than the equivalent
4025 global variables.
4026 * tests/regression.at (Braced code in declaration in rules section):
4027 New test to catch the error fixed by the above patch.
4028
4029 Work on code readability some.
4030 * src/scan-code.l (current_rule): Get rid of this misleading and
4031 redundant declaration: it's actually extern'ed in reader.h.
4032 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4033 translate_action): Add a rule argument and use it instead of the global
4034 current_rule.
4035 (translate_rule_action): This already receives current_rule through an
4036 argument, so pass it on to translate_action instead of assigning
4037 current_rule to current_rule.
4038 (translate_symbol_action, translate_code): Pass rule = NULL to
4039 translate_action.
4040
34f98f46
JD
40412006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4042
4043 Rename %before-definitions to %start-header and %after-definitions to
4044 %end-header. Don't use these declarations to separate pre-prologue
4045 blocks from post-prologue blocks. Add new order-independent
4046 declarations %before-header and %after-header as alternatives to the
4047 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4048 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4049 * NEWS (2.3+): Update for these changes.
4050 * data/glr.c (b4_before_definitions): Update to...
4051 (b4_start_header): ... this.
4052 (b4_after_definitions): Update to...
4053 (b4_end_header): ... this.
4054 * data/glr.cc: Likewise.
4055 * data/lalr1.cc: Likewise.
4056 * data/yacc.c: Likewise.
4057 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4058 prologue blocks with %*-header declarations.
4059 (Calc++ Parser): Likewise.
91661ebb 4060 (Decl Summary): Update names.
148d66d8 4061 (Table of Symbols): Update description.
34f98f46
JD
4062 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4063 (PERCENT_END_HEADER): ... this.
4064 (PERCENT_BEFORE_DEFINITIONS): Update to...
4065 (PERCENT_START_HEADER): ... this.
4066 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4067 (declaration): Update token names and m4 macro names.
4068 When parsing %end-header and %start-header, invoke translate_code
4069 before muscle_code_grow, and no longer set global booleans to remember
4070 whether these declarations have been seen.
4071 Parse new %after-header and %before-header.
4072 * src/reader.c (before_definitions, after_definitions): Remove.
4073 (prologue_augment): Accept a new bool argument to specify whether to
4074 augment the pre-prologue or post-prologue.
4075 * src/reader.h (before_definitions, after_definitions): Remove these
4076 extern's.
4077 (prologue_augment): Add new bool argument.
4078 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4079 (PERCENT_END_HEADER): ... this.
4080 (PERCENT_BEFORE_DEFINITIONS): Update to...
4081 (PERCENT_START_HEADER): ... this.
4082 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4083 * tests/actions.at (Printers and Destructors): Update names.
4084
31b2b07e
JD
40852006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4086
4087 Add comparison operators for C++ location classes. Discussed at
4088 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4089 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4090 declaration indicating whether filename_type has an operator==. If
4091 filename_type is `std::string', it defaults to `1', `0' otherwise.
4092 * data/location.cc: Iff b4_define_location_comparison is `1', add
4093 operator== and operator!= for class position and for class location.
4094
4095 Some minor fixes.
4096 * src/scan-action.l: Remove unused file.
4097 * src/symtab.c (symbol_printer_set): Use printer_location not
4098 destructor_location.
4099 * src/symtab.h (struct symbol): Replace incorrect source comment for
4100 printer members.
4101 * tests/input.at (Incompatible Aliases): Update output with correct
4102 printer location.
4103
9bc0dd67
JD
41042006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4105
4106 Don't put the pre-prologue in the header file. For the yacc.c code
4107 file and the glr.c header and code files, move the pre-prologue before
4108 the token definitions. Add new %before-definitions and
4109 %after-definitions to declare code that will go in both the header file
4110 and code file. Discussed at
4111 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4112 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4113 and
4114 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4115 * NEWS (2.3+): Describe these changes.
4116 * data/glr.c (b4_pre_prologue): Move from within to before...
4117 (b4_shared_declarations): ... this.
4118 Add new b4_before_definitions before b4_token_enums.
4119 Add new b4_after_definitions at the end.
4120 * data/glr.cc (b4_pre_prologue): Replace with...
4121 (b4_before_definitions): ... this in the header file.
4122 (b4_after_definitions): New near the end of the header file.
4123 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4124 code file right before including the header file.
4125 (b4_before_definitions): New in the previous position of
4126 b4_pre_prologue in the header file.
4127 (b4_after_definitions): New near the end of the header file.
4128 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4129 (b4_token_enums_defines): In the code file, move to right before
4130 YYSTYPE for consistency with the header file.
4131 (b4_before_definitions): New right before b4_token_enums_defines in
4132 both the header and code file.
4133 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4134 header and code file.
4135 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4136 of prologues for %union dependencies.
91661ebb
JD
4137 (Decl Summary): In %defines description, mention the effect of
4138 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
4139 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4140 than in the pre-prologue so that make check succeeds.
148d66d8 4141 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
4142 %after-definitions.
4143 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4144 %before-definitions.
4145 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4146 (declaration): Parse those declarations and append to
4147 b4_before_definitions and b4_after_definitions, respectively.
4148 * src/reader.c (before_definitions, after_definitions): New bools to
4149 track whether those declarations have been seen.
4150 (prologue_augment): Add to the post-prologue if %union,
4151 %before-definitions, or %after-definitions has been seen.
4152 * src/reader.h (before_definitions, after_definitions): New extern's.
4153 * src/scan-gram.l: Scan the new declarations.
4154 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4155 prologue block in a %before-definitions or a %after-definitions based
4156 on whether the %union is declared.
4157 * tests/regression.at (Early token definitions with --yacc, Early token
4158 definitions without --yacc): Move tests for token definitions into the
4159 post-prologue since token names are no longer defined in the
4160 pre-prologue.
4161
203b9274
AD
41622006-06-20 Akim Demaille <akim@epita.fr>
4163
4164 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4165 (symbol_get): Use it.
4166 * src/parse-gram.y: Use it.
4167
a7ee59cf
JD
41682006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4169
4170 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4171 build succeeds when configured with --enable-gcc-warnings.
4172
5a2baae7
PE
41732006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4174
33ad1a9c
PE
4175 * src/parse-gram.y (char_name): New function.
4176 (CHAR, STRING, string_content): For %printer, properly escape.
4177 (ID): Prefer fputs to fprintf.
4178 (id): Reindent to be consistent with other rules.
4179 Properly quote char.
4180
5a2baae7
PE
4181 The Translation Project changed its way of publishing translations
4182 to maintainers. I haven't received any responses to my request
4183 for supporting the old way, or for documenting the new way. I
4184 have modified 'bootstrap' to use screen scraping
4185 (in this case, HTML scraping). This is unreliable and inelegant,
4186 but I don't see any better way. Yuck.
4187 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4188 (get_translations): New function, which uses HTML scraping to
4189 deduce locations of latest translations.
4190 Use this function to grab both bison and bison-runtime .po files.
4191 Don't bother priming the pump for the runtime-po domain any more,
4192 as it's now translated better than bison is.
4193
58d7a1a1
AD
41942006-06-19 Akim Demaille <akim@epita.fr>
4195
4196 * src/scan-gram.l: No longer "parse" things after `%union' until
4197 `{'. Rather, return a single "%union" token.
4198 No longer make symbols: return strings, and leave the conversion
4199 to symbols to the parser.
4200 (SC_PRE_CODE, token_type): Remove.
4201 * src/parse-gram.y (%union): New field `character'.
4202 Sort tokens.
4203 (CHAR): New token.
4204 (ID, ID_COLON): Now that the scanner no longer makes them
4205 identifiers, adjust all uses to invoke symbol_get.
4206 (id_colon): New, wraps the conversion from string to symbol.
4207 (%union): Accept a possible union_name.
4208 (symbol): Now can be a char.
4209 * data/c.m4 (b4_union_name): Leave a default value.
4210 * data/glr.c, data/yacc.c: Use it.
4211
b931235e
JD
42122006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4213
4214 For associating token numbers with token names for "yacc.c", don't use
4215 #define statements unless `--yacc' is specified; always use enum
4216 yytokentype. Most important discussions start at:
4217 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4218 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4219 and
4220 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4221 * NEWS (2.3+): Mention.
4222 * data/c.m4 (b4_yacc_if): New.
4223 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4224 token #define's.
4225 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4226 on token name definitions.
4227 * src/getargs.c (usage): Capitalize `Yacc' in English.
4228 * src/output.c (prepare): Define b4_yacc_flag.
4229 * tests/regression.at (Early token definitions): Test that tokens names
4230 are defined before the pre-prologue not just before the post-prologue.
4231 Remove this test case and copy to...
4232 (Early token definitions with --yacc): ... this to test #define's.
4233 (Early token definitions without --yacc): ... and this to test enums.
4234
9e6e7ed2
PE
42352006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4236
4237 * NEWS: Reword the post-2.3 change to not be so optimistic about
4238 removing the old "look-ahead" spelling.
4239 Update previous look-ahead/lookahead change reports.
4240 * REFERENCES: look-ahead -> lookahead (since that's
4241 what he actually wrote).
4242 * doc/refcard.tex: look ahead -> lookahead,
4243 look-ahead -> lookahead
4244
742e4900
JD
42452006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4246
4247 For consistency, use `lookahead' instead of `look-ahead' or
4248 `look_ahead'. Discussed starting at
4249 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4250 and then at
4251 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4252 * NEWS: For the next release, note the change to `--report'.
4253 * TODO, doc/bison.1: Update English.
4254 * doc/bison.texinfo: Update English.
4255 (Understanding Your Parser, Bison Options): Document as
4256 `--report=lookahead' rather than `--report=look-ahead'.
4257 * src/conflicts.c: Update English in comments.
4258 (lookahead_set): Rename from look_ahead_set.
4259 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4260 (resolve_sr_conflict): Rename local look_ahead_tokens to
4261 lookahead_tokens, and update other uses.
4262 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4263 count_rr_conflicts, conflicts_free): Update uses.
4264 * src/getargs.c (report_args): Move "lookahead" before alternate
4265 spellings.
4266 (report_types): Update uses.
4267 (usage): For `--report' usage description, state `lookahead' spelling
4268 rather than `look-ahead'.
4269 * src/getargs.h (report.report_lookahead_tokens): Rename from
4270 report_look_ahead_tokens.
4271 * src/lalr.c: Update English in comments.
4272 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4273 (state_lookahead_tokens_count): Rename from
4274 state_look_ahead_tokens_count.
4275 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4276 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4277 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4278 Update other uses.
4279 Update English in output.
4280 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4281 * src/print.c: Update English in comments.
4282 (lookahead_set): Rename from look_ahead_set.
4283 (print_reduction): Rename argument lookahead_token from
4284 look_ahead_token.
4285 (print_core, state_default_rule, print_reductions, print_results):
4286 Update uses.
4287 * src/print_graph.c: Update English in comments.
4288 (print_core): Update uses.
4289 * src/state.c: Update English in comments.
4290 (reductions_new): Update uses.
4291 (state_rule_lookahead_tokens_print): Rename from
4292 state_rule_look_ahead_tokens_print, and update other uses.
4293 * src/state.h: Update English in comments.
4294 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4295 (state_rule_lookahead_tokens_print): Rename from
4296 state_rule_look_ahead_tokens_print.
4297 * src/tables.c: Update English in comments.
4298 (conflict_row, action_row): Update uses.
4299 * tests/glr-regression.at
4300 (Incorrect lookahead during deterministic GLR,
4301 Incorrect lookahead during nondeterministic GLR): Rename
4302 print_look_ahead to print_lookahead.
4303 * tests/torture.at: Update English in comments.
4304 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4305 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4306 (Many lookahead tokens): Update uses.
4307 * data/glr.c: Update English in comments.
4308 * lalr1.cc: Likewise.
4309 * yacc.c: Likewise.
4310 * src/conflicts.h: Likewise.
4311 * src/lalr.h: Likewise.
4312 * src/main.c: Likewise.
4313 * src/output.c: Likewise.
4314 * src/parse-gram.c: Likewise.
4315 * src/tables.h: Likewise.
4316 * tests/calc.at: Likewise.
4317
3c40d0b5
JD
43182006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4319
4320 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4321
5d278082
PE
43222006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4323
4324 * TODO: Add request from Nelson H. F. Beebe to be able to install
4325 Bison without installing the yacc script.
4326
9e668899
JD
43272006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4328
4329 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4330 and yytext if they're already #define'd.
4331 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4332 * src/scan-code-c.c: ... here.
4333 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4334 <config.h>.
4335
0c8e079f
JD
43362006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4337
4338 Get Bison to build again when configured with --enable-gcc-warnings.
4339 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4340 missing #include's.
4341 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4342 loc argument as it shadows a global.
4343 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4344 invocation.
4345
4346 * src/.cvsignore: Add scan-code.c.
4347
2346344a
AD
43482006-06-07 Akim Demaille <akim@epita.fr>
4349
4350 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4351 to...
4352 * src/scan-code.l: here.
4353 * tests/input.at (Torturing the Scanner): Fix another location
4354 error.
4355
4862bdfd
AD
43562006-06-07 Akim Demaille <akim@epita.fr>
4357
4358 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4359
e9071366
AD
43602006-06-06 Akim Demaille <akim@epita.fr>
4361
4362 Extract the parsing of user actions from the grammar scanner.
4363 As a consequence, the relation between the grammar scanner and
4364 parser is much simpler. We can also split "composite tokens" back
4365 into simple tokens.
4366 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4367 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4368 rename as...
4369 * src/location.h, src/location.c (add_column_width)
4370 (location_compute): these.
4371 Fix the column count: the initial column is 0.
4372 (location_print): Be robust to ending column being 0.
4373 * src/location.h (boundary_set): New.
4374 * src/main.c: Adjust to scanner_free being renamed as
4375 gram_scanner_free.
4376 * src/output.c: Include scan-code.h.
4377 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4378 Use boundary_set.
4379 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4380 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4381 which is now, again, a separate token.
4382 Adjust all dependencies.
4383 Whereever actions with $ and @ are used, use translate_code.
4384 (action): Remove this nonterminal which is now useless.
4385 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4386 (grammar_current_rule_action_append): Use translate_code.
4387 (packgram): Bound check ruleno, itemno, and rule_length.
4388 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4389 (last_string, last_braced_code_loc, max_left_semantic_context)
4390 (scanner_initialize, scanner_free, scanner_last_string_free)
4391 (gram_out, gram_lineno, YY_DECL_): Move to...
4392 * src/scan-gram.h: this new file.
4393 (YY_DECL): Rename as...
4394 (GRAM_DECL): this.
4395 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4396 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4397 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4398 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4399 Move these declarations, and...
4400 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4401 these to...
4402 * src/flex-scanner.h: this new file.
4403 * src/scan-gram.l (rule_length, rule_length_overflow)
4404 (increment_rule_length): Remove.
4405 (last_braced_code_loc): Rename as...
4406 (gram_last_braced_code_loc): this.
4407 Adjust to the changes of the parser.
4408 Move all the handling of $ and @ into...
4409 * src/scan-code.l: here.
4410 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4411 (handle_action_dollar, handle_action_at): Move to...
4412 * src/scan-code.l: here.
4413 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4414 scan-code.h, scan-code-c.c, scan-gram.h.
4415 (EXTRA_bison_SOURCES): Add scan-code.l.
4416 (BUILT_SOURCES): Add scan-code.c.
4417 (yacc): Be robust to white spaces.
4418
4419 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4420 * tests/regression.at: Adjust the column numbers.
4421 * tests/regression.at: Adjust the error message.
7891a7c4 4422
184e42f0
JD
44232006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4424
4425 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4426 Use Akim's wording from
4427 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4428
7891a7c4
JD
44292006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4430
4431 Between Bison releases, manually append `+' to the previous Bison
4432 release number, and use that as a signal to automatically print the
4433 ChangeLog's CVS Id keyword from --version. Discussed starting at
4434 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4435 * ChangeLog: Add Id header.
4436 * configure.ac (AC_INIT): Append `+' to `2.3'.
4437 * src/.cvsignore: Add revision.c.
4438 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4439 (BUILT_SOURCES): Add revision.c.
4440 (revision.c): New target rule. This file defines a new global variable
4441 named revision. It initializes it with either the Id from ChangeLog
4442 or, if VERSION doesn't contain `+', with the empty string.
4443 * src/getargs.c (version): Print the value of revision.
4444 * src/revision.h: Extern revision.
4445
4ad3ed84
PE
44462006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4447
4448 * NEWS: Version 2.3.
4449 * configure.ac (AC_INIT): Likewise.
4450
02103984
PE
44512006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4452
4453 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4454 with no arguments, not as an object-like macro. This is for
4455 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4456 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4457 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4458 Document this.
4459
2c08afa5
JD
44602006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4461
4462 * src/getargs.c (usage): Back out yesterday's modification of the
4463 --help output so that we don't have to wait for translation before
4464 releasing 2.3.
4465
6077da58
PE
44662006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4467
4468 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4469 Problem reported by Akim Demaille.
4470
2a26b6c2
JD
44712006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4472
4473 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4474
aefef0d6
PE
44752006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4476
4477 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4478 generated source code. Problem reported by Frans Englich in
4479 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4480
fcd8e201
PE
44812006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4482
4483 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4484 shell, not within 'make', so that 'make' by an ordinary builder
4485 (using GNU make) does not worry about configuring gzip. This also
4486 works around a bug reported independently by Keith Thompson and by
4487 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4488 stderr rather than stdout, messing up the build logs.
4489
7b5cdcbd
JD
44902006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4491
4492 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4493 to make sure that YYID will never be unused. This fixes a 'make
4494 maintainer-check' failure caused by the recent changes to the 'Trivial
4495 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4496 not used.
4497 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4498
5ad0a449
JD
44992006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4500
4501 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4502 state before an empty RHS is always resolved here. Only the location
4503 of that state is guaranteed to be resolved, and that's enough. This
4504 fixes the remaining bug reported by Derek M. Jones in
4505 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4506 * tests/glr-regression.at (Uninitialized location when reporting
4507 ambiguity): Test the above case.
4508 Also, the embedded comments in this test case claim it checks the case
4509 of an empty RHS that has inherited the initial location. However, the
4510 corresponding LHS was already resolved, so yyresolveLocations didn't
4511 actually have reason to modify it. Fix this by forcing
4512 nondeterministic operation at the beginning of the parse.
4513
50cce58e
PE
45142006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4515
4516 * data/c.m4 (b4_yy_symbol_print_generate):
4517 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4518 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4519 of the bugs reported today by Derek M Jones in
4520 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4521 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4522 defined to be a type name without parens or brackets.
4523 (Location Type): Similarly for YYLTYPE.
4524 * tests/regression.at (Trivial grammars): Put in a test for this
4525 bug that will be caught by 'make maintainer-check' (though not,
4526 alas, by 'make check' unless your compiler is picky).
4527
ab8d9dc5
PE
45282006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4529
0d2c8934 4530 * NEWS: Version 2.2.
ab8d9dc5
PE
4531 * configure.ac (AC_INIT): Likewise.
4532
9138c575
JD
45332006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4534
4535 * data/glr.c (yyreportTree): Make room in yystates for the state
4536 preceding the RHS. This fixes the segmentation fault reported by Derek
4537 M. Jones in
4538 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4539 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4540 to the user. Reported for yyreportTree by Derek M. Jones later in the
4541 same thread.
4542 * THANKS: Add Derek M. Jones.
4543 Update my email address.
4544 Fix typo in Steve Murphy's name.
4545
276f48df
PE
45462006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4547
d6645148
PE
4548 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4549 checking against YYLAST that caused the parser to miss a potential
4550 alternative in its diagnostic.
4551 Problem reported by Maria Jose Moron Fernandez in
4552 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4553 * data/lalr1.cc (yysyntax_error_): Likewise.
4554 * data/yacc.c (yysyntax_error): Likewise.
4555 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4556 tokens, in case we run into an older C compiler.
4557 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4558 Use them to check for the off-by-one error fixed above.
4559
276f48df
PE
4560 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4561 YYSIZE_T, not size_t.
4562 * tests/regression.at (Trivial grammars): New test, to catch
4563 the error fixed by the above patch.
4564
cd8b5791
AD
45652006-05-14 Akim Demaille <akim@lrde.epita.fr>
4566
4567 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4568 scheme.
4569 Reported by Steve Murphy.
4570
34376418
AD
45712006-05-14 Akim Demaille <akim@lrde.epita.fr>
4572
4573 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4574 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4575
327afc7c
AD
45762006-05-14 Akim Demaille <akim@lrde.epita.fr>
4577
4578 Implement --trace=m4.
4579 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4580 * src/output.c (output_skeleton): When set, pass -dV to m4.
4581
4582 Factor the handling of flags in m4.
4583 * src/output.c (prepare): Rename the muscle names debug, defines,
4584 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4585 * data/c.m4: Adjust.
4586 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4587 Use b4_define_flag_if to define other b4_FLAG_if macros.
4588 (b4_location_if): As a consequence, rename as...
4589 (b4_locations_if): this, for consistency.
4590 Adjust all the skeletons.
4591
ba9ecd19
AD
45922006-05-14 Akim Demaille <akim@lrde.epita.fr>
4593
4594 * etc/bench.pm: Shorten bench names.
4595
4e83ea15
AD
45962006-05-14 Akim Demaille <akim@lrde.epita.fr>
4597
4598 * src/output.h, src/output.c (error_verbose): Move to...
4599 * src/getargs.h, src/getargs.c: here.
4600 Sort the flags.
4601 Adjust dependencies.
4602
6e93d810
PE
46032006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4604
4605 * data/c.m4 (b4_copyright): Put the special exception for Bison
4606 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
4607 uses changed. Suggested by Akim Demaille. Also, wrap the
4608 copyright notice, in case it is longer than 80 columns. Replace
4609 comma by newline after title.
6e93d810 4610
eaea13f5
PE
46112006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4612
4613 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4614 incompatibility, not a bug. Mention that it wasn't fixed as of
4615 flex 2.5.33.
4616
3cf084ec
AD
46172006-05-11 Akim Demaille <akim@lrde.epita.fr>
4618
4619 * examples/extexi: Enforce the precedence of concatenation over
4620 >>.
0a9f1c7d 4621 Reported by Tommy Nordgren.
3cf084ec 4622
32c96bd7
AD
46232006-05-11 Akim Demaille <akim@lrde.epita.fr>
4624
4625 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4626 with the member "token".
f94705b2 4627 Reported by Martin Nylin.
32c96bd7 4628
eaea13f5
PE
46292006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4630
4631 * data/glr.c: Switch to Bison 2.2 special-exception language in
4632 the copyright notice. Use more-regular format for titles and
4633 copyright notices.
4634 * data/glr.cc: Likewise.
4635 * data/location.cc: Likewise.
4636 * data/yacc.cc: Likewise.
4637 * doc/bison.texinfo (Conditions): Document this.
4638 * NEWS: likewise. Upgrade version to 2.2.
4639
6e2d1146
AD
46402006-04-27 Akim Demaille <akim@lrde.epita.fr>
4641
4642 * data/glr.cc: Remove dead code.
4643
47671055
PE
46442006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4645
4646 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4647 that variable and the line breaks the bootstrap. Problem reported
4648 by Juan M. Guerrero.
4649
ed2e6384
AD
46502006-04-24 Akim Demaille <akim@lrde.epita.fr>
4651
4652 * doc/bison.texinfo (Multiple start-symbols): New.
4653
3cedc2dc
AD
46542006-04-24 Akim Demaille <akim@lrde.epita.fr>
4655
4656 * etc/README, etc/bench.pl: New.
4657
b2ddc3f3
AD
46582006-04-03 Akim Demaille <akim@lrde.epita.fr>
4659
4660 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4661 rule.
4662 Reported by Mickael Labau.
4663 * tests/input.at (Torturing the Scanner): Test it.
4664
91e3ac9a
PE
46652006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4666
4667 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4668 Problem reported by Bob Rossi.
4669
46702006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4671
4672 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4673 and didn't really work.
4674 For the index, use @ifnotinfo, not @iftex.
4675 Minor cleanups of spacing and terminology.
4676
5cf61e93
AD
46772006-03-12 Akim Demaille <akim@lrde.epita.fr>
4678
4679 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4680 of AT_NAME_PREFIX when %name-prefix is not used.
4681
aa08666d
AD
46822006-03-12 Akim Demaille <akim@lrde.epita.fr>
4683
4684 Apply --prefix to C++ skeletons too: they change the namespace.
4685 The test suite already exercize these cases.
4686 * data/c++.m4 (b4_namespace): New.
4687 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4688 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4689 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4690 * doc/bison.texinfo: Document it.
4691 (Option Cross Key): Use @multitable in all formats. It looks
4692 nicer, even in TeX outputs.
4693 (Rules): Use the same code whatever the output type is.
4694 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4695 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4696 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 4697
45567173
AD
46982006-03-10 Akim Demaille <akim@lrde.epita.fr>
4699
4700 * TODO: Remove dead items.
4701
e9d8f881 47022006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
4703
4704 * doc/FAQ: Remove, merged into...
4705 * doc/bison.texinfo (FAQ): this.
4706 * doc/Makefile.am (EXTRA_DIST): Adjust.
4707
c095d689
AD
47082006-03-10 Akim Demaille <akim@lrde.epita.fr>
4709
4710 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4711 even if empty.
4712 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4713 * doc/bison.texinfo (Calc++ Scanner): Use it.
4714
6e0f8287
PE
47152006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4716
4717 Fix two nits reported by twlevo, plus one more that I discovered.
4718
4719 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4720 this is the usual Bison style.
4721 * src/location.h (location_print): Likewise.
4722
4723 * src/reader.h (token_name): Likewise.
4724
d6b771c3
PE
47252006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4726
4727 Fix some nits reported by twlevo.
4728 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4729 and "POSIX". Use more-modern syntax for URLs. Mention C++
4730 and ask for Java. Don't hardwire OS version numbers. Add
4731 copyright notice.
4732 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4733 * src/conflicts.c (solved_conflicts_obstack): Now static.
4734
1e137b71
JD
47352006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4736
4737 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4738 page. Say "you can use it" not "you may use it" as on the web page;
4739 we're describing capabilities not granting permission.
4740
73f2e47e
PE
47412006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4742
6d05403d
PE
4743 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4744 shadowing warnings. Use usual patter for iterating through RHS.
4745 * tests/glr-regression.at
4746 (Uninitialized location when reporting ambiguity):
4747 Modify yylex so that it uses its argument, rather than trying
4748 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4749 const char -> char const.
4750
73f2e47e
PE
4751 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4752 Don't use tabs inside commands; it messes up 'ps'.
4753 Problem reported by twlevo.
4754
8710fc41
JD
47552006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4756
4757 * tests/glr-regression.at (Uninitialized location when reporting
4758 ambiguity): New test case.
4759 * data/glr.c (yyresolveLocations): New function, which uses
4760 YYLLOC_DEFAULT.
4761 (yyresolveValue): Invoke yyresolveLocations before reporting an
4762 ambiguity.
4763 * doc/bison.texinfo (Default Action for Locations): Note
4764 YYLLOC_DEFAULT's usage for ambiguity locations.
4765 (GLR Semantic Actions): Cross-reference those notes.
4766
ae952af2
JD
47672006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4768
4769 * tests/glr-regression.at (Leaked semantic values when reporting
4770 ambiguity): Remove unnecessary union and type declarations.
4771 (Leaked lookahead after nondeterministic parse syntax error): New test
4772 case.
4773 * data/glr.c (yyparse): Check for zero stacks remaining before
4774 attempting to shift the lookahead so that you don't lose it.
4775
35ee866a
JD
47762006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4777
4778 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4779 * tests/glr-regression.at (Leaked semantic values when reporting
4780 ambiguity): New test case.
4781 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4782 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4783 now unnecessary yystackp parameter.
4784 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4785 destructors can be called.
4786
4787 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4788 in existing testcases.
4789
520181ab
JD
47902006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4791
4792 Don't leak semantic values for parent RHS when a user action cuts the
4793 parser, and clean up related code a bit.
4794 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
4795 cuts parse): Rename to...
4796 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
4797 for leaked parent RHS values.
4798 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4799 between an unresolved state (non-empty chain of semantic options) and
4800 an incomplete one (signaled by an empty chain).
ae952af2 4801 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
4802 successfully or unsuccessfully resolved yyGLRState to...
4803 (yyresolveValue): ... here so that yyresolveValue always leaves a
4804 yyGLRState with consistent data and thus is easier to understand.
4805 Remove the yyvalp and yylocp parameters since they are always just
4806 taken from the yys parameter. When reporting a discarded merged value
4807 in debugging output, note that it is incompletely merged. Document the
4808 interface.
4809 (yyresolveAction): If resolving any of the RHS states fails, destroy
4810 them all rather than leaking them. Thus, as long as user actions are
4811 written to clean up the RHS correctly, yyresolveAction always cleans up
4812 the RHS of a semantic option. Document the interface.
4813
18d9185c
PE
48142006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4815
4816 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4817 led to a segmentation fault in GNU Pascal. Problem reported
4818 by Waldek Hebisch.
4819
841a7737
JD
48202006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4821
4822 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4823 mid-rule action inside a nonterminal symbol in order to declare a
4824 destructor for its semantic value.
4825
fc3f467f
PE
48262006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4827
4828 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4829 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4830 __cplusplus && ! defined _STDLIB_H && !
4831 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4832 defined free))]: Include <stdlib.h> rather than rolling our own
4833 declarations of malloc and free, to avoid problems with
4834 incompatible declarations (using 'throw') C++'s stdlib.h. This
4835 should fix Debian bug 340012
4836 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4837 reported by Guillaume Melquiond.
4838
a3af26dd
PE
48392006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4840
4d7bc38c
PE
4841 * NEWS: Clarify symbols versus types in unused-value warnings.
4842
a3af26dd
PE
4843 * configure.ac (AC_INIT): Bump version number.
4844
4e26c69e
PE
48452006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4846
4847 * NEWS: Version 2.1a.
4848 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4849 since C99 requires this.
4850
498e897c
PE
48512006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4852
4853 * m4/c-working.m4: New file.
4854 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4855
57bb17ca
PE
48562006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4857
4858 * Makefile.maint: Merge from coreutils.
4859
0be105dc
PE
48602006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4861
4862 More portability fixes for problems summarized by Nelson H. F. Beebe.
4863
4864 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4865 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4866 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4867 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4868 messes up because C++ code is compiled in 32-bit mode but linked
4869 in 64-bit mode.
4870
6fc0c024
PE
48712006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4872
4873 More portability fixes for problems summarized by Nelson H. F. Beebe.
4874
7870f699
PE
4875 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4876 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4877
6fc0c024
PE
4878 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4879 nodist_PROGRAMS, since we don't need to actually compile the
4880 example if we're just doing a plain 'make'. This avoids bothering
4881 the installer unnecessarily about problems due to weird C++
4882 compilers.
4883
fe6c2fde
PE
48842006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4885
4886 More portability fixes for problems summarized by Nelson H. F. Beebe.
4887
4888 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4889 than #include "...", and compile with -I'.'. The old method was
4890 not portable, according to Posix and the C standard, and it does
4891 not work with Sun C 5.7, where previous #line directives affect
4892 the working directory used in later #include "..." directives.
4893
927b425b
JMG
48942006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4895
4896 Various DJGGP specific issues in /djgpp
4897
d9735e9e
PE
48982006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4899
4900 More portability fixes for problems summarized by Nelson H. F. Beebe.
4901
4902 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4903 '#include <map>' works and that you can apply ++ to iterators.
4904
5a6755af
PE
49052006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4906
67a0dc4f
PE
4907 Work around portability problems summarized by Nelson H. F. Beebe in
4908 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4909
8c86f0ef
PE
4910 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4911 that '#include <string>' works.
4912
de35dd59
PE
4913 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4914 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4915 "warning: sorry: semantics of inline function static data `const
4916 unsigned char translate_table[262]' are wrong (you'll wind up with
4917 multiple copies)".
4918
67a0dc4f
PE
4919 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4920 or, xor to not_, and_, or_, and xor_, respectively. This works
4921 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4922 random system header somewhere that includes the equivalent of
4923 <iso646.h>.
4924
5a6755af
PE
4925 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4926 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 4927 Suite Version 2.0.
5a6755af 4928
3f001415
JD
49292006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4930
4931 During deterministic GLR operation, user actions should be able to
4932 influence the parse by changing yychar. To make this easier to fix and
4933 to make glr.c easier to evolve in general, don't maintain yytoken in
4934 parallel with yychar; just compute yytoken when needed.
4935 * tests/glr-regression.at (Incorrect lookahead during deterministic
4936 GLR): Check that setting yychar in a user action has the intended
4937 effect.
4938 * data/glr.c (yyGLRStack): Remove yytokenp member.
4939 (yyclearin): Don't set *yytokenp.
4940 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4941 yychar rather than *yytokenp to determine the current lookahead.
4942 Compute yytoken locally when needed.
4943 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4944 point to.
4945
4946 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4947 after `--report' documentation.
4948
e2a8c0f5
PE
49492006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4950
4951 * src/parse-gram.y (grammar_declaration): Location of printer
4952 symbol is @1, not list->location. Bug reported by twlevo.
4953 * tests/input.at (Incompatible Aliases): Adjust to above change.
4954
6b702268
PE
49552006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4956
27622431
PE
4957 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4958 all the test at once. This makes the output easier to read in the
4959 normal case.
4960
6b702268
PE
4961 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4962 got from <http://bro-ids.org/download.html>. The bug is that
4963 when two actions appeared in succession, the second one was
4964 scanned before the first one was added to the grammar rule
4965 as a midrule action. Bison then output the incorrect warning
4966 "parse.y:905.17-906.36: warning: unused value: $3".
4967 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4968 associated with a value.
4969 (rhs): Don't invoke grammar_current_rule_action_append.
4970 (action): Invoke it here instead.
4971 * src/reader.c (grammar_midrule_action): Now extern.
4972 (grammar_current_rule_action_append): Don't invoke
4973 grammar_midrule_action; that is now the scanner's job.
4974 * src/reader.h (last_string, last_braced_code_loc):
4975 (grammar_midrule_action): New decls.
4976 * src/scan-gram.l (last_string): Now extern, sigh.
4977 (last_braced_code_loc): New extern variable.
4978 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4979 rule already has an action.
4980 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4981 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4982 Add some tests to check that the above changes fixed the bug.
4983
d40ba6c2
PE
49842006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4985
4986 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4987 All used changed. Check whether the symbol has a destructor,
4988 not whether it is typed.
4989 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4990 that the values are still reported as unused. All line numbers
4991 adjusted.
4992
401aace6
PE
49932006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4994
4995 Work around a bug in bro 0.8, which underparenthesizes its
4996 definition of YYLLOC_DEFAULT.
4997 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4998 their arguments.
4999 * data/lalr1.cc: Likewise.
5000 * data/yacc.cc: Likewise.
5001
06f01bc4
PE
50022006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5003
401aace6
PE
5004 Work around a bug in Pike 7.0, and give the Pike folks a
5005 better way to override the usual int widths.
5006 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5007 user can override the types.
5008 (short): #undef, to work around a bug in Pike 7.0.
5009 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5010 (union yyalloc.yyss): Use yytype_int16 rather than short.
5011 All uses changed.
5012 (yysigned_char): Remove.
5013 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5014 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5015 * tests/regression.at (Web2c Actions): Adjust to above changes.
5016
5017 * src/reader.c (check_and_convert_grammar): New function.
5018 (reader): Close the input file even if something went wrong during
5019 parsing. Minor file descriptor leak reported by twlevo.
5020
06f01bc4
PE
5021 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5022 to pacify gcc -Wswitch-default.
5023 * src/scan-gram.l (adjust_location): Use a default: break; case
5024 to pacify gcc -Wswitch-default.
5025 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5026 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5027 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5028 Move these decls to scan-skel.l, since they don't need to be
5029 visible elsewhere.
5030 * src/scan-skel.l: Accept the above decls.
5031 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5032 is used.
5033
02650b7f
PE
50342006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5035
5036 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5037 since we don't want to insist on a version number at the start
5038 of the changelog every time.
5039 * Makefile.maint: Sync from coreutils a bit better.
5040 (sc_trailing_blank): Renamed from sc_trailing_space.
5041 All uses changed.
5042 (sc_no_if_have_config_h, sc_require_config_h):
5043 (sc_prohibit_assert_without_use): New rules.
5044 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5045 (sc_dd_max_sym_length): Fix leading spaces in rule.
5046 (sc_system_h_headers): Prefix with @.
5047 (sc_useless_cpp_parens, m4-check): Output line numbers.
5048 (changelog-check): Allow version only in head.
5049 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5050 satisfy new Makefile.maint rule.
5051 * data/glr.c: Likewise.
5052 * data/glr.cc: Likewise.
5053 * data/lalr1.cc: Likewise.
5054 * data/yacc.c: Likewise.
5055 * lib/ebitsetv.c: Likewise.
5056 * lib/lbitset.c: Likewise.
5057 * lib/subpipe.c: Likewise.
5058 * lib/timevar.c: Likewise.
5059 * src/system.h: Likewise.
5060 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5061 * djgpp/Makefile.maint: Add copyright notice.
5062 * djgpp/README.in: Likewise.
5063 * djgpp/config.bat: Likewise.
5064 * djgpp/config.site: Likewise.
5065 * djgpp/config_h.sed: Likewise.
5066 * djgpp/djunpack.bat: Likewise.
5067 * djgpp/config.sed: Fix copyright notice to match standard format.
5068 * djgpp/subpipe.h: Likewise.
5069 * lib/bitsetv-print.c: Likewise.
5070 * lib/bitsetv.c: Likewise.
5071 * lib/subpipe.h: Likewise.
5072 * lib/timevar.c: Likewise.
5073 * lib/timevar.h: Likewise.
5074 * djgpp/subpipe.c: Use standard recipe for config.h.
5075 * lib/abitset.c: Likewise.
5076 * lib/bitset.c: Likewise.
5077 * lib/bitset_stats.c: Likewise.
5078 * lib/bitsetv-print.c: Likewise.
5079 * lib/bitsetv.c: Likewise.
5080 * lib/ebitsetv.c: Likewise.
5081 * lib/get-errno.c: Likewise.
5082 * lib/lbitset.c: Likewise.
5083 * lib/subpipe.c: Likewise.
5084 * lib/timevar.c: Likewise.
5085 * lib/vbitset.c: Likewise.
5086 * tests/local.at: Likewise.
5087 * src/scan-gram.l: Don't include verify.h, since system.h does
5088 that for us.
5089 * .x-sc_require_config_h: New file.
5090 * .x-sc_unmarked_diagnostics: New file.
5091
287c78f6
PE
50922006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5093
287c78f6
PE
5094 Be a bit more systematic about using 'abort'.
5095 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5096 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5097 Put 'default: abort ();' before some other case, to satisfy older
5098 pedantic compilers.
5099 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5100 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5101 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5102 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
5103 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5104 (get_decision_str, get_orientation_str, get_node_alignment_str):
5105 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5106 (get_linestyle_str, get_arrowstyle_str): Likewise.
5107 * src/conflicts.c (resolve_sr_conflict):
5108 Use a default case rather than one for the one remaining enum
5109 value, to catch invalid enum values as well.
5110 * src/lalr.c (set_goto_map, map_goto):
5111 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5112 * src/nullable.c (nullable_compute, token_definitions_output):
5113 Likewise.
5114 * src/reader.c (packgram, reader): Likewise.
5115 * src/state.c (transitions_to, state_new, state_reduction_find):
5116 Likewise.
5117 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5118 (symbol_pack): Likewise.
5119 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
5120 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5121 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
5122 * src/system.h: Don't include <assert.h>.
5123 (assert): New macro.
5124
5125 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5126 (Destructor Decl, Parser Function, Pure Calling):
5127 Describe rules for braces inside C code more carefully.
287c78f6 5128
c66dfadd
PE
51292006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5130
c21493b8
PE
5131 Fix some porting glitches found by Nelson H. F. Beebe.
5132 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5133 compilers that don't understand that abort () does not return.
5134 * src/state.c (transitions_to): Likewise.
5135 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5136 that '#include <cstdlib>' works.
5137 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5138 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5139 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5140 for the benefit of some pre-C99 compilers.
5141
b6e3facf
PE
5142 * bootstrap: Undo changes to gnulib files that autoreconf made.
5143
c66dfadd
PE
5144 Minor fixups to get 'make maintainer-check' to work.
5145 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5146 with the new verify.h implementation.
5147 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5148 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5149 * data/yacc.c (YYUSE): Likewise.
5150 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5151 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5152 * src/parse-gram.y (declaration): Don't pass a string constant
5153 to a function that expects char *, since GCC might complain
5154 about the constant value.
5155 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5156 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5157 before #defining them.
5158 * tests/glr-regression.at
5159 (Incorrectly initialized location for empty right-hand side in GLR):
5160 In yyerror, use the msg arg.
5161 (Corrupted semantic options if user action cuts parse):
5162 (Incorrect lookahead during deterministic GLR):
5163 (Incorrect lookahead during nondeterministic GLR):
5164 Don't name a local var 'index'; it shadows string.h's 'index'.
5165
ed94ef2a
AD
51662006-01-19 Akim Demaille <akim@epita.fr>
5167
5168 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5169 location, not just parts of it.
5170
e9ad4aec
PE
51712006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5172
d6ca7905
PE
5173 * NEWS: Document the fact that multiple %unions are now allowed.
5174 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
5175 * TODO: This feature is now implemented, so remove it from
5176 the wishlist.
d6ca7905 5177
ef1b70e0
PE
5178 * Makefile.maint: Merge with coreutils Makefile.maint.
5179 (CVS_LIST): Use build-aux version if available.
5180 (VERSION_REGEXP): New macro.
5181 (syntax-check-rules): Add sc_no_if_have_config_h,
5182 sc_prohibit_assert_without_use, sc_require_config_h,
5183 sc_useless_cpp_parens.
5184 (sc_obsolete_symbols): Check for O_NDELAY.
5185 (sc_dd_max_sym_length): Track coreutils.
5186 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5187 (sc_useless_cpp_parens): New rule.
5188 (news-date-check): Look for version or today's date.
5189 (changelog-check): Don't require version number near head.
5190 (copyright-check): Use current year instead of hardwiring 2005.
5191 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5192 (announcement): Add --gpg-key-ID.
5193
5194 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5195 with "file system".
5196
2073ce56 5197 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
5198 array. Problem reported by twlevo.
5199 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5200 * src/lalr.c (build_relations): Rely on new sentinel.
5201 * src/gram.c (gram_free): Adjust to new sentinel.
5202
b7691f15
JD
52032006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5204
5205 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5206 yylookaheadNeeds. All uses updated.
5207 (yysplitStack): Rename local yynewLookaheadStatuses to
5208 yynewLookaheadNeeds.
5209 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5210 GLR): In comments, change `lookahead status' to `lookahead need'.
5211
ddee1b06
PH
52122006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5213
5214 * data/glr.c (yysplitStack): A little stylistic rewrite.
5215
12f4614d
PH
52162006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5217
5218 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5219
32c29292
JD
52202006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5221
5222 * doc/bison.texinfo: Fix some typos.
5223 (GLR Semantic Actions): New subsection discussing special
5224 considerations because GLR semantic actions might be deferred.
5225 (Actions): Mention look-ahead usage of yylval.
5226 (Actions and Locations): Mention look-ahead usage of yylloc.
5227 (Special Features for Use in Actions): Add YYEOF entry and mention it
5228 in the yychar entry.
5229 In the yychar entry, remove mention of the local yychar case (pure
5230 parser) since this is irrelevant information when writing semantic
148d66d8 5231 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
5232 yychar is otherwise described as an external variable.
5233 In the yychar entry, don't call it the `current' look-ahead since it
5234 isn't when semantic actions are deferred.
5235 In the yychar and yyclearin entries, add note about deferred semantic
5236 actions.
5237 Add yylloc and yylval entries discussing look-ahead usage.
5238 (Look-Ahead Tokens): When discussing yychar, don't call it the
5239 `current' look-ahead, and do mention yylval and yylloc.
5240 (Error Recovery): Cross-reference `Action Features' when mentioning
5241 yyclearin.
148d66d8 5242 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
5243 look-ahead.
5244 In the yylloc and yylval entries, mention look-ahead usage.
5245
de366a2f 52462006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
5247
5248 * tests/glr-regression.at: Update copyright year to 2006.
5249
bf70fa87
JD
52502006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5251
5252 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5253 use during nondeterministic operation to track which stacks have
5254 actually needed the current lookahead.
5255 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5256 Allocate, deallocate, resize, and otherwise shuffle space for
5257 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5258 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5259 appropriately during nondeterministic operation.
5260 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5261 members to store the current lookahead to be used by the deferred
5262 user action.
5263 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5264 from which the RHS is taken. Set the lookahead members of the new
5265 yySemanticOption according to the lookahead status for stack yyk.
5266 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5267 yyaddDeferredAction.
5268 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5269 members of yySemanticOption before invoking yyuserAction, and then set
5270 them back to their current values afterward.
5271 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5272 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5273 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5274 titles for consistency.
5275 (Leaked merged semantic value if user action cuts parse): In order to
5276 suppress lint warnings, use arguments in merge function, and assign
5277 char value < 128 in main.
5278 (Incorrect lookahead during deterministic GLR): New test case.
5279 (Incorrect lookahead during nondeterministic GLR): New test case.
5280
05449a2c
JD
52812006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5282
de366a2f 5283 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
5284 !yyvaluep as signal that no semantic value is available to print.
5285 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5286 to print a semantic value.
5287
4158e0a1 52882006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 5289
4158e0a1
JD
5290 * tests/glr-regression.at: For consistency with my newer test cases,
5291 don't thank myself.
5292
d659304d
JD
52932006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5294
5295 * data/glr.c (yyresolveValue): When merging semantic options, if at
5296 least one user action succeeds but a later one cuts the parse, then
5297 destroy the semantic value before returning rather than leaking it.
5298 (yyresolveStates): If a user action cuts the parse and thus
5299 yyresolveValue fails, ignore the (unset) semantic value rather than
5300 corrupting the yyGLRState, and empty the semantic options list since
5301 the user actions should have called all necessary destructors.
5302 Simplify code with YYCHK.
5303 * tests/glr-regression.at (Corrupted semantic options if user action
5304 cuts parse): New test case.
5305 (Undesirable destructors if user action cuts parse): New test case.
5306 Before applying any of this patch, this test case never actually failed
5307 for me... but only because the corrupted semantic options usually
5308 masked this bug.
5309 (Leaked merged semantic value if user action cuts parse): New test
5310 case.
5311
6ec2c0f2
AD
53122006-01-05 Akim Demaille <akim@epita.fr>
5313
5314 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5315
1b9c21fb
PE
53162006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5317
5318 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5319 _MSC_VER. Problem reported by Cenzato Marco.
5320 (b4_c_function_def): Use it.
5321 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5322 b4_c_modern.
5323 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5324 than rolling our own.
5325
84866159
AD
53262006-01-04 Akim Demaille <akim@epita.fr>
5327
5328 Also warn about non-used mid-rule values.
5329 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5330 member.
5331 (symbol_list_new): Adjust.
5332 * src/reader.c (symbol_typed_p): New.
5333 (grammar_rule_check): Use it.
5334 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5335 Check its rule.
5336 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5337 Use it.
5338 * tests/actions.at (Exotic Dollars): Adjust.
5339
378f4bd8
AD
53402006-01-04 Akim Demaille <akim@epita.fr>
5341
5342 * src/reader.c (grammar_midrule_action): If $$ is set in a
5343 mid-rule, move the `used' bit to its lhs.
5344 * tests/input.at (Unused values): New.
5345 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5346
e2a21b6f
PE
53472006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5348
54662697
PE
5349 * doc/bison.texinfo (Bison Options): Say more accurately what
5350 --yacc does.
5351 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5352 about declarations in the grammar when in Yacc mode, as POSIX does
5353 not require a diagnostic when the grammar uses extensions.
5354
5355 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5356
073f9288
PE
5357 Warn about dubious constructions like "%token T T".
5358 Reported by twlevo.
5359 * src/symtab.h (struct symbol.declared): New member.
5360 * src/symtab.c (symbol_new): Initialize it to false.
5361 (symbol_class_set): New arg DECLARING, specifying whether
5362 this is a declaration that we want to warn about, if there
5363 is more than one of them. All uses changed.
5364
1221b78a
PE
5365 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5366 Allow multiple %union directives, whose contents concatenate.
5367 * src/parse-gram.y (grammar_declaration): Likewise.
5368 Use muscle_code_grow, so that we don't need stype_line any more.
5369 All uses changed.
5370
5371 * src/muscle_tab.c (muscle_grow): Fix comment.
5372
e2a21b6f
PE
5373 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5374 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5375 Update copyright year to 2006.
5376
8f7e3cf9
AD
53772006-01-03 Akim Demaille <akim@epita.fr>
5378
5379 Have glr.cc pass (some of) the calc.at tests.
5380 * data/glr.cc (b4_parse_param_orig): New.
5381 (b4_parse_param): Improve its definition, and bound it more
5382 clearly in the skeleton.
5383 (b4_epilogue): Append, instead of prepending, in order to keep
5384 #line consistency.
5385 Simplify the generation of auxiliary functions: locations and
5386 purity are mandated.
5387 (b4_global_tokens_and_yystype): Honor it.
5388 * data/location.cc (c++.m4): Don't include it.
5389 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5390 and AT_SKEL_CC_IF.
5391 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5392 AT_LALR1_CC_IF.
5393 Be sure to initialize the first position's filename.
5394 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5395 mandated anyway.
5396 (AT_CHECK_CALC_GLR_CC): New.
5397 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5398
3953ed88
AD
53992006-01-02 Akim Demaille <akim@epita.fr>
5400
5401 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5402 c.m4.
0a96ba81 5403 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
5404 * data/glr.cc: Do not include stack.hh.
5405
9ecafbbf
AD
54062006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5407
5408 * data/glr.c: Reformat whitespace with tabs.
5409 (b4_lpure_formals): Remove this unused m4 macro.
5410 * tests/cxx-type.at: Reformat whitespace with tabs.
5411 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5412 since it's a member. Rename type to isNterm for clarity.
5413
c4d497a0
AD
54142005-12-29 Akim <akim@sulaco.local>
5415
5416 Let glr.cc catch up with symbol_value_print.
5417 * data/glr.cc (b4_yysymprint_generate): Replace by...
5418 (b4_yy_symbol_print_generate): this.
5419 (yy_symbol_print, yy_symbol_value_print): Declare them.
5420
4517da37
PE
54212005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5422
5423 * src/location.h (boundary): Note that a line or column equal
5424 to INT_MAX indicates an overflow.
5425 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5426 (rule_length_overflow, increment_rule_length, add_column_width):
5427 New functions.
5428 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5429 (<SC_BRACED_CODE>"}"):
5430 Use increment_rule_length rather than incrementing it by hand.
5431 (adjust_location, handle_syncline): Diagnose overflow.
5432 (handle_action_dollar, handle_action_at):
5433 Fix bug with monstrosities like $-2147483648.
5434 Remove now-unnecessary checks.
5435 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5436 (convert_ucn_to_byte): Verify assumptions.
5437 (handle_syncline): New arg LOC. All callers changed.
5438 Don't store through a value derived from char const * pointer.
5439
5440 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5441 GCC warnings.
5442
e3233bf6
PE
54432005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5444
5445 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5446 Remove unnecessary forward static decls.
5447
8f3596a6
AD
54482005-12-27 Akim Demaille <akim@epita.fr>
5449
5450 * src/reader.c (grammar_current_rule_check): Also check that $$
5451 is used.
5452 Take the rule to check as argument, hence rename as...
5453 (grammar_rule_check): this.
5454 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5455 Rename as...
5456 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5457 (grammar_midrule_action, grammar_symbol_append): Now static.
5458 * tests/torture.at (input): Don't rely on the default action
5459 being always performed.
5460 * tests/calc.at: "Set" $$ even when the action is "cut" with
5461 YYERROR or other.
5462 * tests/actions.at (Exotic Dollars): Instead of using unused
5463 values, check that the warning is issued.
5464
721be13c
PE
54652005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5466
5467 * NEWS: Improve wording for unused-value warnings.
5468
a0af42fc
AD
54692005-12-22 Akim Demaille <akim@epita.fr>
5470
5471 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5472 (b4_yysymprint_generate): Rename as...
5473 (b4_yy_symbol_print_generate): this.
5474 Generate yy_symbol_print instead of yysymprint.
5475 Generate also yy_symbol_value_print, and use it.
5476
affac613
AD
54772005-12-22 Akim Demaille <akim@epita.fr>
5478
721be13c 5479 * NEWS: Warn about unused values.
affac613
AD
5480 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5481 a `used' member.
5482 (symbol_list_n_get, symbol_list_n_used_set): New.
5483 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5484 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5485 * src/reader.c (grammar_current_rule_check): Check that values are
5486 used.
5487 * src/symtab.c (symbol_print): Accept 0.
5488 * tests/existing.at: Remove the type information.
5489 Empty the actions.
5490 Remove useless actions (beware of mid-rule actions: perl -000
5491 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5492 * tests/actions.at (Exotic Dollars): Use unused values.
5493 * tests/calc.at: Likewise.
5494 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5495 Likewise.
5496
5497 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5498 rule_useful_p.
5499
9d9b8b70
PE
55002005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5501
8bb4c753
PE
5502 Undo 2005-12-01 tentative license wording change. The wording is
5503 still being reviewed by the lawyers, and we don't want to wait for
5504 them before publishing a test release. For now, revert to the
5505 previous wording.
5506 * NEWS: Undo 2005-12-01 change.
5507 * data/glr.c: Revert to previous license wording.
5508 * data/glr.cc: Likewise.
5509 * data/lalr1.cc: Likewise.
5510 * data/location.cc: Likewise.
5511 * data/yacc.c: Likewise.
5512
9d9b8b70
PE
5513 * NEWS: Reword %destructor vs YYABORT etc.
5514 * data/glr.c: Use American spacing, for consistency.
5515 * data/glr.cc: Likewise.
5516 * data/lalr1.cc: Likewise.
5517 * data/yacc.c: Likewise.
5518 * data/yacc.c: Reformat comments slightly.
5519 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5520 for consistency. Fix some spelling errors and reword recently-included
5521 text slightly.
5522 * tests/cxx-type.at: Cast results of malloc, for C++.
5523
2c3b392a
AD
55242005-12-21 Joel E. Denny <address@hidden>
5525
5526 * tests/cxx-type.at: Construct a tree, count the parents of shared
5527 nodes, and free each node once and only once. Previously, the memory
5528 for semantic values was leaked instead.
5529
d6cff4dc
AD
55302005-12-21 Joel E. Denny <address@hidden>
5531
5532 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5533 (yylval, yylloc): If pure, #define to yystackp->yyval and
5534 yystackp->yyloc similar to yychar and yynerrs.
5535 (yyparse): If pure, remove local yylval and yylloc. Add local
5536 yystackp to accommodate pure definitions of yylval and yylloc.
5537 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5538 yylvalp and yyllocp to &yylval and &yylloc.
5539 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5540 namespace. Previously, nerrs and char were missing, but lval and lloc
5541 weren't necessary.
5542 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5543 yylvalp and yyllocp parameters since, if pure, these are now always
5544 accessible through yystackp. If not pure, they are still accessible
5545 globally.
5546 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5547 `if (YYID (N))' to pacify lint.
5548
a85284cf
AD
55492005-12-21 Akim Demaille <akim@epita.fr>
5550
5551 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5552 destroy the RHS symbols of a rule.
5553 * data/yacc.c (yylen): Initialize to 0.
5554 Keep its value to the number of items to possibly shift.
5555 In particular, a regular successful parse that ends on YYFINAL by
5556 a (internal) YYACCEPT must not have yylen != 0.
5557 (yyerrorlab, yyreturn): Pop the RHS.
5558 Reorder a bit to emphasize the `shifting' bits of code.
5559 (YYPOPSTACK): Now accept a number of items to pop.
5560 * data/lalr1.cc: Likewise.
5561 * data/glr.c: Formatting changes.
5562 Use goto instead of fall through.
5563 * doc/bison.texinfo (Destructor Decl): Complete.
5564
d508c281
JMG
55652005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5566
5567 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5568 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5569 * djgpp/config.bat: Replace every occurence of the file name
5570 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5571 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5572 * djgpp/config.sed: Replace every occurence of the file name
5573 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5574 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5575 * djgpp/djunpack.bat: DJGPP specific file.
5576 * djgpp/fnchange.lst: DJGPP specific file.
5577 * djgpp/README.in: Add new information about how to unpack the bison
5578 source on MSDOS and other systems which have 8.3 file name restrictions
5579 using djunpack.bat and fnchange.lst.
5580
3e7a2cd9
PE
55812005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5582
5583 * bootstrap (build_cvs_prefix): Remove; unused.
5584 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5585 when getting gnulib.
5586
55872005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5588
5589 * data/glr.c: Reorder typedef declarations for structs to match order
5590 of struct declarations.
5591 Rename yystack everywhere to yystackp except in yyparse where it's not
5592 a pointer.
5593 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5594 consistency.
5595 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5596 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5597 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5598 lint.
5599
877519f8
PE
56002005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5601
0eca5a39
PE
5602 * tests/sets.at (Accept): Fix typos in regular expression used to
5603 sed out the final state number.
5604
2cec9080
PE
5605 Work around portability problem on Solaris 10: flex-generated
5606 files include <stdio.h> before <config.h>, which messes up
5607 because the latter defines __EXTENSIONS__. Address the problem
5608 by creating two new little files that include <config.h> first,
5609 then include the flex-generated files. Rewrite everyone else
5610 to include <config.h> first, as well.
5611 * lib/timevar.c: Always include "config.h".
5612 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5613 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5614 (EXTRA_bison_SOURCES): New macro.
5615 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5616 * src/system.h: Don't include config.h.
5617 * src/LR0.c: Include <config.h> first.
5618 * src/assoc.c: Likewise.
5619 * src/closure.c: Likewise.
5620 * src/complain.c: Likewise.
5621 * src/conflicts.c: Likewise.
5622 * src/derives.c: Likewise.
5623 * src/files.c: Likewise.
5624 * src/getargs.c: Likewise.
5625 * src/gram.c: Likewise.
5626 * src/lalr.c: Likewise.
5627 * src/location.c: Likewise.
5628 * src/main.c: Likewise.
5629 * src/muscle_tab.c: Likewise.
5630 * src/nullable.c: Likewise.
5631 * src/output.c: Likewise.
5632 * src/parse-gram.y: Likewise.
5633 * src/print.c: Likewise.
5634 * src/print_graph.c: Likewise.
5635 * src/reader.c: Likewise.
5636 * src/reduce.c: Likewise.
5637 * src/relation.c: Likewise.
5638 * src/state.c: Likewise.
5639 * src/symlist.c: Likewise.
5640 * src/symtab.c: Likewise.
5641 * src/tables.c: Likewise.
5642 * src/uniqstr.c: Likewise.
5643 * src/vcg.c: Likewise.
5644
877519f8
PE
5645 * src/parse-gram.y: Fix minor problems uncovered by lint.
5646 (current_lhs, current_lhs_location): Now static.
5647 (current_assoc): Remove unused variable.
5648
5649 Cleanups so that Bison-generated parsers have less lint.
5650 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5651 Prepend /*ARGSUSED*/, for lint's sake.
5652 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5653 definition if 'lint' is defined.
5654 (YYID): New macro (or function, if lint).
5655 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5656 * data/yacc.c: Likewise.
5657 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5658 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5659 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5660 is C++ only.
5661 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5662 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5663 Use YYID(0) rather than 0, for lint.
5664 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5665 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5666
f5228370
PE
56672005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5668
5669 * tests/glr-regression.at
5670 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5671 Close memory leak reported by twlevo.
5672
69ce078b
PE
56732005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5674
6ff99711
PE
5675 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5676 all stacks.
5677 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
5678 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5679 New test case.
5680 (Duplicated user destructor for lookahead): This test now is expected
5681 to succeed.
5682
af3412cd
PE
56832005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5684
32b5b719 5685 * NEWS: Document the following change.
af3412cd
PE
5686 * data/yacc.c: Say "parser skeleton" rather than "file", since
5687 it's no longer just a file.
5688 * data/glr.c: Grant a special exception for C GLR parsers, that
5689 reads like the already-existing exception for C LALR(1) parsers.
5690 * data/glr.cc: Likewise.
5691 * data/lalr1.cc: Likewise.
5692 * data/location.cc: Likewise.
5693 * data/yacc.c: Reword the "written by" statement to clarify that
5694 it was the parser skeleton, not the entire output file.
5695 * data/glr.c: Written by Paul Hilfinger.
5696 * data/glr.cc: Written by Akim Demaille.
5697 * data/lalr1.cc: Likewise.
5698
035aa4a0
PE
56992005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5700
d9963c85
PE
5701 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5702 Fix typos in previous change that broke 'make check'.
5703 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5704 supported in C.
5705 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5706 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5707 We can revert this once things settle down.
5708
035aa4a0
PE
5709 * src/conflicts.c (conflicts_print): Don't print file name twice
5710 when %expect fails because there were no conflicts.
5711 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5712 change.
5713 * tests/conflicts.at (%expect not enough, %expect too much):
5714 (%expect with reduce conflicts): Adjust to new behavior.
5715
57162005-11-18 Akim Demaille <akim@epita.fr>
5717
5718 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5719 errors.
5720 * NEWS: Document this.
5721 * doc/bison.texinfo (Expect Decl): Likewise.
5722
d1ff7a7c
AD
57232005-11-16 Akim Demaille <akim@epita.fr>
5724
5725 Generalize the display of semantic values and locations in traces.
5726 * data/glr.c (yy_reduce_print): Fix indices (again).
5727 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5728 literal integers.
5729 * data/lalr1.cc (yyreduce_print): Rename as...
5730 (yy_reduce_print): this.
5731 Display values and locations.
5732 * data/yacc.c (yy_reduce_print): Likewise.
5733 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5734 (yysymprint): Move higher to be visible from yy_reduce_print).
5735 (yyparse): Adjust.
5736 * tests/calc.at: Adjust the expected length of the traces.
5737
6de5398d
AD
57382005-11-14 Akim Demaille <akim@epita.fr>
5739
5740 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5741 from 1 to N, while values and location start at 0.
5742 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5743
a1373f55
AD
57442005-11-14 Akim Demaille <akim@epita.fr>
5745
5746 * data/glr.c (yy_reduce_print): Fix the $ number.
5747
613d8952
AD
57482005-11-14 Akim Demaille <akim@epita.fr>
5749
5750 "Use" parse parameters.
5751 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5752 * data/glr.c, data/glr.cc: Use them.
5753 * data/glr.c (YYUSE): Have a C++ definition that supports
5754 non-pointer types.
5755
b2741627
AD
57562005-11-14 Akim Demaille <akim@epita.fr>
5757
5758 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5759
5059b5c8
AD
57602005-11-14 Akim Demaille <akim@epita.fr>
5761
42249483
AD
5762 * data/glr.cc: New.
5763 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 5764
4626a15d
AD
57652005-11-12 Akim Demaille <akim@epita.fr>
5766
5767 Let position and location be PODs.
5768 * data/location.cc (position::initialize, location::initialize): New.
5769 (position::position, location::location): Define only if
5770 b4_location_constructors is defined.
5771 * data/lalr1.cc (b4_location_constructors): Define it for backward
5772 compatibility.
5773 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5774
57752005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
5776
5777 * data/lalr1.cc: Move the body of the ctor and dtor into the
5778 parser file (instead of the header).
5779 Wrap the implementations in a "namespace yy".
5780
57812005-11-12 Akim Demaille <akim@epita.fr>
5782
5783 Have glr.c include its header file when created.
5784 * data/glr.c (b4_shared_declarations): New.
5785 Output them verbatim in the parser if !%defines, otherwise
5786 output then in the header file, and include it instead.
5787
1989d947
AD
57882005-11-11 Akim Demaille <akim@epita.fr>
5789
5790 * data/glr.c: Comment changes.
5791
57922005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
5793
5794 When yydebug, report semantic and location values for reductions.
5795 * data/glr.c (yy_reduce_print): Report the semantic values and the
5796 locations.
5797 (YY_REDUCE_PRINT): Adjust.
5798 (yyglrReduce): Use them.
5799 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5800 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5801 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5802 traces.
5803
02998094
AD
58042005-11-10 Akim Demaille <akim@epita.fr>
5805
5806 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5807 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5808 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5809
5210672f
PE
58102005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5811
5812 * m4/cxx.m4, examples/Makefile.am: Don't build
5813 examples/calc++ if no C++ compiler is available. (trivial change)
5814
a8991a1d
AD
58152005-11-09 Akim Demaille <akim@epita.fr>
5816
5817 * src/scan-skel.l: Use a couple of asserts.
5818
36b5e963
AD
58192005-11-03 Akim Demaille <akim@epita.fr>
5820
5821 In some (weird) cases, the final state number is incorrect.
5822 Reported by Alexandre Duret-Lutz.
5823 * src/LR0.c (state_list_append): Remove the computation of
5824 final_state.
5825 (save_reductions): Do it here.
5826 (get_state): Alpha conversion.
5827 (generate_states): Use a for loop.
5828 * src/gram.h (item_number_is_rule_number)
5829 (item_number_is_symbol_number): New.
5830 * src/state.c: Use assert.
5831 * src/system.h: Include assert.h.
5832 * tests/sets.at (Accept): New.
5833
44e7ead1
PH
58342005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5835
5836 * data/glr.c (yyfill): Adjust comment.
36b5e963 5837 (yyresolveAction): Initialize default location properly
44e7ead1
PH
5838 for empty right-hand sides.
5839 (yydoAction): Ditto.
5840 Add comment explaining apparently dead code.
36b5e963
AD
5841 * tests/glr-regression.at
5842 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 5843 New test.
36b5e963 5844
e10a80ee
PE
58452005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5846
5847 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5848 gnulib when interrupted. This fixes some race conditions and
5849 works around some portability problems (one noted by Paul
5850 Hilfinger).
5851
067b32ee
AD
58522005-10-22 Akim <akim@epita.fr>
5853
5854 * Makefile.cfg: Adjust to config -> build-aux.
5855 Reported by twledo.
5856
4b367315
AD
58572005-10-21 Akim Demaille <akim@epita.fr>
5858
5859 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5860 the %parse-params.
5861 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5862 * data/yacc.c (b4_Pure_if): Rename as...
5863 (b4_yacc_pure_if): this.
5864 (YY_SYMBOL_PRINT, yyparse): Adjust.
5865 * doc/bison.texinfo: Formatting changes.
5866
24cc23d9
AD
58672005-10-21 Akim Demaille <akim@epita.fr>
5868
5869 Finish the transition config -> build-aux.
5870 * configure.ac, Makefile.am: Use build-aux.
5871 * config/prev-version, config/announce-gen, config/Makefile.am:
5872 Move to...
5873 * build-aux/prev-version, build-aux/announce-gen,
5874 * build-aux/Makefile.am: here.
5875
d4476375
AD
58762005-10-14 Akim Demaille <akim@epita.fr>
5877
5878 * examples/calc++/test: Use set -x only when VERBOSE.
5879
302c0aee
PE
58802005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5881
5882 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5883 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5884
7625ec2c
AD
58852005-10-13 Akim Demaille <akim@epita.fr>
5886
5887 * src/scan-skel.l: Output the base name parts of the parser and
5888 header file names.
302c0aee 5889 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
5890 additional checks.
5891 Use this to exercise C++ outputs in subdirs.
5892 Reported by Oleg Smolsky.
5893
ba0fe3c7
PE
58942005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5895
5896 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5897 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5898 Problem reported by John P. Hartmann.
5899 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5900 already defined it.
5901
9b8a5ce0
AD
59022005-10-12 Akim Demaille <akim@epita.fr>
5903
5904 * src/parse-gram.y (version_check): Exit 63 to please missing
5905 (stands for "version mismatch).
5906 * tests/input.at, doc/bison.texinfo: Adjust.
5907
4f6e011e
PE
59082005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5909
5910 Work around portability problems with Visual Age C compiler
5911 (xlc and xlC_r) reported by John P. Hartmann.
5912 * data/location.cc (initial_column, initial_line): Remove.
5913 All uses replaced by 0 and 1.
5914 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5915 that xlc complains about.
5916 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 5917 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 5918 as __STDC__.
4d7aa45e
PE
5919 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5920 __STDC_VERSION__. Use it everywhere instead of looking at
5921 __STDC__ and __cplusplus.
4f6e011e 5922
a1b3bf8c
AD
59232005-10-10 Akim Demaille <akim@epita.fr>
5924
5925 * examples/calc++/test: Be quiet unless VERBOSE.
5926
412e44aa
PE
59272005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5928
2a4647a3
PE
5929 * data/c.m4 (yydestruct, yysymprint):
5930 Use YYUSE instead of casting to void.
5931 * data/glr.c (YYUSE): New macro.
5932 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5933 Use it instead of rolling our own.
5934 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5935 (YYCHK1):
5936 Use /*CONSTCOND*/ to suppress lint warnings.
5937 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5938 (YY_STACK_PRINT): Use 'false' not '0'.
5939 (YYUSE): New macro.
5940 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5941 * data/yacc.c (YYUSE): New macro.
5942 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5943 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5944 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5945
5946
412e44aa
PE
5947 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5948 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5949
88c6637f
PE
59502005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5951
2f4f028d
PE
5952 Undo the parts of the unlocked-I/O change that substituted
5953 putc or puts for printf. This might hurt performance a bit,
5954 but some people prefer the printf style.
5955 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5956 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5957 All uses replaced by YYFPRINTF and YYDPRINTF.
5958 * data/yacc.c: Likewise.
5959 * lib/bitset.c (bitset_print): Likewise.
5960 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5961 putc and puts.
5962 * lib/lbitset.c (debug_lbitset): Likewise.
5963 * src/closure.c (print_firsts, print_fderives): Likewise.
5964 * src/gram.c (grammar_dump): Likewise.
5965 * src/lalr.c (look_ahead_tokens_print): Likewise.
5966 * src/output.c (escaped_output): Likewise.
5967 (user_actions_output): Break apart two printfs.
5968 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5969 * src/reduce.c (reduce_print): Likewise.
5970 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5971 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5972
88c6637f
PE
5973 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5974 Use assignments rather than casts-to-void to suppress
5975 unused-variable warnings. This pacifies 'lint'.
5976 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5977 unused-variable warnings.
5978
fb32e373
JMG
59792005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5980
5981 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5982
edb8f44f
PE
59832005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5984
fb9c0b33
PE
5985 Use unlocked I/O for a minor performance improvement on hosts like
5986 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5987 is to use the gnlib unlocked-io module, and to prefer putc and
5988 puts to printf when either will work (since the latter doesn't
5989 come in an unlocked flavor).
5990 * bootstrap (gnulib_modules): Add unlocked-io.
5991 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5992 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5993 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5994 and similarly for puts and putc and printf.
5995 * data/yacc.c: Likewise.
5996 * lib/bitset.c (bitset_print): Likewise.
5997 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5998 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5999 to printf.
6000 * lib/lbitset.c (debug_lbitset): Likewise.
6001 * src/closure.c (print_firsts, print_fderives): Likewise.
6002 * src/gram.c (grammar_dump): Likewise.
6003 * src/lalr.c (look_ahead_tokens_print): Likewise.
6004 * src/output.c (escaped_output): Likewise.
6005 (user_actions_output): Coalesce two printfs.
2f4f028d 6006 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
6007 * src/reduce.c (reduce_print): Likewise.
6008 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 6009 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 6010
edb8f44f
PE
6011 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6012 this confuses xgettext.
6013
b50d2359
AD
60142005-10-02 Akim Demaille <akim@epita.fr>
6015
6016 * bootstrap (gnulib_modules): Add strverscmp.
6017 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6018 * m4/.cvsignore: Add strverscmp.m4.
6019 * src/parse-gram.y (%require): New token, new rule.
6020 (version_check): New.
6021 * src/scan-gram.l (%require): Adjust.
6022 * tests/input.at (AT_REQUIRE): New.
6023 Use it.
6024 * doc/bison.texinfo (Require Decl): New.
6025 (Calc++ Parser): Use %require.
6026
21667f64
AD
60272005-10-02 Akim Demaille <akim@epita.fr>
6028
6029 * data/location.cc: New.
6030
2b81e969
AD
60312005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6032 Akim Demaille <akim@epita.fr>
6033
6034 Make sure -odir/foo.cc creates dir/location.hh etc.
6035 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6036 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6037 (spec_defines_file): Now const.
6038 (dir_prefix): New.
6039 (short_base_name): Remove.
6040 * src/files.c: Adjust.
6041 (dirname.h): Include.
6042 (base_name): Don't prototype it.
6043 (finput): Remove, duplicates gram_in.
6044 (full_base_name, short_base_name): Replace by...
6045 (all_but_ext, all_but_tab_ext): these.
6046 (compute_base_names): Rename as...
6047 (compute_file_name_parts): this.
6048 Update to compute the new variables, including dir_prefix.
6049 Adjust dependencies.
6050 * src/output.c (prepare): Output them.
6051 * src/reader.c: Adjust to use gram_in, not finput.
6052 * src/scan-skel.l (@dir_prefix@): New.
6053
ad6a9b97
JMG
60542005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6055
6056 * lib/subpipe.c: New function end_of_output_subpipe() added
6057 to allow support for non-posix systems. This is a no-op function
6058 for posix systems.
6059
6060 * lib/subpipe.h: New function end_of_output_subpipe() added
6061 to allow support for non-posix systems. This is a no-op function
6062 for posix systems.
6063
6064 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6065 handle the lack of pipe/fork functionality on non-posix systems.
6066
6067 * djgpp/Makefile.maint: DJGPP specific file.
6068
6069 * djgpp/README.in: DJGPP specific file.
6070
6071 * djgpp/config.bat: DJGPP specific configuration file.
6072
6073 * djgpp/config.sed: DJGPP specific configuration file.
6074
6075 * djgpp/config.site: DJGPP specific configuration file.
6076
6077 * djgpp/config_h.sed: DJGPP specific configuration file.
6078
6079 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6080
6081 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6082
fc695704
AD
60832005-10-02 Akim Demaille <akim@epita.fr>
6084
6085 * data/location.cc: New, extract from...
6086 * data/lalr1.cc: here.
6087 (location.hh): Include it after the user prologue, in case the
6088 filename type is defined by the user.
6089 Forward declation location and position before the pre-prologue.
6090 (yyresult_): Rename as...
6091 (yyresult): this, it's a local variable, not an attribute.
6092 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6093
60942005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
6095
6096 * examples/extexi: Restore the #line generation.
6097
fb9712a9
AD
60982005-09-30 Akim Demaille <akim@epita.fr>,
6099 Alexandre Duret-Lutz <adl@gnu.org>
6100
6101 Move the token type and YYSTYPE in the parser class.
6102 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6103 (parser::token): New, from the moved free definition of tokens.
6104 (parser::semantic_value): Now a full definition instead of an
6105 indirection to YYSTYPE.
6106 (b4_post_prologue): No longer included in the header file, but
6107 in the implementation file.
6108 * doc/bison.texi (C+ Language Interface): Update.
6109 * src/parse-gram.y: Support unary %define.
6110 * tests/actions.at: Define global_tokens_and_yystype for backward
6111 compatibility until we update the tests.
6112 * tests/calc.at: Idem.
6113 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6114 to simplify the code.
6115
55f0c7b1
PE
61162005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6117
6118 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6119 Ah, the good old days! Problem reported by Peter Klein.
6120 * bootstrap (gnulib_modules): Add strerror, strtoul.
6121 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6122 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6123
fb9712a9 61242005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
6125
6126 * data/c.m4 (b4_error_verbose_if): New.
6127 * data/lalr1.cc: Use it.
6128 (YYERROR_VERBOSE_IF): Remove.
6129 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6130 parser members, replaced by...
6131 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6132 local variables.
6133 (yysyntax_error_): Takes the state number as argument.
6134 (yyreduce_print_): Use the argument yyrule, not the former
6135 attribute yyn_.
6136
8a6f72f3
PE
61372005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6138
6139 * bootstrap (gnulib_modules): Add verify.
6140 * lib/.cvsignore: Add verify.h.
6141 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6142 * src/system.h (verify): Remove.
6143 Include verify.h instead.
6144 * src/tables.c (tables_generate): Use new API for 'verify'.
6145
0d50976f
PE
61462005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6147
ebc3737e
PE
6148 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6149 local variables whose names begin with 'yy'.
6150 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6151 Trivial changes from Joel E. Denny.
6152
0d50976f
PE
6153 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6154 it itself.
6155 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6156 don't use alloca any more.
6157
6158 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6159 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 6160 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
6161 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6162 to match yacc.c, to test more hosts.
6163
a05b79df
PE
61642005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6165
55289366
PE
6166 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6167 doesn't affect behavior.
6168 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6169 Solaris, AIX, MSC.
6170 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6171 This works a bit better with glibc, if user code has already included
6172 stdlib.h.
6173 * doc/bison.texinfo (Bison Parser): Document that users can't
6174 arbitrarily use malloc and free for other purposes. Document
6175 that <alloca.h> and <malloc.h> might be included.
6176 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6177 user must declare alloca.
6178
a05b79df
PE
6179 * HACKING (release): Forwarn the Translation Project about
6180 stable releses.
6181
3ab2ca22
AD
61822005-09-20 Akim Demaille <akim@epita.fr>
6183
6184 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6185
a9739e7c
PE
61862005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6187
a702593e
PE
6188 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6189 (YYSTACK_ALLOC_MAXIMUM): Use it.
6190 (yysyntax_error): New function.
6191 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6192 multiple syntax errors are reported, and alloca is being used.
6193 Instead, reallocate buffers twice as big each time, so that
6194 we waste at most half the allocated memory. Start with a small
6195 (128-byte) buffer that will suffice in most cases anyway.
6196 Use yysyntax_error to do most of the work.
6197
6198 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6199 yynerrs is the number of errors reported, not the number of
6200 errors encountered.
6201
a9739e7c
PE
6202 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6203 Mark it as expected to fail.
6204 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6205 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6206 Don't start user-code symbols with "yy", to avoid name space problems.
6207
f479c6c6
AD
62082005-09-19 Akim Demaille <akim@epita.fr>
6209
6210 Remove the traits, failed experiment.
6211 It never proved useful, and anyway because of the current
6212 definition, it was not possible to have several specialization of
6213 this traits, making it useless.
6214 * data/lalr1.cc (yy:traits): Remove.
6215 Inline its definitions in the parser class.
6216
e2586f82
AD
62172005-09-19 Akim Demaille <akim@epita.fr>
6218
6219 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6220 least Mac OSX with a /usr/local install of gettext.
6221
2e8cf949
AD
62222005-09-19 Akim Demaille <akim@epita.fr>
6223
6224 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6225 and yytoken for similarity with the other skeletons.
6226
c7fb0b90
AD
62272005-09-19 Akim Demaille <akim@epita.fr>
6228
4e26c69e 6229 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 6230
1bd0deda
PE
62312005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6232
6233 * NEWS: Version 2.1.
6234
6235 * NEWS: Remove notice of yytname change, since it was never in an
6236 official release.
6237 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6238 diagnostic.
6239 * src/output.c (prepare): Likewise.
6240 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6241 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6242 is not defined. This is an awful hack, but it's enough for now.
6243 All callers changed.
6244 * tests/glr-regression-at (make_value): Args are const pointers now,
6245 to avoid GCC warning.
6246 (Duplicated user destructor for lookahead): New test. Currently
6247 skipped. It fails on my host but I'm not sure it'll always fail.
6248
62492005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
6250
6251 * src/symtab.h (struct symbol): Declare the printer and destructor
6252 as const, to avoid accidental calls to free.
6253 (symbol_destructor_set, symbol_printer_set): Adjust.
6254 * src/symtab.c: Adjust.
6255
1bd0deda 62562005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
6257
6258 * data/c.m4 (b4_token_enums): New.
6259 (b4_token_defines): Rename as...
6260 (b4_token_enums_defines): this.
6261 (b4_token_defines): New, output only the #defines.
6262 * data/yacc.c, data/glr.c: Adjust.
6263 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6264 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6265 as default values.
6266
dbcdae2d
AD
62672005-09-16 Akim Demaille <akim@epita.fr>
6268
6269 * data/lalr1.cc (yylex_): Remove, inline its code.
6270 (yyreport_syntax_error_): Remove, replaced by...
6271 (yysyntax_error_): this which returns a string and leaves to the
6272 caller the call to the users' error function.
6273 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6274 Move from members of the parser object...
6275 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6276 to local variables of the parse function.
6277
70d8f291
AD
62782005-09-16 Akim Demaille <akim@epita.fr>
6279
6280 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6281 since it's in Bison's name space.
6282
b47dbebe
PE
62832005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6284
ae199bf1
PE
6285 * data/glr.c (yyresolveValue): Add default case to pacify
6286 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6287
b47dbebe
PE
6288 * NEWS: Document when yyparse started to return 2.
6289 * doc/bison.texinfo (Parser Function): Document when yyparse
6290 returns 2.
6291
6292 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6293 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6294 changed.
6295 (class position): file_name -> filename (reverting). All uses changed.
6296
62972005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6298
6299 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6300 do anything if $@ exists. This reverts part of the 2005-07-07
6301 patch.
6302
00292f66
PE
63032005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6304
6305 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6306 contains obsolete information and isn't worth distributing as a
6307 separate file anyway.
6308 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6309 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6310 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6311 (yyparse): Abort if user code uses longjmp to throw an unexpected
6312 value.
6313
a420f962
PE
63142005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6315
00292f66
PE
6316 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6317 Suggested by twlevo@xs4all.nl.
6318
127287e9
PE
6319 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6320 This avoids a diagnostic from gcc -Wswitch-enum.
6321 Problem reported by twlevo@xs4all.nl.
6322
a420f962
PE
6323 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6324 standards. Use "file name" or "file" or "name", depending on
6325 the context.
6326 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6327 not to hack/foo.tab.c.
6328 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
6329 * data/glr.c: b4_filename -> b4_file_name.
6330 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6331 All uses changed.
6332 (class position): filename -> file_name. All uses changed.
6333 * data/yacc.c: b4_filename -> b4_file_name.
6334 * lib/bitset.h: filename -> file_name in local vars.
6335 * lib/bitset_stats.c: Likewise.
6336 * src/files.c: Likewise.
6337 * src/scan-skel.l ("@output ".*\n): Likewise.
6338 * src/files.c (file_name_split): Renamed from filename_split.
6339 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
6340
63412005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6342
6343 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6344 to accommodate latest gnulib.
6345
6346 * tests/glr-regression.at (Duplicate representation of merged trees):
6347 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6348
6349 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6350 needed.
6351
42a6501d
PE
63522005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6353
6354 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6355 All uses changed. Invoke user destructor after an error during a
6356 split parse (trivial change from Joel E. Denny).
6357
6358 * tests/glr-regression.at
6359 (User destructor after an error during a split parse): New test case.
6360 Problem reported by Joel E. Denny in:
6361 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6362
ef9a1faf
PE
63632005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6364
5b4aaf78
PE
6365 * README-cvs: Give URLs for recommended tools.
6366 Mention Gzip version problem, and bootstrapping issues.
6367 Remove troubleshooting section, as it's somewhat obsolete.
6368
b5240ba5
PE
6369 * bootstrap (no_cache): New var, to accommodate different wget
6370 variants. Use it instead of '-C off'. Problem reported by
6371 twlevo@xs4all.nl.
6372
ef9a1faf
PE
6373 * data/glr.c (yydestroyStackItem): New function.
6374 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6375 debugging information. Problem reported by Joel E. Denny.
6376
e6efa9da
AD
63772005-08-25 Akim Demaille <akim@epita.fr>
6378
6379 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6380
adc90f13
PE
63812005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6382
6383 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6384 Don't invoke destructor on unresolved entries.
6385 * tests/glr-regression.at
6386 (User destructor for unresolved GLR semantic value): New test case.
6387 Problem reported by Joel E. Denny in:
6388 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6389
f9315de5
PE
63902005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6391
15d29c1f
PE
6392 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6393 Add strnlen.c.
6394 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6395 lib-prefix.m4, po.m4.
6396
dd5f2af2
PE
6397 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6398 in yydestruct diagnostic, since it might not be an error.
6399 Problem reported by Joel Denny near end of
6400 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 6401 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
6402 * data/yacc.c (yyreturn): Likewise.
6403 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6404
6405 * src/files.c: Remove obsolete FIXME comment.
6406
6407 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6408 with the other templates, and to fix bogus run-on messages such
6409 as the one reported at the end of
6410 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6411 All callers changed to avoid the newline.
6412 (yyprocessOneStack): Output two lines rather than one, to accommodate
6413 the above change. This changes the debug output format slightly.
6414
f9315de5
PE
6415 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6416 reported by Joel E. Denny in
6417 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6418 (trivial change).
6419 * tests/glr-regression.at (Duplicate representation of merged trees):
6420 New test, from Joel E. Denny in:
6421 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6422 * THANKS: Add Joel E. Denny.
6423
6424 * configure.ac (AC_INIT): Bump to 2.0c.
6425
04098407
PE
64262005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6427
6428 * NEWS: Version 2.0b.
6429
ca5d2013
PE
6430 * Makefile.am (SUBDIRS): Put examples before tests, so that
6431 "make check" doesn't finish with "All 1 tests passed".
6432
3d54b576
PE
6433 * tests/regression.at (Token definitions): Don't rely on
6434 AT_PARSER_CHECK for data that contains backslashes. It currently
6435 uses 'echo', and 'echo' isn't portable if its argument contains
6436 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6437 that the byte '\0xff' is not printable in the C locale; it is,
6438 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6439 not printable, so use '\0x81' to test.
6440
d53ae497
PE
6441 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6442 version of GCC, since the macro is used with non-GCC compilers.
6443
fc01665e
PE
6444 Fix core dump reported by Pablo De Napoli in
6445 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6446 * tests/regression.at (Invalid inputs with {}): New test.
6447 * src/parse-gram.y (token_name): Translate type before using
6448 it as an index.
6449
04098407
PE
6450 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6451 the user's name space. All uses changed to __attribute__
6452 ((__unused__)).
6453 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6454 Add __attribute__ ((__noreturn__)).
6455
6456 * etc/clcommit: Remove. We weren't using it, and it failed
6457 "make maintainer-distcheck".
6458 * Makefile.maint: Merge from coreutils.
6459 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6460 (syntax-check-rules): Change list of rules as described below.
6461 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6462 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6463 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6464 (sc_trailing_space): New rules.
6465 (sc_xalloc_h_in_src): Remove.
6466 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6467 (sc_space_tab, sc_error_exit_success, sc_changelog):
6468 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6469 (makefile-check, po-check, author_mark_check):
6470 (makefile_path_separator_check, copyright-check):
6471 Use grep -n, to make it easier to find violations.
6472 Use CVS_LIST and CVS_LIST_EXCEPT.
6473 (header_regexp, h_re): Remove.
6474 (dd_c): New macro.
6475 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6476 (my-distcheck): Use more-modern GCC flags.
6477 (signatures, %.asc): Remove.
6478 (rel-files, announcement): Remove signatures.
6479 Restore old updating code, even though we don't use it, so
6480 that we're the same as coreutils.
6481 (alpha, beta, major): Depend on news-date-check.
6482 Make the upload commands.
6483
6484 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6485 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6486 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6487 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6488 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6489 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6490 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6491 * tests/sets.at: Likewise.
6492
6493 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6494 we comment out the Autoconf version number.
6495 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6496 it's error-prone and "make maintainer-distcheck" rejects it.
6497
6498 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6499 Indent calls to "error" to pacify "make maintainer-distcheck",
6500 when the calls are not intended to be translated.
6501 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6502
6503 * src/Makefile.am (DEFS): Use +=, to pacify
6504 "make maintainer-distcheck".
6505 (bison_SOURCES): Add scan-skel.h.
6506 (sc_tight_scope): New rule, from coreutils.
6507
6508 * src/files.c (src_extension, header_extension):
6509 Now static, not extern.
6510 * src/getargs.c (short_options): Likewise.
6511 * src/muscle_tab.c (muscle_table): Likewise.
6512 * src/parse-gram.y (current_class, current_type, current_prec):
6513 Likewise.
6514 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6515 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6516 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6517 void, to avoid warning when NLS is disabled.
6518 * src/output.c: Include scan-skel.h.
6519 (scan_skel): Remove decl, since scan-skel.h does this.
6520 (output_skeleton):
6521 Indent calls to "error" to pacify "make maintainer-distcheck".
6522 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6523 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6524 "make maintainer-distcheck".
6525 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6526 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6527 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6528 (skel_lex_destroy, scan_skel): Move these decls to...
6529 * src/scan-skel.h: New file.
6530 * src/uniqstr.c (uniqstr_assert):
6531 Indent calls to "error" to pacify "make maintainer-distcheck".
6532
6533 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6534 not @VAR@.
6535
6536 * tests/torture.at: Revamp to avoid misuse of atoi that
6537 "make maintainer-distcheck" complained about.
6538
6539 * examples/extexi (message): Don't print a message more than once,
6540 and omit line-number decoration that makes Emacs compile think
6541 that informative messages are worth worrying about.
6542
65432005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6544
6545 * configure.ac: Update version number.
6546
6547 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6548 accidentally.
6549 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6550 autogenerated by the maintainer.
6551 * examples/calc++/.cvsignore: Add *.yy.
6552
6553 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6554 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6555 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6556
6557 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6558
6559 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6560 from maintainer-distcheck about casting the argument of 'free'.
6561
6562 * NEWS: Mention recent yytname changes.
6563 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6564
6565 * bootstrap: For translations that have not yet been upgraded to
6566 the new runtime-po domain, prime the pump by extracting the
6567 relevant strings from the obsolete translations. This code can be
6568 removed once the bison-runtime domain has been translated by each
6569 team.
6570
6571 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6572 now that token names are already quoted.
6573
6574 Fix problem reported by Anthony Heading.
6575 * data/glr.c (YYTOKEN_TABLE): New macro.
6576 (yytname): Define if YYTOKEN_TABLE.
6577 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6578 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6579 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6580 * src/output.c (prepare_symbols): Output token_table_flag.
6581
0ffda363
PE
65822005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6583
6584 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6585 again if the first call fails.
6586
6587 * data/glr.c (yytnamerr): New function.
6588 (yyreportSyntaxError): Use it to dequote most string literals.
6589 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6590 with other skeletons. All uses changed.
6591 (yytnameerr_): New function.
6592 (yyreport_syntax_error): Use it to dequote most string literals.
6593 * data/yacc.c (yytnamerr): New function.
6594 (yyerrlab): Use it to decode most string literals.
6595 * doc/bison.texinfo (Decl Summary, Calling Convention):
6596 Clarify quoting convention of yytname.
6597 * src/output.c (prepare_symbols): Quote all names. This undoes
6598 the 2005-04-17 change, which is now accomplished (mostly) via
6599 changes in the parsers as described above.
6600 * tests/regression.at (Token definitions, Web2c Actions):
6601 Undo most 2005-04-17 change here, too.
6602
66032005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6604
6605 Fix more problems reported by twlevo@xs4all.nl.
6606 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6607 remove trailing spaces. This loses the exit status of ./types,
6608 and isn't needed since ./types shouldn't be emitting trailing
6609 spaces.
6610 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6611 as the stack isn't valid in that case.
6612
6613 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6614 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6615 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6616 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6617 is used.
6618 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6619 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6620 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6621 Likewise.
6622
6623 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6624 overly-picky compilers that reject 'char *foo = "bar";'.
6625
6626 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6627 to FILE * parameter, not to stderr. This fixes a typo introduced
6628 in the 2005-07-12 change.
6629
6630 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6631 warnings from GCC 4.
6632
6633 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6634 (yyglrShiftDefer, yysplitStack):
6635 Remove unused parameters b4_pure_formals. All uses changed.
6636 (yyglrShift): Remove unused parameters b4_user_formals.
6637 All uses changed.
6638 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6639
6100a9aa
PE
66402005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6641
258b75ca
PE
6642 Destructor cleanups and regularization among the three skeletons.
6643 * NEWS: Document the behavior changes.
6644 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6645 stack before failing, as the cleanup code will do it for us now.
6646 * data/lalr1.cc (yyerrlab): Likewise.
6647 * data/glr.c (yyparse): Pop everything off the stack before
6648 freeing it, so that destructors get called properly.
6649 * data/lalr1.cc (yyreturn): Likewise.
6650 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6651 This is more consistent.
6652 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6653 why destructors might be called. 1.875 -> 2.1.
6654 (Destructor Decl, Decl Summary, Table of Symbols):
6655 Some English-language cleanups for %destructor.
6656 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6657 Add output line for destructor of start symbol.
6658 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6659 because of that same extra output line.
6660
1a059451
PE
6661 * NEWS: Document minor wording changes in diagnostics of
6662 Bison-generated parsers.
6663 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6664 Remove unused formals. All uses changed.
6665 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6666 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6667 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6668 Rename yyoverflowab to yyexhaustedlab.
6669 When memory exhaustion occurs during syntax-error reporting,
6670 report it separately rather than in a single diagnostic; this
6671 eases translation.
6672 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6673 (Memory Exhausted): Renamed from Parser Stack Overflow.
6674 Revamp wording slightly to prefer "memory exhaustion".
6675 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6676
97460c78
PE
6677 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6678
30757c8c
PE
6679 Add i18n support to the GLR skeleton. Partially fix the C++
6680 skeleton; a C++ expert needs to finish this. Remove debugging
6681 msgids; there's little point to having them translated, since they
6682 can be understood only by someone who can read the
6683 (English-language) source code.
6684
6685 Generate runtime-po/bison-runtime.pot automatically, so that we
6686 don't have to worry about garbage getting in that file. We'll
6687 make sure after the next official release that old msgids don't
6688 get lost. See
6689 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6690
6691 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6692 Now auto-generated.
6693 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6694 Fix typos in explanations of the runtime file.
6695 * bootstrap: Change gettext keyword from YYI18N to YY_.
6696 Use standard Makefile.in.in in runtime-po, since we'll arrange
6697 for backward-compatible bison-runtime.po files in a different way.
6698 * data/glr.c (YY_): New macro, from yacc.c.
6699 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6700 Translate messages intended for users.
6701 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6702 the wording in the other skeletons. We don't know that the memory
6703 is virtual.
6704 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6705 Use same method that yacc.c uses.
6706 Don't translate debugging messages.
6707 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6708 it doesn't work (yet), and requires C++ expertise to fix.
6709 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6710 Move defn to a more logical place, to be consistent with other
6711 skeletons.
6712 Don't translate debugging messages.
6713 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6714 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6715 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6716 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6717
ac8c5689
PE
6718 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6719 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6720 void, not int.
6721 * tests/glr-regression.at (Badly Collapsed GLR States):
6722 Likewise.
6723 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6724 yylex should return 0 at EOF rather than aborting.
6725
6100a9aa
PE
6726 Improve tests for stack overflow in GLR parser.
6727 Problem reported by twlevo@xs4all.nl.
6728 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6729 All uses removed.
6730 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6731 can handle the problem.
6732 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6733 (yyparse): New local variable yyresult to record the result.
6734 Use result of setjmp to set it, rather than storing itinto
6735 struct.
6736 (yyDone): Remove label.
6737 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6738 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6739 if YYABORT is used).
6740 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6741 yyparse status; put status > 1 into diagnostic.
6742 Check that status==2 works.
6743 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6744 Use exit status 3 for failure to open (which shouldn't happen).
6745
15f40952
PE
67462005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6747
67fd79c4
PE
6748 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6749 1 on syntax error; just let yyparse do its thing.
6750 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6751 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6752 (Exploding the Stack Size with Alloca):
6753 (Exploding the Stack Size with Malloc):
6754 Expect exit status 2, not 1, since the parser is supposed to blow
6755 its stack. Problem reported by twlevo@xs4all.nl.
6756
15f40952
PE
6757 * data/glr.c (yyparse): Don't assume that the initial calls
6758 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6759 Print a stack-overflow message and fail instead.
6760 Initialize the line-number information before creating the stack,
6761 so that the stack-overflow message can report line zero safely.
6762
f32c66b5
PE
67632005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6764
a22ff96f 6765 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
6766 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6767 (yyuserMerge): Provide a default case if b4_mergers is empty.
6768 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6769 * tests/glr-regression.at
6770 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 6771 Add casts to pacify C++ compilers.
1beb0b24
PE
6772 * tests/glr-regression.at (Improper merging of GLR delayed action
6773 sets): Declare yylex before using it.
f32c66b5 6774 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
6775 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6776 test for valgrind; valgrind is independent of g++.
6777 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6778 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6779 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6780 Use a destructor, so that we can expand the stack. Change
6781 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 6782
d741bd1b
PE
67832005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6784
6785 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6786 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6787
0410a6e0
PE
67882005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6789
6790 * PACKAGING: New file, suggested by Bruno Haible and taken from
6791 similar wording in gettext's PACKAGING file.
6792 * NEWS: Mention PACKAGING.
6793 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6794
f7ab6a50
PE
67952005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6796
baf785db 6797 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
6798 * bootstrap: Get runtime translations into runtime-po.
6799 Create runtime-po files automatically, if possible.
6800 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6801 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6802 does not infringe on the user's name space.
6803 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6804 * doc/bison.texinfo (Internationalization): Revamp the English
6805 and Texinfo syntax a bit, to try to make it clearer.
6806 (Bison Options, Option Cross Key): Mention --print-localedir.
6807 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6808 YYENABLE_NLS. Quote a bit more.
6809 * runtime-po/.cvsignore: New file.
6810 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6811 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6812 * runtime-po/quot.sed: Likewise.
6813 * runtime-po/boldquot.sed: Likewise.
6814 * runtime-po/en@quot.header: Likewise.
6815 * runtime-po/en@boldquot.header: Likewise.
6816 * runtime-po/insert-header.sin: Likewise.
6817 * runtime-po/remove-potcdate.sin: Likewise.
6818 * runtime-po/Makevars: Likewise.
6819 * runtime-po/LINGUAS: Likewise.
6820 * runtime-po/de.po: Likewise; we will rely on the translation project
6821 to maintain this, so "bootstrap" should get it.
0410a6e0 6822 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
6823 its value.
6824 * src/main.c (main): Bind the bison-runtime domain, too.
6825
68262005-07-12 Bruno Haible <bruno@clisp.org>
6827
6828 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6829 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6830 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6831 * runtime-po: New directory.
6832 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6833 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6834 * runtime-po/Rules-quot: New file, copied from po/.
6835 * runtime-po/quot.sed: Likewise.
6836 * runtime-po/boldquot.sed: Likewise.
6837 * runtime-po/en@quot.header: Likewise.
6838 * runtime-po/en@boldquot.header: Likewise.
6839 * runtime-po/insert-header.sin: Likewise.
6840 * runtime-po/remove-potcdate.sin: Likewise.
6841 * runtime-po/Makevars: New file.
6842 * runtime-po/POTFILES.in: New file.
6843 * runtime-po/LINGUAS: New file.
6844 * runtime-po/bison-runtime.pot: New file.
6845 * runtime-po/de.po: New file.
6846 * m4/bison.m4: New file.
6847 * Makefile.am (SUBDIRS): Add runtime-po.
6848 (aclocaldir, aclocal_DATA): New variables.
6849 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6850 Define aclocaldir.
6851 * src/getargs.c (usage): Document --print-localedir option.
6852 (PRINT_LOCALEDIR_OPTION): New enum item.
6853 (long_options): Add --print-localedir option.
6854 (getargs): Handle --print-localedir option.
6855 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6856 (Internationalization): New section.
6857
22dda0f0
AD
68582005-07-12 Akim Demaille <akim@epita.fr>
6859
6860 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6861 for consistency with the rest of the code.
6862 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6863 Add separators.
6864
82b248ad
AD
68652005-07-12 Akim Demaille <akim@epita.fr>
6866
6867 * src/parse-gram.y: Use %printer instead of YYPRINT.
6868
fa0e9314
AD
68692005-07-12 Akim Demaille <akim@epita.fr>
6870
867a3e00
AD
6871 * src/symtab.h, src/symtab.c (symbol_print): New.
6872 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6873 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6874
68752005-07-12 Akim Demaille <akim@epita.fr>
6876
6877 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
6878 b4_at_dollar and b4_dollar_dollar.
6879
e054b190
PE
68802005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6881
6882 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6883 and Pennello's paper.
6884
34160ec4
PE
68852005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6886
407d4a75
PE
6887 * data/yacc.c (yyparse): Undo previous patch. Instead,
6888 set yylsp[0] and yyvsp[0] only if the initial action
6889 sets yylloc and yylval, respectively.
6890
34160ec4
PE
6891 * data/yacc.c (yyparse): In the initial action, set
6892 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6893 This avoids the use of undefined variables if the initial
6894 action does not set yylloc and/or yylval.
6895
c3d5a4a7
PE
68962005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6897
b34d96c1
PE
6898 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6899 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6900 Remove from CVS. These files are automatically generated.
6901 * examples/extexi: Clarify that this file is now part of Bison,
6902 not GNU M4, and that it works with any POSIX-compatible Awk.
6903 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6904 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6905 so that we also get calc++-parser.yy. Geneate it.
6906 Use $(AWK), not gawk, since any conforming Awk will do.
6907 Put comment before action, since older 'make' can't handle comment
6908 in action.
6909 $(BUILT_SOURCES): List all built sources, not just some of them.
6910 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6911 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6912 $($(calc_sources_generated)): Remove unnecessary test for existence
6913 of target. (This had a shell syntax error anyway; a stray "x".)
6914 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6915 calc++-parser.yy.
6916 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6917
c3d5a4a7
PE
6918 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6919 implied by the other modules.
6920
828c373b
AD
69212005-07-06 Akim Demaille <akim@epita.fr>
6922
6923 Bind examples/calc++ to the package.
6924 * examples/calc++/Makefile: Remove, replaced by...
6925 * examples/calc++/Makefile.am: ... this new file.
6926 * examples/calc++/test: Remove input.
6927 * examples/calc++/compile: Remove.
6928 * examples/Makefile.am: New.
6929 * configure.ac, Makefile.am: Adjust.
6930 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6931
63cb01d6
PE
69322005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6933
fd2df2ed
PE
6934 * data/glr.c (yyFail): Drastically simplify; since the format argument
6935 never had any % directives, we can simply pass it to yyerror.
6936 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6937 be modified later, as that is the usual style in glr.c.
6938 Problems reported by Paul Hilfinger.
6939
63cb01d6
PE
6940 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6941 and size overflow errors.
6942 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6943 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6944 (YYSIZEMAX): New macro.
6945 (yystpcpy): New function, taken from yacc.c.
6946 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6947 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6948 so that we don't have to maintain their signatures.
6949 (yyFail): Check for buffer overflow, by using vsnprintf rather
6950 than vsprintf. Allocate a bigger buffer if possible.
6951 Report an error if buffer allocation fails.
6952 (yyStackOverflow): New function.
6953 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6954 the initialization was successful. It might fail if storage was
6955 exhausted.
6956 (yyexpandGLRStack): Add more checks for storage allocation failure.
6957 Use yyStackOverflow to report failures.
6958 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6959 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6960 Don't assume stack number fits in int.
6961 (yysplitStack): Check for storage allocation failure.
6962 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6963 can print diagnostics on storage allocation failure. All callers
6964 changed.
6965 (yyresolveValue): Use yybool for boolean.
6966 (yyreportSyntaxError): Check for size-calculation overflow.
6967 This code is taken from yacc.c.
6968 (yyparse): Check for storage allocation errors when allocating
6969 the initial stack.
6970
1c59e0a1
AD
69712005-07-05 Akim Demaille <akim@epita.fr>
6972
6973 Extract calc++ from the documentation.
6974 * doc/bison.texinfo (Calc++): Add the extraction marks.
6975 * examples/extexi: New, from the aborted GNU Programming 2E.
6976 Separate the different paragraph of a file with empty lines.
6977 * examples/Makefile: Use it to extract the whole calc++ example.
6978
8a0adb01
AD
69792005-06-24 Akim Demaille <akim@epita.fr>
6980
6981 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6982 class typedefs.
6983
12545799
AD
69842005-06-22 Akim Demaille <akim@epita.fr>
6985
6986 * doc/bison.texinfo (C++ Language Interface): First stab.
6987 (C++ Parsers): Remove.
6988
99be0235
AD
69892005-06-22 Akim Demaille <akim@epita.fr>
6990
6991 * data/lalr1.cc (yylex_): Honor %lex-param.
6992
0ffd4fd1
AD
69932005-06-22 Akim Demaille <akim@epita.fr>
6994
6995 Start a set of simple examples.
6996 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6997 * examples/calc++/calc++-driver.hh,
6998 * examples/calc++/calc++-parser.yy,
6999 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7000 * examples/calc++/compile, examples/calc++/test: New.
7001
0925ebb4
PE
70022005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7003
7004 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7005 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7006 which stems from the 2005-05-27 patch.
7007
43d3b664
PH
70082005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7009
7010 * data/glr.c: Modify treatment of unused parameters to permit use
7011 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7012
3062864d
PE
70132005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7014
7015 Fix infringement on user name space reported by Janos Zoltan Szabo.
7016 * data/yacc.c (yyparse): strlen -> yystrlen.
7017
989b5b8e
AD
70182005-05-30 Akim Demaille <akim@epita.fr>
7019
7020 * data/lalr1.cc (_): New.
7021 Translate the various messages.
7022
bedf57f5
PE
70232005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7024
7025 Fix infringement on user name space reported by Bruno Haible.
7026 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7027 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7028 the user's name space.
7029 (alloca): Include <stdlib.h> to get it, if it's not built in.
7030 (YYMALLOC, YYFREE): Define only if needed.
7031 (malloc, free): Declare, but only if needed, as this infringes on
7032 the user name space.
7033
4d1801f1
PE
70342005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7035
7036 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7037 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7038 with %d format.
7039 * lib/ebitset.c (min, max): Undef before defining.
7040 * lib/vbitset.c (min, max): Likewise.
7041 * lib/subpipe.c (create_subpipe): Save local variables in case
7042 vfork clobbers them.
7043
70442005-05-24 Bruno Haible <bruno@clisp.org>
7045
7046 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7047 error message syntax used by gcc-4.0.
7048
b94a9e1e
PE
70492005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7050
85ac3861
PE
7051 * README: Mention m4 1.4.3. Remove obsolete advice about
7052 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7053
b94a9e1e
PE
7054 * bootstrap: Remove workaround for problem I encountered with
7055 gettext 0.14.1; it seems to be fixed now.
7056
51c30d21
PE
70572005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7058
009ce67d
PE
7059 * NEWS: Version 2.0a.
7060
f2a97c62
PE
7061 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7062 the previous change.
7063
c8775f93
PE
7064 Various maintainer cleanups.
7065 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7066 conftest*, for benefit of CVS commands run at the same time as
7067 "configure". Add build-aux, since "bootstrap" now creates it and
7068 its subfiles.
7069 * Makefile.cfg (move_if_change): Remove.
7070 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7071 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7072 (po_repo, do-po-update, po-update, wget_files, get-targets):
7073 (config.guess-url_prefix, config.sub-url_prefix):
7074 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7075 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7076 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7077 Remove.
7078 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7079 this is now the recommended name.
7080 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7081 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7082 ylwrap. These files now go into build-aux.
7083 * config/move-if-change: Remove.
7084 * config/prev-version.txt: Bump from 1.75 to 2.0.
7085
3ea5f0ec
PE
7086 * bootstrap: Add stdio-safer, unistd-safer modules.
7087 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7088 we don't need it).
7089 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7090 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7091 * lib/subpipe.c: Include "unistd-safer.h".
7092 (create_subpipe): Make sure all the newly-created
7093 file descriptors are > 2, so that diagnostics don't
7094 get sent down them (which might cause Bison to hang, in theory).
7095 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7096 * src/files.c (xfopen): Use fopen_safer, not fopen.
7097
51c30d21
PE
7098 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7099 yesterday's yacc.c fix.
7100
cea1469d
PE
71012005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7102
3ea5f0ec
PE
7103 * data/glr.c, data/lalr1.cc: Update copyright date.
7104
cea1469d
PE
7105 Fix a destructor bug reported by Wolfgang Spraul in
7106 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7107 * data/yacc.c (yyabortlab): Don't call destructor, and
7108 don't set yychar to EMPTY.
7109 (yyoverflowlab): Don't call destructor.
7110 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7111 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7112 since we no longer output the message "discarding lookahead token
7113 end of input ()".
7114
5e6f62f2
PH
71152005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7116
7117 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7118 fix a small glitch in debugging output.
7119 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7120 after YY_SYMBOL_PRINT where needed.
7121
7122 (struct yyGLRState): Add some comments.
7123 (struct yySemanticOption): Add some comments.
7124 (union yyGLRStackItem): Add comment.
7125
7126 (yymergeOptionSets): Correct this to properly perform the union,
7127 avoiding infinite reported by Michael Rosien.
7128 Update comment.
7129
7130 * tests/glr-regression.at: Add test for GLR merging error reported
7131 by M. Rosien.
cea1469d 7132
0fb669f9
PE
71332005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7134
7135 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7136 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7137 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7138 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7139 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7140 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7141 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7142 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7143 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7144 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7145 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7146 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7147 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7148 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7149 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7150 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7151 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7152 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7153 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7154 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7155 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7156 src/output.h, src/parse-gram.c, src/parse-gram.h,
7157 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7158 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7159 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7160 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7161 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7162 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7163 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7164 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7165 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7166 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7167 tests/reduce.at, tests/regression.at, tests/sets.at,
7168 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7169 Update FSF postal mail address.
7170
51f4735e
PE
71712005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7172
7173 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7174 Problem reported by Ralf Menzel.
7175
80ce3401
PE
71762005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7177
7178 * tests/actions.at: Test that stack overflow invokes destructors.
7179 From Marcus Holland-Moritz.
7180 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7181 from here....
7182 (yyreturn): to here. That way, destructors are called properly
7183 even if the stack overflows, or the user calls YYACCEPT or
7184 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7185 (yyoverflowlab): Destroy the lookahead.
7186
71872005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7188
7189 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7190
72f000b0
PE
71912005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7192
7193 * NEWS: Bison-generated C parsers no longer quote literal strings
7194 associated with tokens.
7195 * src/output.c (prepare_symbols): Don't escape strings,
7196 since users don't want to see C escapes.
7197 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7198 in diagnostics.
c19683bb 7199 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
7200 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7201
1094323f
PE
72022005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7203
7204 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7205 the data size is known to be too small and we can't increase it.
7206 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7207
ca407bdf
PE
72082005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7209
7210 * src/parse-gram.y: Include quotearg.h.
7211 (string_as_id): Quote $1 before using it as a key, since the
7212 lexer no longer quotes it for us.
7213 (string_content): Don't strip quotes, since lexer no longer
7214 quotes it for us.
7215 * src/scan-gram.l: Include quotearg.h.
7216 ("\""): Omit quote.
7217 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7218 a key, since the rest of the lexer doesn't quote it.
7219 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7220 * tests/regression.at (Token definitions): Check for backslashes
7221 in token strings.
7222
7223 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7224 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7225 (yyparse): Revamp code to generate long syntax error message, to
7226 make it easier to translate, and to avoid problems with arithmetic
7227 overflow. Change "virtual memory" to "memory" in diagnostic, since
7228 we don't know whether the memory is virtual.
7229
1ce59070
PE
72302005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7231
7232 * NEWS: Bison-generated C parsers now use the _ macro to
7233 translate strings.
7234 * data/yacc.c (_) [!defined _]: New macro.
7235 All English strings wrapped inside this macro.
7236 * doc/bison.texinfo (Bison Parser): Document _.
7237 * po/POTFILES.in: Include src/parse-gram.c, since it now
7238 includes translateable strings that parse-gram.y doesn't.
7239
a749a695
PE
72402005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7241
7242 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7243 reverting the 2004-10-11 change to this function.
7244 (symbol_check_alias_consistency): Don't call symbol_type_set
7245 if the type name is already correct.
7246 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7247
8fb1053b
PE
72482005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7249
7250 * tests/regression.at (Token definitions): Don't use a token named
7251 c, as that generates a "#define c ..." that runs afoul of buggy
7252 stdlib.h that uses the identifier c as a member of struct
7253 drand48_data. Problem reported by Horst Wente.
7254
ff498c4a
PE
72552005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7256
7257 * bootstrap: Change translation URL from
7258 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7259 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7260 redirection glitches. Problem reported by twlevo@xs4all.nl.
7261
65211d70
PE
72622005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7263
7264 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7265 after operands; POSIX says this isn't portable for the c99 command.
7266
9577fb1f
PE
72672005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7268
7269 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7270 immediately if a data overrun has occurred; this may help us track
7271 down what may be a spurious failure on MacOS.
7272
78b178f7
PE
72732005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7274
a2599d0f
PE
7275 Respond to problems reported by twlevo@xs4all.nl.
7276
7277 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7278
78b178f7
PE
7279 * src/vcg.h: Comment fix.
7280 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7281 (G_CMAX): Change to -1 instead of INT_MAX.
7282
7283 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 7284
7296e729
PE
72852005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 * src/tables.c (state_number_to_vector_number): Put it inside an
7288 "#if 0", since it's not currently used. Problem reported by
7289 Roland McGrath.
7290
05ac60f3
PE
72912005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7292
7293 * src/output.c (escaped_output): Renamed from
7294 escaped_file_name_output, since we now use it for symbol tags as
7295 well. All uses changed.
7296 (symbol_destructors_output, symbol_printers_output):
7297 Escape symbol tags too.
7298 Problem reported by Matyas Forstner in
7299 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7300
7301 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7302 not needed.
7303 * src/output.c (user_actions_output, token_definitions_output,
7304 symbol_destructors_output, symbol_printers_output): Likewise.
7305 * src/reader.c (prologue_augment): Likewise.
7306 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7307
7308 * src/vcg.c (output_edge): Don't quote linestyle arg.
7309 Problem reported by twlevo@xs4all.nl.
7310
7eb453ac
PE
73112005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7312
7313 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7314 example, reported by Derek M Jones. Also, make the example even
7315 more outrageous, to better illustrate how bad the problem is.
7316
4c04c52a
PE
73172005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7318
7319 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7320 putsym. Typo reported by Sebastian Piping.
7321
a61e1620
PE
73222005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7323
7324 * doc/bison.texinfo (Language and Grammar): some -> same
7325 (Epilogue): int he -> in the
7326 Typos reported by Sebastian Piping via Justin Pence.
7327
9ec93868
PE
73282005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7329
7330 * tests/glr-regression.at (Improper handling of embedded actions
7331 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7332 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7333 with dollar signs in test names.
7334 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7335 for a similar reason.
7336
73ce7e7e
PE
73372005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7338
7339 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7340 wants to redefine G_VIEW.
7341
2e72b98e
PE
73422005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7343
7344 * src/vcg.c (get_view_str): Remove case for normal_view.
7345 Problem reported by twlevo@xs4all.nl.
7346
e0d634e5
PE
73472005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7348
ccf830a4
PE
7349 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7350 Problem reported by twlevo@xs4all.nl.
7351
e0d634e5
PE
7352 * doc/bison.texinfo: Change @dircategory from "GNU programming
7353 tools" to "Software development". Requested by Richard Stallman
7354 via Karl Berry.
7355
7bbc8cb0
PE
73562005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7357
7358 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7359 Problem reported by twlevo@xs4all.nl.
7360
08b770bc
PE
73612005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7362
7363 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7364 keyword; it's not needed with modern compilers, and it doesn't
7365 affect correctness with older compilers. Suggested by
7366 twlevo@xs4all.nl.
7367
95f22ad2
PE
73682005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7369
7370 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7371 gcc -Wswitch-default.
7372 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7373 * data/yacc.c (yyparse): Likewise.
7374
d229d15c
PE
73752005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7376
7377 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7378 already. Let config.h define any nonstandard values.
7379
ecadd90f
PE
73802005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7381
7382 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7383 for the benefit of slower hosts. Problem reported by
7384 Nelson H. F. Beebe.
7385
213744b5
PE
73862005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7387
7388 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7389 being defined and not used.
7390 * data/lalr1.cc (yyparse): Likewise.
7391 Use "if (false)" rather than "if (0)".
7392
249d3236
PE
73932005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7394
7395 * TODO: Mention that we should allow NUL bytes in tokens.
7396
987cc1fb
PE
73972005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7398
7399 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7400 Problem reported by Hans Aberg.
7401
08fe02d9
PE
74022005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7403
7404 * src/getargs.c (version): Happy new year; update overall
7405 program copyright date from 2004 to 2005.
7406
7407 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7408 Problem reported by Hans Aberg.
7409 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7410 (Output file names.): Add a test for the case when standard output
7411 is closed.
7412
010c0266
PE
74132004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7414
7415 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7416 to fix an oversight in the Bison 2.0 manual.
7417
da12206a
PE
74182004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7419
7420 * NEWS: Version 2.0. Reformat the existing news items since
7421 1.875, so that related items are grouped together.
3a4734aa 7422 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
7423 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7424
c935d934
PE
7425 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7426 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7427 otherwise, we're not testing alloca. Unfortunately there's no
7428 simple way to consult HAVE_ALLOCA here.
7429
da12206a
PE
7430 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7431 for yymsg, too.
7432
7433 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7434 hand. This avoids a warning about comparing int to size_t when
7435 GCC warnings are enabled.
7436
0a2c5137
PE
74372004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7438
d7e14fc0
PE
7439 * NEWS: Bison-generated parsers no longer default to using the
7440 alloca function (when available) to extend the parser stack, due
7441 to widespread problems in unchecked stack-overflow detection.
7442 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7443 responsibility to set it to a positive value. This lets the user
7444 specify a value that is not a preprocessor constant.
7445 * data/yacc.c (YYMAXDEPTH): Likewise.
7446 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7447 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7448 to be a compile-time constant. However, explain the constraints on it.
7449 Also, explain the constraints on YYINITDEPTH.
7450 (Table of Symbols): Explain that alloca is no longer the default.
7451 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7452 to 1.
7453
0a2c5137
PE
7454 * doc/bison.texinfo (Location Default Action): Mention that n must
7455 be zero when k is zero. Suggested by Frank Heckenbach.
7456
e019c247
AD
74572004-12-22 Akim Demaille <akim@epita.fr>
7458
7459 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7460 (parser::state_type, parser::semantic_type, parser::location_type):
7461 Private, not public.
7462 (parser::parse): Return ints, not bool.
7463 Returning a bool introduces a problem: 0 corresponds to false, and
7464 it seems weird to return false on success. Returning true changes
7465 the conventions for yyparse.
7466 Alternatively we could return void and send an exception.
7467 There is no clear consensus (yet?).
7468 (state_stack, semantic_stack, location_stack): Rename as...
7469 (state_stack_type, semantic_stack_type, location_stack_type): these.
7470 Private, not public.
7471 * tests/c++.at: New.
7472 * tests/testsuite.at, tests/Makefile.am: Adjust.
7473
72731bb7
AD
74742004-12-21 Akim Demaille <akim@epita.fr>
7475
7476 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7477
9a0d8bec
AD
74782004-12-21 Akim Demaille <akim@epita.fr>
7479
7480 Don't impose std::string for filenames.
7481
7482 * data/lalr1.cc (b4_filename_type): New.
7483 (position::filename): Use it.
7484 (parser.hh): Move the inclusion of stack.hh and location.hh below
7485 the user code, so that needed headers for the filename type can be
7486 included first.
72731bb7
AD
7487 Forward declare them before the user code.
7488 * tests/Makefile.am (check-local, installcheck-local): Pass
7489 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 7490
99880de5
AD
74912004-12-20 Akim Demaille <akim@epita.fr>
7492
7493 Use more STL like names: my_class instead of MyClass.
7494
7495 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7496 (SemanticStack, SemanticType, StateStack, StateType)
7497 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7498 (Parser::value): Rename as...
7499 (location_stack, location_type, rhs_number_type, semantic_stack)
7500 (semantic_type, state_stack, state_type, token_number_type, stack)
7501 (slice, traits, parser::yylloc, parser::yylval): these.
7502
7503 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7504
9bec482e
PE
75052004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7506
7507 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7508 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7509
f6fbd3da
PE
75102004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7511
7512 Remove uses of 'short int' and 'unsigned short int'. This raises
7513 some arbitrary limits. It uses more memory but nowadays that's
7514 not much of an issue.
7515
7516 This change does not affect the generated parsers; that's a different
7517 task, as some users will want to conserve memory there.
7518
7519 Ideally we should use size_t to represent all object counts, and
7520 something like ptrdiff_t to represent signed differences of object
7521 counts; but that will require more code-cleanup than I have the
7522 time to do right now.
7523
7524 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7525 Use size_t, not int or short int, to count objects.
7526 * src/closure.c (nritemset, closure): Likewise.
7527 * src/closure.h (nritemset, closure): Likewise.
7528 * src/nullable.c (nullable_compute): Likewise.
7529 * src/print.c (print_core): Likewise.
7530 * src/print_graph.c (print_core): Likewise.
7531 * src/state.c (state_compare, state_hash): Likewise.
7532 * src/state.h (struct state): Likewise.
7533 * src/tables.c (default_goto, goto_actions): Likewise.
7534
7535 * src/gram.h (rule_number, rule): Use int, not short int.
7536 * src/output.c (prepare_rules): Likewise.
7537 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7538 errs, reductions): Likewise.
7539 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7540 Likewise.
7541 * src/tables.c (vector_number, tally, action_number,
7542 ACTION_NUMBER_MINIMUM): Likewise.
7543 * src/output.c (muscle_insert_short_int_table): Remove.
7544
efeed023
AD
75452004-12-17 Akim Demaille <akim@epita.fr>
7546
7547 * data/lalr1.cc: Extensive Doxygenation.
7548 (error_): Rename as...
7549 (error): this, since it is visible to the user.
7550 Adjust callers.
7551 (Parser::message): Now an automatic variable from...
7552 (Parser::yyreport_syntax_error_): here.
7553 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7554 Parser::error.
7555 * tests/input.at: Escape $.
7556
bc82c5a5
PE
75572004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7558
7559 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7560 Parenthesize rhs to avoid obscure problems with mistakes like
7561 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7562 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7563 b4_rhs_location): Likewise.
7564 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7565 b4_rhs_location): Likewise.
7566
fd19f271
AD
75672004-12-16 Akim Demaille <akim@epita.fr>
7568
7569 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7570 yacc.c: be sure to stay within yycheck_.
7571 * tests/actions.at: Re-enable C++ tests.
7572
10454ea4
AD
75732004-12-16 Akim Demaille <akim@epita.fr>
7574
7575 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7576 real.
7577
c5b95ccf
AD
75782004-12-16 Akim Demaille <akim@epita.fr>
7579
7580 Use #define to handle the %name-prefix.
7581
7582 * data/glr.c, data/yacc.c: Comment changes.
7583 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7584 so that one can refer to yylex in the parser file, and have it
7585 renamed, as is the case with other skeletons.
7586
617a8f12
AD
75872004-12-16 Akim Demaille <akim@epita.fr>
7588
7589 Move lalr1.cc internals into yy*.
7590
7591 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7592 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7593 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7594 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7595 (empty_, final_, terror_, errcode_, ntokens_)
7596 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7597 (looka_, ilooka_, error_range_, nerrs_):
7598 Rename as...
7599 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7600 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7601 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7602 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7603 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7604 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7605 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7606 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7607 these.
7608
1e547e6e
PE
76092004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7610
7611 Fix some problems reported by twlevo at xs4all.
7612 * src/symtab.c (symbol_new): Report an error if the input grammar
7613 contains too many symbols. This is better than calling abort() later.
7614 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7615 (struct node, struct graph):
7616 Rename member expand to stretch. All uses changed.
7617 (struct graph): Remove member layoutalgorithm. All uses removed.
7618 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7619 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7620 All uses changed.
7621 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7622
735d6bd4
AD
76232004-12-15 Akim Demaille <akim@epita.fr>
7624
7625 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7626 Add more Doxygen comments.
7627 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7628 (report_syntax_error_, translate_): Rename as...
7629 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7630 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7631
2e1f5829
AD
76322004-12-15 Akim Demaille <akim@epita.fr>
7633
7634 * data/lalr1.cc (lex_): Rename as...
7635 (yylex_): this.
7636 Move the trace here.
7637 Take the %name-prefix into account.
7638 Reported by Alexandre Duret-Lutz.
7639
a3cb6248
AD
76402004-12-15 Akim Demaille <akim@epita.fr>
7641
7642 Simplify the C++ parser constructor.
7643
7644 * data/lalr1.cc (debug_): Rename as...
7645 (yydebug_): so that the parser's internals are always in the yy*
7646 pseudo namespace.
7647 Adjust uses.
7648 (b4_parse_param_decl): Remove the leading comma as it is now only
7649 called as unique argument list.
7650 (Parser::Parser): Remove the constructor accepting a location and
7651 an initial debugging level.
7652 Remove from the other ctor the argument for the debugging level.
7653 (debug_level_type, debug_level, set_debug_level): New.
7654
7655 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7656 constructor calls.
7657
07fed891
AD
76582004-12-15 Akim Demaille <akim@epita.fr>
7659
7660 Remove b4_root related material: failure experiment
a3cb6248 7661 (which goal was to allow to derive from a class).
07fed891
AD
7662
7663 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7664 definitions and uses.
7665
e603eaa5
PE
76662004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7667
7668 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7669 not 2, since it's not portable to subtract 1 from the start of an
7670 array. The new item 0 is never set or used. All uses changed.
7671
7672 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7673 the default definition of YYLLOC_DEFAULT. Problem reported
7674 by Frank Heckenbach.
7675
fafb007d
PE
76762004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7677
7678 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7679 the normal case and one for the error case. Just use the
7680 first one uniformly. Problem reported by Frank Heckenbach.
7681 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7682 use exactly the same macro in both places.
7683 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7684 so that the normal-case YYRHSLOC works for the error case too.
7685 All uses changed.
7686 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7687 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7688 * doc/bison.texinfo (Location Default Action): Don't claim that
7689 we have an array of locations. Use the same macro for both glr
7690 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7691 the index is 0.
7692
48814dcd
PE
76932004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7694
a4e1a53b
PE
7695 * HACKING: Update email addresses to send announcements to.
7696
48814dcd
PE
7697 * configure.ac (AC_INIT): Bump version to 1.875f.
7698
337116ba
PE
76992004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7700
7701 * NEWS: Version 1.875e.
7702 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7703
7704 * src/scan-skel.l: Include "complain.h", for "fatal".
7705
7706 * src/relation.h (relation_print, relation_digraph):
7707 Relation sizes are of type relation_node, not size_t (this is
7708 merely a doc fix, since the two types are equivalent).
7709 (relation_transpose): Relation sizes are of type relation_node,
7710 not int.
7711 * src/relation.c: Likewise.
7712 (top, infinity): Now of type relation_node, not int.
7713 (traverse, relation_transpose): Use relation_node, not int.
7714
7715 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7716 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7717 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7718
7719 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 7720 specifying whether the test should be skipped. Use it tp
337116ba 7721 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 7722 fail on some hosts, and should be skipped.
337116ba 7723
da2a7671
PE
77242004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7725
7726 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7727 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7728 unless otherwise specified below.
7729
7730 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7731 to allocate kernel_base, kernel_items, kernel_size, since
7732 they needn't be initialized to 0.
7733 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7734 * src/closure.c (new_closure): Likewise, for itemset.
7735 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7736 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7737 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7738 (build_relations): Likewise for edge, states1, includes.
7739 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7740 * src/reader.c (packgram): Likewise, for ritem, rules.
7741 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7742 * src/relation.c (relation_digraph): Likewise for VERTICES.
7743 (relation_transpose): Likewise for new_R, end_R.
7744 * src/symtab.c (symbols_token_translations_init): Likewise for
7745 token_translations.
7746 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7747 (token_actions): Likewise for yydefact, actrow, conflrow,
7748 conflict_list.
7749 (save_column): Likewise for froms[symno], tos[symno].
7750 (goto_actions): Likewise for state_count.
7751 (pack_table): Likewise for base, pos, check.
7752 (tables_generate): Likewise for width.
7753
7754 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7755 for initial core. Just have a separate core, so we needn't worry
7756 about whether kernel_size and kernel_base are initialized.
7757
7758 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7759 kernel_size, kernel_items): Remove unnecessary initialization.
7760 * src/conflicts.c (conflicts): Likewise.
7761 * src/derives.c (derives): Likewise.
7762 * src/muscle_tablc (muscle_insert): Likewise.
7763 * src/relation.c (relation_digraph): Likewise.
7764 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7765 conflrow, conflict_table, conflict_list, table, check):
7766 Likewise.
7767
7768 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7769 This is because all callers pass unsigned int.
7770 * src/closure.h (new_closure): Likewise.
7771
7772 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7773 (build_relations): Initialize includes[i] in all cases.
7774 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7775 and rules[ruleno].precsym. Initialize members in order.
7776 * src/relation.c (relation_transpose): Always initialize new_R[i]
7777 and end_R[i].
7778 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7779
7780 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7781 conflict_list[0] was always 0, but now it isn't initialized.
7782
7783 * src/table.c (table_grow): When conflict_table grew, the grown
7784 area wasn't cleared. Fix this.
7785
7786 * lib/.cvsignore: Add strdup.c, strdup.h.
7787 * m4/.cvsignore: Add strdup.m4.
7788
00baeeac
PE
77892004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7790
7791 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7792 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7793 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7794 ngotos + 1 without checking for overflow.
7795 (build_relations): Use END_NODE, not -1, to denote end of edges.
7796 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7797 build_relations): Use goto_number, not int, for goto numbers.
7798 * src/tables.c (save_column, default_goto): Likewise.
7799
be3d9d42
AD
78002004-11-23 Akim Demaille <akim@epita.fr>
7801
7802 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7803 of #defining from yystype.
7804 Don't typedef yystype, C++ does not need it.
7805 This lets it possible to forward declare it as union.
7806
78e526d5
PE
78072004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7808
7809 * bootstrap (gnulib_modules): Add extensions.
7810 Problem reported by Jim Meyering.
7811
afbb696d
PE
78122004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7813
7814 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7815 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7816 src/system.h, src/tables.c: XFREE -> free, to accommodate
7817 recent change to gnulib xalloc.h.
78e526d5 7818 Problem reported by Jim Meyering.
afbb696d 7819
c1f8f16a
AD
78202004-11-17 Akim Demaille <akim@epita.fr>
7821
7822 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7823
db7e5eb5 78242004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
7825 Alexandre Duret-Lutz <adl@gnu.org>
7826
7827 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7828 changes.
7829 (YYCDEBUG): Adjust.
7830 Use it instead of cdebug_.
7831 (Parser::debug_stream, Parser::set_debug_stream): New.
7832 (Parser::symprint_): Define cdebug_ for temporary backward
7833 compatibility.
7834 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7835 debug_stream ().
7836
68e11668
AD
78372004-11-17 Akim Demaille <akim@epita.fr>
7838
7839 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7840 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7841 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7842 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7843
97cbc73e
PE
78442004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7845
7846 * data/glr.c (yyloc_default): Remove; not used.
7847 Problem reported by Frank Heckenbach.
7848
e342c3be
AD
78492004-10-25 Akim Demaille <akim@epita.fr>
7850
7851 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7852 Introduce another definition to address simple location arrays.
7853 (yyGLRStack): New member: yyerror_range.
7854 (yyrecoverSyntaxError, yyparse): Update it.
7855 (yyrecoverSyntaxError): Use it when shifting the error token to
7856 have an accurate range, equivalent to the one computed by both
7857 yacc.c and lalr1.cc.
7858 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7859 that column numbers start at column 0, as per GNU Coding
7860 Standards, the others tests, and the doc.
7861 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7862 Adjust to the above change (first column is 0).
7863 And adjust the location of the "<error>", now covering the whole
7864 line.
7865
93602feb 78662004-10-22 Akim Demaille <akim@epita.fr>
04098407 7867 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
7868
7869 Remove some arbitrary limits on goto numbers and relations.
7870 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7871 initial values, since they're never used.
7872 (set_goto_map): ngotos is now unsigned, so test for overflow
7873 by seeing whether it wraps around to zero.
7874 * src/lalr.h (goto_number): Now size_t, not short int.
7875 (GOTO_NUMBER_MAXIMUM): Remove.
7876 * src/relation.c (relation_print, traverse, relation_transpose):
7877 Check for END_NODE rather than looking at sign.
7878 * src/relation.h (END_NODE): New macro.
7879 (relation_node): Now size_t, not short int.
7880
dba08b04
PE
78812004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7882
7883 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7884 keyword, not an identifier. Problem reported by Baron Schwartz in
7885 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7886
df09ef2e
AD
78872004-10-11 Akim Demaille <akim@epita.fr>
7888
7889 * src/symtab.c (symbol_check_alias_consistency): Also check
7890 type names, destructors, and printers.
7891 Reported by Alexandre Duret-Lutz.
7892 Recode the handling of associativity and precedence in terms
7893 of symbol_precedence_set.
7894 Accept no redeclaration at all, not even equal to the previous
7895 value.
7896 (redeclaration): New.
7897 Use it to factor redeclaration complaints.
7898 (symbol_make_alias): Don't set the type of the alias, let
7899 symbol_check_alias_consistency do it as for other features.
7900 * src/symtab.h (symbol): Add new member prec_location, and
7901 type_location.
7902 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7903 * tests/input.at (Incompatible Aliases): New.
7904
146bc99d
PE
79052004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7906
7907 .cvsignore fixes to accommodate gnulib changes,
7908 and the practice of naming build directories "_build".
7909 * .cvsignore: Add "_*". Sort.
7910 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7911 * m4/.cvsignore: Add "*_gl.m4".
7912
e503aa60
AD
79132004-10-06 Akim Demaille <akim@epita.fr>
7914
7915 * src/parse-gram.y (add_param): Fix the truncation of trailing
7916 spaces.
7917
b4a20338
AD
79182004-10-05 Akim Demaille <akim@epita.fr>
7919
7920 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7921 whether the reducion was empty or not. This leaves room to
7922 improve the use of YYLLOC_DEFAULT in such a case.
7923 lalr1.cc is still experimental, so changing this is acceptable.
7924 And finally, there are probably not many users who changed the
7925 handling of locations in GLR, so changing is admissible too.
7926
7927 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7928 empty reduction, set @$ to an empty location ending the previously
7929 stacked symbol.
7930 Adjust uses to make sure the code is triggered on empty
7931 reductions.
7932 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7933 expected output: empty reductions have empty locations.
7934
f85a5e6f
AD
79352004-09-29 Akim Demaille <akim@epita.fr>
7936
7937 * data/lalr1.cc: Move towards a more standard C++ coding style
7938 for templates: Class < T > -> Class<T>.
7939
b203fc2c
AD
79402004-09-29 Akim Demaille <akim@epita.fr>
7941
7942 * data/lalr1.cc: Reinstall the former ctor, for sake of
7943 compatibility, but warn it will be removed.
7944 Move towards a more standard C++ coding style (i.e., type *var ->
7945 type* var).
7946
5b7e1e73
PE
79472004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7948
3fee967f
PE
7949 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7950 since it's less likely to work if NULs are involved in the future.
5b7e1e73 7951
0dcca5c2
AD
79522004-09-27 Akim Demaille <akim@epita.fr>
7953
7954 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7955
6dde1c82
AD
79562004-09-27 Akim Demaille <akim@epita.fr>
7957
7958 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 7959 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
7960 and argument names.
7961 (b4_cc_constructor_call): Likewise.
7962
b233d555
AD
79632004-09-24 Akim Demaille <akim@epita.fr>
7964
7965 * src/parse-gram.y (add_param): Strip the leading and trailing
7966 blanks from a formal argument declaration.
7967 (YY_LOCATION_PRINT): New.
7968
619404e3
AD
79692004-09-24 Akim Demaille <akim@epita.fr>
7970
7971 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7972 after the location.
7973
dd8d9022
AD
79742004-09-24 Akim Demaille <akim@epita.fr>
7975
7976 * doc/bison.texinfo (Table of Symbols): Sort.
7977
0092f063
AD
79782004-09-21 Akim Demaille <akim@epita.fr>
7979
7980 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7981 the useless parentheses.
7982 Suggested by Paul Eggert.
7983
451364ed
AD
79842004-09-20 Akim Demaille <akim@epita.fr>
7985
7986 Let the initial-action act on the look-ahead, and use it for the
7987 "initial push" (corresponding to an hypothetical beginning-of-file).
7988 And let lalr1.cc honor %initial-action.
7989
7990 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7991 example.
7992 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7993 (Parser::Parser): Remove the ctor that used to initialize it.
7994 (Parser::parse): Like in the other skeletons, issue the "starting
7995 parse" message before any action.
7996 Honor %initial-action.
7997 Initialize the stacks with the lookahead.
7998 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7999 look-ahead.
8000 Push them in the stacks.
8001 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8002
18d192f0
AD
80032004-09-20 Akim Demaille <akim@epita.fr>
8004
8005 * doc/bison.texinfo (Initial Action Decl): New.
8006
b8458aa5
AD
80072004-09-20 Akim Demaille <akim@epita.fr>
8008
8009 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8010 clearer criterion to define it.
8011 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8012 When reducing on an empty RHS, use the latest stacked location as
8013 location.
8014 yylloc is not always available.
8015 * data/glr.c: Likewise.
8016 Also, honor initial-actions.
8017
3fc16193
AD
80182004-09-20 Akim Demaille <akim@epita.fr>
8019
8020 * data/yacc.c (YY_LOCATION_PRINT): New.
8021 Define when we know YYLTYPE's structure, i.e., when the default
8022 YYLLOC_DEFAULT is used.
8023 * data/c.m4 (b4_yysymprint_generate): Use it.
8024 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8025 value of the result.
8026 (error_start_): Replace with...
8027 (error_range_): this location array.
8028 This allows to replace code relying on the implementation of
8029 locations by portable code.
8030 * data/yacc.c (yylerrsp): Replace with...
8031 (yyerror_range): this.
8032 Every time a token is popped, update yyerror_range[0], to have an
8033 accurate location for the error token.
8034 * data/glr.c (YY_LOCATION_PRINT): New.
8035 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8036 deference a pointer.
8037 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8038 report the location in %printers.
8039
8040 * src/scan-skel.l: Instead of abort, report error messages to ease
8041 understanding skeleton scanning failures.
8042
ecfe33e7
AD
80432004-09-16 Akim Demaille <akim@epita.fr>
8044
8045 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8046 (iterator, const_iterator): these, to be more in the C++ spirit.
8047 Also, return reverse iterators so that when displaying the stack
8048 we display its bottom first.
8049 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8050 from yacc.c.
8051 We should probably use vector here though.
8052
1576d44d
AD
80532004-09-16 Akim Demaille <akim@epita.fr>
8054
8055 Have more complete shift traces.
8056
8057 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8058 to report Shifts instead of ad hoc YYDPRINTF invocations,
8059 including for the error token.
8060 * data/lalr1.cc (symprint_): Output the location.
8061 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8062 output the location within the %printer.
8063 Activate GLR tests, at least to make sure they compile properly.
8064 They still don't pass though.
8065 * tests/calc.at: Adjust expect verbose output, since now "Entering
8066 state..." is on a different line than the "Shifting" message.
8067
9c66f418
AD
80682004-09-08 Akim Demaille <akim@epita.fr>
8069
8070 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8071 Bison directive from the Bison file to the invocation of this
8072 macro, so that these directives are passed to
8073 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8074 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8075 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8076 the extra Bison directives instead of the whole series.
8077 Change the grammar so that there are recoverable errors, and
8078 unrecoverable errors. Now we can have the parser give up before
8079 consuming the whole input. As a result we now can observe that
8080 the lookahead is freed when needed.
8081 Change the parser source to parse argv[1] instead of a hard coded
8082 string.
8083 Simplify yylex, and give a value and location to EOF.
8084 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8085 passed directives already coded in the file.
8086 Add some tests to check the location of "error".
8087 For some tests, the C++ parser is correct, and not yacc.c.
8088 For other tests, they provide different, but unsatisfying, values,
8089 so keep the C++ value so that at least one parser is "correct"
8090 according to the test suite.
8091 (Actions after errors): Remove, this is subsumed by the
8092 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8093
52d5733f
AD
80942004-09-06 Akim Demaille <akim@epita.fr>
8095
8096 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 8097 (Parser::pop): New.
52d5733f
AD
8098 Use it.
8099
a0e68930
AD
81002004-09-06 Akim Demaille <akim@epita.fr>
8101
8102 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8103 argument, an informative message.
8104 Call YY_SYMBOL_PRINT.
8105 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8106 * data/lalr1.cc (destruct_): Likewise.
8107 In addition, no longer depend on b4_yysymprint_generate and
8108 b4_yydestruct_generate to generate these functions, do it "by
8109 hand".
8110
e757bb10
AD
81112004-09-03 Akim Demaille <akim@epita.fr>
8112
8113 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8114 invoked, yydestruct the lookahead.
8115 * tests/calc.at (Calculator $1): Update the expected lengths of
8116 traces: there is an added line for the discarded lookahead.
8117 * doc/bison.texinfo (Destructor Decl): Some rewording.
8118 Define "discarded" symbols.
8119
0fe1f06d
AD
81202004-09-02 Akim Demaille <akim@epita.fr>
8121
8122 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8123
284acc8b
AD
81242004-09-02 Akim Demaille <akim@epita.fr>
8125
8126 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8127 (YYDSYMPRINTF): Rename as...
8128 (YY_SYMBOL_PRINT): this.
8129 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8130 two.
8131 Use it instead of direct symprint_ calls.
8132 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8133 one.
8134
a5eb1ed2
AD
81352004-09-02 Akim Demaille <akim@epita.fr>
8136
b7c72fe1
AD
8137 * data/lalr1.cc (b4_yysymprint_generate): New.
8138 (symprint_): New member function, defined when YYDEBUG.
8139 Use it consistently instead of token/nterm debugging output by
8140 hand.
a5eb1ed2
AD
8141 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8142 %printer calls to use cdebug_ when using lalr1.cc.
8143
417141dd
AD
81442004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8145
8146 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8147 with #ifdef YYDEBUG.
8148
2fa09258
AD
81492004-08-26 Akim Demaille <akim@epita.fr>
8150
8151 * doc/bison.texinfo (Implementing Loops): Rename as...
8152 (Implementing Gotos/Loops): this.
8153
9378b508
PE
81542004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8155
8156 Adjust to latest gnulib.
8157 * bootstrap (gnulib_modules): Add xalloc-die.
8158 Set LC_ALL=C so that file names sort consistently.
8159 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8160 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8161 uintmax_t.m4, ulonglong.m4.
8162 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8163 po.m4 since we are now using _gl.m4 instead.
8164
87a8ad5c
PE
81652004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8166
8167 * src/scan-action.l: Remove. Scanning of semantic actions is
8168 handled in scan-gram.l.
8169
dca81a78
PE
81702004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8171
8172 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8173
8174 * src/location.h (struct): The file member is a uniqstr.
8175 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8176
c9cbf7c5
PE
81772004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8178
8179 Fix bug with non-%union parsers that have printers or destructors,
8180 which led to a Bison core dump. Reported by Peter Fales in
8181 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 8182
c9cbf7c5
PE
8183 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8184 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8185 not to our own type.
8186 * src/output.c (symbol_destructors_output, symbol_printers_output):
8187 Don't assume %union.
8188 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8189 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8190 UNION-FLAG. All callers changed.
8191 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8192 Use type char, not unsigned int, when declaring an array of char;
8193 this lets us remove a cast.
8194 (Printers and Destructors): Add non-%union test cases.
8195
fa7e68c3
PE
81962004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8197
8198 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8199 GLR writeups. E.g., avoid frenchspacing and the future tense,
8200 change "lookahead" to "look-ahead", and change "wrt" to "with
8201 respect to".
2fa09258 8202
fa7e68c3
PE
82032004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8204
8205 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8206 New sections, split off from the GLR Parsers section. Put the new
8207 Simple GLR Parser near the start of the GLR section, for clarity.
8208 Rewrite connective text.
8209
99a9344e
PE
82102004-06-21 Frank Heckenbach <frank@g-n-u.de>
8211
8212 * doc/bison.texinfo (Simple GLR Parsers): New section.
8213
8dd162d3
PE
82142004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8215
8216 * NEWS, TODO, doc/bison.texinfo:
8217 Use "look-ahead" instead of "lookahead", to be consistent.
8218 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8219 while we're fixing "look-ahead".
8220 * src/conflicts.c (shift_set): Renamed from shiftset.
8221 (look_ahead_set): Renamed from lookaheadset.
8222 * src/print.c: Likewise.
8223 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8224 name for "lookahead".
8225 (report_types, usage): Likewise.
8226 * src/getargs.h (report_look_ahead_tokens): Renamed from
8227 report_lookaheads.
8228 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8229 compute_lookaheads.
8230 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8231 (look_ahead_tokens_print): Renamed from lookaheads_print.
8232 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8233 state_rule_lookaheads_print.
8234 * src/state.h: Likewise.
8235 (reductions.look_ahead_tokens): Renamed from lookaheads.
8236 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8237 AT_DATA_LOOKAHEADS_GRAMMAR.
8238
57a90331
PE
82392004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8240
8241 * README: Update location of patched M4 distribution.
8242
8ed3234a
PE
82432004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8244
8245 Don't assume the C++ compiler takes the same arguments as the C compiler
8246 (trivial change).
8247 * configure.ac (O0CXXFLAGS): New var.
8248 * tests/atlocal.in (CXXFLAGS): Use it.
8249
07971983
PE
82502004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8251
8252 Fix some "make check" problems with C++ reported by
8253 Albert Chin-A-Young for Tru64 C++ in this thread:
8254 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8255
8256 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8257 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8258 Output to a .cc file for C++, not to a .c file.
8259 * tests/calc.at (AT_CHECK_CALC): Likewise.
8260 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8261 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8262
29058652
PE
82632004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8264
8265 * tests/calc.at, tests/actions.at: Workaround for SGI
8266 C++ compiler. (trivial change)
8267
62cb8a99
PE
82682004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8269
fd418816
PE
8270 Spent a few hours checking out which prerequisite versions the
8271 current sources actually require. I went all the way back to
8272 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8273 a seemingly endless set of combinations of versions more recent
8274 than that. The bottom line is that the current sources require
8275 fairly recent versions of the build tools, and it'll be some work
8276 to change this.
8277 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8278 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8279 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8280 Add comments explaining why those particular versions are
8281 currently needed.
2fa09258 8282
62cb8a99
PE
8283 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8284 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 8285 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
8286
8287 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8288 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8289
caa52c10
PE
82902004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8291
8292 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8293 0.11.5. Suggested by Bruno Haible.
8294 * bootstrap: Remove gettext version checking.
8295
8296 * doc/bison.texinfo (Decl Summary): Also mention that %union
8297 can depend on prerequisite types. Problem reported by Tim
8298 Van Holder.
8299
4bfd5e4e
PE
83002004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8301
2cef3017
PE
8302 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8303 * README-alpha: Don't tell people not to package this.
8304
b9c85d5c
PE
8305 * bootstrap: Don't assume $(...) works; use `...` instead.
8306 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8307 gettext better.
8308
4bfd5e4e
PE
8309 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8310 put into the -d output file, and mention what to do if YYSTYPE is
8311 defined as a macro.
8312
6a36ff94
PE
83132004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8314
6712933e
PE
8315 Undo change made earlier today: it caused autopoint to not bring
8316 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8317 autopoint's.
8318
8319 * bootstrap: Check that gettext version matches what's in
8320 configure.ac. Warn users to ignore robots.txt ERROR 404.
8321 * bootstrap: Undo today's earlier change (logged below).
8322 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 8323
6a36ff94
PE
8324 The gettext version checking is causing more trouble than it's
8325 curing; remove it. Problem reported by Paul Hilfinger.
8326
8327 * bootstrap: Issue a warning that one can expect a message
8328 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8329 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8330
209ea708
PE
83312004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8332
8333 Ensure that the C++ compiler used for testing actually works on a
8334 simple test program; if not, skip the C++-related tests. Problem
8335 reported by Vin Shelton in:
161a71f3 8336 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
8337
8338 * m4/cxx.m4: New file.
8339 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8340 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8341 * tests/local.at (AT_COMPILE_CXX): Use it.
8342
41ca2549
PE
83432004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8344
383e69dc
PE
8345 * data/glr.c (yylloc): Output this macro even if locations are not
8346 being generated, as the GLR parser needs it even in that case.
8347 Problem reported by Troy A. Johnson
8348 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8349
41ca2549
PE
8350 * configure.ac (AC_INIT): Update to 1.875e.
8351
e476c87d
PE
83522004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8353
8354 * NEWS: Version 1.875d.
8355 * configure.ac (AC_INIT): Likewise.
8356 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8357
8358 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8359 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8360 lalr1.cc runs afoul of the first, and the last two are no longer
8361 supported by GCC 3.4.0.
8362 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8363 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8364
233a88ad
PE
83652004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8366
8367 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8368 unsigned int, for compatibility with latest gnulib hash module.
8369 * src/state.c (state_hash, state_hasher): Likewise.
8370 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8371 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 8372
12ffdd28
PE
83732004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8374
8375 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8376
8377 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8378 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8379 character and string literals.
8380 (unexpected_end): New function.
8381 (unexpected_eof): Use it.
8382 (unexpected_newline): New function.
8383 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8384 actions.
e476c87d 8385
12ffdd28
PE
8386 * NEWS: Document %expect-rr.
8387
8388 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8389 Fix typo by replacing $1 with $option.
8390 Remove more 'intl'-related files.
9668e2be 8391 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
8392
8393 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8394 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8395 strtoul.c.
8396 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8397 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8398 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8399 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8400 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8401 * src/.cvsignore: Add *.output.
8402
8403 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8404 gets copied to the output file.
e476c87d 8405
1f65350a
PE
84062004-04-28 Paul Eggert <eggert@twinsun.com>
8407
8408 Get files from the gnulib and po repositories, instead of relying
8409 on them being in our CVS. Upgrade to latest versions of gnulib
8410 and Automake.
8411
8412 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8413 * bootstrap: Bootstrap from gnulib and po repositories.
8414 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8415 * README-cvs: Document these changes. Remove version numbers from
8416 mentions of build tools, since they change so often. Mention Flex.
8417
8418 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8419 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
8420 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8421 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 8422 does this for us.
12ffdd28
PE
8423 (AC_ISC_POSIX): Remove; we no longer support this
8424 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
8425 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8426 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8427 Do not check for C89 headers, except for locale.h which is used
8428 by the Yacc library and must port to K&R hosts.
8429 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8430 Do not check for C89 functions, except for setlocale which is
8431 used by the Yacc library.
8432 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8433 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8434 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8435 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8436 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8437 AM_GNU_GETTEXT): Remove; now done by:
8438 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8439 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8440 for us.
8441
8442 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8443 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8444 Define to empty, as gnulib.mk will do the rest for us.
8445 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8446 for us.
8447 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8448 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8449
8450 * src/files.c: Include gnulib's xstrndup.h.
8451
8452 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8453 (REALLOC): Use xnrealloc, for likewise.
8454 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8455 (strnlen, memrchr): Remove decls; functions no longer used.
8456 Include <stpcpy.h>.
8457
8458 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8459 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8460 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8461 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8462 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8463 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8464 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8465 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8466 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8467 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8468 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8469 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8470 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8471 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8472 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8473 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8474 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8475 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8476 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8477 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8478 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8479 Remove, as these files are now generated automatically
8480 by bootstrap or automake.
8481
8482 * po/ChangeLog: Remove: all but one entry was a duplicate
8483 of this file, and I moved that 2000-11-02 entry here.
8484
8485 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8486 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8487 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8488 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8489 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8490 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8491 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8492 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8493 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8494 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8495 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8496 xstrndup.h.
8497 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8498 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8499 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8500 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8501 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8502 * src/.cvsignore: Remove *_.c.
8503
8504
8505 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8506 support it. (The latest stable gzip doesn't.)
8507
85082004-04-27 Paul Eggert <eggert@twinsun.com>
8509
8510 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8511 case, as stos_ is now used by destructors due to the 2004-02-09
8512 change.
8513
8514 Remove more K&R C support.
8515 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8516 * lib/subpipe.c (errno): Remove decl.
8517 Include <stdlib.h> unconditionally.
8518 (EXIT_FAILURE): Remove macro.
8519 * src/complain.c (vfprintf, strerror): Remove.
8520 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8521 unconditionally.
8522 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8523 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8524 (strchr, strspn, memchr): Remove decls.
8525 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8526 unconditionally. Do not declare perror.
8527 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8528 unconditionally.
8529
8530 * src/complain.c (_): Remove useless defn, as system.h defines this.
8531
8532 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8533 with latest obstack.h.
8534 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8535 to procedure types, as obstack.h now does that for us.
8536 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8537
8538 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8539 so that this include file can stand alone.
8540 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8541 does this now. Include subpipe.h first after config.h, to
8542 test whether it can stand alone.
8543
8544 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8545 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8546 unused declaration.
8547
8548 * tests/synclines.at (%union synch line): Put a dummy member in
8549 the union, because empty unions aren't allowed in C. Caught
8550 by GCC 3.4.0.
8551
4f16766c
PE
85522004-04-13 Jim Meyering <jim@meyering.net>
8553
8554 * src/conflicts.c (conflicts_print): Correct format string typo:
8555 use `%%' to produce literal `%'. (trivial change)
8556
779e7ceb
PE
85572004-03-30 Paul Eggert <eggert@twinsun.com>
8558
8559 * src/getargs.c (version): Update copyright year to 2004.
8560
8561 * data/c.m4 (b4_int_type): Use 'short int' rather than
8562 'short', and similarly for 'long', 'unsigned', etc.
8563 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8564 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8565 yy_yypstack, yydumpstack): Likewise.
8566 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8567 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8568 Likewise.
8569 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8570 yy_stack_print, yyparse): Likewise.
8571 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8572 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8573 * lib/bitset.c (bitset_print): Likewise.
8574 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8575 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8576 * lib/bitsetv.c (bitsetv_dump): Likewise.
8577 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8578 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8579 Likewise.
8580 * src/LR0.c (allocate_itemsets): Likewise.
8581 * src/gram.h (rule_number, rule): Likewise.
8582 * src/lalr.h (goto_number): Likewise.
8583 * src/nullable.c (nullable_compute): Likewise.
8584 * src/output.c (prepare_rules): Likewise.
8585 * src/relation.c (relation_print, relation_digraph): Likewise.
8586 * src/relation.h (relation_node): Likewise.
8587 * src/state.h (state_number, transitions, errs, reductions,
8588 struct state): Likewise.
8589 * src/symtab.h (symbol_number, struct symbol): Likewise.
8590 * src/tables.c (vector_number, tally, action_number,
8591 default_goto, goto_actions): Likewise.
8592 * tests/existing.at (GNU Cim Grammar): Likewise.
8593 * tests/regression.at (Web2c Actions): Likewise.
8594
8595 * src/output.c (muscle_insert_short_int_table): Renamed from
8596 muscle_insert_short_table. All uses changed.
8597
d6328241
PH
85982004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8599
8600 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8601 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8602 Add %expect-rr rule.
4f16766c 8603
d6328241
PH
8604 * src/scan-gram.l: Recognize %expect-rr.
8605
4f16766c 8606 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 8607 expected_conflicts.
4f16766c 8608 (expected_rr_conflicts): Declare.
d6328241
PH
8609
8610 * src/conflicts.c (expected_sr_conflicts): Rename from
8611 expected_conflicts.
8612 (expected_rr_conflicts): Define.
8613 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8614 for GLR parsers.
8615 Use expected_sr_conflicts in place of expected_conflicts.
8616 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 8617
d6328241 8618 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 8619
1452af69
PE
86202004-03-08 Paul Eggert <eggert@gnu.org>
8621
8622 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 8623 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
8624
8625 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8626 in lalr1.cc.
8627 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8628 * src/scan-gram.l (scan_integer): New function.
8629 ({int}): Use it.
8630 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8631 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8632 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8633 Say "long int", not "long", for uniformity with GNU style.
8634
006d217d
PE
86352004-02-25 Paul Eggert <eggert@twinsun.com>
8636
8637 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8638 compilers. This fixes a problem with Intel's C++ compiler being
8639 chatty, reported by Guido Trentalancia in
161a71f3 8640 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 8641
c2729758
ADL
86422004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8643
8644 Support %destructor and merge error locations in lalr1.cc.
8645
8646 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8647 (Parser::stos_): Define unconditionally.
8648 (Parser::destruct_): New method. Generate its body with
8649 b4_yydestruct_generate.
8650 (Parser::error_start_): New attribute.
8651 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8652 token which are discarded.
8653 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8654 error_start_ when erroneous token are discarded.
8655 (Parser::parse) <yyerrlab1>: Compute the location of the error
8656 token so that it covers all the discarded tokens.
8657 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8658 it can be called with `%skeleton "lalr1.cc"', and do that.
8659
dd0e0635
PE
86602004-02-02 Paul Eggert <eggert@twinsun.com>
8661
8662 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8663 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8664 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8665 There's no need to mention top_builddir since Automake does that
8666 for us.
8667 (INCLUDES): Remove, as Automake says it's obsolescent.
8668 Contents migrated into AM_CPPFLAGS as described above.
8669 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8670
86712004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8672
8673 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8674 (yyreportSyntaxError): Handle case where lookahead token is
8675 YYEMPTY.
8676
be16239b
PH
86772004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8678
8679 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8680 resulting parsers are compilable with C++.
8681
5fa90832
PE
86822003-12-23 Paul Eggert <eggert@twinsun.com>
8683
8684 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8685 * src/output.c (output_skeleton): Rename local var.
8686 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8687 Bison tokens, as this runs afoul of the 2003-10-07 change that
8688 disallowed NUL bytes in character constants or string literals.
8689
8690 * tests/local.at: Require Autoconf 2.59's Autotest.
8691 * tests/testsuite.at: Don't include local.at, since we now assume
8692 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8693 including it.
8694 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8695 multiple inclusion warnings.
dd0e0635 8696
b165c324
AD
86972003-12-02 Akim Demaille <akim@epita.fr>
8698
8699 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8700 conditions.
8701 From Bruno Haible.
8702
26e06a21
ADL
87032003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8704
8705 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8706
92ac3705
PE
87072003-10-07 Paul Eggert <eggert@twinsun.com>
8708
6a5ecb38
PE
8709 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8710 if testsuite doesn't exist.
8711
92ac3705
PE
8712 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8713 literals, unfortunately.
8714 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8715 Complain about NUL bytes in character constants or string literals.
8716
91d2c560
PE
87172003-10-05 Paul Eggert <eggert@twinsun.com>
8718
8719 * NEWS: Don't document %no-default-prec, as it's still
8720 too experimental.
8721 * doc/bison.texinfo: Document %no-default-prec only if
8722 the defaultprec flag is set. Normally it's not.
8723
0cc3da3a
PE
87242003-10-04 Paul Eggert <eggert@twinsun.com>
8725
8726 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8727 non-modifiable lvalue, instead of a modifiable one.
8728 * doc/bison.texinfo (Actions): Document that $$ can
8729 be assigned to. Do not claim that $$ and $N are
8730 array element references: user code should not rely on this.
8731
22fccf95
PE
87322003-10-01 Paul Eggert <eggert@twinsun.com>
8733
8734 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8735 (grammar_declaration): Use it.
8736 * src/scan-gram.l: New token %no-default-prec.
8737 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8738 * NEWS, doc/bison.texinfo: Document the above.
8739
fc8f2965
AD
87402003-10-01 Akim Demaille <akim@epita.fr>
8741
8742 VCG no longer supports long_straight_phase.
8743
8744 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8745 * src/print_graph.c (print_graph): Adjust.
8746
39a06c25
PE
87472003-09-30 Frank Heckenbach <frank@g-n-u.de>
8748 and Paul Eggert <eggert@twinsun.com>
8749
8750 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8751 Table of Symbols): Document %default-prec.
8752 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8753 (grammar_declaration): Set default_prec on %default-prec.
8754 * src/scan-gram.l (%default-prec): New token.
8755 * src/reader.h (default_prec): New flag.
8756 * src/reader.c: Likewise.
8757 (packgram): Handle it.
8758 * tests/conflicts.at (%default-prec without %prec,
8759 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 8760
39a06c25
PE
87612003-09-30 Paul Eggert <eggert@twinsun.com>
8762
8763 * tests/testsuite.at: Include local.at, not input.at, fixing
8764 a typo in the 2003-08-25 patch.
8765
62b6aef9
AD
87662003-08-27 Akim Demaille <akim@epita.fr>
8767
8768 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8769 GCC warnings.
8770
89e1cc61
AD
87712003-08-26 Akim Demaille <akim@epita.fr>
8772
8773 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8774 "<\#" to avoid magic from Gnus when posting parts of this script.
8775
a08460b0
AD
87762003-08-26 Akim Demaille <akim@epita.fr>
8777
8778 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8779 (Parser::parse): here.
8780 Adjust: nerrs and errstatus is now replaced by...
8781 (Parser::nerrs_, Parser::errstatus_): New.
8782
603f1cfd
AD
87832003-08-25 Akim Demaille <akim@epita.fr>
8784
8785 * config/announce-gen, Makefile.cfg: New.
8786 * Makefile.am: Adjust.
8787 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8788 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8789
cd3684cf
AD
87902003-08-25 Akim Demaille <akim@epita.fr>
8791
8792 When reducing initial empty rules, Bison parser read an initial
8793 location that is not defined. This results in garbage, and that
8794 affects Bison's own parser. Therefore we need (i) to extend Bison
8795 to support a means to initialize this location, and (ii) to use
8796 this CVS Bison to fix CVS Bison's parser.
8797
8798 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8799 with...
8800 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8801 * src/parse-gram.y: Adjust.
8802 (%initial-action): New.
8803 (%error-verbose): Since we require CVS Bison, there is no reason
8804 not to use it.
8805 * src/scan-gram.l: Adjust.
8806 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8807 * data/yacc.c (yyparse): Use b4_initial_action.
8808
4e03e201
AD
88092003-08-25 Akim Demaille <akim@epita.fr>
8810
8811 * doc/bison.texinfo: Don't promote stdout for error messages.
8812
8c182d05
AD
88132003-08-25 Akim Demaille <akim@epita.fr>
8814
8815 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8816 From Alexandre Duret-Lutz.
8817
6a60c4cf
PE
88182003-08-25 Akim Demaille <akim@epita.fr>
8819
8820 Version 1.875c.
8821
25f66e1a
AD
88222003-08-25 Akim Demaille <akim@epita.fr>
8823
8824 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8825 Use them.
8826
5348bfbe
AD
88272003-08-25 Akim Demaille <akim@epita.fr>
8828
8829 * data/lalr1.cc (Parser::reduce_print_): New.
8830 Use it.
8831
47301314
AD
88322003-08-25 Akim Demaille <akim@epita.fr>
8833
8834 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8835 error recovery loops. This patch is based on
161a71f3 8836 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
8837 Also, augment the similarity between lalr1.cc and yacc.c.
8838 Note: the locations of error recovery rules are not correct yet.
8839
8840 * data/lalr1.cc: Comment changes to augment the similarity between
8841 lalr1.cc and yacc.c.
8842 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8843 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8844 yyerrlab), when hitting EOF, pop the whole stack here instead of
8845 merely falling thru the default error handling mechanism.
8846 (yyerrorlab): New label, with the old contents of YYERROR,
8847 plus the following change: pop the stack of rhs corresponding
8848 to the production that invoked YYERROR. That is how Yacc
8849 behaves (required by POSIX).
8850 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8851 fail.
8852
1f7a61ff
AD
88532003-08-25 Akim Demaille <akim@epita.fr>
8854
8855 Tune local.at so that people can "autom4te -l autotest calc.at -o
8856 calc" for instance, to extract a sub test suite.
8857
8858 * tests/testsuite.at: Move the initialization, Autotest version
8859 requirement, and AT_TESTED invocation into...
8860 * tests/local.at: here.
8861 * tests/testsuite.at: Include it for compatibility with Autoconf
8862 2.57.
8863 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8864 be ignore.
8865
327b5b56
PE
88662003-08-04 Paul Eggert <eggert@twinsun.com>
8867
8868 Rework code slightly to avoid gcc -Wtraditional warnings.
8869 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8870 The returned value is now stored in *YY0. All callers changed.
8871 * src/output.c (merge_output): Adjust to the above change.
8872
0051e3ed
PE
88732003-07-26 Paul Eggert <eggert@twinsun.com>
8874
8875 * data/glr.c (YYASSERT): New macro.
8876 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8877 yyresolveStates, yyprocessOneStack):
8878 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8879 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 8880
137437c6
PE
88812003-07-25 Paul Eggert <eggert@twinsun.com>
8882
5b620e06
PE
8883 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8884 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 8885 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
8886 by Frank Heckenbach, though I have omitted the structure-initialization
8887 part of his glr-knr.diff patch since I recall that the Portable
8888 C Compiler didn't require that change.
8889
137437c6
PE
8890 Let the user specify how to allocate and free memory.
8891 Derived from a suggestion by Frank Heckenbach in
161a71f3 8892 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
8893 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8894 All uses of free, malloc, realloc changed to use these macros,
8895 and unnecessary casts removed.
8896 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8897
ddb85ca5
PE
88982003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8899
8900 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8901 use s.empty() rather than s == "" to test for empty string; see
161a71f3 8902 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
8903 (trivial change)
8904
39910e09
AD
89052003-06-25 Akim Demaille <akim@epita.fr>
8906
8907 * config/depcomp, config/install-sh: Update from masters.
8908
0ae99356
PE
89092003-06-20 Paul Eggert <eggert@twinsun.com>
8910
8911 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8912 and return properly parenthesized result.
8913 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8914 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8915 Remove unnecessary parentheses from uses.
8916 * doc/bison.texinfo (Location Default Action): Describe the
8917 conventions for parentheses.
8918
cd05d13c
PE
89192003-06-19 Paul Eggert <eggert@twinsun.com>
8920
81fd08ca
PE
8921 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8922 yyreportTree): Do not assume that size_t is the same width as int,
8923 when printing sizes. Print sizes using an unsigned format.
8924 Problem reported by Frank Heckenbach in
161a71f3 8925 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 8926
cd05d13c
PE
8927 Port to Forte Developer 7 C compiler.
8928 * data/glr.c (struct YYLTYPE): If locations are not being used,
8929 declare a single dummy member, as empty structs do not conform
8930 to the C standard.
8931 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8932 the Forte Developer 7 C compiler complains that end-of-loop
8933 code is not reached.
8934
4dcf140b
PE
89352003-06-17 Paul Eggert <eggert@twinsun.com>
8936
8937 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8938 avoid warnings from picky compilers about redefinition of PARAMS.
8939
8dd76bee
PE
89402003-06-17 Paul Eggert <eggert@twinsun.com>
8941
8942 Version 1.875b.
8943
8944 * NEWS: Document 1.875b.
8945
8946 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8947 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8948 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8949 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8950 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8951 per recent gettext manual's suggestion.
8952 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8953 Use prototypes, not old-style definitions.
8954 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8955 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8956 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8957 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8958 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8959 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8960 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8961 vbitset_or_and_cmp, vbitset_copy): Likewise.
8962
8963 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8964 Do not include <stdlib.h>.
8965 (PARAMS): Define unconditionally for C89.
8966 (ATTRIBUTE_NORETURN): Remove.
8967 (ATTRIBUTE_UNUSED): Define unconditionally.
8968
8969 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 8970 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
8971 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8972 * lib/vbitset.c, lib/vbitset.h: New files.
8973 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8974 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8975 from libbitset.
8976
8977 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8978 `How Can I Reset @code{yyparse}', since texinfo does not allow
8979 arbitrary @ in node names.
8980
8981 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8982 shouldn't be needed according to the gettext 0.12.1 documentation
8983 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 8984 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 8985 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 8986 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 8987
8dd76bee
PE
8988 * lib/.cvsignore: Add stdbool.h.
8989 * m4/.cvsignore: Add nls.m4, po.m4.
8990
8991 Upgrade to CVS gnulib.
8992 * stdbool_.h: File renamed from stdbool.h.in.
8993 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8994 AC_HEADER_STDBOOL.
8995 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8996 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8997 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8998 (MOSTLYCLEANFILES): New var.
8999 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9000 (stdbool.h): New rule.
9001 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9002 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9003 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9004 m4/quote.m4: Upgrade to today's gnulib.
9005
9006 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9007 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9008 the tests right now.
9009 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9010 yyerror are declared before use; C99 requires this.
9011
25005f6a
PH
90122003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9013
9014 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9015 first.
9016 (yyrecoverSyntaxError): Correct the logic for setting and testing
9017 yyerrState.
9018 Correct comment on handling EOF.
9019 Allow states with only a default reduction, rather than failing
8dd76bee 9020 (I can't quite reconstruct why these were not allowed before).
25005f6a 9021
137437c6 9022 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 9023 buffer overruns, corrupting state.
8dd76bee
PE
9024
9025 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
9026 definition.
9027 * src/reader.h (max_left_semantic_context): New variable declaration.
9028 * src/scan-gram.l (max_left_semantic_context): Define.
9029 (handle_action_dollar): Update max_left_semantic_context.
9030 * data/glr.c (YYMAXLEFT): New definition.
9031 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9032 (yyresolveAction): Ditto.
9033
9034 Fixes to problems with location handling in GLR parsers reported by
9035 Frank Heckenbach (2003/06/05).
9036
9037 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9038 (YYRHSLOC): Add parentheses, and define only if locations used.
9039 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9040 locations not used.
9041 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9042 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 9043
25005f6a
PH
9044 * tests/cxx-type.at: Exercise location information; update tests
9045 to differentiate output with and without locations.
8dd76bee 9046 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
9047 because default YYLTYPE not yet defined.
9048 Change semantic actions to compute strings, rather than printing
9049 them directly (to test proper passing of semantics values). Change
9050 output to prefix notation and update test data and expected results.
9051 (yylex): Track locations.
9052 (stmtMerge): Return value rather than printing, and include arguments
9053 in value.
8dd76bee 9054
711f40b7
PE
90552003-06-03 Paul Eggert <eggert@twinsun.com>
9056
9057 Avoid warnings generated by GCC 2.95.4 when Bison is
9058 configured with --enable-gcc-warnings.
9059 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9060 yy::]b4_parser_class_name[::translate_,
9061 yy::Stack::operator[] (unsigned),
9062 yy::Stack::operator[] (unsigned) const,
9063 yy::Slice::operator[] (unsigned),
9064 yy::Slice::operator[] (unsigned) const):
9065 Rename local vars to avoid warnings.
9066 * tests/glr-regression.at (Improper handling of embedded actions
9067 and $-N in GLR parsers): Remove unused local variable from yylex.
9068 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9069 (void) as arg when not pure, since we now assume C89 when building
9070 Bison. Pacify GCC by using parameter.
9071
ac695f7d
PE
90722003-06-02 Paul Eggert <eggert@twinsun.com>
9073
9074 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9075 yy::Location::lines, yy::Location::columns): Rename arguments
9076 to avoid shadowing; this removes a warning generated by GCC 3.3.
9077
26ec81e0
PE
90782003-06-01 Paul Eggert <eggert@twinsun.com>
9079
9080 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9081 to g++, as GCC 3.3 complains if you do it.
9082 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9083 everything that WARNING_CFLAGS has, except omit warnings
9084 not suitable for C++.
9085 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9086 * tests/atlocal.in (CXXFLAGS): New var.
9087 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9088
9089 Fix a GLR parser bug I reported in February; see
161a71f3 9090 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
9091 The problem was that GLR parsers did not conform to the C standard,
9092 because actions like { $1 = $2 + $3; } expanded to expressions
9093 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9094 to a local variable. The C standard says that expressions
9095 like (var = f ()) + (var = f ()) have undefined behavior.
9096 Another problem was that GCC sometimes issues warnings that
9097 yyfill and its parameters are unused.
9098
9099 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9100 as possibly unused.
9101 (yyfill): New function.
9102 (YYFILL): Use it.
9103 (yyuserAction): Change type of yynormal to bool, so that it matches
9104 the new yyfill signature. Mark it as possibly unused.
9105
9106
9107 Follow up on a bug I reported in February, where a Bison-generated
9108 parser can loop. Provide a test case and a fix for yacc.c. I
9109 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9110 The original bug report is in:
161a71f3 9111 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
9112
9113 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9114 macro's size was becoming unwieldy.
9115 (yyerrlab): Do not discard an empty lookahead symbol, as this
9116 might destroy garbage.
9117 (yyerrorlab): New label, with the old contents of YYERROR,
9118 plus the following change: pop the stack of rhs corresponding
9119 to the production that invoked YYERROR. That is how Yacc
9120 behaves, and POSIX requires this behavior.
9121 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9122 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9123 Define 'alarm' to do nothing if unistd.h is not available.
9124 Add a new rule "exp: '-' error;" to test the above change to
9125 data/yacc.c. Use 'alarm' to abort any test taking longer than
9126 10 seconds, as it's probably looping.
9127 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9128 Also, the new yacc.c generates two fewer diagnostics for an
9129 existing test.
9130
d0829076
PE
91312003-05-24 Paul Eggert <eggert@twinsun.com>
9132
c6ae27df
PE
9133 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9134 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9135 This fixes a problem reported by John Bowman when the Compaq/HP
9136 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9137 -ansi -Wall -gall).
9138 * data/yacc.c (union yyalloc): Likewise.
9139 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 9140
d0829076
PE
9141 Switch from 'int' to 'bool' where that makes sense.
9142
9143 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9144 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9145 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9146 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9147 Return or accept bool, not int. All callers changed.
9148 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9149 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9150 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9151 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9152 bitset_or_and_cmp_): Likewise.
9153 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9154 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9155 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9156 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9157 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9158 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9159 bitset_stats_or_and_cmp): Likewise.
9160 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9161 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9162 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9163 ebitset_xor_cmp): Likewise.
9164 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9165 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9166 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9167 lbitset_xor_cmp): Likewise.
9168 * lib/bbitset.h: Include <stdbool.h>.
9169 (struct bitset_vtable): The following members now return bool, not
9170 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9171 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9172 or_and_cmp).
9173 * src/conflicts.c (count_rr_conflicts): Likewise.
9174 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9175 All uses changed.
9176 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9177 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9178 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9179 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9180 graph_flag): Likewise.
9181 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9182 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9183 graph_flag): Likewise.
9184 * src/output.c (error_verbose): Likewise.
9185 * src/output.h (error_verbose): Likewise.
9186 * src/reader.c (start_flag, typed): Likewise.
9187 * src/reader.h (typed): Likewise.
9188 * src/getargs.c (LOCATIONS_OPTION): New constant.
9189 (long_options, getargs): Use it.
9190 * src/lalr.c (build_relations): Use bool, not int.
9191 * src/nullable.c (nullable_compute): Likewise.
9192 * src/print.c (print_reductions): Likewise.
9193 * src/tables.c (action_row, pack_vector): Likewise.
9194 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9195 * src/output.c (prepare): Use it.
9196 * src/output.c (token_definitions_output,
9197 symbol_destructors_output, symbol_destructors_output): Use string,
9198 not boolean integer, to keep track of whether to output separator.
9199 * src/print_graph.c (print_core): Likewise.
9200 * src/state.c (state_rule_lookaheads_print): Likewise.
9201
9202 * config/install-sh: Sync from automake 1.7.5.
9203
6b2584b7
PE
92042003-05-14 Paul Eggert <eggert@twinsun.com>
9205
9206 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9207 semicolon after a grammar declaration, in the interest of possible
9208 future changes to the Bison input language.
9209 Do not allow a stray semicolon at the start of the grammar.
9210 (rhses.1): Allow one or more semicolons after any rule, including
9211 just before "|" as required by POSIX.
9212 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9213 grammar.
9214
caf37a36
ADL
92152003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9216
9217 %parse-param support for lalr1.cc.
9218
9219 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9220 b4_cc_constructor_calls, b4_cc_constructor_call,
9221 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9222 definitions.
9223 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9224 parse-param arguments.
9225 (yy::b4_parser_class_name): Declare instance variables to
9226 hold parse-param arguments.
9227 * tests/calc.at: s/value/semantic_value/ because value clashes
9228 with a member of yy::b4_parser_class_name. Adjust C++ code
9229 to handle %parse-param. Enable %parse-param test in C++.
9230
3ab37077
PE
92312003-05-12 Paul Eggert <eggert@twinsun.com>
9232
9233 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9234 English a bit. Fix fclose typo. Change "const char" to "char
9235 const", and use ANSI C rather than K&R for "main". Suggest
9236 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9237 and suggest yy_switch_to_buffer.
9238
92392003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
9240
9241 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9242 C89. This avoids a diagnostic on compilers that define __STDC__
9243 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 9244 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 9245
e743727f
PE
92462003-05-03 Paul Eggert <eggert@twinsun.com>
9247
9248 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9249 Do not overrun array bounds.
9250 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 9251 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 9252
916708d5
AD
92532003-04-29 Akim Demaille <akim@epita.fr>
9254
9255 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9256 * src/getargs.c, src/getargs.h: here, as bool, not int.
9257 (nondeterministic_parser): New.
9258 * src/parse-gram.y, src/scan-gram.l: Support
9259 %nondeterministic-parser.
9260 * src/output.c (prepare): Use nondeterministic_parser instead
9261 of glr_parser where appropriate.
9262 * src/tables.c (conflict_row, action_row, save_row)
9263 (token_actions, token_actions, pack_vector): Ditto.
9264
a06ea4aa
AD
92652003-04-29 Akim Demaille <akim@epita.fr>
9266
9267 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9268
211074ca
AD
92692003-04-29 Akim Demaille <akim@epita.fr>
9270
9271 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9272 with %pure-parser and %locations to exercise the patch from Yakov
9273 Markovitch below.
9274
6175ffe3
PE
92752003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9276
9277 * data/yacc.c: (b4_lex_param): Corrected for the case where
9278 %lex-param is provided and %pure-parser isn't.
9279
b1e95857
PE
92802003-04-27 Paul Eggert <eggert@twinsun.com>
9281
9282 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 9283 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
9284 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9285 if it is not defined.
9286 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9287
acda9df6
PE
92882003-04-26 Paul Eggert <eggert@twinsun.com>
9289
3470c57b
PE
9290 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9291 Declare to be of type suitable for the ninf value itself, not of
9292 type suitable for the corresponding table, since the latter might
9293 be unsigned but the ninf value might be negative. This fixes a
9294 bug reported by Alexandre Duret-Lutz in
161a71f3 9295 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 9296
acda9df6
PE
9297 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9298 invokes it. We shouldn't invoke it twice because it will attempt
9299 to put error.o in the archive twice. This fixes a glitch reported
9300 by Martin Mokrejs in
161a71f3 9301 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 9302
b5250f26
PE
93032003-04-21 Paul Eggert <eggert@twinsun.com>
9304
9305 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9306 to gnulib.
9307
089ac0f1
PE
93082003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9309
9310 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9311 Fix obvious typo that results in uncompilable GLR parsers
9312 when both %pure-parser and %locations are used. (trivial change)
9313
5ededac6
PE
93142003-04-17 Paul Eggert <eggert@twinsun.com>
9315
1b8f2fff
PE
9316 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9317 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9318 Do not insert the expected token via unput, as this runs afoul
9319 of a POSIX-compatibility bug in flex 2.5.31.
9320 All uses changed to BEGIN the parent state,
9321 since we no longer insert the expected token via unput.
9322 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9323 that is no longer emitted after the above change.
9324
5ededac6
PE
9325 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9326 the first one. This change is from Paul Hilfinger, and it fixes
9327 regression reported by Werner Lemberg in
161a71f3 9328 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
9329
9330 (resolve_sr_conflict): Don't invoke state_errs_set
9331 unless one or more tokens have been explicitly made errors.
9332 Otherwise, the above change causes Bison to abort.
9333
9334 * tests/existing.at (GNU pic Grammar): New test case, taken from
9335 Lemberg's email.
9336
b8be9132
AD
93372003-03-31 Akim Demaille <akim@epita.fr>
9338
9339 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9340
d423d460
AD
93412003-03-31 Akim Demaille <akim@epita.fr>
9342
9343 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9344 output.
9345
c7e441b4
AD
93462003-03-31 Akim Demaille <akim@epita.fr>
9347
9348 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9349 From Paul Hilfinger.
9350
231897ad
AD
93512003-03-29 Akim Demaille <akim@epita.fr>
9352
9353 * m4/error.m4: Do not put under dynamic conditions some code which
9354 expansion is under static control.
9355
5b066063
AD
93562003-03-29 Akim Demaille <akim@epita.fr>
9357
9358 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9359
22a74fec
AD
93602003-03-29 Akim Demaille <akim@epita.fr>
9361
9362 * doc/bison.texinfo (Strings are Destroyed): New.
9363
0eee27e7
PE
93642003-03-13 Paul Eggert <eggert@twinsun.com>
9365
9366 * .cvsignore: Add configure.lineno.
9367 * src/.cvsignore: Add yacc.
9368 * tests/.cvsignore: Add testsuite.log.
9369 * doc/fdl.texi: Sync with latest FSF version.
9370
f61aad93
PE
93712003-03-12 Paul Eggert <eggert@twinsun.com>
9372
537636c7
PE
9373 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9374 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9375 cursor, instead of leaving it undefined. This fixes a bug
9376 reported by Tim Van Holder in
161a71f3 9377 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
9378 * tests/input.at (Torturing the Scanner): Test the scanner on
9379 an empty input file, which was Tim Van Holder's test case.
9380
9381 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9382 <sys/resource.h> can be included, include sys/time.h and
9383 sys/times.h first, if available. This works around the SunOS
9384 4.1.4 porting bug reported by Bruce Becker in
161a71f3 9385 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
9386
9387 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9388 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9389 AC_HEADER_SYS_WAIT.
9390
f61aad93
PE
9391 Merge changes from gnulib. This was prompted because the CVS
9392 snapshot didn't build on Solaris 7 due to strnlen problems.
9393
9394 These changes need to be merged back into gnulib:
9395 * lib/hash.c: Include <stdbool.h> unconditionally.
9396 * m4/onceonly.m4 (m4_quote): New macro.
9397 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9398 Quote AC_FOREACH variable-expansions properly.
9399 The 2003-01-03 obstack.h change also needs merging.
9400 {end of changes requiring merging}
5b066063 9401
f61aad93
PE
9402 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9403 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9404 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9405 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9406 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9407 New files, imported from gnulib.
9408 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9409 above.
9410
9411 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9412 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9413 gnulib sources.
9414
9415 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9416 Add.
9417 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9418 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9419 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9420 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9421 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9422 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9423 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9424 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9425 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9426 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9427 (jm_PREREQ_ARGMATCH): Remove.
9428 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9429 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9430
9431 * src/system.h: Include <stdbool.h> unconditionally.
9432
9433 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9434 assuming at least C89 in the bitset code for some time now.
9435
d2ffe116
AD
94362003-03-03 Akim Demaille <akim@epita.fr>
9437
9438 * ro.po: New.
9439
052826fd
AD
94402003-03-02 Akim Demaille <akim@epita.fr>
9441
9442 * doc/bison.texinfo (Table of Symbols): Reactivate the
9443 documentation for %lex-param, and %parse-param.
9444
c4749565
AD
94452003-03-02 Akim Demaille <akim@epita.fr>
9446
9447 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9448 generate verbose error messages.
9449 Use the number of tokens as an upper bound in yytname, as it
9450 cannot be a non terminal.
9451
d5286af1
AD
94522003-03-02 Akim Demaille <akim@epita.fr>
9453
9454 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9455 message.
9456
22e304a6
AD
94572003-03-02 Akim Demaille <akim@epita.fr>
9458
22e304a6
AD
9459 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9460 Use them to exercise yycheck overrun.
9461 Based on Andrew Suffield's grammar.
9462
67a25fed
AD
94632003-03-02 Akim Demaille <akim@epita.fr>
9464
9465 Create tests/local.at for Bison generic testing macros.
9466
9467 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9468 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9469 This new file.
9470 * tests/calc.at (AT_CHECK_CALC): Adjust.
9471 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9472 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9473 * tests/local.at: here.
9474 (AT_COMPILE_CXX): Tags the tests using it as c++.
9475 Ignore the test if CXX is not functional.
9476
9c2b381f
PE
94772003-03-01 Paul Eggert <eggert@twinsun.com>
9478
9479 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9480 not loc->end, since loc->end might contain garbage and this leads
9481 to undefined behavior on some platforms.
9482 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9483 depend on *loc, so that the reader doesn't give the the false
9484 impression that *loc is initialized.
9485 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9486 does not survive the return.
9487
0433ba88
AD
94882003-03-01 Akim Demaille <akim@epita.fr>
9489
9490 * src/scan-gram.l (code_start): Always initialize it when entering
9491 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9492 yylex invocation. An alternative would be making it static, but
9493 then it starts with the second %%'s beginning, instead of its end.
9494
b305ea69
PE
94952003-02-28 Paul Eggert <eggert@twinsun.com>
9496
9497 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9498 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 9499 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 9500
c3d25e01
PE
95012003-02-26 Paul Eggert <eggert@twinsun.com>
9502
9503 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9504 Remove Sequent/Pyramid discussion (nobody uses them any more).
9505 Merge VMS and MS-DOS discussion; these ports may well be dead
9506 but let's keep mentioning them for now. Put <> around email
9507 addresses. Add copyright notice.
9508
c267ffbc
PE
95092003-02-24 Paul Eggert <eggert@twinsun.com>
9510
9511 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9512 to avoid collision with flex use of yylineno.
9513 Problem reported by Bruce Lilly in
161a71f3 9514 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
9515 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9516 * data/yacc.c (yy_reduce_print): Likewise.
9517
9518 * config/depcomp: Sync with Automake 1.7.3.
9519
f939fc12
AD
95202003-02-21 Akim Demaille <akim@epita.fr>
9521
9522 * data/lalr1.cc: Use temporary variables instead of casts to
9523 change integer types.
9524 Suggested by Paul Eggert.
9525
95923bd6
AD
95262003-02-21 Akim Demaille <akim@epita.fr>
9527
9528 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9529 to avoid confusions with lalr1.cc's notion of Position.
9530 Suggested by Paul Eggert.
9531
2cdc240e
AD
95322003-02-20 Akim Demaille <akim@epita.fr>
9533
9534 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9535 before initial_columns.
9536 (location.hh): Use consistent variable names when defining the
9537 operator<<.
9538 Use "last" so that we subtract from Positions, not from unsigned.
9539
5d003116
AD
95402003-02-20 Akim Demaille <akim@epita.fr>
9541
9542 * data/lalr1.cc (position.hh): New subfile, including the extended
9543 and Doxygen'ed documentation of class Position.
9544 (location.hh): Use it.
9545 Document a` la Doxygen.
ba1ecc07 9546 With the help of Benoit Perrot.
5d003116 9547
d02b25f9
AD
95482003-02-20 Akim Demaille <akim@epita.fr>
9549
9550 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9551 AT_YACC_IF.
9552 Redefine AT_YYERROR_SEES_LOC_IF using it.
9553 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9554 not defined.
9555 Don't use the location in yy::Parser::error_ and
9556 yy::Parser::print_ when not %locations.
9557 Activate more lalr1.cc tests.
9558
0d1c3a04
AD
95592003-02-19 Akim Demaille <akim@epita.fr>
9560
9561 * data/lalr1.cc: When displaying a line number, be sure to make it
9562 an int.
9563
60a777aa
AD
95642003-02-19 Akim Demaille <akim@epita.fr>
9565
9566 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9567 Remove, useless.
9568 (YYABORT, YYACCEPT, YYERROR): New.
9569 * tests/calc.at: Renable the lalr1.cc test.
9570
0b86fc41
AD
95712003-02-19 Akim Demaille <akim@epita.fr>
9572
9573 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9574 error recovery, mixing with/without pops and discarding of the
9575 lookahead.
9576 Exercise YYERROR.
9577 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9578
da99a5dc
PE
95792003-02-17 Paul Eggert <eggert@twinsun.com>
9580
9581 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9582 * tests/testsuite.at (AT_COMPILE): Use them.
9583 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 9584 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 9585
93b8c255
PE
95862003-02-12 Paul Eggert <eggert@twinsun.com>
9587
9588 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9589 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 9590 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
9591 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9592 Check for malloc failure, for consistency with yacc.c.
9593 (yytname_size): Remove, for consistency with yacc.c.
9594
9595 The bug still remains in data/lalr1.cc, as I didn't have time
9596 to fix it there.
9597
7548fed2
AD
95982003-02-06 Akim Demaille <akim@epita.fr>
9599
9600 * configure.ac (GXX): Rename as...
9601 (CXX): this, to keep the original Autoconf semantics.
9602 Require 2.57.
9603 * data/lalr1.cc: Fix b4_copyright invocations.
9604 If YYDEBUG is not defined, don't depend upon name_ being defined.
9605 (location.hh): Include string and iostream.
9606 (Position::filename): New member.
9607 (Position::Position ()): New.
9608 (operator<< (Position)): New.
9609 (operator- (Position, int)): New.
9610 (Location::first, Location::last): Rename as...
9611 (Location::begin, Location::end): these, to mock the conventional
9612 iterator names.
9613 (operator<< (Location)): New.
9614 * tests/atlocal.in (CXX): New.
9615 * tests/testsuite.at (AT_COMPILE_CXX): New.
9616 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9617 locations in a more synthetic way.
9618 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9619 lalr1.cc is used.
9620 Adjust the C locations to match those from Emacs: first column is
9621 column 0.
9622 Change all the expected results.
9623 Conform to the GCS: simplify the locations when applicable.
9624 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9625 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9626 these CPP macros with the m4 macros new defined by...
9627 (AT_CHECK_PUSHDEFS): this, i.e.:
9628 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 9629 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
9630 New macros.
9631 (AT_CHECK_POPDEFS): Undefine them.
9632 (AT_CHECK_CALC_LALR1_CC): New.
9633 Use it for the first lalr1.cc test.
9634
43a176ef
AD
96352003-02-04 Akim Demaille <akim@epita.fr>
9636
9637 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9638 Location as is defined.
9639
fc049e9c
AD
96402003-02-04 Akim Demaille <akim@epita.fr>
9641
9642 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9643 name_ being defined.
9644
a737b216
PE
96452003-02-03 Paul Eggert <eggert@twinsun.com>
9646
9647 * src/gram.h (start_symbol): Remove unused decl.
9648
9649 Use more-consistent naming conventions for local vars.
9650
9651 * src/derives.c (derives_compute): Change type of local var from
9652 int to rule_number.
9653 * src/gram.c (grammar_rules_partial_print): Likewise.
9654 * src/print.c (print_core): Likewise.
9655 * src/reduce.c (reduce_grammar_tables): Likewise.
9656
9657 * src/gram.c (grammar_dump): Change name of item_number *
9658 local var from r to rp.
9659 * src/nullable.c (nullable_compute): Likewise.
9660
9661 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9662
9663 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9664 for symbol or symbol_number var.
9665 * src/reader.c (grammar_start_symbol_set): Likewise.
9666 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9667 Likewise.
9668 * src/state.c (transitions_to): Likewise.
9669 * src/state.h: Likewise.
9670 * src/tables.c (symbol_number_to_vector_number): Likewise.
9671
9672 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9673 char * var.
9674
9675 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9676 var.
9677
9678 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9679 var.
9680
9681 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9682 Use str, not s, for char * var. Use ch, not c, for character var.
9683 Use size for size var.
9684
9685 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9686 char * var.
9687 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9688 uniqstr var.
9689 * src/uniqstr.h: Likewise.
9690
9691 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9692 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9693 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9694 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9695 param to have same name as that of enum, so that we don't use
9696 "s" to stand for a non-state.
9697
68e93ad5
AD
96982003-02-02 Akim Demaille <akim@epita.fr>
9699
9700 * src/scan-skel.l: Scan more than one inert character per yylex
9701 invocation.
9702
92898986
PE
97032003-02-01 Paul Eggert <eggert@twinsun.com>
9704
9705 Version 1.875a.
9706
1d9d5d71
PE
9707 * po/LINGUAS: Add ms.
9708
0435d061
AD
97092003-01-30 Akim Demaille <akim@epita.fr>
9710
9711 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9712
6029a57f
PH
97132003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9714
9715 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9716 of $1.
0435d061
AD
9717
9718 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 9719 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 9720 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 9721
6029a57f
PH
9722 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9723 (b4_rhs_location): Ditto.
0435d061 9724 (yyfill): New function to copy from stack tree into array
6029a57f 9725 incrementally.
0435d061
AD
9726 (yyuserAction): Modify to allow incremental move of semantic values
9727 to rhs array when in GLR mode.
9728 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
9729 as needed.
9730 Remove dummy use of yystack, as there is now a guaranteed use.
9731 (yydoAction): Modify to allow incremental move of semantic values
9732 to rhs array when in GLR mode.
9733 (yyresolveAction): Ditto.
9734 (yyglrShiftDefer): Update comment.
0435d061 9735 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
9736 (yyglrReduce): Ditto.
9737 (yydoAction): Ditto
0435d061 9738
6029a57f
PH
9739 * tests/glr-regr1.at: Rename to ...
9740 * tests/glr-regression.at: Add new regression test for the problems
9741 described above (adapted from S. Eken).
9742 Update copyright notice.
9743 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9744 * tests/Makefile.am: Ditto.
9745
6cee6297
PE
97462003-01-28 Paul Eggert <eggert@twinsun.com>
9747
9748 * data/lalr1.cc: Do not use @output_header_name@ unless
9749 b4_defines_flag is set. This fixes two bugs reported by
9750 Tim Van Holder in
161a71f3
PE
9751 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9752 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 9753
b2a836b5
PE
97542003-01-21 Paul Eggert <eggert@twinsun.com>
9755
9756 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9757 we don't need to worry about yyerrlab1 being reported as an
9758 "unused label" by non-GCC C compilers. The downside is that if
9759 locations are used then a couple of statements are duplicated each
9760 time YYERROR is invoked, but the upside is that the warnings
9761 should vanish.
9762 (yyerrlab1): Move code to YERROR.
9763 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9764 This reverts some of the 2002-12-27 change.
9765
4196b931
PE
97662003-01-17 Paul Eggert <eggert@twinsun.com>
9767
9768 * src/output.c (symbol_printers_output): Fix typo that led
9769 to core dump. Problem reported by Antonio Rus in
161a71f3 9770 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 9771
3ae831b4
AD
97722003-01-13 Akim Demaille <akim@epita.fr>,
9773 Quoc Peyrot <chojin@lrde.epita.fr>,
9774 Robert Anisko <anisko_r@lrde.epita.fr>
9775
9776 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9777 when the stacks contain one element, as the loop would otherwise
9778 free the last state, and then use the top state (the one we just
9779 popped). This means that the initial elements will not be freed
9780 explicitly, as is the case in yacc.c; it is not a problem, as
9781 these elements have fake values.
9782
e3aa65c5
PE
97832003-01-11 Paul Eggert <eggert@twinsun.com>
9784
9785 * NEWS: %expect-violations are now just warnings, reverting
9786 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9787 bootstrapping problem reported by Matthias Klose; see
161a71f3 9788 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
9789 * src/conflicts.c (conflicts_print): Likewise.
9790 * tests/conflicts.at (%expect not enough, %expect too much,
9791 %expect with reduce conflicts): Likewise.
9792 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9793 that the warning is enabled if the number of conflicts changes
9794 (not necessarily increases).
9795
9796 * src/getargs.c (version): Update copyright year.
9797
f0057011
AD
97982003-01-09 Akim Demaille <akim@epita.fr>
9799
9800 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9801
1ee6d2a0
PE
98022003-01-08 Paul Eggert <eggert@twinsun.com>
9803
9804 * Makefile.maint (WGETFLAGS):
9805 New macro, containing "-C off" to disable proxy caches.
9806 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9807 (rel-check): Use $(WGET) instead of wget.
9808
d4fd77c4
PE
98092003-01-06 Paul Eggert <eggert@twinsun.com>
9810
9811 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9812 the GLR paper of Scott, Johnstone and Hussain.
9813
464c6927
PE
98142003-01-04 Paul Eggert <eggert@twinsun.com>
9815
d600ee67
PE
9816 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9817 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9818 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9819 (EXTRA_LIBRARIES): New var, for liby.a.
9820 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9821 (EXTRA_SCRIPTS): New var, for yacc.
9822
464c6927
PE
9823 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9824 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9825 Problem reported by Nelson H. F. Beebe.
9826
98272003-01-03 Paul Eggert <eggert@twinsun.com>
9828
9829 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9830 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9831 when compiling Bison 1.875's `bitset bset = obstack_alloc
9832 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9833
9834 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9835 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9836 grow to a huge size with typical invocation.
d600ee67 9837
464c6927
PE
9838 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9839 Use the pattern recommended by Autoconf 2.57, except also protect
9840 against double-definition.
9841 * src/system.h: Likewise.
9842 Portability issues reported by Nelson H. F. Beebe.
d600ee67 9843
464c6927
PE
9844 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9845 All uses changed. Provide a definition in both C and C++.
9846 (yytrue, yyfalse): Define even if defined (__cplusplus).
9847
9848 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9849 Reported by Nelson H. F. Beebe.
d600ee67 9850
464c6927
PE
9851 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9852
0f42c7d5
PE
98532003-01-02 Paul Eggert <eggert@twinsun.com>
9854
9855 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9856 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9857 Bug reported by Nelson H. F. Beebe.
9858
dc546b0f
PE
98592003-01-01 Paul Eggert <eggert@twinsun.com>
9860
9861 * Version 1.875.
9862
2c09b6a7
PE
98632002-12-30 Paul Eggert <eggert@twinsun.com>
9864
9865 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9866 Moved here from...
9867 (<INITIAL>","): Here. This causes stray "," to be treated
9868 more uniformly.
9869
dc546b0f 9870 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
9871 last brace in braced code when not in Yacc mode, for compatibility
9872 with Bison 1.35. This resurrects the 2001-12-15 patch to
9873 src/reader.c.
9874
9875 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9876 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9877
535c0f63
PE
98782002-12-28 Paul Eggert <eggert@twinsun.com>
9879
9880 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9881 that of SYM's type. This fixes Debian bug 168069, reported by
9882 Thomas Olsson.
d600ee67 9883
963fcc17
PE
98842002-12-28 Paul Eggert <eggert@twinsun.com>
9885
9886 Version 1.75f.
9887
9888 Switch back to the Yacc style of conflict reports, undoing some
9889 of the 2002-07-30 change.
9890 * doc/bison.texinfo (Understanding): Use Yacc style for
9891 conflict reports. Also, use new way of locating rules.
9892 * src/conflicts.c (conflict_report):
9893 Renamed from conflict_report_yacc, removing the old
9894 'conflict_report'. Translate the entire conflict report at once,
9895 so that we don't assume that "," has the same interpretation in
9896 all languages.
9897 (conflicts_output): Use Yacc-style conflict report for each state,
9898 instead of our more-complicated style.
9899 (conflicts_print): Use Yacc-style conflict report, except print
9900 the input file name when not emulating Yacc.
9901 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9902 Conflicted Reduction, %expect not enough, %expect too much,
9903 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9904 * tests/existing.at (GNU Cim Grammar): Likewise.
9905 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9906
9907 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9908 fatal): Don't invoke fflush; it's not needed and it might even be
9909 harmful for stdout, as stdout might not be open.
9910 * src/reduce.c (reduce_print): Likewise.
9911
b1efe548
PE
99122002-12-27 Paul Eggert <eggert@twinsun.com>
9913
9914 Fix a bug where error locations were not being recorded correctly.
9915 This problem was originally reported by Paul Hilfinger in
161a71f3 9916 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
9917
9918 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9919 top of the location stack's error locations.
9920 (yyerrlab): Set it. When discarding a token, push its location
9921 onto yylerrsp so that we don't lose track of the error's end.
9922 (yyerrlab1): Now is only the target of YYERROR, so that we can
9923 properly record the location of the action that failed. For GCC
9924 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9925 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9926 (yyerrlab2): New label, which yyerrlab now falls through to.
9927 Compute the error's location by applying YYLLOC_DEFAULT to
9928 the locations of all the symbols that went into the error.
9929 * doc/bison.texinfo (Location Default Action): Mention that
9930 YYLLOC_DEFAULT is also invoked for syntax errors.
9931 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9932 Error locations include the locations of all the tokens that were
9933 discarded, not just the last token.
d600ee67 9934
983c5c2c
PE
99352002-12-26 Paul Eggert <eggert@twinsun.com>
9936
b1efe548
PE
9937 * src/files.c: Include quote.h.
9938 (compute_output_file_names): Warn if we detect conflicting
9939 outputs to the same file. This should catch the misunderstanding
9940 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9941
9942 * src/conflicts.c (conflicts_print): If the user specifies
9943 "%expect N", report an error if there are any reduce/reduce
9944 conflicts. This is what the manual says should happen.
9945 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9946 * tests/conflicts.at (%expect with reduce conflicts): New test.
9947
983c5c2c
PE
9948 Don't use m4_include on relative file names, as it doesn't work as
9949 desired if there happens to be a file with that name under ".".
d600ee67 9950
983c5c2c
PE
9951 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9952 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9953 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9954 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9955 * src/output.c (output_skeleton): Use full path names when
9956 specifying a file to include; don't rely on include path, as
9957 it's unreliable when the working file contains a file with
9958 that name.
d600ee67 9959
983c5c2c
PE
99602002-12-25 Paul Eggert <eggert@twinsun.com>
9961
9962 Remove obsolete references to bison.simple and bison.hairy.
9963 Problem mentioned by Aubin Mahe in
161a71f3 9964 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
9965 * data/glr.c: Comment fix.
9966 * doc/bison.1: Remove references. Also, mention "yacc".
9967
9968 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9969 with -g option.
9970
9971 * src/parse-gram.y (declaration): Use enum "report_states" rather
9972 than its numeric value 1.
9973
9974 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9975 opening a new one. This fixes Debian bug 165349, reported by
9976 Bruce Stephens.
9977
23f2d9dc
PE
99782002-12-24 Paul Eggert <eggert@twinsun.com>
9979
9980 Version 1.75e.
9981
9982 * Makefile.maint (cvs-update): Don't assume that the shell
9983 supports $(...), as Solaris sh doesn't.
9984
9985 * src/parse-gram.y (lloc_default): Remove test for empty
9986 nonterminals at the end, since it didn't change the result.
9987
99882002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
9989
9990 If the user does not define YYSTYPE as a macro, Bison now declares it
9991 using typedef instead of defining it as a macro. POSIX requires this.
9992 For consistency, YYLTYPE is also declared instead of defined.
9993
9994 %union directives can now have a tag before the `{', e.g., the
9995 directive `%union foo {...}' now generates the C code
9996 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9997 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9998 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9999 instead of `yyltype'.
10000
10001 `yystype' and `yyltype' are now obsolescent macros instead of being
10002 typedefs or tags; they are no longer documented and will be
10003 withdrawn in a future release.
10004
10005 * data/glr.c (b4_location_type): Remove.
10006 (YYSTYPE): Renamed from yystype.
10007 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10008 (struct YYLTYPE): Renamed from struct yyltype.
10009 (YYLTYPE): Renamed from yyltype.
10010 (yyltype, yystype): New (and obsolescent) macros,
10011 for backward compatibility.
10012 * data/yacc.c: Likewise.
10013
10014 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10015 does not specify a union tag. This is for compatibility with
10016 Solaris 9 yacc.
10017
10018 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10019 const *, since it is now modified by stripping surrounding { }.
10020 (current_braced_code): Remove.
10021 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10022 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10023 trailing " {...}". Now of type <chars>.
10024 (grammar_declaration): Adjust to bundled tokens.
10025 (code_content): Remove; stripping is now done by add_param.
10026 (print_token_value): Print contents of bundled tokens.
10027 (token_name): New function.
10028
10029 * src/reader.h (braced_code, current_braced_code): Remove.
10030 (token_name): New decl.
10031
10032 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10033 token_type, not braced_code code_kind. All uses changed.
10034 (SC_PRE_CODE): New state, for scanning after a keyword that
10035 has (or usually has) an immediately-following braced code.
10036 (token_type): New local var, to keep track of which token type
10037 to return when scanning braced code.
10038 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 10039 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
10040 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10041 instead of returning a token type immediately.
10042 (<INITIAL>"{"): Set token type.
10043 (<SC_BRACED_CODE>"}"): Use it.
10044 (handle_action_dollar, handle_action_at): Now returns bool
10045 indicating success. Fail if ! current_rule; this prevents a core dump.
10046 (handle_symbol_code_dollar, handle_symbol_code_at):
10047 Remove; merge body into caller.
10048 (handle_dollar, handle_at): Complain in invalid contexts.
10049
10050 * NEWS, doc/bison.texinfo: Document the above.
10051 * NEWS: Fix years and program names in copyright notice.
10052
879ca4f8
PE
100532002-12-17 Paul Eggert <eggert@twinsun.com>
10054
10055 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10056 Reporting, Table of Symbols): Omit mentions of %lex-param and
10057 %parse-param from the documentation for now.
10058
1c5fe69d
PE
100592002-12-15 Paul Eggert <eggert@twinsun.com>
10060
10061 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10062 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10063 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
10064 disagreed with the Bison documentation. Bug
10065 reported by Andrew Walrond.
d600ee67 10066
1c5fe69d
PE
10067 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10068 as the caller now does that.
10069 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10070 (YYEMPTY): Parenthesize right hand side, since others use it.
10071 (yyparse): Don't assume that our generated code is the only code
10072 that sets yychar.
10073
d1de5372
PE
100742002-12-13 Paul Eggert <eggert@twinsun.com>
10075
10076 Version 1.75d.
10077
10078 POSIX requires a "yacc" command.
10079 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10080 (MOSTLYCLEANFILES): Add yacc.
10081 (yacc): New rule.
1c5fe69d 10082 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
10083 as an alias for bison y.
10084
10085 * po/LINGUAS: Add da.
d600ee67 10086
d1de5372
PE
10087 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10088 problem with latest <getopt.h>.
10089 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10090
10091 * doc/fdl.texi: Upgrade to 1.2.
10092 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10093 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10094 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10095 gnulib.
10096 * config/install-sh: Sync with autotools.
10097
10098 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 10099 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
10100 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10101 locations are requested.
10102 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10103 locations are requested.
10104
d0f3fe23
PE
101052002-12-12 Paul Eggert <eggert@twinsun.com>
10106
10107 Remove unportable casts and storage allocation tricks.
10108 While we're at it, remove almost all casts, since they
10109 usually aren't needed and are a sign of trouble.
10110
10111 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10112
10113 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10114 the pointer DSET returned by malloc; this isn't portable.
10115 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10116 Similarly for DERIVES.
10117 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10118 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10119 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10120
10121 * src/derives.c (derives_compute): Do not bother invoking
10122 int_of_rule_number, since rule numbers are integers.
10123
10124 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10125 rather than XMALLOC (char, N).
10126
10127 * src/files.c (filename_split): Rewrite to avoid cast.
10128
10129 * src/gram.h (symbol_number_as_item_number,
10130 item_number_as_symbol_number, rule_number_as_item_number,
10131 item_number_as_rule_number):
10132 Now inline functions rather than macros, to avoid casts.
10133 * src/state.h (state_number_as_int): Likewise.
10134 * src/tables.c (state_number_to_vector_number,
10135 symbol_number_to_vector_number): Likewise.
10136
10137 * src/gram.h (int_of_rule_number): Remove; no longer used.
10138
10139 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10140 since the resulting storage is always stored into.
10141
10142 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10143 where it's needed.
10144
10145 * src/muscle_tab.c (muscle_m4_output):
10146 Now inline. Return bool, not int.
10147 * src/state.c (state_compare): Likewise.
10148 * src/symtab.c (symbol_check_defined,
10149 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10150 hash_compare_symbol, hash_symbol):
10151 Likewise.
10152 * src/uniqstr.c (uniqstr_print): Likewise.
10153 * src/muscle_tab.c (muscle_m4_output_processor):
10154 New function, to avoid casts.
10155 * src/state.c (state_comparator, stage_hasher): Likewise.
10156 * src/symtab.c (symbol_check_defined_processor,
10157 symbol_check_alias_consistency_processor, symbol_pack_processor,
10158 symbol_translation_processor, hash_symbol_comparator,
10159 hash_symbol_hasher): Likewise.
10160 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10161 * src/muscle_tab.c (muscles_m4_output):
10162 Use new functions instead of casting old functions unportably.
10163 * src/state.c (state_hash_new): Likewise.
10164 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10165 symbols_token_translations_init):
10166 Likewise.
10167 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10168
10169 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10170 var instead of casting to long, to avoid casts.
10171 (prepare_states): Use MALLOC rather than alloca, so that we don't
10172 have to worry about alloca.
10173 * src/state.c (state_hash_lookup): Likewise.
10174
10175 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10176 local var instead of casting to unsigned char, to avoid casts.
10177
10178 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10179 STATE_ALLOC): Remove.
10180 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10181 rather than calloc, and use offsetof to avoid allocating slightly
10182 too much storage.
10183 (state_new): Initialize all members.
10184
10185 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10186
10187 * src/symtab.c (symbol_free): Remove; unused.
10188 (symbol_get): Remove cast in lhs of assignment.
10189 (symbols_do): Now static. Accept generic arguments, not
10190 hashing-related ones.
10191
10192 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10193 (symbol_processor): Remove.
10194 (symbols_do): Remove decl; now static.
10195
10196 * src/system.h (alloca): Remove; decl no longer needed.
10197 (<stddef.h>): Include, for offsetof.
10198 (<inttypes.>, <stdint.h>): Include if available.
10199 (uintptr_t): New type, if system lacks it.
10200 (CALLOC, MALLOC, REALLOC): New macros.
10201 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10202 new macros.
10203
10204 * src/tables.c (table_size): Now int, to pacify GCC.
10205 (table_grow, table_ninf_remap): Use signed table size.
10206 (save_row): Don't bother initializing locals when not needed.
10207 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10208 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10209
10210 * src/vcg.h: Correct misspellings.
10211
10212 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10213
10214
10215 * src/getargs.c (getargs): Don't assume EOF == -1.
10216
26b4a969
PE
102172002-12-09 Paul Eggert <eggert@twinsun.com>
10218
10219 Change identifier spellings to avoid collisions with names
10220 that are reserved by POSIX.
10221
10222 Don't use names ending in _t, since POSIX reserves them.
10223 For consistency, remove _e and _s endings -- they're weren't
10224 needed to remove ambiguity. All uses changed.
10225 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10226 turn was just renamed from struniq_t.
10227 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10228 which in turn was just renamed from struniq_processor_t.
10229 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10230 in turn was renamed from hash_compare_struniq_t.
10231 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10232 (state_list): Renamed from state_list_t.
10233 * src/assoc.h (assoc): Renamed from assoc_t.
10234 * src/conflicts.c (enum conflict_resolution): Renamed from
10235 enum conflict_resolution_e.
10236 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10237 (rule_list): Renamed from rule_list_t.
10238 * src/getargs.h (enum trace): Renamed from enum trace_e.
10239 (enum report): Renamed from enum report_e.
10240 * src/gram.h (item_number): Renamed from item_number_t.
10241 (rule_number): Renamed from rule_number_t.
10242 (struct rule_s): Remove the "rule_s" part; not used.
10243 (rule): Renamed from rule_t.
10244 (rule_filter): Renamed from rule_filter_t.
10245 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10246 (goto_list): Renamed from goto_list_t.
10247 * src/lalr.h (goto_number): Renamed from goto_number_t.
10248 * src/location.h (location): Renamed from location_t.
10249 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10250 and moved here from:
10251 * src/muscle_tab.h (muscle_entry_t): here.
10252 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10253 (rule_list): Renamed from rule_list_t.
10254 * src/print_graph.c (static_graph): Renamed from graph.
10255 * src/reader.h (braced_code): Renamed from braced_code_t.
10256 Remove brace_code_e tag.
10257 * src/relation.h (relation_node): Renamed from relation_node_t.
10258 (relation_nodes): Renamed from relation_nodes_t.
10259 (relation): Renamed from relation_t.
10260 * src/state.h (state_number): Renamed from state_number_t.
10261 (struct state): Renamed from struct state_s.
10262 (state): Renamed from state_t.
10263 (transitions): Renamed from transitions_t. Unused (and
10264 misspelled) transtion_s tag removed.
10265 (errs): Renamed from errs_t. Unused errs_s tag removed.
10266 (reductions): Renamed from reductions_t. Unused tag
10267 reductions_s removed.
10268 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10269 (struct symbol_list): Renamed from struct symbol_list_s.
10270 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10271 (struct symbol): Renamed from struct symbol_s.
10272 (symbol): Renamed from symbol_t.
10273 * src/tables.c (vector_number): Renamed from vector_number_t.
10274 (action_number): Renamed from action_t.
10275 * src/tables.h (base_number): Renamed from base_t.
10276 * src/vcg.h (enum color): Renamed from enum color_e.
10277 (enum textmode): Renamed from enum textmode_e.
10278 (enum shape): Renamed from enum shape_e.
10279 (struct colorentry): Renamed from struct colorentry_s.
10280 (struct classname): Renamed from struct classname_s.
10281 (struct infoname): Renamed from struct infoname_s.
10282 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10283 (enum decision): Renamed from enum decision_e.
10284 (enum orientation): Renamed from enum orientation_e.
10285 (enum alignment): Renamed from enum alignment_e.
10286 (enum arrow_mode): Renamed from enum arrow_mode_e.
10287 (enum crossing_type): Renamed from enum crossing_type_e.
10288 (enum view): Renamed from enum view_e.
10289 (struct node): Renamed from struct node_s.
10290 (node): Renamed from node_t.
10291 (enum linestyle): Renamed from enum linestyle_e.
10292 (enum arrowstyle): Renamed from enum arrowstyle_e.
10293 (struct edge): Renamed from struct edge.
10294 (edge): Renamed from edge_t.
10295 (struct graph): Renamed from struct graph_s.
10296 (graph): Renamed from graph_t.
10297 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10298 Rename value_t -> value.
10299 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10300 value_t_as_yystype -> value_as_yystype.
10301
10302 Don't include <errno.h> in the mainstream code, since it
10303 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10304 * lib/get-errno.c, lib/get-errno.h: New files.
10305 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10306 get-errno.c.
10307 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10308 * src/output.c (output_skeleton): Likewise.
10309 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10310 instead of errno.
10311 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10312 Likewise.
10313 (handle_action_dollar, handle_action_at): Likewise.
10314 * src/system.h: Do not include <errno.h>.
10315 (TAB_EXT): Renamed from EXT_TAB.
10316 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10317
10318 Avoid str[a-z]*, since <string.h> reserves that name space.
10319 Change all instances of "struniq" in names to "uniqstr", and
10320 likewise for "STRUNIQ" and "UNIQSTR".
10321 * src/uniqstr.c: Renamed from src/struniq.c.
10322 * src/uniqstr.h: Renamed from src/struniq.h.
10323 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10324 * src/files.c (strsuffix): Remove; unused.
10325 (concat2): Renamed from stringappend. Now static.
10326 * src/files.h (strsuffix, stringappend): Remove; unused.
10327 * src/parse-gram.y (<chars>): Renamed from <string>.
10328 (<uniqstr>): Renamed from <struniq>.
10329 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10330 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10331 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10332 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10333 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10334 (N_EXPAND): Renamed from N_STRETCH.
10335
10336 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10337 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10338 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10339 Remove; unused.
10340 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10341 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10342 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10343 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10344 (BASE_MAXIMUM): Renamed from BASE_MAX.
10345 (BASE_MINIMUM): Renamed from BASE_MIN.
10346 (ACTION_MAX): Remove; unused.
10347 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10348 Unnecessary casts removed from above defines.
10349
10350
10351 Fix misspelling in names.
10352 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10353 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10354 G_NODE_ALIGNEMENT.
10355
10356
10357 * lib/timevar.c (timevar_report): Renamed from time_report,
10358 for consistency with other names.
10359 * lib/timevar.h (timevar_report): New decl.
10360 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10361
10362
10363 Sort include-file uses.
10364
10365 Reorder all include files under src to be in the order "system.h".
10366 then the ../lib include files in angle brackets (alphabetized),
10367 then the . include files in double-quotes (alphabetized). Fix
10368 dependency breakages encountered in this process, as follows:
10369 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10370 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10371 * src/state.h: Include "symtab.h".
10372
996b1c7e
PE
103732002-12-08 Paul Eggert <eggert@twinsun.com>
10374
10375 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10376 since this causes problems when __file__ contains character
10377 sequences like "@" that are treated specially by src/scan-skel.l.
10378 Instead, just use the file's basename. This fixes the bug
10379 reported by Martin Mokrejs in
161a71f3 10380 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 10381
e19c4e5d
PE
103822002-12-06 Paul Eggert <eggert@twinsun.com>
10383
10384 Add support for rules that do not have trailing semicolons, as
10385 POSIX requires. Improve the quality of locations in Bison
10386 diagnostics.
26b4a969 10387
e19c4e5d
PE
10388 * src/location.c: Include <quotearg.h>.
10389 (empty_location): Now const.
10390 (location_print): New function. Follow the recommendation of the
10391 GNU Coding Standards for locations that span file boundaries.
10392 * src/location.h: Do not include <quotearg.h>; no longer needed.
10393 (boundary): New type.
10394 (location_t): Use it. This allows locations to span file boundaries.
10395 All member uses changed: file -> start.file or end.file (as needed),
10396 first_line -> start.line, first_column -> start.column,
10397 last_line -> end.line, last_column -> end.column.
10398 (equal_boundaries): New function.
10399 (LOCATION_RESET, LOCATION_STEP): Remove.
10400 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10401 (empty_location): Now const.
10402 (location_print): New decl.
10403 * src/parse-gram.y (lloc_default): New function, which handles
10404 empty locations more accurately.
10405 (YYLLOC_DEFAULT): Use it.
10406 (%token COLON): Remove.
10407 (%token ID_COLON): New token.
26b4a969 10408 (rules): Use it.
e19c4e5d
PE
10409 (declarations, rules): Remove trailing semicolon.
10410 (declaration, rules_or_grammar_declaration):
10411 Allow empty (";") declaration.
10412 (symbol_def): Remove empty actions; no longer needed.
10413 (rules_or_grammar_declaration): Remove trailing semicolon.
10414 (semi_colon.opt): Remove.
10415 * src/reader.h: Include location.h.
10416 (scanner_cursor): New decl.
10417 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10418 rolling our own.
10419 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10420 of *loc.
10421 (STEP): Remove. No longer needed, now that adjust_location does
10422 the work. All uses removed.
10423 (scanner_cursor): New var.
10424 (adjust_location): Renamed from extend_location. It now sets
10425 *loc and adjusts the scanner cursor. All uses changed.
10426 Don't bother testing for CR.
10427 (handle_syncline): Remove location arg; now updates scanner cursor.
10428 All callers changed.
10429 (unexpected_end_of_file): Now accepts start boundary of token or
10430 comment, not location. All callers changed. Update scanner cursor,
10431 not the location.
10432 (SC_AFTER_IDENTIFIER): New state.
10433 (context_state): Renamed from c_context. All uses changed.
10434 (id_loc, code_start, token_start): New local vars.
10435 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10436 processing of Yacc white space and equivalents here.
10437 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10438 instead of returning ID immediately, since we need to search for
10439 a subsequent colon.
10440 (<INITIAL>"'", "\""): Save token_start.
10441 (<INITIAL>"%{", "{", "%%"): Save code_start.
10442 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10443 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10444 BEGIN context_state at end, not INITIAL.
10445 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10446 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10447 Return correct token start.
10448 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10449 the start of a character, string or multiline comment is found.
10450 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10451 Reduction): Adjust reported locations to match the more-precise
10452 results now expected.
10453 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10454 * tests/reduce.at (Useless Rules, Reduced Automaton,
10455 Underivable Rules): Likewise.
10456 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10457 or "|"' now that so many other tokens are allowed by the new grammar.
10458
10459 * src/complain.h (current_file): Remove duplicate decl;
10460 current_file is now owned by files.h.
10461 * src/complain.c, src/scan-gram.l: Include files.h.
10462
104632002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 10464
e19c4e5d
PE
10465 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10466 promotes to int; it might be unsigned int.
10467 * data/yacc.c (yy_reduce_print): Likewise.
10468
10469 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10470 be #defined in the prologue, not in the Bison declarations.
10471 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 10472
b64755e3
PE
104732002-12-02 Paul Eggert <eggert@twinsun.com>
10474
10475 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10476 * lib/strtoul.c: New file, from gnulib.
10477 This fixes a porting bug reported by Peter Klein in
161a71f3 10478 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 10479
6e746484
PE
104802002-11-30 Paul Eggert <eggert@twinsun.com>
10481
b64755e3
PE
10482 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10483 and put only a forward declaration in the prologue. This is for
10484 consistency with the other scanner helper functions.
10485
6ba55592
PE
10486 Type clashes now generate warnings, not errors, since it
10487 appears that POSIX may allow some grammars with type clashes.
10488 * src/reader.c (grammar_current_rule_check): Warn about
10489 type clashes instead of complaining.
10490 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10491
6e746484
PE
10492 Add Yacc library, since POSIX requires it.
10493 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10494 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10495 * lib/main.c, lib/yyerror.c: New files.
10496
10497 gram_error can be static; it need not be extern.
10498 * src/reader.h (gram_error): Remove decl.
10499 * src/parse-gram.y (gram_error): Now static. Add static decl.
10500 (print_token_value): Omit parameter names from forward decl,
10501 for consistency.
10502
88510f9c
PE
105032002-11-29 Paul Eggert <eggert@twinsun.com>
10504
6e746484
PE
10505 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10506 be declared before being used. E.g., one should typically
10507 declare them in the prologue. Use GNU coding style in examples.
10508 Put "const" consistently after the type it modifies. Mention
10509 that C99 supports "inline". Mention that yyerror traditionally
10510 returns "int".
10511
88510f9c
PE
10512 %parse-param and %lex-param now take just one argument, the
10513 declaration; the argument name is deduced from the declaration.
10514
10515 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10516 Reporting, Table of Symbols): Document this.
10517 * src/parse-gram.y (add_param): New function.
10518 (COMMA): Remove.
10519 (declaration): Implement new rule for %parse-param and %lex-param.
10520 * src/scan-gram.l: "," now elicits a warning, rather than being
10521 a token; this is more compatible with byacc.
10522 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10523
bb92250c
PE
105242002-11-27 Paul Eggert <eggert@twinsun.com>
10525
10526 Rename identifiers to avoid real and potential collisions.
10527
10528 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10529 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 10530 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
10531 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10532 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10533 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10534 All uses changed.
10535 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10536 The name "yycontrol" violates the name space rules, and this stuff
10537 wasn't being used anyway.
10538 (input): Remove action; this stuff wasn't being used.
10539 (gram_error): Rename local variable yylloc -> loc.
10540 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10541 (YY_DECL): Don't use "yy" at start of local variables.
10542 All uses changed, e.g., yylloc -> loc.
10543 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10544 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10545 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10546 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10547
10548 * src/parse-gram.y (gram_error): loc is now const *.
10549 * src/reader.h (gram_error): Likewise.
10550
3af4feb2
PE
105512002-11-24 Paul Eggert <eggert@twinsun.com>
10552
10553 Version 1.75c.
10554
10555 * tests/actions.at (Actions after errors): Use an output format
10556 more similar to that of the Printers and Destructors test.
10557 Test the position of the ';' token too.
10558 (Printers and Destructors): Likewise.
10559 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10560 unnecessarily alarming people when the test fails.
10561
10562 * data/yacc.c (yyerrlab1): Move this label down, so that the
10563 parser does not discard the lookahead token if the user code
10564 invokes YYERROR. This change is required for POSIX conformance.
10565
10566 * lib/error.c: Sync with gnulib.
10567
105682002-11-22 Paul Eggert <eggert@twinsun.com>
10569
10570 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10571 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10572 * lib/xmalloc.c: Likewise.
26b4a969 10573
58004308
PE
105742002-11-20 Paul Eggert <eggert@twinsun.com>
10575
10576 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10577
105782002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 10579
58004308
PE
10580 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10581 should use `if (! x) abort ();' rather than `assert (x);', and
10582 anyway it's one less thing to worry about configuring.
10583
10584 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10585 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10586 and replace all instances of assert with abort.
10587 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10588 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10589
10590 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10591 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10592 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10593 hash_find_entry, hash_rehash, hash_insert): Likewise.
10594 * src/conflicts.c (resolve_sr_conflict): Likewise.
10595 * src/lalr.c (set_goto_map, map_goto): Likewise.
10596 * src/nullable.c (nullable_compute): Likewise.
10597 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10598 * src/reader.c (packgram, reader): Likewise.
10599 * src/state.c (state_new, state_free, state_transitions_set,
10600 state_reduction_find): Likewise.
10601 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10602 symbol_pack): Likewise.
10603 * src/tables.c (conflict_row, pack_vector): Likewise.
10604 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10605 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10606 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10607 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10608
10609 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10610 (ARGMATCH_CONSTRAINT): New macro.
10611 (ARGMATCH_ASSERT): Use it.
10612
10613 * src/system.h (verify): New macro.
10614 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10615 rather than assert.
10616 * src/tables.c (tables_generate): Likewise.
10617
10618 * src/struniq.c (struniq_assert): Now returns void, and aborts
10619 if the assertion is false.
10620 (struniq_assert_p): Remove.
10621 * src/struniq.h: Likewise.
10622
76ae8198
PE
106232002-11-18 Paul Eggert <eggert@twinsun.com>
10624
10625 * data/glr.c (yygetLRActions): Replace `yyindex' with
10626 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10627 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 10628 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 10629
d3c4e709
AD
106302002-11-18 Akim Demaille <akim@epita.fr>
10631
10632 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10633 space.
10634 From Tim Van Holder.
10635
8d8a7238
PE
106362002-11-17 Paul Eggert <eggert@twinsun.com>
10637
10638 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10639 to "SyntaxError" for consistency with my 2002-11-15 change.
10640
10641 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10642 not define to {}, since this breaks the common use of `YYDPRINTF
10643 ((...));' if a single statement is desired (e.g. before `else').
10644 Work around GCC warnings by surrounding corresponding calls with
10645 {} if needed.
10646 (yyhasResolvedValue): Remove unused function.
10647 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10648 loop body.
10649 (yyreportSyntaxError): Renamed from yyreportParseError.
10650 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10651 All uses changed.
10652 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10653 extern when possible. Remove unused initializations.
10654
b0937b22
AD
106552002-11-16 Akim Demaille <akim@epita.fr>
10656
10657 Augment the similarity between GLR and LALR traces.
10658
10659 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10660 (YY_REDUCE_PRINT): New.
10661 (yyparse): Use them.
10662 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10663 YYDPRINT here.
10664 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10665 state reached after the reduction/recovery, since...
10666 (yyparse, yyprocessOneStack): Report the state we are entering in.
10667
c5e3e510
AD
106682002-11-16 Akim Demaille <akim@epita.fr>
10669
10670 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10671 Add support for --trace=skeleton.
10672 * src/scan-skel.l: %option debug.
10673 Scan strings of non-@ or \n instead of character by character.
10674 (scan_skel): Handle trace_skeleton.
10675 (QPUTS): New.
10676 (@output_parser_name@, @output_header_name@): ``Restore'' their
10677 support (used to be M4 macros).
10678 * data/yacc.c: Quote larger chunks, a la glr.c.
10679 * data/lalr1.cc: Likewise.
10680 The header guards are no longer available, so use some other
10681 string than `YYLSP_NEEDED'.
10682
4c6cc1db
AD
106832002-11-16 Akim Demaille <akim@epita.fr>
10684
10685 Make the ``Printers and Destructors'' test more verbose, taking
10686 `yacc.c''s behavior as (possibly wrong) reference.
10687
10688 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10689 instead of fprint on stdout.
10690 Set and report the last_line of the symbols.
10691 Consistently display values and locations.
10692
6d9e8019
PE
106932002-11-16 Paul Eggert <eggert@twinsun.com>
10694
10695 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10696
6e649e65
PE
106972002-11-15 Paul Eggert <eggert@twinsun.com>
10698
b25d88f6
PE
10699 * tests/actions.at (Actions after errors): New test case.
10700
6e649e65
PE
10701 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10702 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10703 tests/action.at, tests/calc.at, tests/conflicts.at,
10704 tests/cxx-type.at, tests/regression.at:
10705 "parse error" -> "syntax error" for POSIX compatibility.
10706 "parsing stack overflow..." -> "parser stack overflow" so
10707 that code matches Bison documentation.
10708
0f39aab9
AD
107092002-11-15 Akim Demaille <akim@epita.fr>
10710
10711 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10712 take two BRACED_CODE, not two string_content.
10713 Free the scanner's obstack when we are done.
10714 (code_content): New.
10715 * tests/calc.at: Adjust.
10716 * doc/bison.texinfo: Adjust.
10717 Also, make sure to include the `,' for these declarations.
10718
761c1926
AD
107192002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10720
10721 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10722 definition; avoids potential autoreconf problems.
10723
b0f98b10
AD
107242002-11-15 Akim Demaille <akim@epita.fr>
10725
10726 Always check the value returned by yyparse.
10727
10728 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10729 returned by yyparse.
10730 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10731 Adjust calls.
10732 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10733 returned by yyparse.
10734
970785f1
PH
107352002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10736
10737 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10738 on input.at test.
10739
8fcc7db1
PE
107402002-11-14 Paul Eggert <eggert@twinsun.com>
10741
7ec1b48e
PE
10742 * src/output.c (output_skeleton): Call xfopen instead of
10743 duplicating xfopen's body.
10744
cfff7583 10745 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 10746 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 10747
8fcc7db1
PE
10748 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10749 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10750 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10751 file twice in the grammar, as an extra check.
10752
10753 * tests/input.at (Torturing the Scanner): Surround the
10754 backslash-newline tests with "#if 0", to make it less likely that
10755 we'll run into compiler bugs. Bring back solitary \ inside
10756 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 10757 test backslash-newline in C character constant.
8fcc7db1 10758
4e8d992c
AD
107592002-11-14 Akim Demaille <akim@epita.fr>
10760
10761 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10762 status of the compiler.
f32b346d 10763 Calling `exit 1' is no longer needed.
4e8d992c
AD
10764 Reported by Nelson H. F. Beebe.
10765
9501dc6e
AD
107662002-11-14 Akim Demaille <akim@epita.fr>
10767
10768 * tests/atlocal.in (CPPFLAGS): We have config.h.
10769 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10770 New.
10771 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10772 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10773 * tests/regression.at, tests/torture.at: Use them for all the
10774 grammars that are to be compiled.
10775 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10776 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10777 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10778
18b519c0
AD
107792002-11-14 Akim Demaille <akim@epita.fr>
10780
10781 * doc/bison.texinfo: Various formatting changes (alignments in
10782 samples, additional @group/@end group, GCS in samples.
10783 Use @deffn instead of simple @table to define the directives,
10784 macros, variables etc.
10785
9a86cdb9
PE
107862002-11-13 Paul Eggert <eggert@twinsun.com>
10787
daa33def 10788 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 10789 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 10790
daa33def 10791 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 10792 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
10793 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10794 * tests/headers.at (export YYLTYPE): Likewise.
10795
10796 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 10797 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 10798
9a86cdb9
PE
10799 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10800 comments, since they're not portable. Use GNU coding style.
10801
9c1e26bd
AD
108022002-11-13 Akim Demaille <akim@epita.fr>
10803
10804 * data/yacc.c: Leave bigger chunks of quoted text.
10805 (YYDSYMPRINTF): New.
10806 Use it to report symbol activities.
10807 * data/glr.c (YYDSYMPRINTF): New.
10808 Use it.
10809
87f721cc
PE
108102002-11-12 Paul Eggert <eggert@twinsun.com>
10811
10812 Version 1.75b.
10813
10814 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10815 (yyglrReduce): Return yyok, not 0.
10816 This should avoid the enumerated-type warnings reported
464c6927 10817 by Nelson H. F. Beebe in
161a71f3 10818 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
10819
10820 * lib/bbitset.h (BITSET_INLINE): Remove.
10821 * lib/bitset.h [! BITSET_INLINE]: Remove.
10822 (bitset_set, bitset_reset, bitset_test): Rename local vars
10823 to avoid shadowing warnings by GCC.
10824
10825 * data/glr.c (inline): Remove #define. It's the user's
10826 responsibility to #define it away, just like 'const'.
464c6927 10827 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 10828 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 10829
87f721cc
PE
10830 * Makefile.maint (po-check): Scan .l and .y files instead of the
10831 .c and the .h files that they generate. This fixes the bug
10832 reported by Tim Van Holder in:
161a71f3 10833 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
10834 Look for N_ as well as for _. Try to avoid matching #define for
10835 N_ and _.
10836 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10837 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10838 * src/scan-gram.l: Revamp regular expressions so that " and '
10839 do not confuse xgettext.
10840
10841 * src/struniq.h (struniq_new): Do not declare the return type
10842 to be 'const'; this violates the C standard.
10843 * src/struniq.c (struniq_new): Likewise.
10844
be14ade5
AD
108452002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10846
10847 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10848 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10849 linker.
10850
05291fbc
AD
108512002-11-12 Akim Demaille <akim@epita.fr>
10852
10853 * Makefile.maint: Sync with Autoconf:
10854 (local_updates): New.
10855
1f5fd52e
AD
108562002-11-12 Akim Demaille <akim@epita.fr>
10857
10858 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10859
283f1e64
AD
108602002-11-12 Akim Demaille <akim@epita.fr>
10861
10862 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10863 locations.
10864
886b69d1
AD
108652002-11-12 Akim Demaille <akim@epita.fr>
10866
10867 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10868 not yyvalue.
10869
3df37415
AD
108702002-11-12 Akim Demaille <akim@epita.fr>
10871
10872 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10873 Use it to test the GLR parser.
10874
7bd6c77e
AD
108752002-11-12 Akim Demaille <akim@epita.fr>
10876
10877 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10878 defines it.
10879 * data/glr.c (yystos): New.
10880 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10881 (YYDSYMPRINT): New.
10882 (yyval): Don't define it, it is handled via M4.
10883 (yyrecoverParseError): Free verbosely the discarded symbols.
10884 * data/yacc.c (yysymprint): Remove, rather...
10885 (b4_yysymprint_generate): invoke.
10886 * data/c.m4 (b4_yysymprint_generate): New.
10887 Accept pointers as arguments, as opposed to the version from
10888 yacc.c.
10889 (b4_yydestruct_generate): Likewise.
10890 * tests/cations.at (Printers and Destructors): Use Bison directives
10891 instead of CPP macros.
10892 Don't rely on internal details.
10893
b0400cc6
AD
108942002-11-12 Akim Demaille <akim@epita.fr>
10895
10896 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10897 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10898 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10899 it against YYEMPTY and so forth), work on yytoken (i.e., set
10900 it to YYEMPTY etc.).
10901 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10902 (b4_symbol_actions): Remove.
10903 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10904 for 0, end-of-input.
10905
72f889cc
AD
109062002-11-12 Akim Demaille <akim@epita.fr>
10907
10908 * doc/bison.texinfo (Destructor Decl): New.
10909
b1ae9233
AD
109102002-11-12 Akim Demaille <akim@epita.fr>
10911
10912 * src/tables.c (tables_generate): Use free for pointers that
10913 cannot be NULL, not XFREE.
10914 (pack_vector): Use assert, not fatal, for bound violations.
10915 * src/state.c (state_new): Likewise.
10916 * src/reader.c (reader): Likewise.
10917 * src/lalr.c (set_goto_map): Likewise.
72f889cc 10918 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
10919 the file name.
10920
7ec2d4cd
AD
109212002-11-12 Akim Demaille <akim@epita.fr>
10922
10923 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10924 Restore.
10925 * src/scan-gram.l (last_string): Is global to the file, not to
10926 yylex.
10927 * src/parse-gram.y (input): Don't append the epilogue here,
10928 (epilogue.opt): do it here, and free the scanner's obstack.
10929 * src/reader.c (epilogue_set): Rename as...
10930 (epilogue_augment): this.
10931 * data/c.m4 (b4_epilogue): Defaults to empty.
10932
573a6cd3
AD
109332002-11-12 Akim Demaille <akim@epita.fr>
10934
10935 * src/getargs.c (long_options): Remove duplicates.
10936 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10937 Remove.
10938 * doc/bison.rnh: Remove.
10939 * doc/bison.texinfo (VMS Invocation): Remove.
10940
95612cfa
AD
109412002-11-12 Akim Demaille <akim@epita.fr>
10942
10943 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10944 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10945
10946 Use struniq for symbols.
10947
10948 * src/symtab.h (symbol_t): The tag member is a struniq.
10949 (symbol_type_set): Adjust.
10950 * src/symtab.c (symbol_new): Takes a struniq.
10951 (symbol_free): Don't free the tag member.
10952 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10953 (hash_compare_symbol, hash_symbol): these.
10954 Use the fact that tags as struniqs.
10955 (symbol_get): Use struniq_new.
10956 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10957 Returns a strniq.
10958 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10959 and type members are struniqs.
10960 * src/reader.c (get_merge_function)
10961 (grammar_current_rule_merge_set): Adjust.
10962 (TYPE, current_type): Are struniq.
10963
10964 Use struniq for file names.
10965
10966 * src/files.h, src/files.c (infile): Split into...
10967 (grammar_file, current_file): these.
10968 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10969 * src/reduce.c (reduce_print): Likewise.
10970 * src/getargs.c (getargs): Likewise.
10971 * src/complain.h, src/complain.c: Likewise.
10972 * src/main.c (main): Call struniqs_new early enough to use it for
10973 file names.
10974 Don't free the input file name.
10975
3e6656f9
AD
109762002-11-12 Akim Demaille <akim@epita.fr>
10977
10978 * src/symtab.c (symbol_free): Remove dead deactivated code:
10979 type_name are properly removed.
10980 Don't use XFREE to free items that cannot be NULL.
10981 * src/struniq.h, src/struniq.c: New.
10982 * src/main.c (main): Initialize/free struniqs.
10983 * src/parse-gram.y (%union): Add astruniq member.
10984 (yyprint): Adjust.
10985 * src/scan-gram.l (<{tag}>): Return a struniq.
10986 Free the obstack bit that used to store it.
10987 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10988
7672019c
PE
109892002-11-11 Paul Eggert <eggert@twinsun.com>
10990
10991 Revamp to fix many (but not all) of the C- and M4-related quoting
10992 problems. Among other things, this fixes the Bison bug reported
10993 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 10994 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
10995
10996 Use new @ escapes consistently. Represent brackets with @{ and @}
10997 rather than @<:@ and @:>@, since this works a bit better with dumb
10998 editors like vi. Represent @ with @@, since @ is now consistently
10999 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11000 __ofile__, to avoid unexpected expansions. Similarly, use @output
11001 rather than #output.
11002
11003 * data/c.m4 (b4_copyright): Omit file name from comment, since
11004 the file name could contain "*/".
11005 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11006 be quoted. All uses changed.
11007
11008 * data/glr.c: Use new @ escapes consistently.
11009 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11010 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11011 Remove, since they couldn't handle arbitrary characters in file
11012 names.
11013 * data/lalr1.cc: Likewise.
11014 * data/yacc.c: Likewise.
11015
11016 * src/files.c (output_infix): Remove; all uses removed.
11017 * src/files.h: Likewise.
11018
11019 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11020 mishandled funny characters in file names, and anyway it isn't
11021 needed any more.
11022 * data/yacc.c: Likewise.
11023 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11024
11025 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11026 * data/yacc.c: Likewise.
11027
11028 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11029 strings now.
11030 (muscle_init): Quote filename as a C string.
11031 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11032 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11033 * src/output.c (escaped_file_name_output): New function.
11034 (prepare_symbols): Quote tokens for M4.
11035 (prepare): Don't insert output_infix, output_prefix,
11036 output_parser_name, output_header_name; this is now down by scan-skel.
11037 Insert skeleton as a C string.
11038
11039 * src/output.c (user_actions_output, symbol_destructors_output,
11040 symbol_printers_output): Quote filenames for C and M4.
11041 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11042
11043 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11044 escapes other than \\ and \'; this simplifies the code.
11045 (<SC_STRING>): Likewise, for \\ and \".
11046 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11047 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11048 Use new escapes @{ and @} for [ and ].
11049
11050 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11051 them with auto vars.
11052 Switch to new escape scheme, where @ is the escape character uniformly.
11053 Abort if a stray escape character is found. Avoid unbounded input
11054 buffer when parsing non-escaped text.
11055
11056 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11057 __oline__, #output, $@, and @{ do not have unintended meanings.
11058
acea4f3b
PE
110592002-11-09 Paul Eggert <eggert@twinsun.com>
11060
11061 Fix the test failure due to GCC warnings described in
161a71f3 11062 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
11063 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11064 evaluate to 0 if it's impossible for NINF to be in the respective
11065 table.
11066 (yygetLRActions, yyrecoverParseError): Use them.
11067
11068 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11069 counted in the token inserted at end of file. Now takes
11070 location_t *, not location_t, so that the location can be
11071 adjusted. All uses changed.
11072
11073 * tests/regression.at (Invalid inputs): Adjust wording in
11074 diagnostic to match the new behavior.
11075
11076 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11077 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11078 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11079 abort ();'. This reduces the runtime of the "Many lookaheads"
11080 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11081 GCC 3.2.
11082
20ef1ad5
PE
110832002-11-07 Paul Eggert <eggert@twinsun.com>
11084
11085 * src/parse-gram.y (CHARACTER): Remove unused token.
11086 All uses removed.
11087
11088 * src/scan-gram.l: Remove stack option. We no longer use the
11089 stack, since the stack was never deeper than 1; instead, use the
11090 new auto var c_context to record the stacked value.
11091
11092 Remove nounput option. At an unexpected end of file, we now unput
11093 the minimal input necessary to end cleanly; this simplifies the
11094 code.
11095
11096 Avoid unbounded token sizes where this is easy.
11097
11098 (unexpected_end_of_file): New function.
11099 Use it to systematize the error message on unexpected EOF.
11100 (last-string): Now auto, not static.
11101 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11102 (scanner_last_string_free): Remove; not used.
11103 (percent_percent_count): Move decl to just before use.
11104 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11105 not the (never otherwised-used) CHARACTER.
11106
93724f13
AD
111072002-11-07 Akim Demaille <akim@epita.fr>
11108
11109 Let yyerror always receive the msg as last argument, so that
11110 yyerror can be variadic.
11111
11112 * data/yacc.c (b4_yyerror_args): New.
11113 Use it when calling yyerror.
11114 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11115 Use it when calling yyerror.
11116 * doc/bison.texinfo (Error Reporting): Adjust.
11117 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11118 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11119
6e40b4eb
AD
111202002-11-06 Akim Demaille <akim@epita.fr>
11121
11122 #line should have quoted strings.
11123 Ideally, this should be done by m4_quotearg.
11124
11125 * src/scan-skel.l: Include quotearg.h.
11126 Quote __ofile__.
11127 * src/output.c (symbol_printers_output)
11128 (symbol_destructors_output): Quote the file name.
11129
2dfbfc12
AD
111302002-11-06 Akim Demaille <akim@epita.fr>
11131
11132 * tests/regression.at (Invalid inputs): Adjust to the recent
11133 messages.
11134
437c2d80
AD
111352002-11-06 Akim Demaille <akim@epita.fr>
11136
11137 Restore --no-lines.
11138 Reported by Jim Kent.
11139
11140 * data/c.m4 (b4_syncline): New.
11141 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11142 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11143 * src/output.c (user_actions_output): Likewise.
11144 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 11145 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 11146
900c5db5
AD
111472002-11-06 Akim Demaille <akim@epita.fr>
11148
11149 * src/main.c (main): Free `infile'.
11150 * src/scan-gram.l (handle_syncline): New.
11151 Recognize `#line'.
11152 * src/output.c (user_actions_output, symbol_destructors_output)
11153 (symbol_printers_output): Use the location's file name, not
11154 infile.
11155 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11156
e183b123 111572002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 11158
e183b123 11159 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 11160 either has GLR conflict entries.
e183b123 11161
193eb6b7
PE
111622002-11-05 Paul Eggert <eggert@twinsun.com>
11163
e183b123
PE
11164 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11165 "integer out of range" rather than "invalid value".
11166 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11167 accordingly.
11168
193eb6b7
PE
11169 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11170 Also, remove one static variable in the scanner.
11171
11172 * src/scan-gram.l (braces_level): Now auto, not static.
11173 Initialize to zero if the compiler is being picky.
11174 (INITIAL): Clear braces_level instead of incrementing it.
11175 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11176 as POSIX 1003.1-2001 requires.
11177 * src/system.h (IF_LINT): New macro, taken from coreutils.
11178 * configure.ac: Define "lint" if --enable-gcc-warnings.
11179
29c01725
AD
111802002-11-05 Akim Demaille <akim@epita.fr>
11181
11182 * src/scan-gram.l: When it starts with `%', complain about the
11183 whole directive, not just that `invalid character: %'.
11184
8aeac3ca
AD
111852002-11-04 Akim Demaille <akim@epita.fr>
11186
11187 * Makefile.maint: Update from Autoconf.
11188 (update, cvs-update, po-update, do-po-update): New.
11189
793a58bb
AD
111902002-11-04 Akim Demaille <akim@epita.fr>
11191
11192 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11193 and yyerror.
11194 Have yyerror `use' its arguments.
11195 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11196 returns true when location & yacc & pure & parse-param.
11197 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11198
c4d720cd
AD
111992002-11-04 Akim Demaille <akim@epita.fr>
11200
11201 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11202 clashes.
11203 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11204 font-lock-mode.
11205 Use complain_at.
11206 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11207 slot 0.
11208
613a0dc5
PE
112092002-11-03 Paul Eggert <eggert@twinsun.com>
11210
11211 * src/reader.c (get_merge_function, grammar_current_rule_check):
11212 Use consistent diagnostics for reporting type name clashes.
11213 Quote the types with <>, for consistency with Yacc.
11214 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11215
2a8d363a
AD
112162002-11-03 Akim Demaille <akim@epita.fr>
11217
11218 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11219 New.
11220 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11221 (b4_parse_param): Remove.
11222 Use b4_identification.
11223 Propagate b4_pure_args where needed to pass them to yyerror.
11224 * data/glr.m4 (b4_parse_param): Remove.
11225 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11226 (b4_lpure_formals): New.
11227 Use b4_identification.
11228 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11229 b4_user_formals and b4_user_args.
11230 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11231 (yyreportAmbiguity): When using a pure parser, also need
11232 the location, and the parse-params.
11233 Adjust callers.
11234 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11235 When using a pure parser, also need the parse-params.
11236 Adjust callers.
11237 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11238 (%pure-parser + %parse-param) LALR and GLR parsers.
11239 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11240 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11241 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11242 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11243 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11244 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11245 * doc/bison.texinfo: Untabify the whole file.
11246 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11247 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11248 (Error Reporting): Adjust to these new directives.
11249 Document %error-verbose, deprecate YYERROR_VERBOSE.
11250
9e32add8
AD
112512002-11-03 Akim Demaille <akim@epita.fr>
11252
11253 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11254 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11255 command line options.
11256 * tests/cxx-type.at: Formatting changes.
11257
b02d90a5
PE
112582002-11-03 Paul Eggert <eggert@twinsun.com>
11259
11260 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11261 to count columns correctly, and to check for invalid inputs.
9e32add8 11262
b02d90a5
PE
11263 Use mbsnwidth to count columns correctly. Account for tabs, too.
11264 Include mbswidth.h.
11265 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11266 (extend_location): New function.
11267 (YY_LINES): Remove.
11268
11269 Handle CRLF in C code rather than in Lex code.
11270 (YY_INPUT): New macro.
11271 (no_cr_read): New function.
11272
11273 Scan UCNs, even though we don't fully handle them yet.
11274 (convert_ucn_to_byte): New function.
11275
11276 Handle backslash-newline correctly in C code.
11277 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11278 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11279 all uses changed.
11280 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11281 Use {splice} wherever C allows backslash-newline.
11282 YY_STEP after space, newline, vertical-tab.
11283 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 11284
b02d90a5
PE
11285 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11286
11287 ({int}, handle_action_dollar, handle_action_at): Check for integer
11288 overflow.
9e32add8 11289
b02d90a5
PE
11290 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11291
11292 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11293 as well as \000. Check for UCHAR_MAX, not 255.
11294 Allow \x with an arbitrary positive number of digits, as in C.
11295 Check for overflow here.
11296 Allow \? and UCNs, for compatibility with C.
11297
11298 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11299 with quote slot used by complain_at.
11300
11301 * tests/input.at: Add tests for backslash-newline, m4 quotes
11302 in symbols, long literals, and funny escapes in strings.
11303
11304 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11305 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11306 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11307 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11308 * m4/mbswidth.m4: New file, from GNU coreutils.
11309
11310 * doc/bison.texinfo (Grammar Outline): Document // comments.
11311 (Symbols): Document that trigraphs have no special meaning in Bison,
11312 nor is backslash-newline allowed.
11313 (Actions): Document that trigraphs have no special meaning.
11314
11315 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11316 no longer used.
11317
113182002-11-02 Paul Eggert <eggert@twinsun.com>
11319
11320 * src/reader.c: Don't include quote.h; not needed.
11321 (get_merge_function): Reword warning to be consistent with
11322 type clash diagnostic in grammar_current_rule_check.
11323
11324 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11325 bug in trigraph handling.
11326
11327 * src/output.c (prepare_symbols): When printing token names,
11328 escape "[" as "@<:@" and likewise for "]".
11329
11330 * src/system.h (errno): Remove declaration, as we are now
11331 assuming C89 or better, and C89 guarantees errno.
11332
762b212b
PE
113332002-10-30 Paul Eggert <eggert@twinsun.com>
11334
11335 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11336 Check for close failures.
11337 * src/files.h (xfclose): Return void, not int, since it always
11338 returned zero.
11339 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11340 indicates one.
11341 * src/output.c (output_skeleton): Use xfclose rather than fclose
11342 and ferror. xfclose now checks ferror.
11343
11344 * data/glr.c (YYLEFTMOST_STATE): Remove.
11345 (yyreportTree): Use a stack-based leftmost state. This avoids
11346 our continuing battles with bogus warnings about initializers.
11347
56100c60
AD
113482002-10-30 Akim Demaille <akim@epita.fr>
11349
11350 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11351 #if.
11352
51b4a04c
PH
113532002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11354
11355 * tests/glr-regr1.at: New test for reported regressions.
11356 * tests/testsuite.at: Add glr-regr1.at test.
11357 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 11358
bf1ebda2
PE
113592002-10-24 Paul Eggert <eggert@twinsun.com>
11360
5c16c6b1
PE
11361 Version 1.75a.
11362
bf1ebda2
PE
11363 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11364 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11365 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11366 Don't assume strdup exists; POSIX says its an XSI extension.
11367 Check for buffer overflow on input.
11368
b526ee61
AD
113692002-10-24 Akim Demaille <akim@epita.fr>
11370
11371 * src/output.c (output_skeleton): Don't disable M4sugar comments
11372 too soon: it results in comments being expanded.
11373 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11374 first output.
11375
f1886bb2
AD
113762002-10-24 Akim Demaille <akim@epita.fr>
11377
11378 * data/yacc.c (m4_int_type): New.
11379 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11380 char' as only yacc.c wants K&R portability.
11381 * data/glr.c (yysigned_char): Remove.
11382 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11383 Reported by Quoc Peyrot.
11384
c5576256
PE
113852002-10-23 Paul Eggert <eggert@twinsun.com>
11386
11387 * src/main.c (main): With --trace=time, report times even if a
11388 non-fatal error occurs. Formerly, the times were reported in some
11389 such cases but not in others.
11390 * src/reader.c (reader): Just return if a complaint has been issued,
11391 instead of exiting, so that 'main' can report times.
11392
27b0ffea
AD
113932002-10-22 Akim Demaille <akim@epita.fr>
11394
11395 * src/system.h: Include sys/types.
11396 Reported by Bert Deknuydt.
11397
223a7883
PE
113982002-10-23 Paul Eggert <eggert@twinsun.com>
11399
11400 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11401 Suggested by Art Haas.
11402
114032002-10-22 Paul Eggert <eggert@twinsun.com>
11404
11405 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11406 decl; not needed any more.
11407 * src/main.c (main): Use return to exit, undoing yesterday's change.
11408 The last OS that we could find where this wouldn't work is
11409 SunOS 3.5, and that's too old to worry about now.
11410
11411 * data/glr.c (struct yyltype): Define members even when not
11412 doing locations. This is more consistent with yacc.c, and it
11413 works around the following bug reports:
161a71f3
PE
11414 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11415 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 11416
223a7883
PE
11417 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11418 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11419 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11420
8b76775a
AD
114212002-10-22 Akim Demaille <akim@epita.fr>
11422
11423 * data/README: New.
11424
6db10d14
PE
114252002-10-21 Paul Eggert <eggert@twinsun.com>
11426
11427 Be consistent about 'bool'; the old code used an enum in one
11428 module and an int in another, and this violates the C standard.
11429 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11430 * configure.ac (AC_HEADER_STDBOOL): Add.
11431 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11432 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11433 * src/symtab.c (hash_compare_symbol_t): Likewise.
11434 * src/system.h (bool, false, true): Use a definition consistent
11435 with ../lib/hash.c. All uses changed.
11436
11437 * src/complain.c (warning_issued): Renamed from warn_message_count,
11438 so that we needn't worry about integer overflow (!).
11439 Now of type bool. All uses changed.
11440 (complaint_issued): Renamed from complain_message_count; likewise.
11441
11442 * src/main.c (main): Use exit to exit with failure.
27b0ffea 11443
6db10d14
PE
11444 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11445 rather than 1 and 0.
11446 * src/main.c (main): Likewise.
11447 * src/getargs.c (getargs): Likewise.
11448 * src/reader.c (reader): Likewise.
11449
11450 * src/getarg.c (getargs): Remove duplicate code for
11451 "Try `bison --help'".
11452
11453 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11454 What was that "2" for?
11455
11456 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11457 * src/getargs.c (usage): Likewise.
11458
11459 * src/getargs.c (getargs): When there are too few operands, report
11460 the last one. When there are too many, report the first extra
11461 one. This is how diffutils does it.
11462
92a060fd
PE
114632002-10-20 Paul Eggert <eggert@twinsun.com>
11464
11465 Remove K&R vestiges.
11466 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11467 * src/complain.c (VA_START): Remove. Assume prototypes.
11468 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11469 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11470 fatal): Assume prototypes.
11471 * src/complain.h: Assume prototypes.
11472 * src/system.h (PARAMS): Remove.
11473 Include <limits.h> unconditionally, since it's guaranteeed even
11474 for a freestanding C89 compiler.
11475 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11476 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 11477
e7cb57c0
AD
114782002-10-20 Akim Demaille <akim@epita.fr>
11479
11480 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11481 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11482 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11483 (yyresolveStates, yyresolveAction, yyresolveStack)
11484 (yyprocessOneStack): Use them.
11485 (yy_reduce_print): New.
11486 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11487
0245f82d
AD
114882002-10-20 Akim Demaille <akim@epita.fr>
11489
11490 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11491 arguments and output `void'.
11492 (b4_c_function): Rename as...
11493 (b4_c_function_def): this.
11494 (b4_c_function_decl, b4_c_ansi_function_def)
11495 (b4_c_ansi_function_decl): New.
11496 Change the interpretation of the arguments: before `int, foo', now
11497 `int foo, foo'.
11498 * data/yacc.c (yyparse): Prototype and define thanks to these.
11499 Adjust b4_c_function_def uses.
11500 * data/glr.c (yyparse): Likewise, but ANSI only.
11501
39912f52
AD
115022002-10-20 Akim Demaille <akim@epita.fr>
11503
11504 * src/output.c (prepare): Move the definition of `tokens_number',
11505 `nterms_number', `undef_token_number', `user_token_number_max'
11506 to...
11507 (prepare_tokens): Here.
11508 (prepare_tokens): Rename as...
11509 (prepare_symbols): this.
11510 (prepare): Move the definition of `rules_number' to...
11511 (prepare_rules): here.
11512 (prepare): Move the definition of `last', `final_state_number',
11513 `states_number' to...
11514 (prepare_states): here.
11515 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11516
20c1e2ad
AD
115172002-10-20 Akim Demaille <akim@epita.fr>
11518
11519 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11520
21964f43
AD
115212002-10-20 Akim Demaille <akim@epita.fr>
11522
11523 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11524 * data/c.m4: here.
11525
66d30cd4
AD
115262002-10-20 Akim Demaille <akim@epita.fr>
11527
11528 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11529 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11530 `pair'.
11531 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11532 `name' to...
11533 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11534 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11535 These.
11536
95f2c9fe
PE
115372002-10-19 Paul Eggert <eggert@twinsun.com>
11538
11539 Do not create a temporary file, as that involves security and
11540 cleanup headaches. Instead, use a pair of pipes.
11541 Derived from a suggestion by Florian Krohm.
11542 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11543 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11544 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11545 (BISON_PREREQ_SUBPIPE): Add.
11546 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11547 Add subpipe.h, subpipe.c.
11548 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11549 * po/POTFILES.in: Add lib/subpipe.c.
11550 * src/output.c: Include "subpipe.h".
11551 (m4_invoke): Remove decl.
11552 (scan_skel): New decl.
11553 (output_skeleton): Use pipe rather than temporary file for m4 input.
11554 Check that m4sugar.m4 is readable, to avoid deadlock.
11555 Check for pipe I/O error.
11556 * src/scan-skel.l (readpipe): Remove decl.
11557 (scan_skel): New function, to be used in place of m4_invoke.
11558 Read from stream rather than file.
66d30cd4 11559
95f2c9fe
PE
11560 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11561 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11562 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11563 this generates a more-accurate value anyway.
11564
11565 * lib/timevar.c (timervar_accumulate): Rename locals to
11566 avoid confusion with similarly-named more-global.
11567 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11568
11569 * src/output.c (prepare): Use xstrdup to convert char const *
11570 to char *, to avoid GCC warning.
11571
c19988b7
AD
115722002-10-19 Akim Demaille <akim@epita.fr>
11573
11574 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11575 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11576 Use them to have `calc.y' ready for %pure-parser.
11577 * data/yacc.c (YYLEX): Pass a yylex return type to
11578 b4_c_function_call.
11579
ae7453f2
AD
115802002-10-19 Akim Demaille <akim@epita.fr>
11581
11582 Prototype support of %lex-param and %parse-param.
11583
11584 * src/parse-gram.y: Add the definition of the %lex-param and
11585 %parse-param tokens, plus their rules.
11586 Drop the `_' version of %glr-parser.
11587 Add the "," token.
11588 * src/scan-gram.l (INITIAL): Scan them.
11589 * src/muscle_tab.c: Comment changes.
11590 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11591 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11592 (muscle_entry_s): The `value' member is no longer const.
11593 Adjust all dependencies.
11594 * src/muscle_tab.c (muscle_init): Adjust: use
11595 MUSCLE_INSERT_STRING.
11596 Initialize the obstack earlier.
11597 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11598 (muscle_pair_list_grow): New.
11599 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11600 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11601 * tests/calc.at: Use %locations, not --locations.
11602 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11603
0e575721
AD
116042002-10-19 Akim Demaille <akim@epita.fr>
11605
11606 * src/getargs.c (usage): Take status as argument and exit
11607 accordingly.
11608 Report the traditional `Try ... --help' message when status != 0.
11609 (usage, version): Don't take a FILE * as arg, it is pointless.
11610 (getargs): When there is an incorrect number of arguments, make it
11611 an error, and report it GNUlically thanks to `usage ()'.
11612
724ce7f5
PE
116132002-10-18 Paul Eggert <eggert@twinsun.com>
11614
3a781eb2
PE
11615 * data/glr.c (yyreportParseError): Don't assume that sprintf
11616 yields the length of the printed string, as this is not true
11617 on SunOS 4.1.4. Reported by Peter Klein.
11618
724ce7f5
PE
11619 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11620 * tests/conflicts.at (%nonassoc and eof): Likewise.
11621 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11622
473d0a75
AD
116232002-10-17 Akim Demaille <akim@epita.fr>
11624
11625 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11626 * src/getargs.c (trace_types, trace_args): Adjust.
11627 * src/reader.c (grammar_current_rule_prec_set)
11628 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11629 Standardize error messages.
11630 And s/@prec/%prec/!
11631 (reader): Use trace_flag to enable scanner/parser debugging,
11632 instead of an adhoc scheme.
11633 * src/scan-gram.l: Remove trailing debugging code.
11634
e76d2469
PE
116352002-10-16 Paul Eggert <eggert@twinsun.com>
11636
93e2236a
PE
11637 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11638 MUSCLE_TAB_H.
11639
e76d2469
PE
11640 * NEWS: Officially drop support for building Bison with K&R C,
11641 since it didn't work anyway and it's not worth worrying about.
11642 * Makefile.maint (wget_files): Remove ansi2knr.c.
11643 (ansi2knr.c-url_prefix): Remove.
11644 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11645 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11646 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11647
5bd1c419
PE
116482002-10-15 Paul Eggert <eggert@twinsun.com>
11649
11650 Stop using the "enum_" trick for K&R-style function definitions;
11651 it confused me, and I was the author! Instead, assume that people
11652 who want to use K&R C compilers (when using these modules in GCC,
11653 perhaps?) will run ansi2knr.
11654
11655 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11656 All uses of "enum_" changed to "enum ".
11657 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11658 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 11659
5bd1c419
PE
11660 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11661 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11662 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11663 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11664 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11665 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11666 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11667 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11668 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11669 Use function prototypes; this removes the need for declaring
11670 static functions simply to provide their prototypes.
11671 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11672 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11673 bitset_count_, bitset_create, bitset_dump, bitset_first,
11674 bitset_free, bitset_init, bitset_last, bitset_next,
11675 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11676 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11677 bitset_print, bitset_release_memory, bitset_toggle_,
11678 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11679 debug_bitset): Likewise.
11680 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11681 * lib/bitset_stats.c (bitset_log_histogram_print,
11682 bitset_percent_histogram_print, bitset_stats_and,
11683 bitset_stats_and_cmp, bitset_stats_and_or,
11684 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11685 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11686 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11687 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11688 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11689 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11690 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11691 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11692 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11693 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11694 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11695 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11696 bitset_stats_zero): Likewise.
11697 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11698 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11699 bitsetv_dump, debug_bitsetv): Likewise.
11700 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11701 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11702 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11703 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11704 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11705 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11706 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11707 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11708 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11709 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11710 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11711 Likewise.
11712 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11713 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11714 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11715 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11716 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11717 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11718 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11719 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11720 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11721 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11722 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 11723
ae26e1f0
AD
117242002-10-14 Akim Demaille <akim@epita.fr>
11725
11726 Version 1.75.
11727
d43baf71
AD
117282002-10-14 Akim Demaille <akim@epita.fr>
11729
11730 * tests/Makefile.am (maintainer-check-posix): New.
11731
7ebc83e3
AD
117322002-10-14 Akim Demaille <akim@epita.fr>
11733
11734 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11735 member.
11736
05846dae
AD
117372002-10-14 Akim Demaille <akim@epita.fr>
11738
11739 * src/tables.c (table_ninf_remap): base -> tab.
11740 Reported by Matt Rosing.
11741
1318e37d
PE
117422002-10-14 Paul Eggert <eggert@twinsun.com>
11743
447fbb17
PE
11744 * tests/action.at, tests/calc.at, tests/conflicts.at,
11745 tests/cxx-type.at, tests/headers.at, tests/input.at,
11746 tests/regression.at, tests/synclines.at, tests/torture.at:
11747 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11748 so that the tests still work even if POSIXLY_CORRECT is set.
11749 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 11750
1318e37d
PE
11751 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11752 for portability to K&R hosts. Fix typo: signed char is guaranteed
11753 only to 127, not to 128.
11754 * data/glr.c (yysigned_char): New type.
11755 * data/yacc.c (yysigned_char): Likewise.
11756 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11757
cc0f0794
PE
117582002-10-13 Paul Eggert <eggert@twinsun.com>
11759
5038f418
PE
11760 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11761 true due to limited range of data type" warning from GCC.
11762
cc0f0794
PE
11763 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11764 by wrapping enum yytokentype's definition inside #ifndef
11765 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11766
6fed0802
AD
117672002-10-13 Akim Demaille <akim@epita.fr>
11768
11769 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11770 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11771
32f0598d
AD
117722002-10-13 Akim Demaille <akim@epita.fr>
11773
11774 * Makefile.maint: Update from Autoconf 2.54.
11775 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11776
7ea9a33f
AD
117772002-10-13 Akim Demaille <akim@epita.fr>
11778
11779 * src/print.c (print_state): Separate the list of solved conflicts
11780 from the other items.
11781 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11782
ea99527d
AD
117832002-10-13 Akim Demaille <akim@epita.fr>
11784
11785 Let nondeterministic skeletons be usable with deterministic
11786 tables.
11787
11788 With the patch, GAWK compiled by GCC without -O2 passes its test
11789 suite using a GLR parser driven by LALR tables. It fails with -O2
11790 because `struct stat' gives two different answers on my machine:
11791 88 (definition of an auto var) and later 96 (memset on this var).
11792 Hence the stack is badly corrumpted. The headers inclusion is to
11793 blame: if I move the awk.h inclusion before GLR's system header
11794 inclusion, the two struct stat have the same size.
11795
11796 * src/tables.c (pack_table): Always create conflict_table.
11797 (token_actions): Always create conflict_list.
11798 * data/glr.c (YYFLAG): Remove, unused.
11799
f377f69f
AD
118002002-10-13 Akim Demaille <akim@epita.fr>
11801
11802 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11803 (O0FLAGS): New.
11804 (VALGRIND, GXX): New.
11805 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11806 * tests/bison.in: Run $PREBISON a pre-command.
11807 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11808 (maintainer-check-g++): New.
11809 * Makefile.am (maintainer-check): New.
11810
2a1fe6ed
AD
118112002-10-13 Akim Demaille <akim@epita.fr>
11812
11813 * data/glr.c: Formatting changes.
11814 Tweak some trace messages to match yacc.c's.
11815
f50adbbd
AD
118162002-10-13 Akim Demaille <akim@epita.fr>
11817
11818 GLR parsers sometimes raise parse errors instead of performing the
11819 default reduction.
11820 Reported by Charles-Henry de Boysson.
11821
11822 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 11823 check the length of the traces when %glr.
f50adbbd
AD
11824 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11825 GLR's traces.
11826 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11827 Test GLR parsers.
11828 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11829 (yyltype): Remove the yy prefix from the member names.
11830 (yytable): Complete its comment.
11831 (yygetLRActions): Map error action number from YYTABLE from
11832 YYTABLE_NINF to 0.
11833 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11834 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11835 not satisfying as we could compare an YYACTION computed from
11836 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11837 only value for error actions.
11838 (yyreportParseError): In verbose parse error messages, don't issue
11839 `error' in the list of expected tokens.
11840 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11841 next action to perform to match glr.c's decoding.
11842 (yytable): Complete its comment.
11843
bcbad5b9
PE
118442002-10-13 Paul Eggert <eggert@twinsun.com>
11845
11846 Fix problem reported by Henrik Grubbstroem in
161a71f3 11847 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
11848 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11849 because the Bison parser reads the second action before reducing
11850 the first one.
11851 * src/scan-gram.l (rule_length): New static var.
11852 Use it to keep track of the rule length in the scanner, since
11853 we can't expect the parser to be in lock-step sync with the scanner.
11854 (handle_action_dollar, handle_action_at): Use this var.
11855 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 11856
14904b89
PE
118572002-10-12 Paul Eggert <eggert@twinsun.com>
11858
1fe611e5
PE
11859 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11860 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11861 Include <sys/time.h> when checking for clock_t and struct tms.
11862 Use same include order as source.
11863 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 11864 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 11865
1fe611e5
PE
11866 * lib/timevar.c: Update copyright date and clarify comments.
11867 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 11868
1fe611e5
PE
11869 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11870 GCC version as of today, then merge Bison's changes.
11871 Change "GCC" to "Bison" in copyright notice. timevar.def's
11872 author is Akim, so change that too.
11873
98194095
PE
11874 * src/reader.c (grammar_current_rule_check):
11875 Don't worry about the default action if $$ is untyped.
11876 Prevents bogus warnings reported by Jim Gifford in
161a71f3 11877 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 11878
14904b89
PE
11879 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11880 * data/glr.c, data/lalr1.cc, data/yacc.c:
11881 Output token definitions before the first part of user declarations.
11882 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 11883 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 11884
ff6dca18
PE
118852002-10-11 Paul Eggert <eggert@twinsun.com>
11886
11887 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11888 (yyparse): here. This undoes some of the 2002-07-25 change.
11889 Compatibility problem reported by Ralf S. Engelschall with
11890 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11891
eb714592
AD
118922002-10-11 Akim Demaille <akim@epita.fr>
11893
11894 * tests/regression.at Characters Escapes): New.
11895 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11896 characters.
11897 Reported by Jan Nieuwenhuizen.
11898
b7195100
AD
118992002-10-11 Akim Demaille <akim@epita.fr>
11900
11901 * po/id.po: New.
11902
f28a0f2d
PE
119032002-10-10 Paul Eggert <eggert@twinsun.com>
11904
11905 Portability fixes for bitsets; this also avoids several GCC
11906 warnings.
11907
11908 * lib/abitset.c: Include <stddef.h>, for offsetof.
11909 * lib/lbitset.c: Likewise.
11910
11911 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11912 properly for vectors of objects. Do not assume that adding a
11913 header size to a multiple of a word size yields a value that is
11914 properly aligned for the whole union.
11915 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11916
11917 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11918 unique names for structures.
11919 * lib/ebitset.c (ebitset_bytes): Likewise.
11920 * lib/lbitset.c (lbitset_bytes): Likewise.
11921
11922 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11923 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11924 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11925 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11926 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11927 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11928 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11929 to improve the type-checking that GCC can do.
11930 * lib/bitset.c (bitset_op4_cmp): Likewise.
11931 * lib/bitset_stats.c (bitset_stats_count,
11932 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11933 bitset_stats_copy, bitset_stats_disjoint_p,
11934 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11935 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11936 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11937 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11938 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11939 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11940 bitset_stats_or_and_cmp): Likewise.
11941 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11942 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11943 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11944 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11945
11946 * lib/abitset.h: Include bitset.h, not bbitset.h.
11947 * lib/ebitset.h: Likewise.
11948 * lib/lbitset.h: Likewise.
11949
11950 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11951 All instances of parameters of type enum bitset_opts are now of
11952 type enum_bitset_opts, to conform to the C Standard, and similarly
11953 for enum_bitset_type.
11954 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11955 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11956
11957 Do not use "struct bitset_struct" to mean different things in
11958 different modules. Not only is this confusing, it violates
11959 the C Standard, which requires that structure types in different
11960 modules must be compatible if one is to be passed to the other.
11961 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11962 All instances of "struct bitset_struct *" replaced with "bitset".
11963 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11964 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11965 struct lbitset_struct, struct bitset_stats_struct): New types.
11966 All uses of struct bitset_struct changed to union bitset_union,
11967 etc.
ba0fe3c7 11968 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
11969 struct bitset_struct): Remove.
11970 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11971 struct bitset_struct): Remove.
11972 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11973 bitset_struct): Remove.
11974 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11975 Likewise.
11976
11977 Do not call a function of type T using a call that assumes the
11978 function is of a different type U. Standard C requires that a
11979 function must be called with a type that is compatible with its
11980 definition.
11981 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11982 New decls.
11983 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11984 New functions.
11985 * lib/ebitset.c (PFV): Remove.
11986 * lib/lbitset.c (PFV): Likewise.
11987 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11988 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11989 decls.
11990 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11991 (ebitset_vtable): Use them.
11992 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11993 lbitset_xor): New functions.
11994 (lbitset_vtable): Use them.
11995
11996 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11997 Declare.
11998
11999 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12000 GCC warning.
12001 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12002 Use offsetof, for simplicity.
12003
6fbe4984
PE
120042002-10-06 Paul Eggert <eggert@twinsun.com>
12005
12006 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12007 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 12008 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
12009 which was inadvertently undone by the 2002-09-30 patch.
12010 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12011 the same width as int.
12012
420f93c8
PE
120132002-10-04 Paul Eggert <eggert@twinsun.com>
12014
12015 Version 1.50.
12016
12017 * configure.ac (AC_INIT), NEWS: Increment version number.
12018
12019 * doc/bison.texinfo: Minor spelling, grammar, and white space
12020 fixes.
12021 (Symbols): Mention that any negative value returned from yylex
12022 signifies end-of-input. Warn about negative chars. Mention
12023 the portable Standard C character set.
12024
12025 The GNU coding standard says CFLAGS and YFLAGS are reserved
12026 for the installer to set.
12027 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12028 * src/Makefile.am (AM_CFLAGS): Likewise.
12029 (AM_YFLAGS): Renamed from YFLAGS.
12030
12031 Fix some MAX and MIN problems.
12032 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12033 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12034 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12035 * src/reader.c (reader): Use it.
12036
12037 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12038 POSIX 1003.1-2001 has removed fgrep.
12039
120402002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12041
12042 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12043 interpreted as signed.
12044 * lib/ebitset.c (ebitset_list): Fix bug.
12045
ff68026d
PE
120462002-10-01 Paul Eggert <eggert@twinsun.com>
12047
12048 More fixes for 64-bit hosts and large bitsets.
12049
12050 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12051 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12052 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12053 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12054 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12055 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12056 bitset_count_): Likewise.
12057 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12058 bitset_first, bitset_last): Likewise.
12059 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12060 bitset_stats_list_reverse, bitset_stats_size,
12061 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12062 Likewise.
12063 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12064 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12065 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12066 bitsetv_reflexive_transitive_closure): Likewise.
12067 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12068 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12069 Likewise.
12070 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12071 Likewise.
420f93c8 12072
ff68026d
PE
12073 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12074 Use size_t, not unsigned int, to count bytes.
12075 * lib/abitset.h (abitset_bytes): Likewise.
12076 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12077 Likewise.
12078 * lib/bitset.h (bitset_bytes): Likewise.
12079 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12080 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12081 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12082 * lib/ebitset.c (ebitset_bytes): Likewise.
12083 * lib/ebitset.h (ebitset_bytes): Likewise.
12084 * lib/lbitset.c (lbitset_bytes): Likewise.
12085 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 12086
ff68026d
PE
12087 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12088 abitset_subset_p, abitset_disjoint_p, abitset_and,
12089 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12090 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12091 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12092 abitset_or_and, abitset_or_and_cmp):
12093 Use bitset_windex instead of unsigned int.
12094 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12095 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12096 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12097 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12098 Likewise.
12099 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 12100
ff68026d
PE
12101 * lib/bitset.c (bitset_print):
12102 Use proper printf formats for widths of integer types.
12103 * lib/bitset_stats.c (bitset_percent_histogram_print,
12104 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12105 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12106 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12107 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 12108
ff68026d
PE
12109 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12110 BITSET_SIZE_MAX): New macros.
12111 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12112 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12113 to BITSET_WINDEX_MAX.
12114
12115 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12116 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12117 since we now return the bitset_bindex type (not int).
12118
12119 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12120 when computing sizes.
12121 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12122
12123 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12124 and avoid cast to unsigned.
12125
6aa452a6
AD
121262002-09-30 Akim Demaille <akim@epita.fr>
12127
12128 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12129 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12130 Updates from Michael Hayes.
12131
927f7817
AD
121322002-09-30 Art Haas <ahaas@neosoft.com>
12133
12134 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12135 invocations.
12136 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12137 defined.
12138
9738f41e
AD
121392002-09-27 Akim Demaille <akim@epita.fr>
12140
12141 Version 1.49c.
12142
a5c75d7f
AD
121432002-09-27 Akim Demaille <akim@epita.fr>
12144
12145 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12146 (Because of AC_LIBSOURCE).
12147
8280e179
AD
121482002-09-27 Akim Demaille <akim@epita.fr>
12149
12150 Playing with Autoscan.
12151
12152 * configure.ac: Remove the old LIBOBJ tweaks.
12153 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12154 * lib/strrchr.c: New.
12155 * lib/strtol.c: New, from the Coreutils 4.5.1.
12156
ae64af35
AD
121572002-09-27 Akim Demaille <akim@epita.fr>
12158
12159 Playing with Autoscan.
12160
12161 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12162 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12163 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12164 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12165 Coreutils 4.5.1.
12166
d1a1114f
AD
121672002-09-24 Akim Demaille <akim@epita.fr>
12168
12169 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12170 (Frequently Asked Questions, Parser Stack Overflow): New.
12171
b906441c
AD
121722002-09-13 Akim Demaille <akim@epita.fr>
12173
12174 Playing with autoscan.
12175
12176 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12177 * src/files.c (skeleton_find): Remove, unused.
12178 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12179 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12180
bd701811
AD
121812002-09-13 Akim Demaille <akim@epita.fr>
12182
12183 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12184 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12185
e0a13e7b
AD
121862002-09-13 Akim Demaille <akim@epita.fr>
12187
12188 * configure.ac: Require 2.54.
12189 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12190 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12191 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12192 Remove, provided by Autoconf macros.
12193
c97011bf
AD
121942002-09-12 Akim Demaille <akim@epita.fr>
12195
12196 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12197
d862b1be
AD
121982002-09-12 Akim Demaille <akim@epita.fr>
12199
12200 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12201 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12202 Reported by Martin Mokrejs.
12203
3d38c03a
AD
122042002-09-10 Akim Demaille <akim@epita.fr>
12205
12206 * src/parse-gram.y: Associate a human readable string to each
12207 token type.
12208 * tests/regression.at (Invalid inputs): Adjust.
12209
b6347355
AD
122102002-09-10 Gary V. Vaughan <gary@gnu.org>
12211
12212 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12213 with an Autoconf-2.5x style configure.ac.
12214
09ba4ab2
PE
122152002-09-06 Paul Eggert <eggert@twinsun.com>
12216
12217 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12218 exception applies only to yacc.c. This is a modification of a
12219 patch originally suggested by Akim Demaille.
12220
21846f69
AD
122212002-09-06 Akim Demaille <akim@epita.fr>
12222
09ba4ab2
PE
12223 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12224 here to...
12225 * data/yacc.c: here.
12226
21846f69
AD
12227 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12228 LocationType.
12229 (b4_ltype): Default to yy::Location from location.hh.
12230
c0ad8bf3
AD
122312002-09-04 Jim Meyering <jim@meyering.net>
12232
12233 * data/yacc.c: Guard the declaration of yytoknum also with
12234 `#ifdef YYPRINT', so it is declared only when used.
12235
3a93251e
AD
122362002-09-04 Akim Demaille <akim@epita.fr>
12237
12238 * configure.in: Rename as...
12239 * configure.ac: this.
12240 Bump to 1.49c.
12241
427c0dda
AD
122422002-09-04 Akim Demaille <akim@epita.fr>
12243
12244 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12245 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12246 translate maintainer only messages.
12247
6a254321
PE
122482002-08-12 Paul Eggert <eggert@twinsun.com>
12249
645e30d1
PE
12250 Version 1.49b.
12251
6a254321
PE
12252 * Makefile.am (SUBDIRS): Remove intl.
12253 (DISTCLEANFILES): Remove.
12254 * NEWS: Mention that GNU M4 is now required. Clarify what is
12255 meant by "larger grammars". Mention the pt_BR translation.
12256 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12257 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12258 Bump version from 0.11.2 to 0.11.5.
12259 (BISON_PREREQ_STAGE): Remove.
12260 (AM_GNU_GETTEXT): Use external gettext.
12261 (AC_OUTPUT): Remove intl/Makefile.
12262
12263 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12264
12265 * data/glr.c: Include string.h, for strlen.
12266 (yyreportParseError): Use size_t for yysize.
12267 (yy_yypstack): No longer nested inside yypstates, as nested
12268 functions are not portable. Do not assume size_t is the
12269 same width as int.
12270 (yypstates): Do not assume that ptrdiff_t is the same width
12271 as int, and similarly for yyposn and YYINDEX.
12272
12273 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12274
12275 * lib/Makefile.am (INCLUDES): Do not include from the intl
12276 directory, which has been removed.
12277 * src/Makefile.am (INCLUDES): Likewise.
12278
12279 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12280 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12281 New vars.
12282
12283 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12284 * tests/Makefile.am (EXTRA_DIST): Likewise.
12285
12286 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12287 Do not assume that bitset_windex is the same width as unsigned.
12288
12289 * lib/abitset.c (abitset_unused_clear): Do not assume that
12290 bitset_word is the same width as int.
12291 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12292 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12293 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12294 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12295 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12296
12297 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12298 portability to one's complement hosts!).
12299 * lib/ebitset.c (ebitset_op1): Likewise.
12300 * lib/lbitset.c (lbitset_op1): Likewise.
12301
12302 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12303 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12304 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12305 Sync with fileutils.
12306 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12307 lib/gettext.h: Sync with diffutils.
12308
12309 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12310 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12311
12312 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12313 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12314 check for void *.
12315
12316 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12317 size_t; the old version tried to do this but casted improperly.
12318 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12319 (bitset_test): Now returns int, not unsigned long.
12320
12321 * lib/bitset_stats.c: Include "gettext.h".
12322 (_): New macro.
12323 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12324 name locals "index", as it generates unnecessary warnings on some
12325 hosts that have an "index" function.
12326
12327 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12328 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12329 they need translation.
12330 * src/LR0.c (state_list_append, new_itemsets, get_state,
12331 append_states, generate_states): Likewise.
12332 * src/assoc.c (assoc_to_string): Likewise.
12333 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12334 * src/gram.c (grammar_dump): Likewise.
12335 * src/injections.c (injections_compute): Likewise.
12336 * src/lalr.c (lookaheads_print): Likewise.
12337 * src/relation.c (relation_transpose): Likewise.
12338 * src/scan-gram.l: Likewise.
12339 * src/tables.c (table_grow, pack_vector): Likewise.
12340
12341 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12342 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12343 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12344 * m4/mbstate_t.m4: Sync with fileutils.
12345 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12346
12347 * po/LINGUAS: Add pt_BR.
12348 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12349 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12350 lib/timevar.c.
12351 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12352 manual recommends.
12353 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12354
12355 * src/complain.c (strerror_r): Remove decl; not needed.
12356 (strerror): Use same pattern as ../lib/error.c.
12357
12358 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12359
12360 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12361
12362 * src/main.c (main): Cast result of bindtextdomain and textdomain
12363 to void, to avoid a GCC warning when --disable-nls is in effect.
12364
12365 * src/scan-gram.l: Use strings rather than escapes when possible,
12366 to minimize the number of warnings from xgettext.
12367 (handle_action_dollar, handle_action_at): Don't use isdigit,
12368 as it mishandles negative chars and it may not work as expected
12369 outside the C locale.
12370
12371 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12372 this is a GCC extension and is not portable to other compilers.
12373
12374 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12375 Do not include <ctype.h>; no longer needed.
12376 Do not include <malloc.h>; no longer needed (and generates
12377 warnings on OpenBSD 3.0).
12378
12379 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12380 it's not portable.
12381
12382 * tests/regression.at: Do not use 'cc -c input.c -o input';
12383 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12384
12385 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12386 exit status as failure, not just exit status 1. Sun C exits
12387 with status 2 sometimes.
12388
12389 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12390 Use it for the two large tests.
12391
c8f002c7
AD
123922002-08-02 Akim Demaille <akim@epita.fr>
12393
12394 * src/conflicts.c (conflicts_output): Don't output rules never
12395 reduced here, since anyway that computation doesn't work.
12396 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12397 (rule_useless_p, rule_never_reduced_p): New.
12398 (grammar_rules_partial_print): Use a filter instead of a range.
12399 Display the title only if needed.
12400 (grammar_rules_print): Adjust.
12401 (grammar_rules_never_reduced_report): New.
12402 * src/tables.c (action_row): Move the computation of rules never
12403 reduced to...
12404 (token_actions): here.
12405 * src/main.c (main): Make the parser before making the report, so
12406 that rules never reduced are computed.
12407 Call grammar_rules_never_reduced_report.
12408 * src/print.c (print_results): Report rules never reduced.
12409 * tests/conflicts.at, tests/reduce.at: Adjust.
12410
cd08e51e
AD
124112002-08-01 Akim Demaille <akim@epita.fr>
12412
12413 Instead of attaching lookaheads and duplicating the rules being
12414 reduced by a state, attach the lookaheads to the reductions.
12415
12416 * src/state.h (state_t): Remove the `lookaheads',
12417 `lookaheads_rule' member.
12418 (reductions_t): Add a `lookaheads' member.
12419 Use a regular array for the `rules'.
12420 * src/state.c (reductions_new): Initialize the lookaheads member
12421 to 0.
12422 (state_rule_lookaheads_print): Adjust.
12423 * src/state.h, src/state.c (state_reductions_find): New.
12424 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12425 (count_rr_conflicts): Adjust.
12426 * src/lalr.c (LArule): Remove.
12427 (add_lookback_edge): Adjust.
12428 (state_lookaheads_count): New.
12429 (states_lookaheads_initialize): Merge into...
12430 (initialize_LA): this.
12431 (lalr_free): Adjust.
12432 * src/main.c (main): Don't free nullable and derives too early: it
12433 is used by --verbose.
12434 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12435
bb0027a9
AD
124362002-08-01 Akim Demaille <akim@epita.fr>
12437
12438 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12439 `rule_number_t**'.
12440 (set_derives, free_derives): Rename as...
12441 (derives_compute, derives_free): this.
12442 Adjust all dependencies.
12443 * src/nullable.c (set_nullable, free_nullable): Rename as...
12444 (nullable_compute, nullable_free): these.
12445 (rule_list_t): Store rule_t *, not rule_number_t.
12446 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12447 pointers, instead of their numbers.
12448 * src/main.c (main): Call nullable_free, and derives_free earlier,
12449 as they were lo longer used.
12450
3325ddc4
AD
124512002-08-01 Akim Demaille <akim@epita.fr>
12452
12453 * lib/timevar.c (get_time): Include children time.
12454 * src/lalr.h (LA, LArule): Don't export them: used with the
12455 state_t.
12456 * src/lalr.c (LA, LArule): Static.
12457 * src/lalr.h, src/lalr.c (lalr_free): New.
12458 * src/main.c (main): Call it.
12459 * src/tables.c (pack_vector): Check whether loc is >= to the
12460 table_size, not >.
12461 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12462 (tables_generate): do it, since that's also it which allocates
12463 them.
12464 Don't free LA and LArule, main does.
12465
c6f1a33c
AD
124662002-07-31 Akim Demaille <akim@epita.fr>
12467
12468 Separate parser tables computation and output.
12469
12470 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12471 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12472 (yydefgoto, yydefact, high): Move to...
12473 * src/tables.h, src/tables.c: here.
12474 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12475 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12476 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12477 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12478 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12479 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12480 (action_row, save_row, token_actions, save_column, default_goto)
12481 (goto_actions, sort_actions, matching_state, pack_vector)
12482 (table_ninf_remap, pack_table, prepare_actions): Move to...
12483 * src/tables.c: here.
12484 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12485 * src/output.c (token_actions, output_base, output_conflicts)
12486 (output_check): Merge into...
12487 (prepare_actions): this.
12488 (actions_output): Rename as...
12489 (user_actions_output): this.
12490 * src/main.c (main): Call tables_generate and tables_free.
12491
1509d42f
AD
124922002-07-31 Akim Demaille <akim@epita.fr>
12493
12494 Steal GCC's --time-report support.
12495
12496 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12497 stolen/adjusted from GCC.
12498 * m4/stage.m4: Remove time related checks.
12499 * m4/timevar.m4: New.
12500 * configure.in: Adjust.
12501 * src/system.h: Adjust to using timevar.h.
12502 * src/getargs.h, src/getargs.c: Support trace_time for
12503 --trace=time.
12504 * src/main.c (stage): Remove.
12505 (main): Replace `stage' invocations with timevar calls.
12506 * src/output.c: Insert pertinent timevar calls.
12507
273a74fa
AD
125082002-07-31 Akim Demaille <akim@epita.fr>
12509
12510 Let --trace have arguments.
12511
12512 * src/getargs.h (enum trace_e): New.
12513 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12514 (long_options, short_options): --trace/-T takes an optional
12515 argument.
12516 Change all the uses of trace_flag to reflect the new flags.
12517 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12518
12519 Strengthen `stage' portability.
12520
12521 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12522 * configure.in: Use it.
12523 Don't check for malloc.h and sys/times.h.
12524 * src/system.h: Include them when appropriate.
12525 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12526 times and struct tms are available.
12527
217598da
AD
125282002-07-30 Akim Demaille <akim@epita.fr>
12529
12530 In verbose parse error message, don't report `error' as an
12531 expected token.
12532 * tests/actions.at (Printers and Destructors): Adjust.
12533 * tests/calc.at (Calculator $1): Adjust.
12534 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12535 error message, do not report the parser accepts the error token in
12536 that state.
12537
52489d44
AD
125382002-07-30 Akim Demaille <akim@epita.fr>
12539
12540 Normalize conflict related messages.
12541
12542 * src/complain.h, src/complain.c (warn, complain): New.
12543 * src/conflicts.c (conflicts_print): Use them.
12544 (conflict_report_yacc): New, extracted from...
12545 (conflicts_print): here.
12546 * tests/conflicts.at, tests/existing.at: Adjust.
12547
e8832397
AD
125482002-07-30 Akim Demaille <akim@epita.fr>
12549
12550 Report rules which are never reduced by the parser: those hidden
12551 by conflicts.
12552
12553 * src/LR0.c (save_reductions): Don't make the final state too
12554 different: save its reduction (accept) instead of having a state
12555 without any action (no shift or goto, no reduce).
12556 Note: the final state is now a ``regular'' state, i.e., the
12557 parsers now contain `reduce 0' as default reduction.
12558 Nevertheless, since they decide to `accept' when yystate =
12559 final_state, they still will not reduce rule 0.
12560 * src/print.c (print_actions, print_reduction): Adjust.
12561 * src/output.c (action_row): Track reduced rules.
12562 (token_actions): Report rules never reduced.
12563 * tests/conflicts.at, tests/regression.at: Adjust.
12564
caf23d24
AD
125652002-07-30 Akim Demaille <akim@epita.fr>
12566
12567 `stage' was accidently included in a previous patch.
12568 Initiate its autoconfiscation.
12569
12570 * configure.in: Look for malloc.h and sys/times.h.
12571 * src/main.c (stage): Adjust.
12572 Report only when trace_flag.
12573
640748ee
AD
125742002-07-29 Akim Demaille <akim@epita.fr>
12575
12576 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12577 state_number_t.
12578 (errs_t): symbol_t*, not symbol_number_t.
12579 (reductions_t): rule_t*, not rule_number_t.
12580 (FOR_EACH_SHIFT): New.
12581 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12582 * src/print.c, src/print_graph.c: Adjust.
12583
88bce5a2
AD
125842002-07-29 Akim Demaille <akim@epita.fr>
12585
12586 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12587
12588 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12589 (endtoken, accept): these.
12590 * src/reader.c (reader): Set endtoken's default tag to "$end".
12591 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12592 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12593 Adjust.
12594
1bfb97db
AD
125952002-07-29 Akim Demaille <akim@epita.fr>
12596
12597 * src/reduce.c (reduce_grammar): When the language is empty,
12598 complain about the start symbol, not the axiom.
12599 Use its location.
12600 * tests/reduce.at (Empty Language): New.
12601
fc5734fe
AD
126022002-07-26 Akim Demaille <akim@epita.fr>
12603
12604 * src/reader.h, src/reader.c (gram_error): ... can't get
12605 yycontrol without making too strong assumptions on the parser
12606 itself.
12607 * src/output.c (prepare_tokens): Use the real 0th value of
12608 token_translations instead of `0'.
12609 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12610 visible here.
12611 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12612 for the time being: %locations ought to provide it to yyerror.
12613
3650b4b8
AD
126142002-07-25 Akim Demaille <akim@epita.fr>
12615
12616 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12617 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12618 * tests/regression.at (Web2c Actions): Adjust.
12619
4b3d3a8e
AD
126202002-07-25 Akim Demaille <akim@epita.fr>
12621
12622 Stop storing rules from 1 to nrules + 1.
12623
12624 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12625 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12626 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12627 Iterate from 0 to nrules.
12628 Use rule_number_as_item_number and item_number_as_rule_number.
12629 Adjust to `derive' now containing possibly 0.
12630 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12631 Handle the `- 1' part in rule numbers from/to item numbers.
12632 * src/conflicts.c (log_resolution): Fix the message which reversed
12633 shift and reduce.
12634 * src/output.c (action_row): Initialize default_rule to -1.
12635 (token_actions): Adjust.
12636 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12637 expected output.
12638 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12639
4a2a22f4
AD
126402002-07-25 Akim Demaille <akim@epita.fr>
12641
12642 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12643 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12644 (b4_c_knr_arg_decl): New.
12645 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12646 yyreport_parse_error.
12647
b8df3223
AD
126482002-07-25 Akim Demaille <akim@epita.fr>
12649
12650 * data/yacc.c (yyreport_parse_error): New, extracted from...
12651 (yyparse): here.
12652 (yydestruct, yysymprint): Move above yyparse.
12653 Be K&R compliant.
12654
a762e609
AD
126552002-07-25 Akim Demaille <akim@epita.fr>
12656
12657 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12658 replace...
12659 (b4_sint_type, b4_uint_type): these.
12660 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12661 * tests/regression.at (Web2c Actions): Adjust.
12662
12b0043a
AD
126632002-07-25 Akim Demaille <akim@epita.fr>
12664
12665 * src/gram.h (TIEM_NUMBER_MAX): New.
12666 (item_number_of_rule_number, rule_number_of_item_number): Rename
12667 as...
12668 (rule_number_as_item_number, item_number_as_rule_number): these.
12669 Adjust dependencies.
12670 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12671 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12672 (symbol_number_to_vector_number): New.
12673 (order): Of vector_number_t* type.
12674 (base_t, BASE_MAX, BASE_MIN): New.
12675 (froms, tos, width, pos, check): Of base_t type.
12676 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12677 (actrow): Of action_number_t type.
12678 (conflrow): Of unsigned int type.
12679 (table_ninf, base_ninf): New.
12680 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12681 (muscle_insert_int_table, muscle_insert_base_table)
12682 (muscle_insert_rule_number_table): New.
12683 (prepare_tokens): Output `toknum' as int_table.
12684 (action_row): Returns a rule_number_t.
12685 Use ACTION_MIN, not SHRT_MIN.
12686 (token_actions): yydefact is rule_number_t*.
12687 (table_ninf_remap): New.
12688 (pack_table): Use it for `base' and `table'.
12689 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12690 replaced with...
12691 (YYPACT_NINF, YYTABLE_NINF): these.
12692 (yypact, yytable): Compute their types instead of hard-coded
12693 `short'.
12694 * tests/regression.at (Web2c Actions): Adjust.
12695
5dde258a
AD
126962002-07-19 Akim Demaille <akim@epita.fr>
12697
12698 * src/scan-gram.l (id): Can start with an underscore.
12699
a945ec39
AD
127002002-07-16 Akim Demaille <akim@epita.fr>
12701
12702 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12703 Adjust all former `associativity' dependencies.
12704 * src/symtab.c (symbol_new): Default associativity is `undef', not
12705 `right'.
12706 (symbol_check_alias_consistence): Adjust.
12707
fae437e8
AD
127082002-07-09 Akim Demaille <akim@epita.fr>
12709
12710 * doc/bison.texinfo: Properly set the ``header'' part.
12711 Use @dircategory ``GNU programming tools'' as per Texinfo's
12712 documentation.
12713 Use @copying.
12714
1a715ef2
AD
127152002-07-09 Akim Demaille <akim@epita.fr>
12716
12717 * lib/quotearg.h: Protect against multiple inclusions.
12718 * src/location.h (location_t): Add a `file' member.
12719 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12720 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12721 `error_one_per_line' support.
12722
a5d50994
AD
127232002-07-09 Akim Demaille <akim@epita.fr>
12724
12725 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12726 * src/reader.c (lineno): Remove.
12727 Adjust all dependencies.
12728 (get_merge_function): Take a location and use complain_at.
12729 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12730 * tests/regression.at (Invalid inputs, Mixing %token styles):
12731 Adjust.
12732
b275314e
AD
127332002-07-09 Akim Demaille <akim@epita.fr>
12734
12735 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12736 recovery rule, and forbid extensions when --yacc.
12737 (gram_error): Use complain_at.
12738 * src/reader.c (reader): Exit if there were parse errors.
12739
865b9df1
AD
127402002-07-09 Akim Demaille <akim@epita.fr>
12741
12742 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12743 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12744 Reported by R Blake <blakers@mac.com>.
12745
c76e14da
AD
127462002-07-09 Akim Demaille <akim@epita.fr>
12747
12748 * data/yacc.c: Output the copyright notive in the header.
12749
7db2ed2d
AD
127502002-07-03 Akim Demaille <akim@epita.fr>
12751
12752 * src/output.c (froms, tos): Are state_number_t.
12753 (save_column): sp, sp1, and sp2 are state_number_t.
12754 (prepare): Rename `final' as `final_state_number', `nnts' as
12755 `nterms_number', `nrules' as `rules_number', `nstates' as
12756 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12757 unused.
12758 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12759 * data/lalr1.cc (nsym_): Remove, unused.
12760
e68e0410
AD
127612002-07-03 Akim Demaille <akim@epita.fr>
12762
12763 * src/lalr.h, src/lalr.c (goto_number_t): New.
12764 * src/lalr.c (goto_list_t): New.
12765 Propagate them.
12766 * src/nullable.c (rule_list_t): New.
12767 Propagate.
12768 * src/types.h: Remove.
12769
e1a4f3a4
AD
127702002-07-03 Akim Demaille <akim@epita.fr>
12771
12772 * src/closure.c (print_fderives): Use rule_rhs_print.
12773 * src/derives.c (print_derives): Use rule_rhs_print.
12774 (rule_list_t): New, replaces `shorts'.
12775 (set_derives): Add comments.
12776 * tests/sets.at (Nullable, Firsts): Adjust.
12777
536545f3
AD
127782002-07-03 Akim Demaille <akim@epita.fr>
12779
12780 * src/output.c (prepare_actions): Free `tally' and `width'.
12781 (prepare_actions): Allocate and free `order'.
12782 * src/symtab.c (symbols_free): Free `symbols'.
12783 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12784 * src/output.c (m4_invoke): Move to...
12785 * src/scan-skel.l: here.
12786 (<<EOF>>): Close yyout, and free its name.
12787
8b752b00
AD
127882002-07-03 Akim Demaille <akim@epita.fr>
12789
12790 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12791
12792 * src/LR0.c (new_state): Merge into...
12793 (state_list_append): this.
12794 (new_states): Merge into...
12795 (generate_states): here.
12796 (set_states): Don't ensure a proper `errs' state member here, do it...
12797 * src/conflicts.c (conflicts_solve): here.
12798 * src/state.h, src/state.c: Comment changes.
12799 (state_t): Rename member `shifts' as `transitions'.
12800 Adjust all dependencies.
12801 (errs_new): For consistency, also take the values as argument.
12802 (errs_dup): Remove.
12803 (state_errs_set): New.
12804 (state_reductions_set, state_transitions_set): Assert that no
12805 previous value was assigned.
12806 (state_free): New.
12807 (states_free): Use it.
12808 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12809 temporary storage: use `errs' and `nerrs' as elsewhere.
12810 (set_conflicts): Allocate and free this `errs'.
12811
613f5e1a
AD
128122002-07-02 Akim Demaille <akim@epita.fr>
12813
12814 * lib/libiberty.h: New.
12815 * lib: Update the bitset implementation from upstream.
12816 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12817 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12818 * src/main.c: Adjust bitset stats calls.
12819
26e0cadc
PE
128202002-07-01 Paul Eggert <eggert@twinsun.com>
12821
12822 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12823 char, so that negative chars don't collide with $.
12824
1154cced
AD
128252002-06-30 Akim Demaille <akim@epita.fr>
12826
12827 Have the GLR tests be `warning' checked, and fix the warnings.
12828
12829 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12830 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12831 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12832 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12833 (yyaddDeferredAction): static.
12834 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12835 (yyreportParseError): yyprefix is const.
12836 yytokenp is used only when verbose.
12837 (yy__GNUC__): Replace with __GNUC__.
12838 (yypdumpstack): yyi is size_t.
12839 (yypreference): Un-yy local variables and arguments, to avoid
12840 clashes with `yyr1'. Anyway, we are not in the user name space.
12841 (yytname_size): be an int, as is compared with ints.
12842 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12843 Use them.
12844 * tests/cxx-gram.at: Use quotation to protect $1.
12845 Use AT_COMPILE to enable warnings hunts.
12846 Prototype yylex and yyerror.
12847 `Use' argc.
12848 Include `string.h', not `strings.h'.
12849 Produce and prototype stmtMerge only when used.
12850 yylex takes a location.
12851
97650f4e
AD
128522002-06-30 Akim Demaille <akim@epita.fr>
12853
12854 We spend a lot of time in quotearg, in particular when --verbose.
12855
12856 * src/symtab.c (symbol_get): Store a quoted version of the key.
12857 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12858 Adjust all callers.
12859
d2576365
AD
128602002-06-30 Akim Demaille <akim@epita.fr>
12861
12862 * src/state.h (reductions_t): Rename member `nreds' as num.
12863 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12864 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12865
ccaf65bc
AD
128662002-06-30 Akim Demaille <akim@epita.fr>
12867
12868 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12869 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12870 (shifts_to): Rename as...
12871 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12872 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12873 (TRANSITION_IS_DISABLED, transitions_to): these.
12874
87675353
AD
128752002-06-30 Akim Demaille <akim@epita.fr>
12876
12877 * src/print.c (print_shifts, print_gotos): Merge into...
12878 (print_transitions): this.
12879 (print_transitions, print_errs, print_reductions): Align the
12880 lookaheads columns.
12881 (print_core, print_transitions, print_errs, print_state,
12882 print_grammar): Output empty lines separator before, not after.
12883 (state_default_rule_compute): Rename as...
12884 (state_default_rule): this.
12885 * tests/conflicts.at (Defaulted Conflicted Reduction),
12886 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12887 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12888
ce4ccb4b
AD
128892002-06-30 Akim Demaille <akim@epita.fr>
12890
12891 Display items as we display rules.
12892
12893 * src/gram.h, src/gram.c (rule_lhs_print): New.
12894 * src/gram.c (grammar_rules_partial_print): Use it.
12895 * src/print.c (print_core): Likewise.
12896 * tests/conflicts.at (Defaulted Conflicted Reduction),
12897 (Unresolved SR Conflicts): Adjust.
12898 (Unresolved SR Conflicts): Adjust and rename as...
12899 (Resolved SR Conflicts): this, as was meant.
12900 * tests/regression.at (Web2c Report): Adjust.
12901
bc933ef1
AD
129022002-06-30 Akim Demaille <akim@epita.fr>
12903
12904 * src/print.c (state_default_rule_compute): New, extracted from...
12905 (print_reductions): here.
12906 Pessimize, but clarify the code.
12907 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12908
53d4308d
AD
129092002-06-30 Akim Demaille <akim@epita.fr>
12910
12911 * src/output.c (action_row): Let default_rule be always a rule
12912 number.
12913
574fb2d5
AD
129142002-06-30 Akim Demaille <akim@epita.fr>
12915
12916 * src/closure.c (print_firsts, print_fderives, closure):
12917 Use BITSET_EXECUTE.
12918 * src/lalr.c (lookaheads_print): Likewise.
12919 * src/state.c (state_rule_lookaheads_print): Likewise.
12920 * src/print_graph.c (print_core): Likewise.
12921 * src/print.c (print_reductions): Likewise.
12922 * src/output.c (action_row): Likewise.
12923 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12924
05811fd7
AD
129252002-06-30 Akim Demaille <akim@epita.fr>
12926
12927 * src/print_graph.c: Use report_flag.
12928
0e4d5753
AD
129292002-06-30 Akim Demaille <akim@epita.fr>
12930
12931 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12932 to...
12933 * src/relation.h, src/relation.c (traverse, relation_digraph)
12934 (relation_print, relation_transpose): New.
12935
24c7d800
AD
129362002-06-30 Akim Demaille <akim@epita.fr>
12937
12938 * src/state.h, src/state.c (shifts_to): New.
12939 * src/lalr.c (build_relations): Use it.
12940
9222837b
AD
129412002-06-30 Akim Demaille <akim@epita.fr>
12942
12943 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12944 (item_number_of_rule_number, rule_number_of_item_number): New.
12945 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12946 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12947 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12948 Propagate their use.
12949 Much remains to be done, in particular wrt `shorts' from types.h.
12950
260008e5
AD
129512002-06-30 Akim Demaille <akim@epita.fr>
12952
12953 * src/symtab.c (symbol_new): Initialize the `printer' member.
12954
8a731ca8
AD
129552002-06-30 Akim Demaille <akim@epita.fr>
12956
12957 * src/LR0.c (save_reductions): Remove, replaced by...
12958 * src/state.h, src/state.c (state_reductions_set): New.
12959 (reductions, errs): Rename as...
12960 (reductions_t, errs_t): these.
12961 Adjust all dependencies.
12962
32e1e0a4
AD
129632002-06-30 Akim Demaille <akim@epita.fr>
12964
12965 * src/LR0.c (state_list_t, state_list_append): New.
12966 (first_state, last_state): Now symbol_list_t.
12967 (this_state): Remove.
12968 (new_itemsets, append_states, save_reductions): Take a state_t as
12969 argument.
12970 (set_states, generate_states): Adjust.
12971 (save_shifts): Remove, replaced by...
12972 * src/state.h, src/state.c (state_shifts_set): New.
12973 (shifts): Rename as...
12974 (shifts_t): this.
12975 Adjust all dependencies.
12976 * src/state.h (state_t): Remove the `next' member.
12977
e5fb6710
AD
129782002-06-30 Akim Demaille <akim@epita.fr>
12979
12980 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12981 escaped in slot 0.
12982
c7ca99d4
AD
129832002-06-30 Akim Demaille <akim@epita.fr>
12984
12985 Use hash.h for the state hash table.
12986
12987 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12988 (allocate_storage): Use state_hash_new.
12989 (free_storage): Use state_hash_free.
12990 (new_state, get_state): Adjust.
12991 * src/lalr.h, src/lalr.c (states): Move to...
12992 * src/states.h (state_t): Remove the `link' member, no longer
12993 used.
12994 * src/states.h, src/states.c: here.
12995 (state_hash_new, state_hash_free, state_hash_lookup)
12996 (state_hash_insert, states_free): New.
12997 * src/states.c (state_table, state_compare, state_hash): New.
12998 * src/output.c (output_actions): Do not free states now, since we
12999 still need to know the final_state number in `prepare', called
13000 afterwards. Do it...
13001 * src/main.c (main): here: call states_free after `output'.
13002
df0e7316
AD
130032002-06-30 Akim Demaille <akim@epita.fr>
13004
13005 * src/state.h, src/state.c (state_new): New, extracted from...
13006 * src/LR0.c (new_state): here.
13007 * src/state.h (STATE_ALLOC): Move to...
13008 * src/state.c: here.
13009 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13010 * src/state.h, src/state.c: here.
13011
39f41916
AD
130122002-06-30 Akim Demaille <akim@epita.fr>
13013
13014 * src/reader.c (gensym): Rename as...
13015 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13016 (getsym): Rename as...
13017 (symbol_get): this.
13018
d57650a5
AD
130192002-06-30 Akim Demaille <akim@epita.fr>
13020
13021 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13022 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13023 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13024 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13025
5a08f1ce
AD
130262002-06-30 Akim Demaille <akim@epita.fr>
13027
13028 Make the test suite pass with warnings checked.
13029
13030 * tests/actions.at (Printers and Destructors): Improve.
13031 Avoid unsigned vs. signed issues.
13032 * tests/calc.at: Don't exercise the scanner here, do it...
13033 * tests/input.at (Torturing the Scanner): here.
13034
720623af
PH
130352002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13036
88e7e941 13037 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
13038 reorganize first lines parallel to yacc.c.
13039
fb8135fa
AD
130402002-06-28 Akim Demaille <akim@epita.fr>
13041
13042 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13043 (b4_token_enum, b4_token_defines): New, factored from...
13044 * data/lalr1.cc, data/yacc.c, glr.c: here.
13045
41442480
AD
130462002-06-28 Akim Demaille <akim@epita.fr>
13047
13048 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13049 unused variables.
13050 * src/output.c (merger_output): static.
13051
e0e5bf84
AD
130522002-06-28 Akim Demaille <akim@epita.fr>
13053
ba0fe3c7 13054 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
13055 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13056 pacify GCC.
13057 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 13058
676385e2
PH
130592002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13060
13061 Accumulated changelog for new GLR parsing features.
13062
6a254321 13063 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
13064 conflicts_total_count.
13065 * src/conflicts.h: Ditto.
13066 * src/output.c (token_actions): Use the new name.
13067 (output_conflicts): Change conflp => conflict_list_heads, and
13068 confl => conflict_list for better readability.
13069 * data/glr.c: Use the new names.
13070 * NEWS: Add self to GLR announcement.
e0e5bf84 13071
676385e2
PH
13072 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13073
13074 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13075 Akim Demaille.
13076
13077 * data/bison.glr: Change name to glr.c
13078 * data/glr.c: Renamed from bison.glr.
13079 * data/Makefile.am: Add glr.c
e0e5bf84
AD
13080
13081 * src/getargs.c:
13082
676385e2 13083 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 13084 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 13085
676385e2
PH
13086 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13087
13088 * data/bison.glr: Be sure to restore the
13089 current #line when returning to the skeleton contents after having
13090 exposed the input file's #line.
13091
13092 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13093
13094 * data/bison.glr: Bring up to date with changes to bison.simple.
13095
13096 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13097
13098 * data/bison.glr: Correct definitions that use b4_prefix.
13099 Various reformatting.
13100 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13101 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13102 yytokenp argument; now part of stack.
13103 (yychar): Define to behave as documented.
13104 (yyclearin): Ditto.
e0e5bf84 13105
676385e2
PH
13106 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13107
13108 * src/reader.h: Add declaration for free_merger_functions.
13109
13110 * src/reader.c (merge_functions): New variable.
13111 (get_merge_function): New function.
13112 (free_merger_functions): New function.
13113 (readgram): Check for %prec that is not followed by a symbol.
13114 Handle %dprec and %merge declarations.
13115 (packgram): Initialize dprec and merger fields in rules array.
13116
13117 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13118 conflict_list_cnt, conflict_list_free): New variables.
13119 (table_grow): Also grow conflict_table.
e0e5bf84 13120 (prepare_rules): Output dprec and merger tables.
676385e2 13121 (conflict_row): New function.
e0e5bf84 13122 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
13123 default reduction in conflicted states for GLR parser so that there
13124 are spaces for the conflict lists.
13125 (save_row): Also save conflict information.
13126 (token_actions): Allocate conflict list.
13127 (merger_output): New function.
13128 (pack_vector): Pack conflict table, too.
13129 (output_conflicts): New function to output yyconflp and yyconfl.
13130 (output_check): Allocate conflict_tos.
13131 (output_actions): Output conflict tables, also.
13132 (output_skeleton): Output b4_mergers definition.
13133 (prepare): Output b4_max_rhs_length definition.
13134 Use 'bison.glr' as default skeleton for GLR parsers.
13135
13136 * src/gram.c (glr_parser): New flag.
13137 (grammar_free): Call free_merger_functions.
13138
13139 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13140 all pairs of conflicting reductions, rather than just all tokens
13141 causing conflicts. Needed to size conflict tables.
e0e5bf84 13142 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
13143 interface.
13144 (conflicts_print): Ditto.
13145 (count_total_conflicts): New function.
13146
13147 * src/reader.h (merger_list): New type.
13148 (merge_functions): New variable.
13149
13150 * src/lex.h (tok_dprec, tok_merge): New token types.
13151
13152 * src/gram.h (rule_s): Add dprec and merger fields.
13153 (glr_parser): New flag.
13154
13155 * src/conflicts.h (count_total_conflicts): New function.
13156
13157 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13158
13159 * doc/bison.texinfo (Generalized LR Parsing): New section.
13160 (GLR Parsers): New section.
13161 (Language and Grammar): Mention GLR parsing.
13162 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13163 Correct typo ("tge" -> "the").
13164
13165 * data/bison.glr: New skeleton for GLR parsing.
13166
13167 * tests/cxx-gram.at: New tests for GLR parsing.
13168
13169 * tests/testsuite.at: Include cxx-gram.at.
13170
13171 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 13172
676385e2
PH
13173 * src/parse-gram.y:
13174
13175 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13176
13177 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 13178
b5480d74 131792002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
13180
13181 * src/options.h, src/options.c: Remove.
13182 * src/getargs.c (short_options, long_options): New.
13183
60491a94
AD
131842002-06-27 Akim Demaille <akim@epita.fr>
13185
13186 * data/bison.simple, data/bison.c++: Rename as...
13187 * data/yacc.c, data/lalr1.cc: these.
13188 * doc/bison.texinfo (Environment Variables): Remove.
13189
9be0c25b
AD
131902002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13191
13192 * src/getargs.c (report_argmatch): Initialize strtok().
13193
1ae72863
AD
131942002-06-20 Akim Demaille <akim@epita.fr>
13195
13196 * data/bison.simple (b4_symbol_actions): New, replaces...
13197 (b4_symbol_destructor, b4_symbol_printer): these.
13198 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13199 user token numbers.
13200
87542d29
AD
132012002-06-20 Akim Demaille <akim@epita.fr>
13202
13203 * data/bison.simple (yydestructor): Rename as...
13204 (yydestruct): this.
13205
1a31ed21
AD
132062002-06-20 Akim Demaille <akim@epita.fr>
13207
13208 * src/symtab.h, src/symtab.c (symbol_type_set)
13209 (symbol_destructor_set, symbol_precedence_set): The location is
13210 the last argument.
13211 Adjust all callers.
13212
e776192e
AD
132132002-06-20 Akim Demaille <akim@epita.fr>
13214
13215 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13216 internals.
13217 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13218 Takes a location.
13219 * src/symtab.h, src/symtab.c (symbol_class_set)
13220 (symbol_user_token_number_set): Likewise.
13221 Adjust all callers.
13222 Promote complain_at.
13223 * tests/input.at (Type Clashes): Adjust.
13224
5c1180b3
AD
132252002-06-20 Akim Demaille <akim@epita.fr>
13226
13227 * data/bison.simple (YYLEX): Fix the declaration when
13228 %pure-parser.
13229
e3170060
AD
132302002-06-20 Akim Demaille <akim@epita.fr>
13231
13232 * data/bison.simple (yysymprint): Don't print the token number,
13233 just its name.
13234 * tests/actions.at (Destructors): Rename as...
13235 (Printers and Destructors): this.
13236 Also exercise %printer.
13237
253862fd
AD
132382002-06-20 Akim Demaille <akim@epita.fr>
13239
13240 * data/bison.simple (YYDSYMPRINT): New.
13241 Use it to remove many of the #if YYDEBUG/if (yydebug).
13242
366eea36
AD
132432002-06-20 Akim Demaille <akim@epita.fr>
13244
13245 * src/symtab.h, src/symtab.c (symbol_t): printer and
13246 printer_location are new members.
13247 (symbol_printer_set): New.
13248 * src/parse-gram.y (PERCENT_PRINTER): New token.
13249 Handle its associated rule.
13250 * src/scan-gram.l: Adjust.
13251 (handle_destructor_at, handle_destructor_dollar): Rename as...
13252 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13253 * src/output.c (symbol_printers_output): New.
13254 (output_skeleton): Call it.
13255 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13256 since there are already many grammar files with a user `yyprint'.
13257 Replace the calls to YYPRINT to calls to yysymprint.
13258 * tests/calc.at: Adjust.
13259 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13260 taking advantage of parser very internal details (stack size!).
13261
4f25ebb0
AD
132622002-06-20 Akim Demaille <akim@epita.fr>
13263
13264 * src/scan-gram.l: Complete the scanner with the missing patterns
13265 to pacify Flex.
13266 Use `quote' and `symbol_tag_get' where appropriate.
13267
93b68a0e
AD
132682002-06-19 Akim Demaille <akim@epita.fr>
13269
13270 * tests/actions.at (Destructors): Augment to test locations.
13271 * data/bison.simple (yydestructor): Pass it the current location
13272 if locations are enabled.
13273 Prototype only when __STDC__ or C++.
13274 Change the argument names to move into the yy name space: there is
13275 user code here.
13276
58612f1d
AD
132772002-06-19 Akim Demaille <akim@epita.fr>
13278
74310291
AD
13279 * data/bison.simple (b4_pure_if): New.
13280 Use it instead of #ifdef YYPURE.
13281
132822002-06-19 Akim Demaille <akim@epita.fr>
13283
13284 * data/bison.simple (b4_location_if): New.
58612f1d
AD
13285 Use it instead of #ifdef YYLSP_NEEDED.
13286
f25bfb75
AD
132872002-06-19 Akim Demaille <akim@epita.fr>
13288
13289 Prepare @$ in %destructor, but currently don't bind it in the
13290 skeleton, as %location use is not cleaned up yet.
13291
13292 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13293 (handle_action_at): New.
13294 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13295 a braced_code_t and a location as additional arguments.
13296 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13297 unquote one when outputting `b4_dollar_dollar'.
13298 Adjust callers.
13299 * data/bison.simple (b4_eval): Remove.
13300 (b4_symbol_destructor): Adjust.
13301 * tests/input.at (Invalid @n): Adjust.
13302
c732d2c6
AD
133032002-06-19 Zack Weinberg <zack@codesourcery.com>
13304
13305 * doc/bison.texinfo: Document ability to have multiple
13306 prologue sections.
13307
8c165d89
AD
133082002-06-18 Akim Demaille <akim@epita.fr>
13309
13310 * src/files.c (compute_base_names): When computing the output file
13311 names from the input file name, strip the directory part.
13312
ca98bf57
AD
133132002-06-18 Akim Demaille <akim@epita.fr>
13314
13315 * data/bison.simple.new: Comment changes.
13316 Reported by Andreas Schwab.
13317
0bfb02ff
AD
133182002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13319
13320 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13321 there are no `label `yyoverflowlab' defined but not used' warnings
13322 when yyoverflow is defined.
13323
24c0aad7
AD
133242002-06-18 Akim Demaille <akim@epita.fr>
13325
13326 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13327 new member.
13328 (symbol_destructor_set): Adjust.
13329 * src/output.c (symbol_destructors_output): Output the destructor
13330 locations.
13331 Output the symbol name.
13332 * data/bison.simple (b4_symbol_destructor): Adjust.
13333
5719c109
AD
133342002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13335 and Akim Demaille <akim@epita.fr>
13336
13337 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13338 what's left on the stack when the error recovery hits EOF.
13339 * tests/actions.at (Destructors): Complete to exercise this case.
13340
9280d3ef
AD
133412002-06-17 Akim Demaille <akim@epita.fr>
13342
13343 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13344 arguments is really empty, not only equal to `[]'.
13345 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13346 member.
13347 (symbol_destructor_set): New.
13348 * src/output.c (symbol_destructors_output): New.
13349 * src/reader.h (brace_code_t, current_braced_code): New.
13350 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13351 (handle_dollar): Rename as...
13352 (handle_action_dollar): this.
13353 (handle_destructor_dollar): New.
13354 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13355 (grammar_declaration): Use it.
13356 * data/bison.simple (yystos): Is always defined.
13357 (yydestructor): New.
13358 * tests/actions.at (Destructors): New.
13359 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13360
dafdc66f
AD
133612002-06-17 Akim Demaille <akim@epita.fr>
13362
13363 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13364 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13365 rule_length only when needed.
13366 * src/output.c (actions_output, token_definitions_output): Output
13367 the full M4 block.
13368 * src/symtab.c: Don't access directly to the symbol tag, use
13369 symbol_tag_get.
13370 * src/parse-gram.y: Use symbol_list_free.
13371
56c47203
AD
133722002-06-17 Akim Demaille <akim@epita.fr>
13373
13374 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13375 (symbol_list_prepend, get_type_name): Move to...
13376 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13377 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13378 Adjust all callers.
13379 (symbol_list_free): New.
13380 * src/scan-gram.l (handle_dollar): Takes a location.
13381 * tests/input.at (Invalid $n): Adjust.
13382
1e0bab92
AD
133832002-06-17 Akim Demaille <akim@epita.fr>
13384
13385 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13386 (symbol_list_prepend): New.
13387 * src/parse-gram.y (%union): `list' is a new member.
13388 (symbols.1): New, replaces...
13389 (terms_to_prec.1, nterms_to_type.1): these.
13390 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13391 Take a location as additional argument.
13392 Adjust all callers.
13393
04e60654
AD
133942002-06-15 Akim Demaille <akim@epita.fr>
13395
13396 * src/parse-gram.y: Move %token in the declaration section so that
13397 we don't depend upon CVS Bison.
13398
10e5b8bd
AD
133992002-06-15 Akim Demaille <akim@epita.fr>
13400
13401 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13402 * src/print.c (print_core): Use it.
13403
9801d40c
AD
134042002-06-15 Akim Demaille <akim@epita.fr>
13405
13406 * src/conflicts.c (log_resolution): Accept the rule involved in
13407 the sr conflicts instead of the lookahead number that points to
13408 that rule.
13409 (flush_reduce): Accept the current lookahead vector as argument,
13410 instead of the index in LA.
13411 (resolve_sr_conflict): Accept the current number of lookahead
13412 bitset to consider for the STATE, instead of the index in LA.
13413 (set_conflicts): Adjust.
13414 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13415
c0263492
AD
134162002-06-15 Akim Demaille <akim@epita.fr>
13417
13418 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13419 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13420 Adjust all dependencies.
13421 * src/lalr.c (initialize_lookaheads): Split into...
13422 (states_lookaheads_count, states_lookaheads_initialize): these.
13423 (lalr): Adjust.
13424
9757c359
AD
134252002-06-15 Akim Demaille <akim@epita.fr>
13426
13427 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13428 out of...
13429 (grammar_rules_print): here.
13430 * src/reduce.c (reduce_output): Use it.
13431 * tests/reduce.at (Useless Rules, Reduced Automaton)
13432 (Underivable Rules): Adjust.
13433
6b98e4b5
AD
134342002-06-15 Akim Demaille <akim@epita.fr>
13435
13436 Copy BYacc's nice way to report the grammar.
13437
13438 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13439 New.
13440 Don't print the rules' location, it is confusing and useless.
13441 (rule_print): Use grammar_rhs_print.
13442 * src/print.c (print_grammar): Use grammar_rules_print.
13443
6b98e4b5
AD
134442002-06-15 Akim Demaille <akim@epita.fr>
13445
13446 Complete and rationalize `useless thing' warnings.
13447
13448 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13449 (symbol_tag_print): New.
13450 Use them everywhere in place of accessing directly the tag member.
13451 * src/gram.h, src/gram.c (rule_print): New.
13452 Use it where a rule used to be printed `by hand'.
13453 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13454 (reduce_grammar_tables): Report the useless rules.
13455 (reduce_print): Useless things are a warning, not an error.
13456 Report it as such.
13457 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13458 (Reduced Automaton, Underivable Rules): Adjust.
13459 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13460 * tests/conflicts.at (Unresolved SR Conflicts)
13461 (Solved SR Conflicts): Adjust.
13462
ee000ba4
AD
134632002-06-15 Akim Demaille <akim@epita.fr>
13464
13465 Let symbols have a location.
13466
13467 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13468 (getsym): Adjust.
13469 Adjust all callers.
13470 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13471 Use location_t, not int.
13472 * src/symtab.c (symbol_check_defined): Take advantage of the
13473 location.
13474 * tests/regression.at (Invalid inputs): Adjust.
13475
8efe435c
AD
134762002-06-15 Akim Demaille <akim@epita.fr>
13477
13478 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13479 (input): Don't try to initialize yylloc here, do it in the
13480 scanner.
13481 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13482 * src/gram.h (rule_t): Change line and action_line into location
13483 and action_location, of location_t type.
13484 Adjust all dependencies.
13485 * src/location.h, src/location.c (empty_location): New.
13486 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13487 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13488 (grammar_current_rule_symbol_append)
13489 (grammar_current_rule_action_append): Expect a location as argument.
13490 * src/reader.c (grammar_midrule_action): Adjust to attach an
13491 action's location as dummy symbol location.
13492 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13493 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13494 the line numbers.
13495
1921f1d7
AD
134962002-06-14 Akim Demaille <akim@epita.fr>
13497
13498 Grammar declarations may be found in the grammar section.
13499
13500 * src/parse-gram.y (rules_or_grammar_declaration): New.
13501 (declarations): Each declaration may end with a semicolon, not
13502 just...
13503 (grammar_declaration): `"%union"'.
13504 (grammar): Branch to rules_or_grammar_declaration.
13505
4515534c
AD
135062002-06-14 Akim Demaille <akim@epita.fr>
13507
13508 * src/main.c (main): Invoke scanner_free.
13509
f958596b
AD
135102002-06-14 Akim Demaille <akim@epita.fr>
13511
13512 * src/output.c (m4_invoke): Extracted from...
13513 (output_skeleton): here.
13514 Free tempfile.
13515
2c569025
AD
135162002-06-14 Akim Demaille <akim@epita.fr>
13517
13518 * src/parse-gram.y (directives, directive, gram)
13519 (grammar_directives, precedence_directives, precedence_directive):
13520 Rename as...
13521 (declarations, declaration, grammar, grammar_declaration)
13522 (precedence_declaration, precedence_declarator): these.
13523 (symbol_declaration): New.
13524
592e8d4d
AD
135252002-06-14 Akim Demaille <akim@epita.fr>
13526
13527 * src/files.c (action_obstack): Remove, unused.
13528 (output_obstack): Remove it, and all its dependencies, as it is no
13529 longer needed.
13530 * src/reader.c (epilogue_set): Build the epilogue in the
13531 muscle_obstack.
13532 * src/output.h, src/output.c (muscle_obstack): Move to...
13533 * src/muscle_tab.h, src/muscle_tab.h: here.
13534 (muscle_init): Initialize muscle_obstack.
13535 (muscle_free): New.
13536 * src/main.c (main): Call it.
13537
0c15323d
AD
135382002-06-14 Akim Demaille <akim@epita.fr>
13539
13540 * src/location.h: New, extracted from...
13541 * src/reader.h: here.
13542 * src/Makefile.am (noinst_HEADERS): Merge into
13543 (bison_SOURCES): this.
13544 Add location.h.
13545 * src/parse-gram.y: Use location_t instead of Bison's.
13546 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13547 Use location_t instead of ints.
13548
e96c9728
AD
135492002-06-14 Akim Demaille <akim@epita.fr>
13550
13551 * data/bison.simple, data/bison.c++: Be sure to restore the
13552 current #line when returning to the skeleton contents after having
13553 exposed the input file's #line.
13554
75d1fe16
AD
135552002-06-12 Akim Demaille <akim@epita.fr>
13556
13557 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13558 eager.
13559 * tests/actions.at (Exotic Dollars): New.
13560
6c35d22c
AD
135612002-06-12 Akim Demaille <akim@epita.fr>
13562
13563 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13564 ['"/] too eagerly.
13565 * tests/input.at (Torturing the Scanner): New.
13566
1d6412ad
AD
135672002-06-11 Akim Demaille <akim@epita.fr>
13568
13569 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13570 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13571 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13572 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13573 * src/reader.c (reader): Use it.
13574
4cdb01db
AD
135752002-06-11 Akim Demaille <akim@epita.fr>
13576
13577 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13578 Adjust all callers.
13579 (scanner_last_string_free): New.
13580
44995b2e
AD
135812002-06-11 Akim Demaille <akim@epita.fr>
13582
13583 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13584 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13585 (last_string, YY_OBS_FREE): New.
13586 Use them when returning an ID.
13587
e9955c83
AD
135882002-06-11 Akim Demaille <akim@epita.fr>
13589
13590 Have Bison grammars parsed by a Bison grammar.
13591
13592 * src/reader.c, src/reader.h (prologue_augment): New.
13593 * src/reader.c (copy_definition): Remove.
13594
13595 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13596 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13597 (grammar_current_rule_prec_set, grammar_current_rule_check)
13598 (grammar_current_rule_symbol_append)
13599 (grammar_current_rule_action_append): Export.
13600 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13601 (symbol_list_action_append): Remove.
13602 Hook the routines from reader.
13603 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13604 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13605
13606 * src/reader.c (read_declarations): Remove, unused.
13607
13608 * src/parse-gram.y: Handle the epilogue.
13609 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13610 (grammar_start_symbol_set): this.
13611 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13612 * src/reader.c (readgram): Remove, unused.
13613 (reader): Adjust to insert eoftoken and axiom where appropriate.
13614
13615 * src/reader.c (copy_dollar): Replace with...
13616 * src/scan-gram.h (handle_dollar): this.
13617 * src/parse-gram.y: Remove `%thong'.
13618
13619 * src/reader.c (copy_at): Replace with...
13620 * src/scan-gram.h (handle_at): this.
13621
13622 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13623 New.
13624
13625 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13626 time being.
13627
13628 * src/reader.h, src/reader.c (grammar_rule_end): New.
13629
13630 * src/parse.y (current_type, current_class): New.
13631 Implement `%nterm', `%token' support.
13632 Merge `%term' into `%token'.
13633 (string_as_id): New.
13634 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13635 type name.
13636
13637 * src/parse-gram.y: Be sure to handle properly the beginning of
13638 rules.
13639
13640 * src/parse-gram.y: Handle %type.
13641 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13642
13643 * src/parse-gram.y: More directives support.
13644 * src/options.c: No longer handle source directives.
13645
13646 * src/parse-gram.y: Fix %output.
13647
13648 * src/parse-gram.y: Handle %union.
13649 Use the prologue locations.
13650 * src/reader.c (parse_union_decl): Remove.
13651
13652 * src/reader.h, src/reader.c (epilogue_set): New.
13653 * src/parse-gram.y: Use it.
13654
13655 * data/bison.simple, data/bison.c++: b4_stype is now either not
13656 defined, then default to int, or to the contents of %union,
13657 without `union' itself.
13658 Adjust.
13659 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13660
13661 * src/output.c (actions_output): Don't output braces, as they are
13662 already handled by the scanner.
13663
13664 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13665 characters to themselves.
13666
13667 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13668 that the epilogue has a proper #line.
13669
13670 * src/parse-gram.y: Handle precedence/associativity.
13671
13672 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13673 a terminal.
13674 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13675 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13676 at all to define terminals that cannot be emitted.
13677
13678 * src/scan-gram.l: Escape M4 characters.
13679
13680 * src/scan-gram.l: Working properly with escapes in user
13681 strings/characters.
13682
13683 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13684 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13685 grammar.
13686 Use more modest sizes, as for the time being the parser does not
13687 release memory, and therefore the process swallows a huge amount
13688 of memory.
13689
13690 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13691 stricter %token grammar.
13692
13693 * src/symtab.h (associativity): Add `undef_assoc'.
13694 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13695 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13696
13697 * tests/regression.at (Invalid %directive): Remove, as it is now
13698 meaningless.
13699 (Invalid inputs): Adjust to the new error messages.
13700 (Token definitions): The new grammar doesn't allow too many
13701 eccentricities.
13702
13703 * src/lex.h, src/lex.c: Remove.
13704 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13705 (copy_character, copy_string2, copy_string, copy_identifier)
13706 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13707 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13708 (parse_action): Remove.
13709 * po/POTFILES.in: Adjust.
13710
2e047461
AD
137112002-06-11 Akim Demaille <akim@epita.fr>
13712
cd05d13c 13713 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
13714 rule's action member: return the action as a string.
13715 Don't require `rule_length' as an argument: compute it.
13716 (grammar_current_rule_symbol_append)
13717 (grammar_current_rule_action_append): New, eved out from
13718 (readgram): here.
13719 Remove `action_flag', `rulelength', unused now.
13720
9af3fbce
AD
137212002-06-11 Akim Demaille <akim@epita.fr>
13722
13723 * src/reader.c (grammar_current_rule_prec_set).
13724 (grammar_current_rule_check): New, eved out from...
13725 (readgram): here.
13726 Remove `xaction', `first_rhs': useless.
13727 * tests/input.at (Type clashes): New.
13728 * tests/existing.at (GNU Cim Grammar): Adjust.
13729
1485e106
AD
137302002-06-11 Akim Demaille <akim@epita.fr>
13731
13732 * src/reader.c (grammar_midrule_action): New, Eved out from
13733 (readgram): here.
13734
da4160c3
AD
137352002-06-11 Akim Demaille <akim@epita.fr>
13736
13737 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13738 New.
13739 (readgram): Use them as replacement of inlined code, crule and
13740 crule1.
13741
f6d0f937
AD
137422002-06-11 Akim Demaille <akim@epita.fr>
13743
13744 * src/reader.c (grammar_end, grammar_symbol_append): New.
13745 (readgram): Use them.
13746 Make the use of `p' as local as possible.
13747
69078d4b
AD
137482002-06-10 Akim Demaille <akim@epita.fr>
13749
13750 GCJ's parser requires the tokens to be defined before the prologue.
13751
13752 * data/bison.simple: Output the token definition before the user's
13753 prologue.
13754 * tests/regression.at (Braces parsing, Duplicate string)
13755 (Mixing %token styles): Check the output from bison.
13756 (Early token definitions): New.
13757
5e424082
AD
137582002-06-10 Akim Demaille <akim@epita.fr>
13759
13760 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13761 assigning twice the same user number to a token, so that we can
13762 use it in...
13763 * src/lex.c (lex): here.
13764 Also use `symbol_class_set' instead of hand written code.
13765 * src/reader.c (parse_assoc_decl): Likewise.
13766
44536b35
AD
137672002-06-10 Akim Demaille <akim@epita.fr>
13768
13769 * src/symtab.c, src/symtab.c (symbol_class_set)
13770 (symbol_user_token_number_set): New.
13771 * src/reader.c (parse_token_decl): Use them.
13772 Use a switch instead of ifs.
13773 Use a single argument.
13774
8b9f2372
AD
137752002-06-10 Akim Demaille <akim@epita.fr>
13776
13777 Remove `%thong' support as it is undocumented, unused, duplicates
13778 `%token's job, and creates useless e-mail traffic with people who
13779 want to know what it is, why it is undocumented, unused, and
13780 duplicates `%token's job.
13781
13782 * src/reader.c (parse_thong_decl): Remove.
13783 * src/options.c (option_table): Remove "thong".
13784 * src/lex.h (tok_thong): Remove.
13785
3ae2b51f
AD
137862002-06-10 Akim Demaille <akim@epita.fr>
13787
13788 * src/symtab.c, src/symtab.c (symbol_type_set)
13789 (symbol_precedence_set): New.
13790 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13791 (value_components_used): Remove, unused.
13792
2f1afb73
AD
137932002-06-09 Akim Demaille <akim@epita.fr>
13794
13795 Move symbols handling code out of the reader.
13796
13797 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13798 (axiom): Move to...
13799 * src/symtab.h, src/symtab.c: here.
13800
13801 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13802 * src/reader.c (startval): Rename as...
13803 * src/symtab.h, src/symtab.c (startsymbol): this.
13804 * src/reader.c: Adjust.
13805
13806 * src/reader.c (symbol_check_defined, symbol_make_alias)
13807 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13808 (token_translations_init)
13809 Move to...
13810 * src/symtab.c: here.
13811 * src/reader.c (packsymbols): Move to...
13812 * src/symtab.h, src/symtab.c (symbols_pack): here.
13813 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13814 argument.
13815
e9bca3ad
AD
138162002-06-03 Akim Demaille <akim@epita.fr>
13817
13818 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13819 then statements.
13820
86eff183
AD
138212002-06-03 Akim Demaille <akim@epita.fr>
13822
13823 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13824 structs with non literals.
13825 * src/scan-skel.l: never-interactive.
13826 * src/conflicts.c (enum conflict_resolution_e): No trailing
13827 comma.
13828 * src/getargs.c (usage): Split long literal strings.
13829 Reported by Hans Aberg.
13830
717be197
AD
138312002-05-28 Akim Demaille <akim@epita.fr>
13832
13833 * data/bison.c++: Use C++ ostreams.
13834 (cdebug_): New member.
13835
670ddffd
AD
138362002-05-28 Akim Demaille <akim@epita.fr>
13837
13838 * src/output.c (output_skeleton): Be sure to allocate enough room
13839 for `/' _and_ for `\0' in full_skeleton.
13840
769b430f
AD
138412002-05-28 Akim Demaille <akim@epita.fr>
13842
13843 * data/bison.c++: Catch up with bison.simple:
13844 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13845 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13846 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13847 and popping traces.
13848
7067cb36
PH
138492002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13850
13851 * src/output.c (output_skeleton): Put an explicit path in front of
13852 the skeleton file name, rather than relying on the -I directory,
13853 to partially alleviate effects of having a skeleton file lying around
13854 in the current directory.
769b430f 13855
4a713ec2
PH
138562002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13857
769b430f 13858 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
13859 obstack_printf should be obstack_fgrow1.
13860
b408954b
AD
138612002-05-26 Akim Demaille <akim@epita.fr>
13862
13863 * src/state.h (state_t): `solved_conflicts' is a new member.
13864 * src/LR0.c (new_state): Set it to 0.
13865 * src/conflicts.h, src/conflicts.c (print_conflicts)
13866 (free_conflicts, solve_conflicts): Rename as...
13867 (conflicts_print, conflicts_free, conflicts_solve): these.
13868 Adjust callers.
13869 * src/conflicts.c (enum conflict_resolution_e)
13870 (solved_conflicts_obstack): New, used by...
13871 (log_resolution): this.
13872 Adjust to attach the conflict resolution to each state.
13873 Complete the description with the precedence/associativity
13874 information.
13875 (resolve_sr_conflict): Adjust.
13876 * src/print.c (print_state): Output its solved_conflicts.
13877 * tests/conflicts.at (Unresolved SR Conflicts)
13878 (Solved SR Conflicts): Exercise --report=all.
13879
a49aecd5
AD
138802002-05-26 Akim Demaille <akim@epita.fr>
13881
13882 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13883 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13884 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13885 (token_number_t, item_number_as_token_number)
13886 (token_number_as_item_number, muscle_insert_token_number_table):
13887 Rename as...
13888 (symbol_number_t, item_number_as_symbol_number)
13889 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13890 these, since it is more appropriate.
13891
5504898e
AD
138922002-05-26 Akim Demaille <akim@epita.fr>
13893
13894 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13895 `Error:' lines.
13896 * data/bison.simple (yystos) [YYDEBUG]: New.
13897 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13898 error recovery.
13899 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13900
ec3bc396
AD
139012002-05-25 Akim Demaille <akim@epita.fr>
13902
13903 * doc/bison.texinfo (Debugging): Split into...
13904 (Tracing): this new section, its former contents, and...
13905 (Understanding): this new section.
13906 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13907 by...
13908 (report_flag): this.
13909 Adjust all dependencies.
13910 (report_args, report_types, report_argmatch): New.
13911 (usage, getargs): Report/support -r, --report.
13912 * src/options.h
13913 (struct option_table_struct): Rename as..,
13914 (struct option_table_s): this.
13915 Rename the `set_flag' member to `flag' to match with getopt_long's
13916 struct.
13917 * src/options.c (option_table): Split verbose into an entry for
13918 %verbose, and another for --verbose.
13919 Support --report/-r, so remove -r from the obsolete --raw.
13920 * src/print.c: Attach full item sets and lookaheads reports to
13921 report_flag instead of trace_flag.
13922 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13923
78df8250
PE
139242002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13925 and Paul Eggert <eggert@twinsun.com>
769b430f 13926
78df8250
PE
13927 * data/bison.simple (yyparse): Correct error handling to conform to
13928 POSIX and yacc. Specifically, after syntax error is discovered,
13929 do not reduce further before shifting the error token.
13930 Clean up the code a bit by removing the labels yyerrdefault,
13931 yyerrhandle, yyerrpop.
13932 * NEWS: Document the above.
13933
c0c9ea05
PH
139342002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13935
13936 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13937 type; it isn't always big enough, since it doesn't necessarily
13938 include non-terminals.
769b430f 13939 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
13940 the latter can be removed.
13941 (yy_token_number_type): Remove, only one use.
13942 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13943 don't use TokenNumberType as element type.
769b430f 13944
c0c9ea05
PH
13945 * tests/regression.at: Modify expected output to agree with change
13946 to yyr1 and yytranslate.
769b430f 13947
6390a83f
FK
139482002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13949
13950 * src/reader.c (parse_action): Use copy_character instead of
13951 obstack_1grow.
13952
db7c8e9a
AD
139532002-05-13 Akim Demaille <akim@epita.fr>
13954
13955 * tests/regression.at (Token definitions): Prototype yylex and
13956 yyerror.
13957
fcc61800
PH
139582002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13959
158c687b 13960 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
13961 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13962 32-bit arithmetic.
13963 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13964
5683e9b2
AD
139652002-05-07 Akim Demaille <akim@epita.fr>
13966
13967 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13968 avoid GCC warnings.
13969
0c2d3f4c
AD
139702002-05-07 Akim Demaille <akim@epita.fr>
13971
13972 Kill GCC warnings.
13973
13974 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13975 over the RHS of each rule.
13976 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13977 * src/state.h (state_t): Member `nitems' is unsigned short.
13978 * src/LR0.c (get_state): Adjust.
13979 * src/reader.c (packgram): Likewise.
13980 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13981 `Type'.
13982 (muscle_insert_int_table): Remove, unused.
13983 (prepare_rules): Remove `max'.
13984
1565b720
AD
139852002-05-06 Akim Demaille <akim@epita.fr>
13986
13987 * src/closure.c (print_firsts): Display of the symbol tags.
13988 (bitmatrix_print): Move to...
13989 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13990 here.
13991 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13992
cfaee611
AD
139932002-05-06 Akim Demaille <akim@epita.fr>
13994
13995 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13996 hash_do_for_each.
13997
458be8e0
AD
139982002-05-06 Akim Demaille <akim@epita.fr>
13999
14000 * src/LR0.c (new_state, get_state): Instead of using the global
14001 `kernel_size' and `kernel_base', have two new arguments:
14002 `core_size' and `core'.
14003 Adjust callers.
14004
a900a624
AD
140052002-05-06 Akim Demaille <akim@epita.fr>
14006
14007 * src/reader.c (packgram): No longer end `ritem' with a 0
14008 sentinel: it is not used.
14009
d4e7d3a1
AD
140102002-05-05 Akim Demaille <akim@epita.fr>
14011
14012 New experimental feature: display the lookaheads in the report and
14013 graph.
14014
14015 * src/print (print_core): When --trace-flag, display the rules
14016 lookaheads.
14017 * src/print_graph.c (print_core): Likewise.
14018 Swap the arguments.
14019 Adjust caller.
14020
39ceb25b
AD
140212002-05-05 Akim Demaille <akim@epita.fr>
14022
14023 * tests/torture.at (Many lookaheads): New test.
14024
5372019f
AD
140252002-05-05 Akim Demaille <akim@epita.fr>
14026
14027 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14028 (GENERATE_MUSCLE_INSERT_TABLE): this.
14029 (output_int_table, output_unsigned_int_table, output_short_table)
14030 (output_token_number_table, output_item_number_table): Replace with...
14031 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14032 (muscle_insert_short_table, muscle_insert_token_number_table)
14033 (muscle_insert_item_number_table): these.
14034 Adjust all callers.
14035 (prepare_tokens): Don't free `translations', since...
14036 * src/reader.h, src/reader.c (grammar_free): do it.
14037 Move to...
14038 * src/gram.h, src/gram.c (grammar_free): here.
14039 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14040 b4_translate_max.
14041
5df5f6d5
AD
140422002-05-05 Akim Demaille <akim@epita.fr>
14043
14044 * src/output.c (output_unsigned_int_table): New.
14045 (prepare_rules): `i' is unsigned.
14046 `prhs', `rline', `r2' are unsigned int.
14047 Rename muscle `rhs_number_max' as `rhs_max'.
14048 Output muscles `prhs_max', `rline_max', and `r2_max'.
14049 Free rline and r1.
14050 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14051 to compute types instead of constant types.
14052 * tests/regression.at (Web2c Actions): Adjust.
14053
b87f8b21
AD
140542002-05-04 Akim Demaille <akim@epita.fr>
14055
14056 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14057 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14058 Adjust dependencies.
14059 * src/output.c (token_definitions_output): Be sure not to output a
14060 `#define 'a'' when fed with `%token 'a' "a"'.
14061 * tests/regression.at (Token definitions): New.
14062
8bb936e4
PE
140632002-05-03 Paul Eggert <eggert@twinsun.com>
14064
14065 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14066 for K&R C.
14067
140682002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14069
14070 * Makefile.am (SUBDIRS): Remove intl.
14071 (EXTRA_DIST): Add config/config.rpath.
14072
53c71a12
AD
140732002-05-03 Akim Demaille <akim@epita.fr>
14074
14075 * data/bison.simple (m4_if): Don't output empty enums.
14076 And actually, output valid enum definitions :(.
14077
289dd0cf
AD
140782002-05-03 Akim Demaille <akim@epita.fr>
14079
14080 * configure.bat: Remove, completely obsolete.
14081 * Makefile.am (EXTRA_DIST): Adjust.
14082 Don't distribute config.rpath...
14083 * config/Makefile.am (EXTRA_DIST): Do it.
14084
db85e524
AD
140852002-05-03 Akim Demaille <akim@epita.fr>
14086
14087 * configure.in (GETTEXT_VERSION): New.
14088 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14089
83ccf991
AD
140902002-05-03 Akim Demaille <akim@epita.fr>
14091
14092 * data/bison.simple (b4_token_enum): New.
14093 (b4_token_defines): Use it to output tokens both as #define and
14094 enums.
14095 Suggested by Paul Eggert.
14096 * src/output.c (token_definitions_output): Don't output spurious
14097 white spaces.
14098
1f418995
AD
140992002-05-03 Akim Demaille <akim@epita.fr>
14100
14101 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14102
45119f04
RA
141032002-05-02 Robert Anisko <robert@lrde.epita.fr>
14104
14105 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14106 Update the stack class, give a try to deque as the default container.
14107
b2d52318
AD
141082002-05-02 Akim Demaille <akim@epita.fr>
14109
14110 * data/bison.simple (yyparse): Do not implement @$ = @1.
14111 (YYLLOC_DEFAULT): Adjust to do it.
14112 * doc/bison.texinfo (Location Default Action): Fix.
14113
3a8b4109
AD
141142002-05-02 Akim Demaille <akim@epita.fr>
14115
14116 * src/reader.c (parse_braces): Merge into...
14117 (parse_action): this.
14118
84614e13
AD
141192002-05-02 Akim Demaille <akim@epita.fr>
14120
14121 * configure.in (ALL_LINGUAS): Remove.
14122 * po/LINGUAS, hr.po: New.
14123
fdbcd8e2
AD
141242002-05-02 Akim Demaille <akim@epita.fr>
14125
14126 Remove the so called hairy (semantic) parsers.
14127
14128 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14129 * src/gram.h, src/gram.c (semantic_parser): Remove.
14130 (rule_t): Remove the guard and guard_line members.
14131 * src/lex.h (token_t): remove tok_guard.
14132 * src/options.c (option_table): Remove %guard and %semantic_parser
14133 support.
14134 * src/output.c, src/output.h (guards_output): Remove.
14135 (prepare): Adjust.
14136 (token_definitions_output): Don't output the `T'
14137 tokens (???).
14138 (output_skeleton): Don't output the guards.
14139 * src/files.c, src/files.c (attrsfile): Remove.
14140 * src/reader.c (symbol_list): Remove the guard and guard_line
14141 members.
14142 Adjust dependencies.
14143 (parse_guard): Remove.
14144 * data/bison.hairy: Remove.
14145 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14146 BISON_HAIRY.
14147
82b6cb3f
AD
141482002-05-02 Akim Demaille <akim@epita.fr>
14149
14150 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14151 (parse_guard): Rename the formal argument `stack_offset' as
14152 `rule_length', which is more readable.
14153 Adjust callers.
14154 (copy_at, copy_dollar): Instead of outputting the hard coded
14155 values of $$, $n and so forth, output invocation to b4_lhs_value,
14156 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
14157 Note: this patch partially drops `semantic-parser' support: it
14158 always does `rule_length - n', where semantic parsers ought to
14159 always use `-n'.
82b6cb3f
AD
14160 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14161 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14162
6cbfbcc5
AD
141632002-05-02 Akim Demaille <akim@epita.fr>
14164
14165 * configure.in (AC_INIT): Bump to 1.49b.
14166 (AM_INIT_AUTOMAKE): Short invocation.
14167
b8548114
AD
141682002-05-02 Akim Demaille <akim@epita.fr>
14169
14170 Version 1.49a.
14171
c20cd1fa
AD
141722002-05-01 Akim Demaille <akim@epita.fr>
14173
14174 * src/skeleton.h: Remove.
14175
8a9566d4
AD
141762002-05-01 Akim Demaille <akim@epita.fr>
14177
14178 * src/skeleton.h: Fix the #endif.
14179 Reported by Magnus Fromreide.
14180
8c6d399a
PE
141812002-04-26 Paul Eggert <eggert@twinsun.com>
14182
14183 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14184 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 14185 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 14186
2b7ed18a
RA
141872002-04-25 Robert Anisko <robert@lrde.epita.fr>
14188
14189 * src/scan-skel.l: Postprocess quadrigraphs.
14190
14191 * src/reader.c (copy_character): New function, used to output
14192 single characters while replacing `[' and `]' with quadrigraphs, to
14193 avoid troubles with M4 quotes.
14194 (copy_comment): Output characters with copy_character.
14195 (read_additionnal_code): Likewise.
14196 (copy_string2): Likewise.
14197 (copy_definition): Likewise.
14198
14199 * tests/calc.at: Exercise M4 quoting.
14200
34a89c50
AD
142012002-04-25 Akim Demaille <akim@epita.fr>
14202
14203 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14204 between `!' and the command.
14205 Reported by Paul Eggert.
14206
0dd1580a
RA
142072002-04-24 Robert Anisko <robert@lrde.epita.fr>
14208
14209 * tests/calc.at: Exercise prologue splitting.
14210
14211 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14212 `b4_post_prologue' instead of `b4_prologue'.
14213
14214 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14215 muscles.
14216 (output): Free pre_prologue_obstack and post_prologue_obstack.
14217 * src/files.h, src/files.c (attrs_obstack): Remove.
14218 (pre_prologue_obstack, post_prologue_obstack): New.
14219 * src/reader.c (copy_definition): Add a parameter to specify the
14220 obstack to fill, instead of using attrs_obstack unconditionally.
14221 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14222 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14223
83c1796f
PE
142242002-04-23 Paul Eggert <eggert@twinsun.com>
14225
14226 * data/bison.simple: Remove unnecessary commentary and white
14227 space differences from 1_29-branch.
14228 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14229
14230 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14231 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14232 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14233 constructors or destructors.
14234
14235 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14236
1207eeac
AD
142372002-04-23 Akim Demaille <akim@epita.fr>
14238
14239 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14240 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14241 location with columns.
14242 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14243 All reported by Paul Eggert.
14244
78ab8f67
AD
142452002-04-22 Akim Demaille <akim@epita.fr>
14246
14247 * src/reduce.c (dump_grammar): Move to...
14248 * src/gram.h, src/gram.c (grammar_dump): here.
14249 Be sure to separate long item numbers.
14250 Don't read the members of a rule's prec if its nil.
14251
133c20e2
AD
142522002-04-22 Akim Demaille <akim@epita.fr>
14253
14254 * src/output.c (table_size, table_grow): New.
14255 (MAXTABLE): Remove, replace uses with table_size.
14256 (pack_vector): Instead of dying when the table is too big, grow it.
14257
9515e8a7
AD
142582002-04-22 Akim Demaille <akim@epita.fr>
14259
14260 * data/bison.simple (yyr1): Its type is that of a token number.
14261 * data/bison.c++ (r1_): Likewise.
14262 * tests/regression.at (Web2c Actions): Adjust.
14263
23c5a174
AD
142642002-04-22 Akim Demaille <akim@epita.fr>
14265
14266 * src/reader.c (token_translations_init): 256 is now the default
14267 value for the error token, i.e., it will be assigned another
14268 number if the user assigned 256 to one of her tokens.
14269 (reader): Don't force 256 to error.
14270 * doc/bison.texinfo (Symbols): Adjust.
14271 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14272 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14273 etc. instead of 10, 20, 30 (which was used to `jump' over error
14274 (256) and undefined (2)).
14275
5fbb0954
AD
142762002-04-22 Akim Demaille <akim@epita.fr>
14277
14278 Propagate more token_number_t.
14279
14280 * src/gram.h (token_number_as_item_number)
14281 (item_number_as_token_number): New.
14282 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14283 Use it to create output_item_number_table and
14284 output_token_number_table.
14285 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14286 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14287 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14288 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14289
4f940944
AD
142902002-04-22 Akim Demaille <akim@epita.fr>
14291
14292 * src/output.h, src/output.c (get_lines_number): Remove.
14293
3ded9a63
AD
142942002-04-19 Akim Demaille <akim@epita.fr>
14295
14296 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14297 as Lex/Flex'.
14298 (Debugging): More details about enabling the debugging features.
14299 (Table of Symbols): Describe $$, $n, @$, and @n.
14300 Suggested by Tim Josling.
14301
e0c471a9
AD
143022002-04-19 Akim Demaille <akim@epita.fr>
14303
14304 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14305
fecc10cd
AD
143062002-04-10 Akim Demaille <akim@epita.fr>
14307
14308 * src/system.h: Rely on HAVE_LIMITS_H.
14309 Suggested by Paul Eggert.
14310
51dec47b
AD
143112002-04-09 Akim Demaille <akim@epita.fr>
14312
14313 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14314 full stderr, and strip it according to the bison options, instead
14315 of composing the error message from different bits.
14316 This makes it easier to check for several error messages.
14317 Adjust all the invocations.
14318 Add an invocation exercising the error token.
14319 Add an invocation demonstrating a stupid error message.
14320 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14321 Adjust the tests.
14322 Error message are for stderr, not stdout.
14323
007a50a4
AD
143242002-04-09 Akim Demaille <akim@epita.fr>
14325
14326 * src/gram.h, src/gram.c (error_token_number): Remove, use
14327 errtoken->number.
14328 * src/reader.c (reader): Don't specify the user token number (2)
14329 for $undefined, as it uselessly prevents using it.
14330 * src/gram.h (token_number_t): Move to...
14331 * src/symtab.h: here.
14332 (state_t.number): Is a token_number_t.
14333 * src/print.c, src/reader.c: Use undeftoken->number instead of
14334 hard coded 2.
14335 (Even though this 2 is not the same as above: the number of the
14336 undeftoken remains being 2, it is its user token number which
14337 might not be 2).
14338 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14339 `user_token_number_max'.
14340 Output `undef_token_number'.
14341 * data/bison.simple, data/bison.c++: Use them.
14342 Be sure to map invalid yylex return values to
14343 `undef_token_number'. This saves us from gratuitous SEGV.
14344
14345 * tests/conflicts.at (Solved SR Conflicts)
14346 (Unresolved SR Conflicts): Adjust.
14347 * tests/regression.at (Web2c Actions): Adjust.
14348
06446ccf
AD
143492002-04-08 Akim Demaille <akim@epita.fr>
14350
14351 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14352 Adding #line.
14353 Remove the duplicate `typedefs'.
14354 (RhsNumberType): Fix the declaration and various other typos.
14355 Use __ofile__.
14356 * data/bison.simple: Use __ofile__.
14357 * src/scan-skel.l: Handle __ofile__.
14358
62a3e4f0
AD
143592002-04-08 Akim Demaille <akim@epita.fr>
14360
14361 * src/gram.h (item_number_t): New, the type of item numbers in
14362 RITEM. Note that it must be able to code symbol numbers as
14363 positive number, and the negation of rule numbers as negative
14364 numbers.
14365 Adjust all dependencies (pretty many).
14366 * src/reduce.c (rule): Remove this `short *' pointer: use
14367 item_number_t.
14368 * src/system.h (MINSHORT, MAXSHORT): Remove.
14369 Include `limits.h'.
14370 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14371 (shortcpy): Remove.
14372 (MAXTABLE): Move to...
14373 * src/output.c (MAXTABLE): here.
14374 (prepare_rules): Use output_int_table to output rhs.
14375 * data/bison.simple, data/bison.c++: Adjust.
14376 * tests/torture.at (Big triangle): Move the limit from 254 to
14377 500.
14378 * tests/regression.at (Web2c Actions): Ajust.
14379
14380 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14381 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14382 passes, but produces negative #line number, once fixed, GCC is
14383 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14384 C), it passes.
14385 * src/state.h (state_h): Code input lines on ints, not shorts.
14386
bb88b0fc
AD
143872002-04-08 Akim Demaille <akim@epita.fr>
14388
14389 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14390 and then the grammar.
14391
9a636f47
AD
143922002-04-08 Akim Demaille <akim@epita.fr>
14393
14394 * src/system.h: No longer using strndup.
14395
680e8701
AD
143962002-04-07 Akim Demaille <akim@epita.fr>
14397
14398 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14399 * src/output.c (output_table_data): Return the longest number.
14400 (prepare_tokens): Output `token_number_max').
14401 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14402 New.
14403 Use them to define yy_token_number_type/TokenNumberType.
14404 Use this type for yytranslate.
14405 * tests/torture.at (Big triangle): Push the limit from 124 to
14406 253.
14407 * tests/regression.at (Web2c Actions): Adjust.
14408
817e9f41
AD
144092002-04-07 Akim Demaille <akim@epita.fr>
14410
14411 * tests/torture.at (Big triangle): New.
14412 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14413 * tests/existing.at: here.
14414
5123689b
AD
144152002-04-07 Akim Demaille <akim@epita.fr>
14416
14417 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14418 nritems.
14419 Adjust dependencies.
14420
f3849179
AD
144212002-04-07 Akim Demaille <akim@epita.fr>
14422
14423 * src/reader.c: Normalize increments to prefix form.
14424
bd02036a
AD
144252002-04-07 Akim Demaille <akim@epita.fr>
14426
14427 * src/reader.c, symtab.c: Remove debugging code.
14428
db8837cb
AD
144292002-04-07 Akim Demaille <akim@epita.fr>
14430
14431 Rename all the `bucket's as `symbol_t'.
14432
14433 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14434 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14435 * src/symtab.c, src/symtab.h (bucket): Rename as...
14436 (symbol_t): this.
14437 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14438 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14439 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14440 (buckets_new, buckets_free, buckets_do): Rename as...
14441 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14442 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14443 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14444 (symbols_new, symbols_free, symbols_do): these.
14445
72a23c97
AD
144462002-04-07 Akim Demaille <akim@epita.fr>
14447
14448 Use lib/hash for the symbol table.
14449
14450 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14451 EOF.
14452 * src/lex.c (lex): Set the `number' member of new terminals.
14453 * src/reader.c (bucket_check_defined, bucket_make_alias)
14454 (bucket_check_alias_consistence, bucket_translation): New.
14455 (reader, grammar_free, readgram, token_translations_init)
14456 (packsymbols): Adjust.
14457 (reader): Number the predefined tokens.
14458 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14459 for predefined tokens.
14460 * src/symtab.h (bucket): Remove all the hash table related
14461 members.
14462 * src/symtab.c (symtab): Replace by...
14463 (bucket_table): this.
14464 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14465 (buckets_new, buckets_do): New.
14466
280a38c3
AD
144672002-04-07 Akim Demaille <akim@epita.fr>
14468
14469 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14470 (start_symbol, max_user_token_number, semantic_parser)
14471 (error_token_number): Initialize.
14472 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14473 Initialize.
14474 (reader): Don't.
14475 (errtoken, eoftoken, undeftoken, axiom): Extern.
14476
03b31c0c
AD
144772002-04-07 Akim Demaille <akim@epita.fr>
14478
14479 * src/gram.h (rule_s): prec and precsym are now pointers
14480 to the bucket giving the priority/associativity.
14481 Member `associativity' removed: useless.
14482 * src/reduce.c, src/conflicts.c: Adjust.
14483
8b3df748
AD
144842002-04-07 Akim Demaille <akim@epita.fr>
14485
14486 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14487 Properly escape the symbols' TAG when outputting them.
14488
e601aa1d
AD
144892002-04-07 Akim Demaille <akim@epita.fr>
14490
14491 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14492
b0299a2e
AD
144932002-04-07 Akim Demaille <akim@epita.fr>
14494
14495 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14496 (LArule): this, which is an array to rule_t*.
14497 * src/print.c, src/conflicts.c: Adjust.
14498
d7e1f00c
AD
144992002-04-07 Akim Demaille <akim@epita.fr>
14500
14501 * src/gram.h (rule_t): Rename `number' as `user_number'.
14502 `number' is a new member.
14503 Adjust dependencies.
14504 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14505
cc9305dd
AD
145062002-04-07 Akim Demaille <akim@epita.fr>
14507
14508 As a result of the previous patch, it is no longer needed
14509 to reorder ritem itself.
14510
14511 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14512
b0940840
AD
145132002-04-07 Akim Demaille <akim@epita.fr>
14514
14515 Be sure never to walk through RITEMS, but use only data related to
14516 the rules themselves. RITEMS should be banished.
14517
14518 * src/output.c (output_token_translations): Rename as...
14519 (prepare_tokens): this.
14520 In addition to `translate', prepare the muscles `tname' and
14521 `toknum', which were handled by...
14522 (output_rule_data): this.
14523 Remove, and move the remainder of its outputs into...
14524 (prepare_rules): this new routines, which also merges content from
14525 (output_gram): this.
14526 (prepare_rules): Be sure never to walk through RITEMS.
14527 (output_stos): Rename as...
14528 (prepare_stos): this.
14529 (output): Always invoke prepare_states, after all, just don't use it
14530 in the output if you don't need it.
14531
643a5994
AD
145322002-04-07 Akim Demaille <akim@epita.fr>
14533
14534 * src/LR0.c (new_state): Display `nstates' as the name of the
14535 newly created state.
14536 Adjust to initialize first_state and last_state if needed.
14537 Be sure to distinguish the initial from the final state.
14538 (new_states): Create the itemset of the initial state, and use
14539 new_state.
14540 * src/closure.c (closure): Now that the initial state has its
14541 items properly set, there is no need for a special case when
14542 creating `ruleset'.
14543
14544 As a result, now the rule 0, reducing to $axiom, is visible in the
14545 outputs. Adjust the test suite.
14546
14547 * tests/conflicts.at (Solved SR Conflicts)
14548 (Unresolved SR Conflicts): Adjust.
14549 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14550 * tests/conflicts.at (S/R in initial): New.
14551
b4c4ccc2
AD
145522002-04-07 Akim Demaille <akim@epita.fr>
14553
14554 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14555 the RHS of the rules.
14556 * src/output.c (output_gram): Likewise.
14557
bba97eb2
AD
145582002-04-07 Akim Demaille <akim@epita.fr>
14559
14560 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14561 bucket.
14562 Adjust all dependencies.
14563 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14564 `number' of the buckets too.
14565 * src/gram.h: Include `symtab.h'.
14566 (associativity): Move to...
14567 * src/symtab.h: here.
14568 No longer include `gram.h'.
14569
c3b407f4
AD
145702002-04-07 Akim Demaille <akim@epita.fr>
14571
14572 * src/gram.h, src/gram.c (rules_rhs_length): New.
14573 (ritem_longest_rhs): Use it.
14574 * src/gram.h (rule_t): `number' is a new member.
14575 * src/reader.c (packgram): Set it.
14576 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14577 the end of `rules', and count them out of `nrules'.
14578 (reduce_output, dump_grammar): Adjust.
14579 * src/print.c (print_grammar): It is no longer needed to check for
14580 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14581 * tests/reduce.at (Reduced Automaton): New test.
14582
11652ab3
AD
145832002-04-07 Akim Demaille <akim@epita.fr>
14584
14585 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14586 lacking `+ 1' to nrules, Bison reported as useless a token if it
14587 was used solely to set the precedence of the last rule...
14588
26b23c1a
AD
145892002-04-07 Akim Demaille <akim@epita.fr>
14590
14591 * data/bison.c++, data/bison.simple: Don't output the current file
14592 name in #line, to avoid useless diffs between two identical
14593 outputs under different names.
14594
18bcecb0
AD
145952002-04-07 Akim Demaille <akim@epita.fr>
14596
14597 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14598 Normalize loops to using `< nrules + 1', not `<= nrules'.
14599
fa770c86
AD
146002002-04-07 Akim Demaille <akim@epita.fr>
14601
14602 * TODO: Update.
14603
d9b739c3
AD
146042002-04-07 Akim Demaille <akim@epita.fr>
14605
14606 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14607 bucket.value as bucket.number.
14608
99013900
AD
146092002-04-07 Akim Demaille <akim@epita.fr>
14610
14611 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14612 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14613 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14614 RHS, instead of being an index in RITEMS.
14615
e966383b
PE
146162002-04-04 Paul Eggert <eggert@twinsun.com>
14617
14618 * doc/bison.texinfo: Update copyright date.
14619 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14620 (Symbols): Warn about running Bison in one character set,
14621 but compiling and/or running in an incompatible one.
14622 Warn about character code 256, too.
14623
146242002-04-03 Paul Eggert <eggert@twinsun.com>
14625
14626 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14627 YYERROR_VERBOSE is nonzero, not whether it is defined.
14628
14629 Merge changes from bison-1_29-branch.
c307773e 14630
8d6c48b9
PE
146312002-03-20 Paul Eggert <eggert@twinsun.com>
14632
14633 Merge fixes from Debian bison_1.34-1.diff.
14634
14635 * configure.in (AC_PREREQ): 2.53.
14636
e53c6322
AD
146372002-03-20 Akim Demaille <akim@epita.fr>
14638
14639 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14640
9ffbeca7
PE
146412002-03-19 Paul Eggert <eggert@twinsun.com>
14642
21db0b2a
PE
14643 * src/bison.simple (YYCOPY): New macro.
14644 (YYSTACK_RELOCATE): Use it.
14645 Remove Type arg; no longer needed. All callers changed.
14646 (yymemcpy): Remove; no longer needed.
14647
9ffbeca7
PE
14648 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14649 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14650
642cb8f8
AD
146512002-03-19 Akim Demaille <akim@epita.fr>
14652
14653 Test and fix the #line outputs.
14654
14655 * tests/atlocal.at (GCC): New.
14656 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 14657 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
14658 (Action synch line, Epilogue synch line): New tests.
14659 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14660 * data/bison.simple, data/bison.c++: Use it.
14661
3c31a486
AD
146622002-03-19 Akim Demaille <akim@epita.fr>
14663
14664 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14665 (Solved SR Conflicts, %expect not enough, %expect right)
14666 (%expect too much): Move to...
14667 * tests/conflicts.at: this new file.
14668
0d8bed56
AD
146692002-03-19 Akim Demaille <akim@epita.fr>
14670
14671 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14672 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14673 that we can move to enums for instance.
14674 * src/output.c (token_definitions_output): Output a list of
14675 `token-name, token-number' instead of the #define.
14676 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14677
9208d17f
AD
146782002-03-14 Akim Demaille <akim@epita.fr>
14679
14680 Use Gettext 0.11.1.
14681
af27eacb
RA
146822002-03-09 Robert Anisko <robert@lrde.epita.fr>
14683
14684 * data/bison.c++: Make the user able to add members to the generated
14685 parser by subclassing.
14686
9101a310
RA
146872002-03-05 Robert Anisko <robert@lrde.epita.fr>
14688
14689 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14690 a character.
14691 Reported by Nicolas Tisserand and Nicolas Burrus.
14692
fff9bf0b
RA
146932002-03-04 Robert Anisko <robert@lrde.epita.fr>
14694
14695 * src/reader.c: Warn about lacking semi-colons, do not complain.
14696
64dba31e
RA
146972002-03-04 Robert Anisko <robert@lrde.epita.fr>
14698
14699 * data/bison.c++: Remove a debug line.
14700
374f5a14
RA
147012002-03-04 Robert Anisko <robert@lrde.epita.fr>
14702
14703 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14704 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14705 provide a default implementation.
14706
bfcf1f3a
AD
147072002-03-04 Akim Demaille <akim@epita.fr>
14708
14709 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14710 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14711 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14712 * tests/semantic.at (Parsing Guards): Similarly.
14713 * src/reader.at (readgram): Complain if the last rule is not ended
14714 with a semi-colon.
14715
65ccf9fc
AD
147162002-03-04 Akim Demaille <akim@epita.fr>
14717
14718 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14719 * src/closure.c: here.
14720 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14721 RTC.
14722 * src/warshall.h, src/warshall.c: Remove.
14723 * tests/sets.at (Broken Closure): Adjust.
14724
d0039cbc
AD
147252002-03-04 Akim Demaille <akim@epita.fr>
14726
14727 * src/output.c (output_skeleton): tempdir is const.
14728 bytes_read is unused.
14729
345cea78
AD
147302002-03-04 Akim Demaille <akim@epita.fr>
14731
14732 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14733 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14734 Update.
14735 From Michael Hayes.
14736
564801f7
AD
147372002-03-04 Akim Demaille <akim@epita.fr>
14738
14739 * src/closure.c (closure): `r' is unused.
14740
e5352bc7
AD
147412002-03-04 Akim Demaille <akim@epita.fr>
14742
14743 * tests/sets.at (Broken Closure): Add the ending `;'.
14744 * src/reader.at (readgram): Complain if a rule is not ended with a
14745 semi-colon.
14746
914feea9
AD
147472002-03-04 Akim Demaille <akim@epita.fr>
14748
14749 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14750 (count_sr_conflicts): Use bitset_count.
14751 * src/reduce.c (inaccessable_symbols): Ditto.
14752 (bits_size): Remove.
14753 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14754
f0250de6
AD
147552002-03-04 Akim Demaille <akim@epita.fr>
14756
14757 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14758 * src/reduce.c: Remove the `bitset_zero's following the
14759 `bitset_create's, as now it is performed by the latter.
14760
ef017502
AD
147612002-03-04 Akim Demaille <akim@epita.fr>
14762
14763 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14764 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14765 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14766 latest sources from Michael.
14767
76514394
AD
147682002-03-04 Akim Demaille <akim@epita.fr>
14769
14770 * src/output.c (output): Don't free the grammar.
14771 * src/reader.c (grammar_free): New.
14772 * src/main.c (main): Call it and don't free symtab here.
14773
55024580
AD
147742002-03-04 Akim Demaille <akim@epita.fr>
14775
14776 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14777 before returning.
14778 Reported by Benoit Perrot.
14779
f9abaa2c
AD
147802002-03-04 Akim Demaille <akim@epita.fr>
14781
14782 Use bitset operations when possible, not loops over bits.
14783
14784 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14785 bitset_or.
14786 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14787 * src/reduce.c (useless_nonterminals): Formatting changes.
14788 * src/warshall.c (TC): Use bitset_or.
14789
0e721e75
AD
147902002-03-04 Akim Demaille <akim@epita.fr>
14791
14792 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14793 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14794 Ditto.
14795
0fb1ffb1
AD
147962002-03-04 Akim Demaille <akim@epita.fr>
14797
14798 * src/lalr.c (F): Now a bitset*.
14799 Adjust all dependencies.
14800
b86796bf
AD
148012002-03-04 Akim Demaille <akim@epita.fr>
14802
14803 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14804 Adjust all dependencies.
14805
602bbf31
AD
148062002-03-04 Akim Demaille <akim@epita.fr>
14807
14808 * src/L0.c, src/LR0.h (nstates): Be size_t.
14809 Adjust comparisons (signed vs unsigned).
14810 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14811 bitset*.
14812 Adjust all dependencies.
14813
d8a0245c
AD
148142002-03-04 Akim Demaille <akim@epita.fr>
14815
14816 * src/closure.c (firsts): Now, also a bitset.
14817 Adjust all dependencies.
14818 (varsetsize): Remove, now unused.
14819 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14820
34ba9743
AD
148212002-03-04 Akim Demaille <akim@epita.fr>
14822
14823 * src/print.c: Convert to use bitset.h, not hand coded iterations
14824 over ints.
14825
ed86e78c
AD
148262002-03-04 Akim Demaille <akim@epita.fr>
14827
14828 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14829
dfdb1797
AD
148302002-03-04 Akim Demaille <akim@epita.fr>
14831
14832 * src/closure.c (ruleset): Be a bitset.
14833 (rulesetsize): Remove.
14834
7086e707
AD
148352002-03-04 Akim Demaille <akim@epita.fr>
14836
14837 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14838 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14839 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14840 * src/closure.c (fderives): Be an array of bitsets.
14841
98254360
RA
148422002-02-28 Robert Anisko <robert@lrde.epita.fr>
14843
14844 * data/bison.c++: Merge the two generated headers. Insert a copyright
14845 notice in each output file.
14846
a75c057f
AD
148472002-02-28 Akim Demaille <akim@epita.fr>
14848
14849 * data/bison.c++: Copy the prologue of bison.simple to fetch
14850 useful M4 definitions, such as b4_header_guard.
14851
06b00abc
AD
148522002-02-25 Akim Demaille <akim@epita.fr>
14853
14854 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
14855 translator friendly scheme for the bgr
14856 copyright notice.
06b00abc 14857
70e7d534
AD
148582002-02-25 Akim Demaille <akim@epita.fr>
14859
14860 * src/output.c (header_output): Remove, now handled completely via
14861 M4.
14862
abe017f6
AD
148632002-02-25 Akim Demaille <akim@epita.fr>
14864
14865 * m4/m4.m4: New, from CVS Autoconf.
14866 * configure.in: Invoke it.
14867 * src/output.c (output_skeleton): Use its result instead of the
14868 hard coded name.
14869
381fb12e
AD
148702002-02-25 Akim Demaille <akim@epita.fr>
14871
14872 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14873 Fileutils 4.1.5.
14874 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14875 * src/output.c (output_skeleton): Use mkstemp to create a real
14876 temporary file.
14877 Move the filling of `skeleton' and its muscle to...
14878 (prepare): here.
14879 (output): Move the definition of the prologue muscle to...
14880 (prepare): here.
14881 * src/system.h (DEFAULT_TMPDIR): New.
14882
6f38107f
PE
148832002-02-14 Paul Eggert <eggert@twinsun.com>
14884
14885 Remove the support for C++ namespace cleanliness; it was
14886 causing more problems than it was curing, since it didn't work
14887 properly on some nonstandard C++ compilers. This can wait
14888 for a proper C++ parser.
14889
14890 * NEWS: Document this.
14891 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14892 of C++, as it's treated like C now.
14893 * src/bison.simple (YYSTD): Remove.
14894 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14895 Treat C++ just like Standard C instead of trying to support
14896 namespace cleanliness.
14897
80cce3da
AD
148982002-02-14 Akim Demaille <akim@epita.fr>
14899
14900 * tests/regression.at (else): Adjust to Andreas' change.
14901
842e8679
AD
149022002-02-14 Akim Demaille <akim@epita.fr>
14903
14904 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14905
4bda3f10
AD
149062002-02-13 Andreas Schwab <schwab@suse.de>
14907
14908 * src/output.c (output_rule_data): Don't output NULL, it might
14909 not be defined yet.
14910
4162fa07 149112002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 14912
4162fa07
RA
14913 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14914 (Copyright notice): Update.
b418ecd8 14915
bd16a5dc
AD
149162002-02-11 Akim Demaille <akim@epita.fr>
14917
14918 * tests/regression.at (%nonassoc and eof): Don't include
14919 nonportable headers.
14920
8d69a1a3
RA
149212002-02-08 Robert Anisko <robert@lrde.epita.fr>
14922
14923 * data/bison.c++: Correct error recovery. Make the user able to
14924 initialize the starting location.
14925
9b2d0677
AD
149262002-02-07 Akim Demaille <akim@epita.fr>
14927
14928 * tests/input.at: New.
14929
69e2658b
RA
149302002-02-07 Robert Anisko <robert@lrde.epita.fr>
14931
14932 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 14933 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
14934 directives around tables only needed for debugging.
14935
4aacc3a7
RA
149362002-02-07 Robert Anisko <robert@lrde.epita.fr>
14937
14938 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14939 C++ parsers.
14940 (yy::b4_name::parse): Use print_.
14941
762a801e
RA
149422002-02-07 Robert Anisko <robert@lrde.epita.fr>
14943
14944 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14945
4bb2bc3f
RA
149462002-02-07 Robert Anisko <robert@lrde.epita.fr>
14947
14948 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14949 C++ parsers.
14950 (yy::b4_name::parse): Build verbose error messages, and use error_.
14951
6b45a3ca
RA
149522002-02-06 Robert Anisko <robert@lrde.epita.fr>
14953
14954 * data/bison.c++: Fix m4 quoting in comments.
14955
50997c6e
RA
149562002-02-06 Robert Anisko <robert@lrde.epita.fr>
14957
14958 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14959 not expanded by m4.
14960
3f3eed27
AD
149612002-02-05 Akim Demaille <akim@epita.fr>
14962
14963 * data/bison.c++: Adjust to the M4 back end.
14964 More is certainly needed.
14965
be2a1a68
AD
149662002-02-05 Akim Demaille <akim@epita.fr>
14967
14968 Give a try to M4 as a back end.
14969
14970 * lib/readpipe.c: New, from wdiff.
14971 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14972 BISON_HAIRY.
14973 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14974 specific values. Now it is m4 that performs the lookup.
14975 * src/parse-skel.y: Remove.
14976 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14977 * src/output.c (actions_output, guards_output)
14978 (token_definitions_output): No longer keeps track of the output
14979 line number, hence remove the second argument.
14980 (guards_output): Check against the guard member of a rule, not the
14981 action member.
14982 Adjust callers.
14983 (output_skeleton): Don't look for the skeleton location, let m4 do
14984 that.
14985 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14986 file will be used.
14987 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14988 (prepare): Given that for the time being changesyntax is not
14989 usable in M4, rename the muscles using `-' to `_'.
14990 Define `defines_flag', `output_parser_name' and `output_header_name'.
14991 * src/output.h (actions_output, guards_output)
14992 (token_definitions_output): Adjust prototypes.
14993 * src/scan-skel.l: Instead of scanning the skeletons, it now
14994 processes the output of m4: `__oline__' and `#output'.
14995 * data/bison.simple: Adjust to be used by M4(sugar).
14996 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14997 to date.
14998 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14999 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15000 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15001 shamelessly stolen from CVS Autoconf.
15002
beda758b
AD
150032002-02-05 Akim Demaille <akim@epita.fr>
15004
15005 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15006 * configure.in: Check for the declarations of free and malloc.
15007 * src/muscle_tab.c: Adjust.
15008
5ece6d43
AD
150092002-02-05 Akim Demaille <akim@epita.fr>
15010
15011 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15012 which have no values.
15013
5bb18f9a
AD
150142002-02-05 Akim Demaille <akim@epita.fr>
15015
15016 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15017 * data/: here.
15018
894dd62e
PE
150192002-01-29 Paul Eggert <eggert@twinsun.com>
15020
15021 * src/bison.simple (YYSIZE_T): Do not define merely because
15022 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15023 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15024
82841af7
AD
150252002-01-27 Akim Demaille <akim@epita.fr>
15026
15027 Fix `%nonassoc and eof'.
15028
15029 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15030 which were not properly copied! Replace
15031 memcpy (res->errs, src->errs, src->nerrs);
15032 with
15033 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15034 !!!
15035 * tests/regression.at (%nonassoc and eof): Adjust to newest
15036 Autotest: `.' is not in the PATH.
15037
318b76e9
AD
150382002-01-27 Akim Demaille <akim@epita.fr>
15039
15040 * tests/sets.at (AT_EXTRACT_SETS): New.
15041 (Nullable): Use it.
15042 (Firsts): New.
15043
30d2f3d5
AD
150442002-01-26 Akim Demaille <akim@epita.fr>
15045
15046 * tests/actions.at, tests/calc.at, tests/headers.at,
15047 * tests/torture.at: Adjust to the newest Autotest which no longer
15048 forces `.' in the PATH.
15049
30f8c395
AD
150502002-01-25 Akim Demaille <akim@epita.fr>
15051
15052 * tests/regression.at (%nonassoc and eof): New.
15053 Suggested by Robert Anisko.
15054
29ae55f1
AD
150552002-01-24 Akim Demaille <akim@epita.fr>
15056
15057 Bison dumps core when trying to complain about broken input files.
15058 Reported by Cris van Pelt.
15059
15060 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15061 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15062 into...
15063 (Invalid inputs): Strengthen: exercise parse_percent_token.
15064
2b548aa6
RA
150652002-01-24 Robert Anisko <robert.anisko@epita.fr>
15066
15067 * src/Makefile.am: Add bison.c++.
15068 * src/bison.c++: New skeleton.
15069
bb0146c2
AD
150702002-01-21 Paolo Bonzini <bonzini@gnu.org>
15071
15072 * po/it.po: New.
15073
bec30531
AD
150742002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15075
15076 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15077
fc6edc45
MA
150782002-01-20 Marc Autret <marc@gnu.org>
15079
15080 * src/files.c (compute_output_file_names): Fix
15081
5e5d5415
MA
150822002-01-20 Marc Autret <marc@gnu.org>
15083
15084 * tests/output.at: New test.
15085 * src/files.c (compute_base_names): Don't map extensions when
15086 the YACC flag is set, use defaults.
15087 Reported by Evgeny Stambulchik.
15088
44ea3fbd
MA
150892002-01-20 Marc Autret <marc@gnu.org>
15090
ba0fe3c7
PE
15091 * src/system.h: Need to define __attribute__ away for non-GCC
15092 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
15093 Suggested by Albert Chin-A-Young.
15094
338963d1
TVH
150952002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15096
15097 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15098 canonical definition.
15099 * src/system.h: Use the canonical definition for PARAMS (avoids
15100 a conflict with the macro from lib/hash.h).
15101
c57b2479
AD
151022002-01-11 Akim Demaille <akim@epita.fr>
15103
15104 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 15105 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 15106
b85810ae
AD
151072002-01-09 Akim Demaille <akim@epita.fr>
15108
15109 * src/files.c, src/files.h (output_infix): New.
15110 (tab_extension): Remove.
15111 (compute_base_names): Compute the former, drop the latter.
15112 * src/output.c (prepare): Insert the muscles `output-infix', and
15113 `output-suffix'.
15114 * src/parse-skel.y (string, string.1): New.
15115 (section.header): Use it.
15116 (section.yacc): Remove.
15117 (prefix): Remove too.
15118 * src/scan-skel.l: Adjust.
15119 * src/bison.simple, src/bison.hairy: Adjust.
15120
cae60122
AD
151212002-01-09 Akim Demaille <akim@epita.fr>
15122
15123 * configure.in (WERROR_CFLAGS): Compute it.
15124 * src/Makefile.am (CFLAGS): Pass it.
15125 * tests/atlocal.in (CFLAGS): Idem.
15126 * src/files.c: Fix a few warnings.
15127 (get_extension_index): Remove, unused.
15128
ae404801
AD
151292002-01-08 Akim Demaille <akim@epita.fr>
15130
15131 * src/getargs.c (AS_FILE_NAME): New.
15132 (getargs): Use it to convert DOSish file names.
15133 * src/files.c (base_name): Rename as full_base_name to avoid
15134 clashes with `base_name ()'.
15135 (filename_split): New.
15136 (compute_base_names): N-th rewrite, using filename_split.
15137
22312b71
AD
151382002-01-08 Akim Demaille <akim@epita.fr>
15139
15140 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15141 New, stolen from the Fileutils 4.1.
15142 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15143 * configure.in: Check for the presence of memrchr, and of its
15144 prototype.
15145
a67cef01
TVH
151462002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15147
15148 * lib/hash.h (__P): Added definition for this macro.
15149 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15150 BUILT_SOURCES, to ensure they are generated first.
15151 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15152 %error-verbose to allow bootstrapping with bison 1.30x.
15153
2b25d624
AD
151542002-01-06 Akim Demaille <akim@epita.fr>
15155
15156 * src/reader.c (parse_braces): Don't fetch the next char, the
15157 convention is to fetch on entry.
15158 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15159 'switch' without a following semicolon.
15160 * tests/regression.at (braces parsing): New.
15161
3460813b
AD
151622002-01-06 Akim Demaille <akim@epita.fr>
15163
15164 Bison is dead wrong in its RR conflict reports.
15165
15166 * tests/torture.at (GNU Cim Grammar): New.
15167 * src/conflicts.c (count_rr_conflicts): Fix.
15168
73784c64
AD
151692002-01-06 Akim Demaille <akim@epita.fr>
15170
15171 Creating package.m4 from configure.ac causes too many problems.
15172
15173 * tests/Makefile.am (package.m4): Create it by hand,
15174 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15175
25d81090
AD
151762002-01-06 Akim Demaille <akim@epita.fr>
15177
15178 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15179 skeleton.h.
15180
a9b8959e
PE
151812002-01-04 Paul Eggert <eggert@twinsun.com>
15182
15183 * doc/bison.texinfo (Debugging):
15184 Remove YYSTDERR; it's no longer defined or used.
15185 Also, s/cstdio.h/cstdio/.
15186
25d81090
AD
151872002-01-03 Akim Demaille <akim@epita.fr>
15188
15189 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15190
1109455c
AD
151912002-01-03 Akim Demaille <akim@epita.fr>
15192
15193 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15194 tracing code to --trace, wait for a better --trace option, with
15195 args.
15196
7ea5e977
AD
151972002-01-03 Akim Demaille <akim@epita.fr>
15198
15199 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15200 The ISO C++ standard is extremely clear about it: stderr is
15201 considered a macro, not a regular symbol (see table 94 `Header
15202 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15203 Therefore std:: does not apply to it. It still does with fprintf.
15204 Also, s/cstdio.h/cstdio/.
15205
fab5b110
AD
152062002-01-03 Akim Demaille <akim@epita.fr>
15207
15208 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15209 for non system headers.
15210
aed7fd9b
AD
152112002-01-02 Akim Demaille <akim@epita.fr>
15212
15213 Equip the skeleton chain with location tracking, runtime trace,
15214 pure parser and scanner.
15215
15216 * src/parse-skel.y: Request a pure parser, locations, and prefix
15217 renaming.
15218 (%union): Having several members with the same type does not help
15219 type mismatches, simplify.
15220 (YYPRINT, yyprint): New.
15221 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15222 (skel_error): this.
15223 Handle locations.
15224 * src/scan-skel.l: Adjust to these changes.
15225 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15226 (LOCATION_PRINT, skel_control_t): New.
15227
24fad99e
AD
152282001-12-30 Akim Demaille <akim@epita.fr>
15229
15230 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15231 replace `gb' with BLANKS.
15232 * src/scan-skel.l: Adjust.
15233
a4b36db4
AD
152342001-12-30 Akim Demaille <akim@epita.fr>
15235
15236 * src/system.h: We don't need nor want bcopy.
15237 Throw away MS-DOS crap: we don't need getpid.
15238 * configure.in: We don't need strndup. It was even causing
15239 problems: because Flex includes the headers *before* us,
15240 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15241 not visible.
15242 * lib/xstrndup.c: New.
15243 * src/scan-skel.l: Use it.
15244 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15245 * src/parse-skel.y: Use %directives instead of #defines.
15246
1239777d
AD
152472001-12-30 Akim Demaille <akim@epita.fr>
15248
15249 * src/skeleton.h: New.
15250 * src/output.c (output_parser, output_master_parser): Remove, dead
15251 code.
15252 * src/output.h (get_lines_number, actions_output, guards_output)
15253 (token_definitions_output): Prototype them.
15254 * src/parse-skel.y: Add the license notice.
15255 Include output.h and skeleton.h.
15256 (process_skeleton): Returns void, and takes a single parameter.
15257 * src/scan-skel.l: Add the license notice.
15258 Include skeleton.h.
15259 Don't use %option yylineno: it seems that then Flex imagines
15260 REJECT has been used, and therefore it won't reallocate its
15261 buffers (which makes no other sense to me than a bug). It results
15262 in warnings for `unused: yy_flex_realloc'.
15263
9b3add5b
RA
152642001-12-30 Robert Anisko <robert.anisko@epita.fr>
15265
15266 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15267 (MUSCLE_INSERT_PREFIX): ...to there.
15268 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15269 (MUSCLE_INSERT_PREFIX): Move from here...
15270
15271 * src/bison.hairy: Add a section directive. Put braces around muscle
15272 names. This parser skeleton is still broken, but Bison should not
15273 choke on a bad muscle 'syntax'.
15274 * src/bison.simple: Add a section directive. Put braces around muscle
15275 names.
15276
15277 * src/files.h (strsuffix, stringappend): Add declarations.
15278 (tab_extension): Add declaration.
15279 (short_base_name): Add declaration.
15280
15281 * src/files.c (strsuffix, stringappend): No longer static. These
15282 functions are used in the skeleton parser.
15283 (tab_extension): New.
15284 (compute_base_names): Use the computations done in this function
fab5b110 15285 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
15286 names.
15287 (short_base_name): No longer static.
15288
15289 * src/output.c (output_skeleton): New.
15290 (output): Disable call to output_master_parser, and give a try to
15291 a new skeleton handling system.
15292 (guards_output, actions_output): No longer static.
15293 (token_definitions_output, get_lines_number): No longer static.
15294
15295 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15296
fab5b110 15297 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
15298 parse-skel.y.
15299
15300 * src/parse-skel.y: New file.
15301 * src/scan-skel.l: New file.
15302
b5b61c61
AD
153032001-12-29 Akim Demaille <akim@epita.fr>
15304
15305 %name-prefix is broken.
15306
15307 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15308 Adjust all dependencies.
15309 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15310 %name-prefix.
15311
15312 Renaming yylval but not yylloc is not consistent. Now we do.
15313
15314 * src/bison.simple: Prefix yylloc if used.
15315 * doc/bison.texinfo (Decl Summary): Document that.
15316
8c9a50be
AD
153172001-12-29 Akim Demaille <akim@epita.fr>
15318
15319 * doc/bison.texinfo: Promote `%long-directive' over
15320 `%long_directive'.
15321 Remove all references to fixed-output-files, yacc is enough.
15322
d99361e6
AD
153232001-12-29 Akim Demaille <akim@epita.fr>
15324
15325 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15326 user prologue. These are defaults.
15327 * tests/actions.at (Mid-rule actions): Make sure the user can
15328 define YYDEBUG and YYERROR_VERBOSE.
15329
b9cecb91
AD
153302001-12-29 Akim Demaille <akim@epita.fr>
15331
15332 * src/output.c (header_output): Don't forget to export YYLTYPE and
15333 yylloc.
15334 * tests/headers.at (export YYLTYPE): New, make sure it does.
15335 * tests/regression.at (%union and --defines, Invalid CPP headers):
15336 Move to...
15337 * tests/headers.at: here.
15338
aea13e97
AD
153392001-12-29 Akim Demaille <akim@epita.fr>
15340
15341 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15342
931394cb
AD
153432001-12-29 Akim Demaille <akim@epita.fr>
15344
15345 * tests/actions.at (Mid-rule actions): Output on a single line
15346 instead of several.
15347
704a47c4
AD
153482001-12-29 Akim Demaille <akim@epita.fr>
15349
15350 * doc/bison.texinfo: Formatting changes.
15351
091e20bb
AD
153522001-12-29 Akim Demaille <akim@epita.fr>
15353
15354 Don't store the token defs in a muscle, just be ready to output it
15355 on command. Now possible via `symbols'. Fixes a memory leak.
15356
15357 * src/output.c (token_definitions_output): New.
15358 (output_parser, header_output): Use it.
15359 * src/reader.c (symbols_save): Remove.
15360
cce71710
AD
153612001-12-29 Akim Demaille <akim@epita.fr>
15362
15363 * src/bison.simple: Do not provide a default for YYSTYPE and
15364 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15365 default.
15366
82c035a8
AD
153672001-12-29 Akim Demaille <akim@epita.fr>
15368
15369 Mid-rule actions are simply... ignored!
15370
15371 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15372 the empty-rule associated to the dummy symbol, not to the host
15373 rule.
15374 * tests/actions.at (Mid-rule actions): New.
15375
8419d367
AD
153762001-12-29 Akim Demaille <akim@epita.fr>
15377
15378 Memory leak.
15379
15380 * src/reader.c (reader): Free grammar.
15381
375d5806
AD
153822001-12-29 Akim Demaille <akim@epita.fr>
15383
15384 Memory leak.
15385
15386 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15387 since it allocates it for each state, although only one is needed.
15388 (allocate_storage): Do it here.
15389
f51cb8ff
AD
153902001-12-29 Akim Demaille <akim@epita.fr>
15391
15392 * src/options.h, src/options.c (create_long_option_table): Rename
15393 as...
15394 (long_option_table_new): this, with a clearer prototype.
15395 (percent_table): Remove, unused,
15396 * src/getargs.c (getargs): Adjust.
15397
29e88316
AD
153982001-12-29 Akim Demaille <akim@epita.fr>
15399
15400 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15401 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15402 as states.
15403
b9f71f19
AD
154042001-12-29 Akim Demaille <akim@epita.fr>
15405
15406 * src/lalr.c (build_relations): Rename `states' as `states1'.
15407 Sorry, I don't understand exactly what it is, no better name...
15408
1a2b5d37
AD
154092001-12-29 Akim Demaille <akim@epita.fr>
15410
15411 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15412 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15413 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15414 as rules.
15415
1cca533e
AD
154162001-12-29 Akim Demaille <akim@epita.fr>
15417
15418 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15419 ago.
15420
c03ae966
AD
154212001-12-29 Akim Demaille <akim@epita.fr>
15422
15423 * src/reader.c, src/reader.h (user_toknums): Remove.
15424 Adjust all users to use symbols[i]->user_token_number.
15425
5a670b1e
AD
154262001-12-29 Akim Demaille <akim@epita.fr>
15427
15428 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15429 Adjust all users to use symbols[i]->prec or ->assoc.
15430
ad949da9
AD
154312001-12-29 Akim Demaille <akim@epita.fr>
15432
15433 * src/reader.c, src/reader.h (tags): Remove.
15434 Adjust all users to use symbols[i]->tag.
15435
0e78e603
AD
154362001-12-29 Akim Demaille <akim@epita.fr>
15437
15438 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15439 and rule_table.
15440 * src/reader.c (packsymbols): Fill this table.
15441 Drop sprec.
15442 * src/conflicts.c (resolve_sr_conflict): Adjust.
15443 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15444 single table.
15445 Use symbols[i]->tag instead of tags[i].
15446
213e640e
AD
154472001-12-29 Akim Demaille <akim@epita.fr>
15448
15449 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15450 In addition, put a comment in there, to replace...
15451 * tests/regression.at (%union and C comments): Remove.
15452
e7b8bef1
AD
154532001-12-29 Akim Demaille <akim@epita.fr>
15454
15455 * tests/regression.at (Web2c Actions): Blindly move the actual
15456 output as expected output. The contents *seem* right to me, but I
15457 can't pretend reading perfectly parser tables... Nonetheless, all
15458 the other tests pass correctly, the table look OK, even though the
15459 presence of `$axiom' is to be noted: AFAICS it is useless (but
15460 harmless).
15461
b68e7744
AD
154622001-12-29 Akim Demaille <akim@epita.fr>
15463
15464 * src/reader.c (readgram): Don't add the rule 0 if there were no
15465 rules read. In other words, add it _after_ having performed
15466 grammar sanity checks.
15467 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15468
78d5bae9
AD
154692001-12-29 Akim Demaille <akim@epita.fr>
15470
15471 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15472 visible, and some states have now a different number.
15473
ff442794
AD
154742001-12-29 Akim Demaille <akim@epita.fr>
15475
15476 * src/reader.c (readgram): Bind the initial rule's lineno to that
15477 of the first rule.
15478 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15479 (Solved SR Conflicts): Adjust rule 0's line number.
15480
610ab194
AD
154812001-12-29 Akim Demaille <akim@epita.fr>
15482
15483 Fix the `GAWK Grammar' failure.
15484
15485 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15486 the reductions of the first state which was mistakenly confused
15487 with the final state because precisely final_state was initialized
15488 to 0.
15489 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15490 now noticed by Bison.
15491 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15492 have a reduction on $default.
15493
29d29c8f
AD
154942001-12-29 Akim Demaille <akim@epita.fr>
15495
15496 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15497 rule line numbers.
15498 * src/closure.c (print_closure): Likewise.
15499 * src/derives.c (print_derives): Likewise.
15500 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15501 now.
15502
7c6b64d0
AD
155032001-12-29 Akim Demaille <akim@epita.fr>
15504
15505 * src/lalr.c (lookaheads_print): New.
15506 (lalr): Call it when --trace-flag.
15507 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15508 are dumped.
15509
3d4daee3
AD
155102001-12-29 Akim Demaille <akim@epita.fr>
15511
15512 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15513 when walking through ritem, even via rule->rhs.
15514 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15515 (useful_production, useless_nonterminals): Likewise.
15516 (reduce_grammar_tables): Likewise, plus update nritems.
15517 * src/nullable.c (set_nullable): Likewise.
15518 * src/lalr.c (build_relations): Likewise.
15519 * tests/sets.at (Nullable): Adjust.
15520 Fortunately, now, the $axiom is no longer nullable.
15521
9e7f6bbd
AD
155222001-12-29 Akim Demaille <akim@epita.fr>
15523
15524 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15525 the 0-sentinel.
15526 * src/gram.c (ritem_longest_rhs): Likewise.
15527 * src/reduce.c (nonterminals_reduce): Likewise.
15528 * src/print_graph.c (print_graph): Likewise.
15529 * src/output.c (output_rule_data): Likewise.
15530 * src/nullable.c (set_nullable): Likewise.
15531
255ef638
AD
155322001-12-29 Akim Demaille <akim@epita.fr>
15533
15534 * src/output.c: Comment changes.
15535
0d8a7363
AD
155362001-12-27 Paul Eggert <eggert@twinsun.com>
15537
15538 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15539 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15540 Sparc, as they were causing more porting problems than the
15541 (minor) performance improvement was worth.
15542
15543 Also, catch up with 1.31's YYSTD.
15544
3db472b9
AD
155452001-12-27 Akim Demaille <akim@epita.fr>
15546
15547 * src/output.c (output_gram): Rely on nritems, not the
15548 0-sentinel. See below.
15549 Use -1 as separator, not 0.
15550 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15551 Rely on -1 as separator in yyrhs, instead of 0.
15552 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15553 twice `Now at end of input', therefore there are two lines less to
15554 expect.
15555
b365aa05
AD
155562001-12-27 Akim Demaille <akim@epita.fr>
15557
15558 * tests/regression.at (Unresolved SR Conflicts):
15559 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15560 below.
15561
30171f79
AD
155622001-12-27 Akim Demaille <akim@epita.fr>
15563
15564 * src/LR0.c (new_state): Recognize the final state by the fact it
15565 is reached by eoftoken.
15566 (insert_start_shifting_state, insert_eof_shifting_state)
15567 (insert_accepting_state, augment_automaton): Remove, since now
15568 these states are automatically computed from the initial state.
15569 (generate_states): Adjust.
15570 * src/print.c: When reporting a rule number to the user, substract
15571 1, so that the axiom rule is rule 0, and the first user rule is 1.
15572 * src/reduce.c: Likewise.
15573 * src/print_graph.c (print_core): For the time being, just as for
15574 the report, depend upon --trace-flags to dump the full set of
15575 items.
15576 * src/reader.c (readgram): Once the grammar read, insert the rule
15577 0: `$axiom: START-SYMBOL $'.
15578 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15579 number of the states has changed (the final state is no longer
15580 necessarily the last), catch up.
15581
75142d45
AD
155822001-12-27 Akim Demaille <akim@epita.fr>
15583
15584 Try to make the use of the eoftoken valid. Given that its value
15585 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15586 is used instead of > 0 where appropriate, (ii), depend upon nritems
15587 instead of the 0-sentinel.
15588
15589 * src/gram.h, src/gram.c (nritems): New.
15590 Expected to be duplication of nitems, but for the time being...
15591 * src/reader.c (packgram): Assert nritems and nitems are equal.
15592 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15593 * src/closure.c (print_closure, print_fderives): Likewise.
15594 * src/gram.c (ritem_print): Likewise.
15595 * src/print.c (print_core, print_grammar): Likewise.
15596 * src/print_graph.c: Likewise.
15597
b7c49edf
AD
155982001-12-27 Akim Demaille <akim@epita.fr>
15599
15600 * src/main.c (main): If there are complains after grammar
15601 reductions, then output the report anyway if requested, then die.
15602 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15603 * src/reader.c (eoftoken): New.
15604 (parse_token_decl): If the token being defined has value `0', it
15605 is the eoftoken.
15606 (packsymbols): No longer hack `tags' to insert `$' by hand.
15607 Be sure to preserve the value of the eoftoken.
15608 (reader): Make sure eoftoken is defined.
15609 Initialize nsyms to 0: now eoftoken is created just like the others.
15610 * src/print.c (print_grammar): Don't special case the eof token.
15611 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15612 lie anyway, albeit pleasant.
15613 * tests/calc.at: Exercise error messages with eoftoken.
15614 Change the grammar so that empty input is invalid.
15615 Adjust expectations.
15616 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15617
ec2da99f
AD
156182001-12-27 Akim Demaille <akim@epita.fr>
15619
15620 * configure.in: Check the protos of strchr ans strspn.
15621 Replace strchr if needed.
15622 * src/system.h: Provide the protos of strchr, strspn and memchr if
15623 missing.
15624 * lib/strchr.c: New.
15625 * src/reader.c (symbols_save): Use strchr.
15626
8adfa272
AD
156272001-12-27 Akim Demaille <akim@epita.fr>
15628
15629 * src/print.c, src/print_graph.c (escape): New.
15630 Use it to quote the TAGS outputs.
15631 * src/print_graph.c (print_state): Now errors are in red, and
15632 reductions in green.
15633 Prefer high to wide: output the state number on a line of its own.
15634
80dac38c
AD
156352001-12-27 Akim Demaille <akim@epita.fr>
15636
15637 * src/state.h, src/state.c (reductions_new): New.
15638 * src/LR0.c (set_state_table): Let all the states have a
15639 `reductions', even if reduced to 0.
15640 (save_reductions): Adjust.
15641 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15642 * src/print.c (print_reductions, print_actions): Adjust.
15643 * src/output.c (action_row): Adjust.
15644
2cec70b9
AD
156452001-12-27 Akim Demaille <akim@epita.fr>
15646
15647 * src/state.h, src/state.c (errs_new, errs_dup): New.
15648 * src/LR0.c (set_state_table): Let all the states have an errs,
15649 even if reduced to 0.
15650 * src/print.c (print_errs, print_reductions): Adjust.
15651 * src/output.c (output_actions, action_row): Adjust.
15652 * src/conflicts.c (resolve_sr_conflict): Adjust.
15653
13ca549a
AD
156542001-12-27 Akim Demaille <akim@epita.fr>
15655
15656 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15657
5092aba5
AD
156582001-12-27 Akim Demaille <akim@epita.fr>
15659
15660 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15661 * src/print.c: here.
15662 (lookaheadset, shiftset): New, used as additional storage by
15663 print_reductions.
15664 (print_results): Adjust.
15665 (print_shifts, print_gotos, print_errs): New, extracted from...
15666 (print_actions): here.
15667 * src/print_graph.c (print_actions): Remove dead code.
15668
11e2beca
AD
156692001-12-27 Akim Demaille <akim@epita.fr>
15670
15671 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15672 `$n' and `@n'.
15673
dac3c910
AD
156742001-12-27 Akim Demaille <akim@epita.fr>
15675
15676 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15677 (build_relations): Adjust.
15678
d0b0fefa
AD
156792001-12-27 Akim Demaille <akim@epita.fr>
15680
15681 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15682 duplication.
15683
adc8c848
AD
156842001-12-27 Akim Demaille <akim@epita.fr>
15685
15686 * src/reader.c (packgram): Catch nitems overflows.
15687
14d293ac
AD
156882001-12-27 Akim Demaille <akim@epita.fr>
15689
15690 * src/files.c, src/files.h (guard_obstack): Remove.
15691 * src/output.c (output): Adjust.
15692 * src/reader.c (parse_braces): New, factoring...
15693 (copy_action, copy_guard): these two which are renamed as...
15694 (parse_action, parse_guard): these.
15695 As a voluntary consequence, using braces around guards is now
15696 mandatory.
15697
f499b062
AD
156982001-12-27 Akim Demaille <akim@epita.fr>
15699
15700 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15701 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15702 members.
15703 (symbol_list_new): Adjust.
15704 (copy_action): action_line is the first line, not the last.
15705 (copy_guard): Just as for actions, store the `action' only, not
15706 the switch/case/break flesh.
15707 Don't parse the user action that might follow the guard, let...
15708 (readgram): do it, i.e., now, there can be an action after a
15709 guard.
15710 In other words the guard is just explicitly optional.
15711 (packgram): Adjust.
15712 * src/output.c (guards_output): New.
15713 (output_parser): Call it when needed.
15714 (output): Also free the guard and attrs obstacks.
15715 * src/files.c, src/files.h (obstack_save): Remove.
15716 (output_files): Remove.
15717 As a result, if one needs the former `.act' file, using an
15718 appropriate skeleton which requires actions and guards is now
15719 required.
15720 * src/main.c (main): Adjust.
15721 * tests/semantic.at: New.
15722 * tests/regression.at: Use `input.y' as input file name.
15723 Avoid 8+3 problems by requiring input.c when the test needs the
15724 parser.
15725
d945f5cd
AD
157262001-12-27 Akim Demaille <akim@epita.fr>
15727
15728 * src/reader.c (symbol_list_new): Be sure to initialize all the
15729 fields.
15730
d200e455
AD
157312001-12-27 Akim Demaille <akim@epita.fr>
15732
15733 All the hacks using a final pseudo state are now useless.
15734
15735 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15736 * src/lalr.c (nLA): New.
15737 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15738 instead of lookaheadsp from the pseudo state (nstate + 1).
15739
f9507c28
AD
157402001-12-27 Akim Demaille <akim@epita.fr>
15741
15742 * src/output.c (action_row, token_actions): Use a state_t instead
15743 of a integer, and nlookaheads instead of the following state's
15744 lookaheadsp.
15745
065fbd27
AD
157462001-12-27 Akim Demaille <akim@epita.fr>
15747
15748 * src/conflicts.c (log_resolution, flush_shift)
15749 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15750 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15751 (conflicts_print, print_reductions): Use a state_t instead of an
15752 integer when referring to a state.
15753 As much as possible, depend upon nlookaheads, instead of the
15754 `lookaheadsp' member of the following state (since lookaheads of
15755 successive states are successive, the difference between state n + 1
15756 and n served as the number of lookaheads for state n).
15757 * src/lalr.c (add_lookback_edge): Likewise.
15758 * src/print.c (print_core, print_actions, print_state)
15759 (print_results): Likewise.
15760 * src/print_graph.c (print_core, print_actions, print_state)
15761 (print_graph): Likewise.
15762 * src/conflicts.h: Adjust.
15763
1b177bd7
AD
157642001-12-27 Akim Demaille <akim@epita.fr>
15765
15766 * src/bison.hairy: Formatting/comment changes.
15767 ANSIfy.
15768 Remove `register' indications.
15769 Add plenty of `static'.
15770
7742ddeb
AD
157712001-12-27 Akim Demaille <akim@epita.fr>
15772
15773 * src/output.c (prepare): Drop the muscle `ntbase' which
15774 duplicates ntokens.
15775 * src/bison.simple: Formatting/comment changes.
15776 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15777 is an undocumented synonym.
15778
1fa14068
AD
157792001-12-22 Akim Demaille <akim@epita.fr>
15780
15781 * src/output.c (output_table_data): Change the prototype to use
15782 `int' for array ranges: some invocations do pass an int, not a
15783 short.
15784 Reported by Wayne Green.
15785
b9752825
AD
157862001-12-22 Akim Demaille <akim@epita.fr>
15787
15788 Some actions of web2c.y are improperly triggered.
15789 Reported by Mike Castle.
15790
15791 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15792 * tests/regression.at (Web2c): Rename as...
15793 (Web2c Report): this.
15794 (Web2c Actions): New.
15795
776209d6
AD
157962001-12-22 Akim Demaille <akim@epita.fr>
15797
15798 Reductions in web2c.y are improperly reported.
15799 Reported by Mike Castle.
15800
15801 * src/conflicts.c (print_reductions): Fix.
15802 * tests/regression.at (Web2c): New.
15803
275fc3ad
AD
158042001-12-18 Akim Demaille <akim@epita.fr>
15805
15806 Some host fail on `assert (!"foo")', which expands to
15807 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15808 Reported by Nelson Beebee.
15809
15810 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15811 `#define it_succeeded 0' and `assert (it_succeeded)'.
15812
897668ee
MA
158132001-12-17 Marc Autret <autret_m@epita.fr>
15814
15815 * src/bison.simple: Don't hard code the skeleton line and filename.
15816 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15817 New line counter 'skeleton_line' (skeleton-line muscle).
15818
ab3399e0
PE
158192001-12-17 Paul Eggert <eggert@twinsun.com>
15820
15821 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15822 YYDEBUG must be defined to a nonzero value.
15823
15824 * src/bison.simple (yytname): Do not assume that the user defines
15825 YYDEBUG to a properly parenthesized expression.
15826
3877f72b
AD
158272001-12-17 Akim Demaille <akim@epita.fr>
15828
15829 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15830 nlookaheads is a new member.
15831 Adjust all users.
15832 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15833 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15834 state.
776209d6 15835
331dbc1b
AD
158362001-12-17 Akim Demaille <akim@epita.fr>
15837
15838 * src/files.h, src/files.c (open_files, close_files): Remove.
15839 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15840 let...
15841 * src/reader.c (reader): Do it.
776209d6 15842
be750e4c
AD
158432001-12-17 Akim Demaille <akim@epita.fr>
15844
15845 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 15846
709ae8c6
AD
158472001-12-17 Akim Demaille <akim@epita.fr>
15848
15849 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15850 (flush_reduce): New.
15851 (resolve_sr_conflict): Adjust.
776209d6 15852
f87685c3
AD
158532001-12-17 Akim Demaille <akim@epita.fr>
15854
15855 * src/output.c (output_obstack): Be static and rename as...
15856 (format_obstack): this, to avoid any confusion with files.c's
15857 output_obstack.
15858 * src/reader.h (muscle_obstack): Move to...
15859 * src/output.h: here, since it's defined in output.c.
15860
837491d8
AD
158612001-12-17 Akim Demaille <akim@epita.fr>
15862
15863 * src/output.c (action_row, save_column, default_goto)
15864 (sort_actions, matching_state, pack_vector): Better variable
15865 locality.
15866
796d61fb
AD
158672001-12-17 Akim Demaille <akim@epita.fr>
15868
15869 * src/output.c: Various formatting changes.
776209d6 15870
64d15509
AD
158712001-12-17 Akim Demaille <akim@epita.fr>
15872
15873 * src/files.c (output_files): Free the output_obstack.
15874 * src/main.c (main): Call print and print_graph conditionally.
15875 * src/print.c (print): Work unconditionally.
15876 * src/print_graph.c (print_graph): Work unconditionally.
15877 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15878
fbc8ecb7
MA
158792001-12-16 Marc Autret <autret_m@epita.fr>
15880
15881 * src/output.c (actions_output): Fix. When we use %no-lines,
15882 there is one less line per action.
15883
f0440388
MA
158842001-12-16 Marc Autret <autret_m@epita.fr>
15885
15886 * src/bison.simple: Remove a useless #line directive.
15887 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15888 * src/output.c (get_lines_number): New.
776209d6 15889 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
15890 output muscles.
15891 Fix line numbering.
15892 (actions_output): Computes the number of lines taken by actions.
15893 (output_master_parser): Insert new skeleton which is the name of
15894 the output parser file name.
15895
a79986b8
MA
158962001-12-15 Marc Autret <autret_m@epita.fr>
15897
15898 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15899
4ec8e00f
MA
159002001-12-15 Marc Autret <autret_m@epita.fr>
15901
15902 * src/output.c (output_gram): Keep track of the hairy one.
15903
1a4648ff
AD
159042001-12-15 Akim Demaille <akim@epita.fr>
15905
15906 Make `make distcheck' work.
15907
15908 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15909 system.h which uses libgettext.h.
15910
9c2c67e6
AD
159112001-12-15 Akim Demaille <akim@epita.fr>
15912
15913 * src/nullable.c (set_nullable): Useless rules must be skipped,
15914 otherwise, since we range over their symbols, we might look at a
15915 nonterminal which no longer ``exists'', i.e., it is not counted in
15916 `nvars', hence we overflow our arrays.
15917
93ede233
AD
159182001-12-15 Akim Demaille <akim@epita.fr>
15919
15920 The header can also be produced directly, without any obstack!
15921 Yahoo!
15922
15923 * src/files.c, src/files.h (defines_obstack): Remove.
15924 (compute_header_macro): Global.
15925 (defines_obstack_save): Remove.
15926 * src/reader.c (parse_union_decl): No longer output to
15927 defines_obstack: its content can be found in the `stype' muscle
15928 anyway.
15929 (output_token_translations): Merge into...
15930 (symbols_output): this.
15931 Rename as...
15932 (symbols_save): this.
15933 (reader): Adjust.
15934 * src/output.c (header_output): New.
15935 (output): Call it.
15936
2666f928
AD
159372001-12-15 Akim Demaille <akim@epita.fr>
15938
15939 * src/reader.c (parse_union_decl): Instead of handling two obstack
15940 simultaneously, use one to define the `stype' muscle, and use the
15941 value of the latter to fill defines_obstack.
15942 (copy_comment): Remove.
15943 (copy_comment2): Work for a single obstack.
15944 Rename as...
15945 (copy_comment): this.
15946
428046f8
AD
159472001-12-15 Akim Demaille <akim@epita.fr>
15948
15949 * src/lex.c, src/lex.h (xgetc): No longer static.
15950 * src/reader.c (parse_union_decl): Revamp.
15951
ea52d706
AD
159522001-12-15 Akim Demaille <akim@epita.fr>
15953
15954 Still making progress in separating Bison into (i) input, (ii)
15955 process, (iii) output: now we can directly output the parser file
15956 without using table_obstack at all.
15957
15958 * src/files.c, src/files.h (table_obstack): Bye bye.
15959 (parser_file_name): New.
15960 * src/files.c (compute_output_file_names): Compute it.
15961 * src/output.c (actions_output, output_parser)
15962 (output_master_parser): To a file instead of an obstack.
15963
3f96f4dc
AD
159642001-12-15 Akim Demaille <akim@epita.fr>
15965
15966 Attach actions to rules, instead of pre-outputting them to
15967 actions_obstack.
15968
15969 * src/gram.h (rule_t): action and action_line are new members.
15970 * src/reader.c (symbol_list): Likewise.
15971 (copy_action): Save the actions within the rule.
15972 (packgram): Save them in rule_table.
15973 * src/output.c (actions_output): New.
15974 (output_parser): Use it on `%%actions'.
15975 (output_rule_data): Don't free rule_table.
15976 (output): Do it.
15977 (prepare): Don't save the `action' muscle.
15978 * src/bison.simple: s/%%action/%%actions/.
15979
51576fb3
AD
159802001-12-15 Akim Demaille <akim@epita.fr>
15981
15982 * src/reader.c (copy_action): When --yacc, don't append a `;'
15983 to the user action: let it fail if lacking.
dee049eb 15984 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 15985
2648a72d
AD
159862001-12-14 Akim Demaille <akim@epita.fr>
15987
15988 * src/lex.c (literalchar): Simply return the char you decoded, non
15989 longer mess around with obstacks and int pointers.
15990 Adjust all callers.
15991
92790e5b
AD
159922001-12-14 Akim Demaille <akim@epita.fr>
15993
15994 * src/lex.c (literalchar): Don't escape the special characters,
15995 just decode them, and keep them as char (before, eol was output as
15996 the 2 char string `\n' etc.).
15997 * src/output.c (output_rule_data): Use quotearg to output the
15998 token strings.
15999
927c1557
PE
160002001-12-13 Paul Eggert <eggert@twinsun.com>
16001
16002 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16003 Do not infringe on the global user namespace when using C++.
16004 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16005 All uses of `fprintf' and `stderr' changed.
16006
16007 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16008
ed8e1f68
AD
160092001-12-13 Akim Demaille <akim@epita.fr>
16010
16011 The computation of nullable is broken: it doesn't handle empty
16012 RHS's properly.
16013
16014 * tests/torture.at (GNU AWK Grammar): New.
16015 * tests/sets.at (Nullable): New.
16016 * src/nullable.c (set_nullable): Instead of blindly looping over
16017 `ritems', loop over the rules, and then over their rhs's.
16018
16019 Work around Autotest bugs.
16020
16021 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16022 frame, because Autotest understand lines starting with a `+' as
16023 traces from the shell. Then, they are not processed properly.
16024 Admittedly an Autotest bug, but we don't have time to wait for
16025 Autotest to catch up.
16026 * tests/regression.at (Broken Closure): Adjust to the new table
16027 frames.
16028 Move to...
16029 * tests/sets.at: here.
16030
cb581495
AD
160312001-12-13 Akim Demaille <akim@epita.fr>
16032
16033 * src/closure.c (closure): Use nrules instead of playing tricks
16034 with BITS_PER_WORD.
16035
2e729273
AD
160362001-12-13 Akim Demaille <akim@epita.fr>
16037
16038 * src/print.c (print_actions): Output the handling of `$' as the
16039 traces do: shifting the token EOF. Before EOF was treated as a
16040 nonterminal.
16041 * tests/regression.at: Adjust some tests.
16042 * src/print_graph.c (print_core): Complete the set of items via
16043 closure. The next-to-final and final states are still unsatisfying,
16044 but that's to be addressed elsewhere.
16045 No longer output the rule numbers, but do output the state number.
16046 A single loop for the shifts + gotos is enough, but picked a
16047 distinct color for each.
16048 (print_graph): Initialize and finalize closure.
16049
107f7dfb
AD
160502001-12-13 Akim Demaille <akim@epita.fr>
16051
16052 * src/reader.c (readgram): Remove dead code, an strip useless
16053 braces.
16054 (get_type): Remove, unused.
16055
9b53a24f
AD
160562001-12-12 Akim Demaille <akim@epita.fr>
16057
16058 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16059 on that of lib/error.c.
16060
dbfb6dcd
AD
160612001-12-12 Akim Demaille <akim@epita.fr>
16062
16063 Some hosts don't like `/' in includes.
16064
16065 * src/system.h: Include libgettext.h without qualifying the path.
16066 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16067 $(top_srcdir).
16068
c25fb648
MA
160692001-12-11 Marc Autret <autret_m@epita.fr>
16070
16071 * src/output.c (output_parser): Remove useless muscle.
16072
710ddc4f
MA
160732001-12-11 Marc Autret <autret_m@epita.fr>
16074
16075 * src/bison.simple: Remove #line just before %%epilogue. It
16076 is now handled in ...
16077 * src/reader.c (read_additionnal_code): Add the output of a
16078 #line for the epilogue.
16079
e83d80b8
MA
160802001-12-10 Marc Autret <autret_m@epita.fr>
16081
927c1557 16082 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
16083 replace precedent remove.
16084 * src/bison.simple: Remove #line before %%prologue because
16085 %%input-line is wrong at this time.
16086
971d5158
MA
160872001-12-10 Marc Autret <autret_m@epita.fr>
16088
16089 * src/reader.c (symbols_output): Clean up.
927c1557 16090 * src/output.c (output_gram, output): Clean up.
971d5158 16091
5edafffd
AD
160922001-12-10 Akim Demaille <akim@epita.fr>
16093
16094 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16095 * src/LR0.c (set_state_table): here.
16096 * src/lalr.c (lalr): Call it.
16097
0279f8e9
AD
160982001-12-10 Akim Demaille <akim@epita.fr>
16099
16100 * src/state.h (shifts): Remove the `number' member: shifts are
16101 attached to state, hence no longer need to be labelled with a
16102 state number.
16103
190c4f5f
AD
161042001-12-10 Akim Demaille <akim@epita.fr>
16105
16106 Now that states have a complete set of members, the linked list of
16107 shifts is useless: just fill directly the state's shifts member.
16108
16109 * src/state.h (shifts): Remove the `next' member.
16110 * src/LR0.c (first_state, last_state): Remove.
16111 Adjust the callers.
16112 (augment_automaton): Don't look for the shifts that must be added
16113 a shift on EOF: it is those of the state we looked for! But now,
16114 since shifts are attached, it is no longer needed to looking
16115 merely by its id: its number.
16116
2a73b93d
AD
161172001-12-10 Akim Demaille <akim@epita.fr>
16118
16119 * src/LR0.c (augment_automaton): Better variable locality.
16120 Remove an impossible branch: if there is a state corresponding to
16121 the start symbol being shifted, then there is shift for the start
16122 symbol from the initial state.
16123
74392f6a
AD
161242001-12-10 Akim Demaille <akim@epita.fr>
16125
16126 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16127 only when appropriate: when insert_start_shifting_state' is not
16128 invoked.
16129 * tests/regression.at (Rule Line Numbers): Adjust.
16130
37c82725
AD
161312001-12-10 Akim Demaille <akim@epita.fr>
16132
16133 * src/LR0.c (augment_automaton): Now that all states have shifts,
16134 merge the two cases addition shifts to the initial state.
16135
6a164e0c
AD
161362001-12-10 Akim Demaille <akim@epita.fr>
16137
16138 * src/lalr.c (set_state_table): Move to...
16139 * src/LR0.c: here.
16140 * src/lalr.c (lalr): Don't call it...
16141 * src/LR0.c (generate_states): do it.
16142 * src/LR0.h (first_state): Remove, only the table is used.
16143
7215de24
AD
161442001-12-10 Akim Demaille <akim@epita.fr>
16145
16146 * src/LR0.h (first_shift, first_reduction): Remove.
16147 * src/lalr.c: Don't use first_shift: find shifts through the
16148 states.
16149
80e25d4d
AD
161502001-12-10 Akim Demaille <akim@epita.fr>
16151
16152 * src/LR0.c: Attach shifts to states as soon as they are
16153 computed.
16154 * src/lalr.c (set_state_table): Instead of assigning shifts to
16155 state, just assert that the mapping was properly done.
16156
0ab3728b
AD
161572001-12-10 Akim Demaille <akim@epita.fr>
16158
16159 * src/LR0.c (insert_start_shift): Rename as...
16160 (insert_start_shifting_state): this.
16161 (insert_eof_shifting_state, insert_accepting_state): New.
16162 (augment_automaton): Adjust.
16163 Better locality of the variables.
16164 When looking if the start_symbol is shifted from the initial
16165 state, using `while (... symbol != start_symbol ...)' sounds
16166 better than `while (... symbol < start_symbol ...)': If fail
16167 to see how the order between symbols could be relevant!
16168
78af9bbc
AD
161692001-12-10 Akim Demaille <akim@epita.fr>
16170
16171 * src/getargs.h: Don't declare `spec_name_prefix' and
16172 `spec_file_prefix', declared by src/files.h.
16173 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16174 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16175 * src/output.c (prepare): Adjust.
16176 * src/reader.c (symbols_output): Likewise.
16177 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16178
bdef2a41
AD
161792001-12-10 Akim Demaille <akim@epita.fr>
16180
16181 * src/muscle_tab.c (muscle_init): NULL is a better default than
16182 `"0"'.
16183
3735969c
AD
161842001-12-10 Akim Demaille <akim@epita.fr>
16185
16186 * src/reader.c (reader): Calling symbols_output once is enough.
16187
49701457
AD
161882001-12-10 Akim Demaille <akim@epita.fr>
16189
16190 Now that states have a complete set of members, the linked list of
16191 reductions is useless: just fill directly the state's reductions
16192 member.
16193
16194 * src/state.h (struct reductions): Remove member `number' and
16195 `next'.
16196 * src/LR0.c (first_reduction, last_reduction): Remove.
16197 (save_reductions): Don't link the new reductions, store them in
16198 this_state.
16199 * src/lalr.c (set_state_table): No need to attach reductions to
16200 states, it's already done.
16201 * src/output.c (output_actions): No longer free the shifts, then
16202 the reductions, then the states: free all the states and their
16203 members.
16204
0edad749
AD
162052001-12-10 Akim Demaille <akim@epita.fr>
16206
16207 * src/options.c (OPTN, DRTV, BOTH): New.
16208 (option_table): Use them.
16209
0edad749
AD
16210 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16211 the job of system.h.
16212 * src/options.c: Don't include stdio.h and xalloc.h for the same
16213 reasons.
16214
5449dd0f
AD
162152001-12-10 Akim Demaille <akim@epita.fr>
16216
16217 * src/output.c (output, prepare): Make sure the values of the
16218 muscles `action' and `prologue' are 0-terminated.
16219
a870c567
AD
162202001-12-10 Akim Demaille <akim@epita.fr>
16221
16222 Clean up GCC warnings.
16223
16224 * src/reader.c (copy_action): `buf' is not used.
16225 (parse_skel_decl): Be static.
16226 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16227 * src/options.h (create_long_option_table): Have a real prototype.
16228 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16229 (hash_delete_at): Return const void *.
16230 Adjust casts to preserve the const.
16231
80df8768
AD
162322001-12-10 Akim Demaille <akim@epita.fr>
16233
16234 * configure.in: Require 2.52g.
16235 M4 is not needed, but AUTOM4TE is.
16236 * m4/m4.m4: Remove.
16237 * tests/Makefile.am: Adjust.
16238
f693ad14
AD
162392001-12-10 Akim Demaille <akim@epita.fr>
16240
16241 One structure for states is enough, even though theoretically
16242 there are LR(0) states and LALR(1) states.
16243
16244 * src/lalr.h (state_t): Remove.
16245 (state_table): Be state_t **, not state_t *.
16246 * src/state.h (core, CORE_ALLOC): Rename as...
16247 (state_t, STATE_ALLOC): this.
16248 Add the LALR(1) members: shifts, reductions, errs.
16249 * src/LR0.c (state_table): Rename as...
16250 (state_hash): this, to avoid name clashes with the global
16251 `state_table'.
16252 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16253 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16254
74ffbcb6
AD
162552001-12-10 Akim Demaille <akim@epita.fr>
16256
16257 Bison dumps core on bash.y.
16258 Reported by Pascal Bart.
16259
16260 * src/warshall.c (bitmatrix_print): New.
16261 (TC): Use it.
ba0fe3c7 16262 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
16263 j must be the outer loop.
16264 * tests/regression.at (Broken Closure): New.
16265
07708e19
AD
162662001-12-05 Akim Demaille <akim@epita.fr>
16267
16268 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16269 its argument.
ba1ecc07 16270 Reported by Peter Hamorsky.
07708e19 16271
92b16366
AD
162722001-12-05 Akim Demaille <akim@epita.fr>
16273
16274 * src/conflicts.c (err_table): Remove.
16275 (resolve_sr_conflict): Adjust.
16276 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16277 Rename as...
16278 (state_t.reductions, state_t.shifts): this.
16279
076ab033
AD
162802001-12-05 Akim Demaille <akim@epita.fr>
16281
16282 * src/reduce.c (reduce_grammar_tables): No longer disable the
16283 removal of useless rules via CPP but via `if (0)', so that the
16284 compiler still check the code is valid.
16285 For instance, it should have noticed `rline' no longer exists: use
16286 the `line' member of rule_t.
16287 * src/gram.c (dummy, rline): Remove, unused.
16288
3843c413
AD
162892001-12-05 Akim Demaille <akim@epita.fr>
16290
16291 * src/output.c (pack_vector): Use assert, not berror.
16292 * src/main.c (berror): Remove, unused.
16293
43168960
AD
162942001-12-05 Akim Demaille <akim@epita.fr>
16295
16296 New experimental feature: if --verbose --trace output all the
16297 items of a state, not only its kernel.
16298
16299 * src/print.c (print_core): If `trace_flag', then invoke closure
16300 before outputting the items of the state (print_core is no longer
16301 a correct name them).
16302 (print_results): Invoke new_closure/free_closure if needed.
16303
b2872512
AD
163042001-12-05 Akim Demaille <akim@epita.fr>
16305
16306 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16307 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16308 (nitemset): for consistency with the rest of the project.
16309
23cbcc6c
AD
163102001-12-05 Akim Demaille <akim@epita.fr>
16311
16312 * src/closure.c (print_closure): Improve.
16313 (closure): Use it for printing input and output.
16314
03ec521c
AD
163152001-12-05 Akim Demaille <akim@epita.fr>
16316
16317 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16318 indexed by nonterminals.
16319
3a7456dd
AD
163202001-12-05 Akim Demaille <akim@epita.fr>
16321
16322 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16323 what it was!).
16324 * src/warshall.h: Remove accidental duplication of the content.
16325
1cbcf2e7
AD
163262001-12-05 Akim Demaille <akim@epita.fr>
16327
16328 * src/closure.c (set_fderives): De-obfuscate.
16329
84182270
AD
163302001-12-05 Akim Demaille <akim@epita.fr>
16331
16332 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16333
3f6f053c
AD
163342001-12-05 Akim Demaille <akim@epita.fr>
16335
16336 * src/closure.c (set_firsts): De-obfuscate.
16337
7a5350ba
AD
163382001-12-05 Akim Demaille <akim@epita.fr>
16339
16340 * src/output.c (action_row): De-obfuscate
16341 using the good o' techniques: arrays not pointers, variable
16342 locality, BITISSET, RESETBIT etc.
16343
d954473d
AD
163442001-12-05 Akim Demaille <akim@epita.fr>
16345
16346 Pessimize the code to simplify it: from now on, all the states
16347 have a valid SHIFTS, which NSHIFTS is possibly 0.
16348
16349 * src/LR0.c (shifts_new): Be global and move to..
16350 * src/state.c, src/state.h: here.
16351 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16352 * src/print_graph: Adjust.
16353
9839bbe5
AD
163542001-12-05 Akim Demaille <akim@epita.fr>
16355
16356 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16357 * src/conflicts.c: Use it.
16358 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16359 incorrectly ``simplified''.
16360
9f136c07
AD
163612001-12-05 Akim Demaille <akim@epita.fr>
16362
16363 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16364 using the good o' techniques: arrays not pointers, variable
16365 locality, BITISSET, RESETBIT etc.
16366
b608206e
AD
163672001-12-05 Akim Demaille <akim@epita.fr>
16368
16369 * src/state.h (SHIFT_SYMBOL): New.
16370 * src/conflicts.c: Use it to deobfuscate.
16371
52afa962
AD
163722001-12-05 Akim Demaille <akim@epita.fr>
16373
16374 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16375 (print_reductions): De-obfuscate using the good o' techniques:
16376 arrays not pointers, variable locality, BITISSET.
16377
e74dc321
AD
163782001-12-05 Akim Demaille <akim@epita.fr>
16379
16380 * src/conflicts.c (print_reductions): Arrays, not pointers.
16381 Use BITISSET.
16382
768fca83
AD
163832001-12-05 Akim Demaille <akim@epita.fr>
16384
16385 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16386
a17e599f
AD
163872001-12-05 Akim Demaille <akim@epita.fr>
16388
16389 * src/conflicts.c (print_reductions): Improve variable locality.
16390
a04bc341
AD
163912001-12-05 Akim Demaille <akim@epita.fr>
16392
16393 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16394
c8ea038e
AD
163952001-12-05 Akim Demaille <akim@epita.fr>
16396
16397 * src/conflicts.c (print_reductions): Improve variable locality.
16398
aa2aab3c
AD
163992001-12-05 Akim Demaille <akim@epita.fr>
16400
16401 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16402 * src/lalr.c: Use them.
16403
b178c8cc
AD
164042001-12-05 Akim Demaille <akim@epita.fr>
16405
16406 * src/LR0.c (augment_automaton): Formatting changes.
16407 Better variable locality.
16408
f67d13aa
AD
164092001-12-05 Akim Demaille <akim@epita.fr>
16410
16411 * src/lalr.c (matrix_print): New.
16412 (transpose): Use it.
16413 Use arrays instead of pointers.
16414
c2713865
AD
164152001-12-05 Akim Demaille <akim@epita.fr>
16416
16417 * src/lalr.c (maxrhs): Move to...
16418 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16419 * src/lalr.c (build_relations): Adjust.
16420
9887c18a
AD
164212001-12-05 Akim Demaille <akim@epita.fr>
16422
16423 * src/lalr.c (transpose): Free the memory allocated to the
16424 argument, as it is replaced by the results by the unique caller.
16425 (build_relations): Merely invoke transpose: it handles the memory
16426 deallocation.
16427 Improve variable locality.
16428 Avoid variables used as mere abbreviations.
16429 (compute_lookaheads): Use arrays instead of pointers.
16430
4d4f699c
AD
164312001-12-05 Akim Demaille <akim@epita.fr>
16432
16433 * src/lalr.c (initialize_F): Improve variable locality.
16434 Avoid variables used as mere abbreviations.
16435
80a69750
AD
164362001-12-05 Akim Demaille <akim@epita.fr>
16437
16438 * src/derives.c (print_derives): Display the ruleno.
16439 * src/lalr.c (initialize_F, transpose): Better variable locality
16440 to improve readability.
16441 Avoid variables used as mere abbreviations.
16442
fe961097
AD
164432001-12-05 Akim Demaille <akim@epita.fr>
16444
16445 * src/lalr.c (traverse): Use arrays instead of pointers.
16446
e3e4e814
AD
164472001-12-05 Akim Demaille <akim@epita.fr>
16448
16449 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16450 the handling of squeue.
16451 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16452
630e182b
AD
164532001-12-05 Akim Demaille <akim@epita.fr>
16454
16455 Because useless nonterminals are now kept alive (instead of being
16456 `destroyed'), we now sometimes examine them, and store information
16457 related to them. Hence we need to know their number, and adjust
16458 memory allocations.
16459
16460 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16461 static.
16462 * src/LR0.c (allocate_itemsets): The memory allocated to
16463 `symbol_count' was used for two different purpose: once to count
16464 the number of occurrences of each symbol, and later reassigned to
16465 `shift_symbol', containing the symbol that can be shifted from a
16466 given state.
16467 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16468 only, and...
16469 (new_itemsets): Allocate `shift_symbol' here.
16470 (allocate_itemsets): symbol_count includes useless nonterminals.
16471 Make room for them.
16472 (free_storage): Use `free', not `XFREE', for pointers that cannot
16473 be null.
16474
81b51460
AD
164752001-12-05 Akim Demaille <akim@epita.fr>
16476
16477 * src/nullable.c (set_nullable): Deobfuscate the handling of
16478 ritem.
16479 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16480
3067fbef
AD
164812001-12-05 Akim Demaille <akim@epita.fr>
16482
16483 * src/gram.c, src/gram.h (ritem_print): New.
16484 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16485 (This useless function was defined only to work around VMS linkers
16486 that can't handle compilation units with variables only).
16487 * src/reduce.c (dump_grammar): Use it to trace the construction of
16488 ritem.
16489
c2bea5f9
PE
164902001-12-04 Paul Eggert <eggert@twinsun.com>
16491
7d27c823
PE
16492 * src/bison.simple (union yyalloc): Change member names
16493 to be the same as the stack names.
16494 (yyparse): yyptr is now union yyalloc *, not char *.
16495 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16496 and may generate better code on some machines.
c2bea5f9
PE
16497 (yystpcpy): Use prototype if __STDC__ is defined, not just
16498 if __cplusplus is defined.
35687a9d 16499
2c8a9dfa
AD
165002001-11-30 Akim Demaille <akim@epita.fr>
16501
16502 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16503 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16504 Gettext doesn't compile cleanly, and dies with -Werror.
16505 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16506 Include WARNING_CFLAGS here.
16507 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16508 before being defined.
16509
f4e421e6
AD
165102001-11-27 Paul Eggert <eggert@twinsun.com>
16511
16512 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16513 First arg is int, not unsigned.
16514 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16515 (SIZE_MAX, UINT_MAX): New macros.
16516 (quotearg_n_options): Abort if N is negative.
16517 Avoid overflow check on hosts where size_t is 64 bits and int
16518 is 32 bits, as overflow is impossible there.
16519 Fix off-by-one typo that caused unnecessary reallocation.
16520
7093d0f5
AD
165212001-11-29 Paul Eggert <eggert@twinsun.com>
16522
16523 Name space cleanup in generated parser.
16524
16525 * doc/bison.texinfo (Bison Parser): Discuss system headers
16526 and their effect on the user name space.
16527
16528 * src/bison.simple:
16529 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16530 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16531 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16532
16533 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16534 on user names when possible.
16535
16536 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16537 Simplify test for whather <alloca.h> exists.
16538
16539 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16540
16541 (<stdio.h>): Include if YYDEBUG.
16542
16543 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16544 ! defined (yyoverflow) && ! defined (yymemcpy).
16545
16546 (yymemcpy, yyparse): Rename local variables as needed so that
16547 they all begin with 'yy'.
16548
16549 (yystrlen, yystpcpy): New functions.
16550
16551 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16552 All uses changed.
16553
16554 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16555 instead of relying on string.h functions. Use YYSTACK_ALLOC
16556 and YYSTACK_FREE instead of malloc and free.
16557
fd51e5ff
AD
165582001-11-30 Akim Demaille <akim@epita.fr>
16559
16560 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16561 before their first uses.
16562 (YYBISON, YYPURE): Move to the top of the output.
16563
7d13ff5f
AD
165642001-11-30 Akim Demaille <akim@epita.fr>
16565
16566 * tests/reduce.at (Useless Nonterminals): Fix.
16567
892a3995
AD
165682001-11-30 Akim Demaille <akim@epita.fr>
16569
16570 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16571 if body instead of `;' to pacify GCC's warnings.
16572
68f1e3ed
AD
165732001-11-30 Akim Demaille <akim@epita.fr>
16574
16575 Instead of mapping the LHS of unused rules to -1, keep the LHS
16576 valid, but flag the rules as invalid.
16577
16578 * src/gram.h (rule_t): `useful' is a new member.
16579 * src/print.c (print_grammar): Adjust.
16580 * src/derives.c (set_derives): Likewise.
16581 * src/reader.c (packgram, reduce_output): Likewise.
16582 * src/reduce.c (reduce_grammar_tables): Likewise.
16583 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16584
d2d1b42b
AD
165852001-11-30 Akim Demaille <akim@epita.fr>
16586
16587 * src/reduce.c (reduce_output): Formatting changes.
16588 * src/print.c (print_results, print_grammar): Likewise.
16589 * tests/regression.at (Rule Line Numbers)
16590 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16591
760b53a8
AD
165922001-11-30 Akim Demaille <akim@epita.fr>
16593
16594 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16595 useless nonterminals, move them at the end of the symbol arrays.
16596 (reduce_output): Adjust.
16597 * tests/reduce.at (Useless Nonterminals): Adjust.
16598
00238958
AD
165992001-11-30 Akim Demaille <akim@epita.fr>
16600
16601 * src/reduce.c: Various comment/formatting changes.
16602 (nonterminals_reduce): New, extracted from...
16603 (reduce_grammar_tables): here.
16604 (reduce_grammar): Call nonterminals_reduce.
16605
396452de
PE
166062001-11-29 Paul Eggert <eggert@twinsun.com>
16607
16608 * src/bison.simple (YYSTACK_REALLOC): Remove.
16609 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16610 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16611 New macros.
16612 (union yyalloc): New type.
16613 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16614 an arbitrary restriction on hosts where size_t is wider than int.
16615
16616 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16617 a parser stack overflow. Allocate just one block of memory for all
16618 three stacks, instead of allocating three blocks; this typically is
16619 faster and reduces fragmentation.
16620
16621 Do not limit the number of items in the stack to a value that fits
16622 in 'int', as this is an arbitrary limit on hosts with 64-bit
16623 size_t and 32-bit int.
16624
147e184c
MA
166252001-11-29 Marc Autret <autret_m@epita.fr>
16626
16627 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16628 of defining YYERROR_VERBOSE.
16629 [AT_DATA]: $4 is now out of C declarations in the prologue.
16630
426cf563
MA
166312001-11-28 Marc Autret <autret_m@epita.fr>
16632
16633 * src/reader.c (parse_dquoted_param): New.
16634 (parse_skel_decl): Use it.
16635 * src/lex.h: Add its prototype.
16636 * src/lex.c (literalchar): Become not static.
16637
c7925b99
MA
166382001-11-28 Marc Autret <autret_m@epita.fr>
16639
16640 * src/output.h: And put its extern declaration here.
16641 * src/output.c (error_verbose): Define here.
16642 (prepare): Echo name modification.
16643 * src/getargs.h: Clean its extern declaration.
16644 * src/getargs.c (error_verbose_flag): Remove.
16645 (getargs): Remove case 'e'.
16646 * src/options.c (option_table): 'error-verbose' is now seen as simple
16647 percent option.
16648 Include output.h.
16649
16650 * src/reader.c (read_declarations): Remove case tok_include.
16651 (parse_include_decl): Remove.
16652 * src/lex.h (token_t): Remove tok_include.
16653 * src/options.c (option_table): 'include' is now a simple command line
16654 option.
16655
5b5d1929
MA
166562001-11-28 Marc Autret <autret_m@epita.fr>
16657
16658 * src/bison.simple: Adjust muscle names.
16659 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16660 * src/output.c (prepare): s/_/-/ for the muscles names.
16661 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16662
8850be4b
MA
166632001-11-28 Marc Autret <autret_m@epita.fr>
16664
16665 * src/bison.simple: Fix debug.
16666 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16667
4a38e613
AD
166682001-11-28 Akim Demaille <akim@epita.fr>
16669
16670 * src/LR0.c (shifts_new): New.
16671 (save_shifts, insert_start_shift, augment_automaton): Use it.
16672
4b35e1c1
AD
166732001-11-28 Akim Demaille <akim@epita.fr>
16674
16675 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16676 keep ruleno only.
16677
d2b04478
AD
166782001-11-28 Akim Demaille <akim@epita.fr>
16679
16680 * src/closure.c (closure): Instead of looping over word in array
16681 then bits in words, loop over bits in array.
16682
2c4c30aa
AD
166832001-11-28 Akim Demaille <akim@epita.fr>
16684
16685 * src/closure.c (closure): No longer optimize the special case
16686 where all the bits of `ruleset[r]' are set to 0, to make the code
16687 clearer.
16688
576890b7
AD
166892001-11-28 Akim Demaille <akim@epita.fr>
16690
16691 * src/closure.c (closure): `r' and `c' are new variables, used to
16692 de-obfuscate accesses to RULESET and CORE.
16693
cb487d7d
AD
166942001-11-28 Akim Demaille <akim@epita.fr>
16695
16696 * src/reduce.c (reduce_print): Use ngettext.
16697 (dump_grammar): Improve the trace accuracy.
16698
6013d43f
AD
166992001-11-28 Akim Demaille <akim@epita.fr>
16700
16701 * src/reduce.c (dump_grammar): Don't translate trace messages.
16702
cb4956ee
AD
167032001-11-28 Akim Demaille <akim@epita.fr>
16704
16705 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16706 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16707 as all tags are free'ed afterwards.
16708 From Enrico Scholz.
16709
648185ab
PE
167102001-11-27 Paul Eggert <eggert@twinsun.com>
16711
16712 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16713 use alloca when we didn't want to, and vice versa.
16714
68254a03
MA
167152001-11-27 Marc Autret <autret_m@epita.fr>
16716
9113b58f
AD
16717 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16718 initialization.
68254a03
MA
16719 * src/output.c (prepare): Remove its update.
16720
04d843a2
MA
167212001-11-27 Marc Autret <autret_m@epita.fr>
16722
16723 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16724 Use %error-verbose.
16725
d2079671 167262001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
16727
16728 * src/bison.simple: Remove YYERROR_VERBOSE using.
16729 Use %%error_verbose.
16730 (yyparse): Likewise.
16731 * src/output.c (prepare): Give its final value.
16732 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16733 * src/getargs.h: Add its extern declaration.
16734 * src/getargs.c (error_verbose_flag): New int.
16735 (getargs): Update to catch new case.
16736 * src/options.c (option_table): 'error-verbose' is a new option.
16737 (shortopts): Update.
16738
e0327bc8
AD
167392001-11-27 Akim Demaille <akim@epita.fr>
16740
16741 * src/system.h: Use intl/libgettext.h.
16742 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16743
000f1a3c
AD
167442001-11-27 Akim Demaille <akim@epita.fr>
16745
16746 * tests/torture.at (Exploding the Stack Size with Malloc):
16747 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16748
26cfe0be
AD
167492001-11-27 Akim Demaille <akim@epita.fr>
16750
16751 * src/files.c: Include error.h.
16752 Reported by Hans Aberg.
16753
f6bd5427
MA
167542001-11-26 Marc Autret <autret_m@epita.fr>
16755
d2079671 16756 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
16757 (read_declarations): Add case tok_include.
16758 * src/getargs.h (include): Add its extern definition.
16759 * src/getargs.c (include): New const char *.
16760 (getargs): Add case '-I'.
16761 * src/options.c (option_table): Add include as command line and
16762 percent option.
16763 * src/lex.h (token_t): Add tok_include.
16764
2ca209c1
AD
167652001-11-26 Akim Demaille <akim@epita.fr>
16766
16767 * src/reader.c (readgram): Make sure rules for mid-rule actions
16768 have a lineno equal to that of their host rule.
16769 Reported by Hans Aberg.
16770 * tests/regression.at (Rule Line Numbers): New.
16771
0e41b407
AD
167722001-11-26 Akim Demaille <akim@epita.fr>
16773
16774 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16775 size_ts.
16776
167772001-11-26 Akim Demaille <akim@epita.fr>
16778
16779 * src/complain.c, src/complain.h (error): Remove, provided by
16780 lib/error.[ch].
16781
e0c40012
AD
167822001-11-26 Akim Demaille <akim@epita.fr>
16783
16784 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16785 issue an error message.
16786 * tests/regression.at (Invalid %directive): New.
16787 Reported by Hans Aberg.
16788
5e147124
AD
167892001-11-26 Akim Demaille <akim@epita.fr>
16790
16791 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16792 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16793
a034c8b8
AD
167942001-11-26 Akim Demaille <akim@epita.fr>
16795
16796 * src/conflicts.c (conflicts_print): Don't complain at all when
16797 there are no reduce/reduce conflicts, and as many shift/reduce
16798 conflicts as expected.
16799 * tests/regression.at (%expect right): Adjust.
16800
c64a20f3
AD
168012001-11-23 Akim Demaille <akim@epita.fr>
16802
16803 * lib/alloca.c: Update, from fileutils.
16804
5b0d29bb
AD
168052001-11-23 Akim Demaille <akim@epita.fr>
16806
16807 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16808
722c4bfe
AD
168092001-11-23 Akim Demaille <akim@epita.fr>
16810
16811 * src/system.h: Include alloca.h.
16812 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16813
6255b435
AD
168142001-11-23 Akim Demaille <akim@epita.fr>
16815
16816 * src/print_graph.c (print_actions): Remove `rule', unused.
16817 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16818 pacify GCC's signed < unsigned warnings.
16819 * src/closure.c (itemsetsize): Likewise.
16820 * src/reader.c (symbol_list_new): Static.
16821
b29b2ed5
AD
168222001-11-23 Akim Demaille <akim@epita.fr>
16823
16824 Attaching lineno to buckets is stupid, since only one copy of each
16825 symbol is kept, only the line of the first occurrence is kept too.
16826
16827 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16828 * src/reader.c (rline_allocated): Remove, unused.
16829 (symbol_list): Have a `line' member.
16830 (symbol_list_new): New.
16831 (readgram): Use it.
16832 * src/print.c (print_grammar): Output the rule line numbers.
16833 * tests/regression.at (Solved SR Conflicts)
16834 (Unresolved SR Conflicts): Adjust.
16835 Reported by Hans Aberg.
16836
a81b1d4a
MA
168372001-11-22 Marc Autret <autret_m@epita.fr>
16838
16839 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16840
c1ecb3c1
MA
168412001-11-22 Marc Autret <autret_m@epita.fr>
16842
16843 * src/muscle_tab.c (muscle_init): Remove initialization of
16844 skeleton muscle.
16845 * src/output.c (output_master_parser): Do it here.
16846
fbe01355
AD
168472001-11-20 Akim Demaille <akim@epita.fr>
16848
16849 * po/sv.po: New.
16850 * configure.in (ALL_LINGUAS): Adjust.
16851 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16852 longer contains strings to translate.
16853
81e895c0
AD
168542001-11-19 Akim Demaille <akim@epita.fr>
16855
16856 * src/conflicts.c (conflicts_print): Add a missing \n.
16857
6bb1878b
AD
168582001-11-19 Akim Demaille <akim@epita.fr>
16859
16860 * src/nullable.c (nullable_print): New.
16861 (set_nullable): Call it when tracing.
16862 Better locality of variables.
16863
d9ec2d07
AD
168642001-11-19 Akim Demaille <akim@epita.fr>
16865
16866 * src/print.c (print_actions): Better locality of variables.
16867
720e5c1b
AD
168682001-11-19 Akim Demaille <akim@epita.fr>
16869
16870 * src/derives.c (print_derives): Fix and enrich.
16871 * src/closure.c (print_fderives): Likewise.
16872
fb908786
AD
168732001-11-19 Akim Demaille <akim@epita.fr>
16874
16875 * src/closure.c (itemsetend): Remove, replaced with...
16876 (itemsetsize): new.
16877
125ecb56
AD
168782001-11-19 Akim Demaille <akim@epita.fr>
16879
16880 * src/LR0.c (kernel_end): Remove, replaced with...
16881 (kernel_size): new.
16882
d8cf039f
AD
168832001-11-19 Akim Demaille <akim@epita.fr>
16884
16885 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16886 to clarify.
16887
7bec0760
AD
168882001-11-19 Akim Demaille <akim@epita.fr>
16889
16890 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16891
c87d4863
AD
168922001-11-19 Akim Demaille <akim@epita.fr>
16893
16894 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16895 trace messages.
16896 * src/LR0.c: Likewise.
16897 (allocate_itemsets): Use arrays instead of pointers to clarify.
16898
9bfe901c
AD
168992001-11-19 Akim Demaille <akim@epita.fr>
16900
16901 * src/getargs.c (statistics_flag): Replace with...
16902 (trace_flag): New.
16903 (longopts): Accept --trace instead of --statistics.
16904 * src/getargs.h, src/options.c: Adjust.
16905 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16906 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16907
97db7bd4
AD
169082001-11-19 Akim Demaille <akim@epita.fr>
16909
cc72668c 16910 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
16911 pointers to clarify the code.
16912 (save_reductions, save_shifts): Factor common parts of alternatives.
16913
2c5f66ed
AD
169142001-11-19 Akim Demaille <akim@epita.fr>
16915
16916 * src/LR0.c (new_state, get_state): Complete TRACE code.
16917 * src/closure.c: Include `reader.h' to get `tags', needed by the
16918 trace code.
16919 Rename the conditional DEBUG as TRACE.
16920 Output consistently TRACEs to stderr, not stdout.
16921 * src/derives.c: Likewise.
16922 * src/reduce.c: (inaccessable_symbols): Using if is better style
16923 than goto.
16924 Use `#if TRACE' instead of `#if 0' for tracing code.
16925
300f275f
AD
169262001-11-19 Akim Demaille <akim@epita.fr>
16927
16928 * src/system.h (LIST_FREE, shortcpy): New.
16929 * src/LR0.c: Use them.
16930 * src/output.c (free_itemsets, free_reductions, free_shifts):
16931 Remove, replaced by LIST_FREE.
16932
f59c437a
AD
169332001-11-19 Akim Demaille <akim@epita.fr>
16934
16935 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16936 (REDUCTIONS_ALLOC): New.
16937 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16938 allocation.
16939
6986fd9e
AD
169402001-11-19 Akim Demaille <akim@epita.fr>
16941
16942 * src/LR0.c (new_state): Complete trace code.
16943 * src/nullable.c (set_nullable): Don't translate traces.
16944
4bc30f78
AD
169452001-11-19 Akim Demaille <akim@epita.fr>
16946
16947 * src/print_graph.c (print_core): Better locality of variables.
16948 * src/print.c (print_core): Likewise.
16949
08a946e0
AD
169502001-11-19 Akim Demaille <akim@epita.fr>
16951
16952 * src/vcg.c: You do the output, so you are responsible of the
16953 handling of VCG syntax, in particular: use quotearg.
16954 * src/print_graph.c: Don't.
16955 (print_actions): Don't output the actions as part of the nodes,
16956 since that's the job of the edges.
16957 (print_state): Don't output by hand: fill the node description,
9bfe901c 16958 and ask for its output.
08a946e0 16959
f0473484
AD
169602001-11-19 Akim Demaille <akim@epita.fr>
16961
cc72668c
AD
16962 * src/bison.simple (yyparse): When verbosely reporting an error,
16963 no longer put additional quotes around token names.
f0473484
AD
16964 * tests/calc.at: Adjust.
16965
e41dc700
AD
169662001-11-19 Akim Demaille <akim@epita.fr>
16967
16968 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16969 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16970 * src/output.c: Adjust.
16971
652a871c
AD
169722001-11-19 Akim Demaille <akim@epita.fr>
16973
16974 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16975 (rule_t): this.
16976 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16977
b2ed6e58
AD
169782001-11-19 Akim Demaille <akim@epita.fr>
16979
16980 * src/gram.h (rule_t): New.
16981 (rule_table): New.
16982 (rrhs, rlhs): Remove, part of state_t.
16983 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16984 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16985 * src/reader.c, src/reduce.c: Adjust.
16986
edad7067
AD
169872001-11-19 Akim Demaille <akim@epita.fr>
16988
16989 * src/reader.c (symbols_output): New, extracted from...
16990 (packsymbols): Here.
16991 (reader): Call it.
16992
3feec034
AD
169932001-11-19 Akim Demaille <akim@epita.fr>
16994
16995 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16996 (maxrhs): this new function.
16997
ddcd5fdf
AD
169982001-11-19 Akim Demaille <akim@epita.fr>
16999
cc72668c 17000 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
17001 Adjust.
17002
bb527fc2
AD
170032001-11-19 Akim Demaille <akim@epita.fr>
17004
cc72668c 17005 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
17006 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17007 * src/lalr.c: Adjust.
17008
a845a697
AD
170092001-11-19 Akim Demaille <akim@epita.fr>
17010
17011 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17012 (set_state_table): handle the `lookaheads' members.
17013
f004bf6a
AD
170142001-11-19 Akim Demaille <akim@epita.fr>
17015
cc72668c
AD
17016 * src/lalr.h (lookaheads): Removed array, whose contents is now
17017 a member of...
f004bf6a
AD
17018 (state_t): this structure.
17019 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17020 Adjust.
17021
de326cc0
AD
170222001-11-19 Akim Demaille <akim@epita.fr>
17023
cc72668c
AD
17024 * src/lalr.h (consistent): Removed array, whose contents is now
17025 a member of...
de326cc0
AD
17026 (state_t): this structure.
17027 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17028 Adjust.
17029
90b4416b
AD
170302001-11-19 Akim Demaille <akim@epita.fr>
17031
cc72668c
AD
17032 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17033 contents are now members of...
90b4416b
AD
17034 (state_t): this structure.
17035 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17036 Adjust.
17037
9703cc49
AD
170382001-11-19 Akim Demaille <akim@epita.fr>
17039
17040 * src/lalr.h (state_t): New.
17041 (state_table): Be a state_t * instead of a core **.
17042 (accessing_symbol): Remove, part of state_t.
17043 * src/lalr.c: Adjust.
17044 (set_accessing_symbol): Merge into...
17045 (set_state_table): this.
17046 * src/print_graph.c, src/conflicts.c: Adjust.
17047
d803322e
AD
170482001-11-14 Akim Demaille <akim@epita.fr>
17049
17050 * tests/calc.at, tests/output.at, tests/regression.at,
17051 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17052 now the tests are run in private dirs, therefore AC_CLEANUP and
17053 family can be simplified to 0-ary.
17054 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17055 use abs. path to find config.h.
17056 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17057 stderr, there can be way too much random noise.
17058 Instead pass -Werror to GCC and rely on the exit status.
17059 Reported by Wolfram Wagner.
17060
3d76b07d
AD
170612001-11-14 Akim Demaille <akim@epita.fr>
17062
17063 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17064 defined only if yyoverflow is defined, to avoid `warning: unused
17065 variable `yyvs1''.
17066 Reported by The Test Suite.
17067
09b503c8
AD
170682001-11-14 Akim Demaille <akim@epita.fr>
17069
17070 * src/print.c: Include reduce.h.
17071 Reported by Hans Aberg.
17072
170732001-11-14 Akim Demaille <akim@epita.fr>
17074
17075 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17076 Revert a previous patch: these are really const.
17077 * src/conflicts.c (conflict_report): Additional useless pair of
17078 braces to pacify GCC's warnings for `if () if () {} else {}'.
17079 * src/lex.c (parse_percent_token): Replace equal_offset with
17080 arg_offset.
17081 arg is const.
17082 Be sure to strdup `arg' when used, since there is no reason for
17083 token_buffer not to change.
17084
0f37a994
AD
170852001-11-14 Akim Demaille <akim@epita.fr>
17086
17087 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17088 definition.
17089 * src/main.c (main): Use them.
17090 Suggested by Hans Aberg.
17091
d39d93b8
AD
170922001-11-12 Akim Demaille <akim@epita.fr>
17093
17094 * src/system.h (ngettext): Now that we use ngettext, be sure to
17095 provide a default definition when NLS are not used.
17096
9edcd895
AD
170972001-11-12 Akim Demaille <akim@epita.fr>
17098
17099 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17100 Use @kbd to denote user input.
17101 (Language and Grammar): ANSIfy the example.
17102 Adjust its layout for info/notinfo.
17103 (Location Tracking Calc): Output error messages to stderr.
17104 Output locations in a more GNUtically correct way.
17105 Fix a couple of Englishos.
17106 Adjust @group/@end group pairs.
17107
7da99ede
AD
171082001-11-12 Akim Demaille <akim@epita.fr>
17109
e3aa65c5 17110 %expect was not functioning at all.
7da99ede
AD
17111
17112 * src/conflicts.c (expected_conflicts): Set to -1.
17113 (conflict_report): Use ngettext.
17114 (conflicts_print): Check %expect and make its violation an error.
17115 * doc/bison.texinfo (Expect Decl): Adjust.
17116 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17117 * tests/regression.at (%expect not enough, %expect right)
17118 (%expect too much): New.
17119
ba9dda1a
AD
171202001-11-12 Akim Demaille <akim@epita.fr>
17121
17122 * tests/regression.at (Conflicts): Rename as...
17123 (Unresolved SR Conflicts): this.
17124 (Solved SR Conflicts): New.
17125
337c5bd1
AD
171262001-11-12 Akim Demaille <akim@epita.fr>
17127
17128 * src/reduce.c (print_results): Rename as...
17129 (reduce_output): This.
17130 Output to OUT, passed as argument, instead of output_obstack.
17131 (dump_grammar): Likewise.
17132 (reduce_free): New.
17133 Also free V1.
17134 (reduce_grammar): No longer call reduce_output, since...
17135 * src/print.c (print_results): do it.
17136 * src/main.c (main): Call reduce_free;
17137
c73a41af
AD
171382001-11-12 Akim Demaille <akim@epita.fr>
17139
17140 * src/conflicts.c (print_reductions): Accept OUT as argument.
17141 Output to it, not to output_obstack.
17142 * src/print.c (print_actions): Adjust.
17143
0df87bb6
AD
171442001-11-12 Akim Demaille <akim@epita.fr>
17145
17146 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17147 the result instead of using...
17148 (src_total, rrc_total, src_count, rrc_count): Remove.
17149 (any_conflicts): Remove.
17150 (print_conflicts): Split into...
17151 (conflicts_print, conflicts_output): New.
17152 * src/conflicts.h: Adjust.
17153 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 17154 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
17155 * tests/regression.at (Conflicts): New.
17156 Reported by Tom Lane.
17157
e4d3d4de
AD
171582001-11-12 Akim Demaille <akim@epita.fr>
17159
17160 * tests/regression.at (Invalid input): Remove, duplicate with
17161 ``Invalid input: 1''.
17162
6d7d248e
AD
171632001-11-12 Akim Demaille <akim@epita.fr>
17164
17165 * tests/torture.at (AT_DATA_STACK_TORTURE)
17166 (Exploding the Stack Size with Alloca)
17167 (Exploding the Stack Size with Malloc): New.
17168
e9e4c321
AD
171692001-11-12 Akim Demaille <akim@epita.fr>
17170
17171 * src/bison.simple (YYSTACK_REALLOC): New.
17172 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 17173 Reported by Per Allansson.
e9e4c321 17174
5f7e0832
AD
171752001-11-12 Pascal Bart <pascal.bart@epita.fr>
17176
17177 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17178 define CPP macro, which substitute YYSTYPE by yystype.
17179 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17180 with yyltype/YYLTYPE. This allows inclusion of the generated
17181 header within the parser if the compiler, such as GGC, accepts
17182 multiple equivalent #defines.
17183 From Akim.
17184
e3f1699f
AD
171852001-11-05 Akim Demaille <akim@epita.fr>
17186
17187 * src/reader.c (symbols_output): New, extracted from...
17188 (packsymbols): here.
17189 (reader): Adjust.
17190
65be0866
AD
171912001-11-05 Akim Demaille <akim@epita.fr>
17192
17193 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17194
e4d910bf
AD
171952001-11-05 Akim Demaille <akim@epita.fr>
17196
17197 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17198 pattern.
17199
951366c1
AD
172002001-11-05 Akim Demaille <akim@epita.fr>
17201
17202 * src/options.h (struct option_table_struct): set_flags is void*.
17203 * src/options.c (longopts): Support `--output' and `%output'.
17204 (usage): Adjust.
17205 * src/lex.h (tok_setopt): Remove, replaced with...
17206 (tok_intopt, tok_stropt): these new guys.
17207 * src/lex.c (getopt.h): Not needed.
17208 (token_buffer, unlexed_token_buffer): Not const.
17209 (percent_table): Promote `-' over `_' in directive names.
17210 Active `%name-prefix', `file-prefix', and `output'.
17211 (parse_percent_token): Accept possible arguments to directives.
17212 Promote `-' over `_' in directive names.
17213
d8988b2f
AD
172142001-11-04 Akim Demaille <akim@epita.fr>
17215
17216 * doc/bison.texinfo (Decl Summary): Split the list into
17217 `directives for grammars' and `directives for bison'.
17218 Sort'em.
17219 Add description of `%name-prefix', `file-prefix', and `output'.
17220 Promote `-' over `_' in directive names.
17221 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17222 Simplify the description of `--name-prefix'.
17223 Promote `-' over `_' in directive names.
17224 Promote `--output' over `--output-file'.
17225 Fix the description of `--defines'.
17226 * tests/output.at: Exercise %file-prefix and %output.
17227
6468d18e
AD
172282001-11-02 Akim Demaille <akim@epita.fr>
17229
17230 * doc/refcard.tex: Update.
17231
6b7e85b9
AD
172322001-11-02 Akim Demaille <akim@epita.fr>
17233
17234 * src/symtab.h (SUNDEF): New.
17235 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17236 stand for `uninitialized', instead of 0.
17237 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17238 * src/lex.c (lex): Adjust.
17239
17240 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17241 Number it 0.
17242 Let yylex return it instead of a plain 0.
17243 Reported by Dick Streefland.
17244
cd5aafcf
AD
172452001-11-02 Akim Demaille <akim@epita.fr>
17246
17247 * tests/regression.at (Mixing %token styles): New test.
17248
037ca2f1
AD
172492001-11-02 Akim Demaille <akim@epita.fr>
17250
17251 * src/reader.c (parse_thong_decl): Formatting changes.
17252 (token_translations_init): New, extracted from...
17253 (packsymbols): Here.
17254 Adjust.
17255
270a173c
AD
172562001-11-01 Akim Demaille <akim@epita.fr>
17257
17258 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17259 Check that `9foo.y' produces correct cpp guards.
17260 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17261 guards.
17262 Reported by Wwp.
17263
561f9a30
AD
172642001-11-01 Akim Demaille <akim@epita.fr>
17265
17266 * tests/regression.at (Invalid input: 2): New.
17267 * src/lex.c (unlexed_token_buffer): New.
17268 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17269 too.
17270 Reported by Wwp.
17271
f987e9d2
AD
172722001-11-01 Akim Demaille <akim@epita.fr>
17273
17274 * tests/calc.at: Catch up with 1.30.
17275 * configure.in: Bump to 1.49a.
17276 Adjust to newer Autotest.
17277
0846f581
PB
172782001-10-19 Pascal Bart <pascal.bart@epita.fr>
17279
17280 * src/conflicts.c: Move global variables rrc_total and src_total ...
17281 (print_conflicts): here.
17282 * src/output.c (output): Free global variable user_toknums.
17283 * src/lex.c (token_obstack): Become static.
17284
3c1a79b3
AD
172852001-10-18 Akim Demaille <akim@epita.fr>
17286
17287 * tests/atlocal.in (GCC): Add.
17288 * tests/calc.at: s/m4_match/m4_bmatch/.
17289 s/m4_patsubst/m4_bpatsubst/.
17290 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17291 * configure.in: AC_SUBST(GCC).
17292
5d52e7d0
MA
172932001-10-14 Marc Autret <autret_m@epita.fr>
17294
17295 * src/options.c (create_long_option_table): Fix.
17296
631aa1d3
AD
172972001-10-10 Akim Demaille <akim@epita.fr>
17298
17299 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17300
f6ec6d13
AD
173012001-10-04 Akim Demaille <akim@epita.fr>
17302
17303 * src/reader.c (parse_union_decl): Push the caracters in
17304 union_obstack, not attrs_obstack.
17305
342b8b6e
AD
173062001-10-04 Akim Demaille <akim@epita.fr>
17307
17308 Merge in the branch 1.29.
17309
17310 * src/reader.c (packsymbols): Use a temporary obstack for
17311 `%%tokendef', since output_stack is already used elsewhere.
17312
17313 2001-10-02 Akim Demaille <akim@epita.fr>
17314
17315 Bump 1.29d.
17316
17317 2001-10-02 Akim Demaille <akim@epita.fr>
17318
17319 Version 1.29c.
17320
17321 2001-10-02 Akim Demaille <akim@epita.fr>
17322
17323 * tests/regression.at (Invalid CPP headers): New.
17324 From Alexander Belopolsky.
17325 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17326
17327 2001-10-02 Akim Demaille <akim@epita.fr>
17328
17329 * tests/regression.at (Invalid input): New.
17330 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17331 Reported by Shura.
17332
17333 2001-10-02 Akim Demaille <akim@epita.fr>
17334
17335 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17336
17337 2001-10-02 Akim Demaille <akim@epita.fr>
17338
17339 * src/output.c (output_parser): Assert `skeleton'.
17340 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17341 systems.
17342 From Shura.
17343
17344 2001-10-01 Marc Autret <autret_m@epita.fr>
17345
17346 * src/lex.h: Echo modifications.
17347 * src/lex.c (unlex): Parameter is now token_t.
17348 From Hans Aberg.
17349
17350 2001-10-01 Marc Autret <autret_m@epita.fr>
17351
17352 * src/main.c: Include lex.h.
17353 From Hans Aberg.
17354
17355 2001-09-29 Akim Demaille <akim@epita.fr>
17356
17357 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17358
17359 2001-09-28 Akim Demaille <akim@epita.fr>
17360
17361 * tests/testsuite.at: Update to newer Autotest.
17362 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17363
17364 2001-09-27 Akim Demaille <akim@epita.fr>
17365
17366 Position independent wrapper.
17367
17368 * tests/bison: Remove.
17369 * tests/bison.in: New.
17370 * configure.in: Adjust.
17371
17372 2001-09-27 Paul Eggert <eggert@twinsun.com>
17373
17374 Port quotearg fixes from tar 1.13.24.
17375
17376 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17377 tm to be declared.
17378 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17379 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17380
17381 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17382 * m4/mbrtowc.m4: New file.
17383 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17384 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17385
17386 2001-09-27 Akim Demaille <akim@epita.fr>
17387
17388 Bump to 1.29c.
17389
17390 2001-09-27 Akim Demaille <akim@epita.fr>
17391
17392 Version 1.29b.
17393
17394 2001-09-25 Akim Demaille <akim@epita.fr>
17395
17396 * src/system.h: Include `xalloc.h'.
17397 Remove it from the C files.
17398 * src/files.c (output_files): Free the obstacks.
17399 * src/lex.c (init_lex): Rename as...
17400 (lex_init): this.
17401 (lex_free): New.
17402 * src/main.c (main): Use it.
17403
17404 2001-09-24 Marc Autret <autret_m@epita.fr>
17405
17406 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17407 to output informations in fout (FILE*).
17408 (open_graph, close_graph): Likewise.
17409 (output_graph, output_edge, output_node): Likewise.
17410 * src/vcg.h: Update function prototypes.
17411 * src/print_graph.c (print_graph): Open output graph file.
17412 (print_actions): Adjust.
17413 * src/files.h: Remove extern declaration.
17414 * src/files.c: Remove graph_obstack declaration.
17415 (open_files): Remove graph_obstack initialization.
17416 (output_files): Remove graph_obstack saving.
17417
17418 2001-09-24 Marc Autret <autret_m@epita.fr>
17419
17420 * src/files.c (compute_output_file_names): Fix.
17421
17422 2001-09-24 Marc Autret <autret_m@epita.fr>,
17423 Akim Demaille <akim@epita.fr>
17424
17425 * src/reader.c (reader): Remove call to free_symtab ().
17426 * src/main.c (main): Call it here.
17427 Include symtab.h.
17428 * src/conflicts.c (initialize_conflicts): Rename as...
17429 (solve_conflicts): this.
17430 * src/print.c (print_core, print_actions, print_state)
17431 (print_grammar): Dump to a file instead a `output_obstack'.
17432 (print_results): Dump `output_obstack', and then proceed with the
17433 FILE *.
17434 * src/files.c (compute_output_file_names, close_files): New.
17435 (output_files): Adjust.
17436 * src/main.c (main): Adjust.
17437
17438 2001-09-23 Marc Autret <autret_m@epita.fr>
17439
17440 * src/files.c (compute_header_macro): Computes header macro name
17441 from spec_defines_file when given.
17442
17443 2001-09-23 Marc Autret <autret_m@epita.fr>
17444
17445 * src/files.c (output_files): Add default extensions.
17446
17447 2001-09-22 Akim Demaille <akim@epita.fr>
17448
17449 * src/conflicts.c (finalize_conflicts): Rename as...
17450 (free_conflicts): this.
17451
17452 2001-09-22 Akim Demaille <akim@epita.fr>
17453
17454 * src/gram.c (gram_free): Rename back as...
17455 (dummy): this.
17456 (output_token_translations): Free `token_translations'.
17457 * src/symtab.c (free_symtab): Free the tag field.
17458
17459 2001-09-22 Akim Demaille <akim@epita.fr>
17460
17461 Remove `translations' as it is always set to true.
17462
17463 * src/gram.h: Adjust.
17464 * src/reader.c (packsymbols, parse_token_decl): Adjust
17465 * src/print.c (print_grammar): Adjust.
17466 * src/output.c (output_token_translations): Adjust.
17467 * src/lex.c (lex): Adjust.
17468 * src/gram.c: Be sure the set pointers to NULL.
17469 (dummy): Rename as...
17470 (gram_free): this.
17471
17472 2001-09-22 Akim Demaille <akim@epita.fr>
17473
17474 * configure.in: Invoke AM_LIB_DMALLOC.
17475 * src/system.h: Use dmalloc.
17476 * src/LR0.c: Be sure to have pointers initialized to NULL.
17477 (allocate_itemsets): Allocate kernel_items only if needed.
17478
17479 2001-09-22 Akim Demaille <akim@epita.fr>
17480
17481 * configure.in: Bump to 1.29b.
17482 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17483 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17484 need xmalloc.c in calc.y.
17485 From Pascal Bart.
17486
17487 2001-09-21 Akim Demaille <akim@epita.fr>
17488
17489 Version 1.29a.
17490 * Makefile.maint, config/config.guess, config/config.sub,
17491 * config/missing: Update from masters.
17492 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17493 upon package.m4.
17494 * configure.in (ALL_LINGUAS): Add `tr'.
17495
17496 2001-09-21 Akim Demaille <akim@epita.fr>
17497
17498 * tests/Makefile.am (package.m4): Move to...
17499 ($(srcdir)/$(TESTSUITE)): here.
17500
17501 2001-09-20 Akim Demaille <akim@epita.fr>
17502
17503 * src/complain.c: No longer try to be standalone: use system.h.
17504 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17505 * src/complain.h: Likewise.
17506 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17507 Remove the unused variable `n'.
17508 From Albert Chin-A-Young.
17509
17510 2001-09-18 Marc Autret <autret_m@epita.fr>
17511
17512 * doc/bison.1: Update.
17513 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17514 descriptions.
17515 (Option Cross Key): Update.
17516 Add --graph.
17517
17518 2001-09-18 Marc Autret <autret_m@epita.fr>
17519
17520 * tests/regression.at: New test (comment in %union).
17521
17522 2001-09-18 Marc Autret <autret_m@epita.fr>
17523
17524 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17525 do that.
17526 Reported by Keith Browne.
17527
17528 2001-09-18 Marc Autret <autret_m@epita.fr>
17529
17530 * tests/output.at: Add tests for --defines and --graph.
17531
17532 2001-09-18 Marc Autret <autret_m@epita.fr>
17533
17534 * tests/output.at: Removes tests of %{header,src}_extension features.
17535
17536 2001-09-18 Akim Demaille <akim@epita.fr>
17537
17538 * tests/Makefile.am (package.m4): New.
17539 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17540 (_AT_CHECK_CALC_ERROR): Likewise.
17541 Factor the `, ' part of verbose error messages.
17542
17543 2001-09-18 Marc Autret <autret_m@epita.fr>
17544
17545 * src/getargs.c (longopts): Declare --defines and --graph as options
17546 with optional arguments.
17547 * src/files.h: Add extern declarations.
17548 * src/files.c (spec_graph_file, spec_defines_file): New.
17549 (output_files): Update.
17550 Remove CPP-outed code.
17551
17552 2001-09-18 Marc Autret <autret_m@epita.fr>
17553
17554 Turn off %{source,header}_extension feature.
17555
17556 * src/files.c (compute_exts_from_gf): Update.
17557 (compute_exts_from_src): Update.
17558 (output_files): CPP-out useless code.
17559 * src/files.h: Remove {header,source}_extension extern declarations.
17560 * src/reader.c (parse_dquoted_param): CPP-out.
17561 (parse_header_extension_decl): Remove.
17562 (parse_source_extension_decl): Remove.
17563 (read_declarations): Remove cases tok_{hdrext,srcext}.
17564 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17565 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17566
17567 2001-09-10 Akim Demaille <akim@epita.fr>
17568
17569 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17570 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17571 (AT_CHECK_OUTPUT): this.
17572 Merely check ls' exit status, its output is useless.
17573
17574 2001-09-10 Akim Demaille <akim@epita.fr>
17575
17576 * tests/calc.at: Use m4_match.
17577 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17578
17579 2001-09-10 Marc Autret <autret_m@epita.fr>,
17580 Akim Demaille <akim@epita.fr>
17581
17582 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17583 enum color_e.
17584 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17585 to `normal'.
17586 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17587 * src/lex.h: Adjust prototype.
17588 (token_t): Add `tok_undef'.
17589 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17590 (parse_percent_token): Now returns token_t.
17591 Add default statement in switch.
17592 (lex): Separate `c' as an input variable, from the token_t result
17593 part.
17594 (unlexed): Is a token_t.
17595
17596 2001-09-10 Akim Demaille <akim@epita.fr>
17597
17598 * configure.in: Bump to 1.29a.
17599
17600 2001-09-07 Akim Demaille <akim@epita.fr>
17601
17602 Version 1.29.
17603
17604 2001-08-30 Akim Demaille <akim@epita.fr>
17605
17606 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17607 * m4/atconfig.m4: Remove.
17608 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17609 * tests/bison: New.
17610 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17611 m4_if, m4_patsubst, and m4_regexp.
17612 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17613 `input' file instead of echo.
17614
17615 2001-08-29 Akim Demaille <akim@epita.fr>
17616
17617 Bump to 1.28e.
17618
17619 2001-08-29 Akim Demaille <akim@epita.fr>
17620
17621 Version 1.28d.
17622
17623 2001-08-29 Paul Eggert <eggert@twinsun.com>
17624
17625 * src/bison.simple (yyparse): Don't take the address of an
17626 item before the start of an array, as that doesn't conform to
17627 the C Standard.
17628
17629 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17630
17631 * doc/bison.texinfo (Location Tracking Calc): New node.
17632
17633 2001-08-29 Paul Eggert <eggert@twinsun.com>
17634
17635 * src/output.c (output): Do not define const, as this now
17636 causes more problems than it cures.
17637
17638 2001-08-29 Akim Demaille <akim@epita.fr>
17639
17640 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17641 the nodes.
17642 Be sure to tag the `detailmenu'.
17643
17644 2001-08-29 Akim Demaille <akim@epita.fr>
17645
17646 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17647 download in a tmp dir.
17648
17649 2001-08-28 Marc Autret <autret_m@epita.fr>
17650
17651 * config/depcomp: New file.
17652
17653 2001-08-28 Marc Autret <autret_m@epita.fr>
17654
17655 * doc/bison.1 (mandoc): Adjust.
17656 From Juan Manuel Guerrero.
17657
17658 2001-08-28 Marc Autret <autret_m@epita.fr>
17659
17660 * src/print_graph.c (print_state): Fix.
17661
17662 2001-08-27 Marc Autret <autret_m@epita.fr>
17663
17664 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17665 char * members.
17666 Echo modifications to the functions prototypes.
17667 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17668
17669 2001-08-27 Marc Autret <autret_m@epita.fr>
17670
17671 * src/vcg.c: Include `xalloc.h'.
17672 (add_colorentry): New.
17673 (add_classname): New.
17674 (add_infoname): New.
17675 * src/vcg.h: Add new prototypes.
17676
17677 2001-08-27 Akim Demaille <akim@epita.fr>
17678
17679 * Makefile.maint: Sync. again with CVS Autoconf.
17680
17681 2001-08-27 Akim Demaille <akim@epita.fr>
17682
17683 * Makefile.maint: Formatting changes.
17684 (po-update, cvs-update, update): New targets.
17685 (AMTAR): Remove.
17686
17687 2001-08-27 Akim Demaille <akim@epita.fr>
17688
17689 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17690 * Makefile.maint: Sync. with CVS Autoconf.
17691
17692 2001-08-27 Marc Autret <autret_m@epita.fr>
17693
17694 * src/vcg.h (struct infoname_s): New.
17695 (struct colorentry_s): New.
17696 (graph_s): New fields {vertical,horizontal}_order in structure.
17697 Add `infoname' field.
17698 Add `colorentry' field;
17699 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17700 (G_HORIZONTAL_ORDER): New.
17701 (G_INFONAME): New.
17702 (G_COLORENTRY): New.
17703 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17704 Add output of `infoname'.
17705 Add output of `colorentry'.
17706
17707 2001-08-27 Marc Autret <autret_m@epita.fr>
17708
17709 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17710 This one shadowed a global parameter.
17711
17712 2001-08-24 Marc Autret <autret_m@epita.fr>
17713
17714 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17715 instead of `unsigned'.
17716 (print_state): Do not call obstack_object_size () in obstack_grow ()
17717 to avoid macro variables shadowing.
17718
17719 2001-08-23 Marc Autret <autret_m@epita.fr>
17720
17721 * src/lex.c (percent_table): Typo: s/naem/name/.
17722 Add graph option.
17723 Normalize new options declarations.
17724
17725 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17726
17727 * tests/suite.at: Exercise %header_extension and %source_extension.
17728
17729 2001-08-16 Marc Autret <autret_m@epita.fr>
17730
17731 * src/reader.c (parse_dquoted_param): New.
17732 (parse_header_extension_decl): Use it.
17733 (parse_source_extension_decl): Likewise.
17734
17735 2001-08-16 Marc Autret <autret_m@epita.fr>
17736
17737 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17738 (get_xxxx_str): Use assert () instead of complain ().
17739 Remove return invokations in default cases.
17740 (get_decision_str): Modify default behaviour. Remove second argument.
17741 Echo modifications on calls.
17742 (output_graph): Fix.
17743
17744 2001-08-16 Marc Autret <autret_m@epita.fr>
17745
17746 * src/getargs.c (usage): Update with ``-g, --graph''.
17747
17748 2001-08-16 Marc Autret <autret_m@epita.fr>
17749
17750 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17751 (Option Cross Key): Likewise.
17752 * doc/bison.1: Update.
17753
1c8c2190
PB
177542001-09-25 Pascal Bart <pascal.bart@epita.fr>
17755
17756 * src/output.c (output_master_parser): Don't finish action_obstack.
17757 (output_parser): Don't care about the muscle action, here.
17758 (prepare): Copy the action_obstack in the action muscle.
17759 (output): Free action_obstack.
17760
180d45ba
PB
177612001-09-23 Pascal Bart <pascal.bart@epita.fr>
17762
17763 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17764 will contain `%union' declaration.
17765 (parse_union_decl): Delete #line directive output.
17766 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17767 informations about %union.
17768 (parse_union_decl): Copy the union_obstack in the muscle stype.
17769 * src/bison.simple: Add new #line directive.
17770 Add typdef %%stype YYSTYPE.
17771
c51d1a19
PB
177722001-09-23 Pascal Bart <pascal.bart@epita.fr>
17773
17774 * src/bison.simple: Add new `#line' directive.
17775
6f9344da
PB
177762001-09-22 Pascal Bart <pascal.bart@epita.fr>
17777
17778 * src/bison.simple: New `#line' directive.
17779 * src/output.c (output_parser): Support new dynamic muscle input_line.
17780
652def80
MA
177812001-09-22 Marc Autret <autret_m@epita.fr>
17782
17783 * src/output.c (output_master_parser): New.
17784 (output_parser): Be more re-entrant.
17785
25b222fa
MA
177862001-09-21 Marc Autret <autret_m@epita.fr>
17787
17788 * src/reader.c (copy_definition, parse_union_decl): Update and use
17789 `linef' muscle.
17790 (copy_action): Likewise.
17791 Use obstack_1grow ().
17792 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17793
6bc35ae5
MA
177942001-09-21 Marc Autret <autret_m@epita.fr>
17795
17796 * src/options.c (option_table): Adjust.
17797 * src/lex.c (parse_percent_token): Fix.
17798
c0629aa1
PB
177992001-09-20 Pascal Bart <pascal.bart@epita.fr>
17800
17801 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 17802
82b6d266
PB
178032001-09-20 Pascal Bart <pascal.bart@epita.fr>
17804
17805 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17806 is now an option_table_struct*.
17807 (option_strcmp): New function option_strcmp.
17808 (parse_percent_token): Call option_strcmp.
17809 * src/getargs.c (xalloc.h, options.h): Include it.
17810 (getargs): Call create_long_option_table.
17811 (getargs): Free longopts at the end of the function.
17812 (shortopts): Move in options.c.
17813 * src/options.c (create_long_option_table): New function. Convert
17814 information from option_table to option structure.
17815 * src/reader.c (options.h): Include it.
17816
17817 * src/Makefile.am: Adjust.
17818 * src/options.c (option_table): Create from longopts and percent_table.
17819 * src/getargs.c (longopts): Delete.
17820 * src/lex.c (struct percent_table_struct): Delete.
17821 (percent_table): Delete.
17822 (options.h): Include it.
17823 * src/options.c: Create.
17824 * src/options.h: Create.
17825 Declare enum opt_access_e.
17826 Define struct option_table_struct.
17827
75f5aaea
MA
178282001-09-20 Marc Autret <autret_m@epita.fr>
17829
17830 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17831 sections of Bison.
17832
f508cb0a
PB
178332001-09-19 Pascal Bart <pascal.bart@epita.fr>
17834
17835 * src/bison.simple: s/%%filename/%%skeleton.
17836 * src/muscle_tab.c (getargs.h): Include it.
17837 (muscle_init): Insert new muscle skeleton.
17838
13105fc1
PB
178392001-09-18 Pascal Bart <pascal.bart@epita.fr>
17840
17841 * src/output.c (output_parser): Delete unused variable actions_dumped.
17842
b0c4483e
PB
178432001-09-07 Pascal Bart <pascal.bart@epita.fr>
17844
17845 * src/output.c (output): Delete call to reader_output_yylsp.
17846 * src/reader.c (reader): Likewise.
ba0fe3c7 17847 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 17848
11d82f03
MA
178492001-09-02 Marc Autret <autret_m@epita.fr>
17850
17851 * src/reader.c: Include muscle_tab.h.
17852 (parse_union_decl): Update.
17853 (parse_macro_decl): Rename parse_muscle_decl.
17854 Update to use renamed functions and variable.
17855 (read_declarations, copy_action, read_additionnal_code, : Updated
17856 with correct variables and functions names.
17857 (packsymbols, reader): Likewise.
342b8b6e 17858
11d82f03 17859 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 17860
11d82f03
MA
17861 * src/output.c: Include muscle_tab.h
17862 In all functions using macro_insert, change by using muscle_insert ().
17863 (macro_obstack): Rename muscle_obstack.
17864 Echo modifications in the whole file.
17865 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17866 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17867 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17868
17869 * src/muscle_tab.h: Update double inclusion macros.
17870 (macro_entry_s): Rename muscle_entry_s.
17871 Update prototypes.
342b8b6e 17872
11d82f03
MA
17873 * src/muscle_tab.c: Include muscle_tab.h.
17874 Rename macro_tabble to muscle_table.
17875 (mhash1, mhash2, mcmp): Use muscle_entry.
17876 (macro_init): Rename muscle_init. Update.
17877 (macro_insert): Rename muscle_insert. Update.
17878 (macro_find): Rename muscle_find. Update.
17879
17880 * src/main.c: Include muscle_tab.h.
17881 (main): Call muscle_init ().
17882 * src/Makefile.am (bison_SOURCES): Echo modifications.
17883
93a37297
MA
178842001-09-02 Marc Autret <autret_m@epita.fr>
17885
f753cd62 17886 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 17887
f753cd62
MA
17888 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17889
178902001-09-02 Marc Autret <autret_m@epita.fr>
17891
17892 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 17893
682d48cd
PB
178942001-09-01 Pascal Bart <pascal.bart@epita.fr>
17895
342b8b6e 17896 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
17897 filename.
17898
087c8fda
MA
178992001-09-01 Marc Autret <autret_m@epita.fr>
17900
17901 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17902 to an explicit value to activate the feature. We do it here.
17903
dda680cb
PB
179042001-08-31 Pascal Bart <pascal.bart@epita.fr>
17905
17906 * src/output.c (prepare): Delete the `filename' muscule insertion.
17907 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17908 (parse_union_decl): Likewise.
17909 * src/macrotab.c (macro_init): Initialize filename by infile.
17910
9e644e64
MA
179112001-08-31 Marc Autret <autret_m@epita.fr>
17912
17913 * src/bison.simple (YYLSP_NEEDED): New definition.
17914 * src/output.c (prepare): Add macro insertion of `locations_flag'
17915
17da6427
PB
179162001-08-31 Pascal Bart <pascal.bart@epita.fr>
17917
17918 * src/output.c (prepare): Delete insertion of previous muscles,
17919 and insert the `prefix' muscles.
17920 * src/macrotab.c (macro_init): Likewise.
17921 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 17922 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
17923 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17924 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 17925 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
17926 name_prefix.
17927
e8cb70b9
PB
179282001-08-31 Pascal Bart <pascal.bart@epita.fr>
17929
17930 * src/main.c (main): Standardize.
17931 * src/output.c (output_table_data, output_parser): Likewise.
17932 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17933
63c2d5de
MA
179342001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17935
342b8b6e 17936 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
17937 %%epilogue.
17938 * src/output.c (output): Rename %%declarations to %%prologue.
17939 * src/bison.simple: Echo modifications.
342b8b6e 17940
d8cb5183
MA
179412001-08-31 Marc Autret <autret_m@epita.fr>
17942
17943 * src/reader.c (readgram): CleanUp.
17944 (output_token_defines): Likewise.
17945 (packsymbols): Likewise.
17946 (reader): Likewise.
17947 * src/output.c (output): CPP-out useless code.
17948
6c686258
PB
179492001-08-31 Pascal Bart <pascal.bart@epita.fr>
17950
342b8b6e 17951 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
17952 output_trailers and output_headers.
17953 * src/output.h: Remove obsolete functions prototypes of output_headers
17954 and output_trailers.
17955
8f451ef7
PB
179562001-08-30 Pascal Bart <pascal.bart@epita.fr>
17957
17958 * src/main.c: Include macrotab.h.
342b8b6e 17959 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
17960 Adjust functions prototypes.
17961 * src/macrotab.c (macro_insert): Constify key and value.
17962 (macro_find): Constify key.
17963 (macro_insert): Include 'xalloc.h'
17964 (macro_insert): Use XMALLOC.
17965 (macro_find): Constify return value.
17966 * src/output.c (output_table_data): Rename table to table_data.
17967 (output_parser): Constify macro_key, macro_value.
17968
997b6fd0 179692001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
17970
17971 * src/reader.c (parse_skel_decl): New.
342b8b6e 17972 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
17973 * src/lex.h (token_t): New token `tok_skel'.
17974 * src/lex.c (percent_table): Add skeleton option entry.
17975 Standardize.
17976
ff48177d
MA
179772001-08-29 Marc Autret <autret_m@epita.fr>
17978
17979 * src/bison.simple: Add %%user_code directive at the end.
17980 * src/reader.c (read_additionnal_code): New.
17981 (reader): Use it.
17982 * src/output.c (output_program): Remove.
17983 (output): Update.
17984
b33160bf
MA
179852001-08-28 Marc Autret <autret_m@epita.fr>
17986
17987 * src/output.c (output_actions): Clean up.
4e5caae2 17988 (output_gram): CPP-out useless code.
b33160bf
MA
17989 * src/reader.c (reader): Clean up, CPP-out useless code.
17990
d1a2daf7
PB
179912001-08-28 Pascal Bart <pascal.bart@epita.fr>
17992
342b8b6e 17993 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 17994 directive.
d1a2daf7
PB
17995 * src/bison.simple: Add `%%definitions'.
17996
2b763dfe
MA
179972001-08-28 Marc Autret <autret_m@epita.fr>
17998
17999 * config/depcomp: New file.
18000
f1a87ef6
PE
180012001-08-27 Paul Eggert <eggert@twinsun.com>
18002
18003 * src/bison.simple (yyparse): Don't take the address of an
18004 item before the start of an array, as that doesn't conform to
18005 the C Standard.
18006
82e236e2
RA
180072001-08-27 Robert Anisko <robert.anisko@epita.fr>
18008
f1a87ef6 18009 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
18010 obstack. It was done too late here.
18011
18012 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18013 completely wrong.
18014 (reader): Initialize the macro obstack here, since we need it to grow
18015 '%define' directives.
18016
18017 * src/reader.h: Declare the macro obstack as extern.
18018
b0cfa28a
RA
180192001-08-27 Robert Anisko <robert.anisko@epita.fr>
18020
18021 * src/output.c (output_parser): Fix. Store single '%' characters in
18022 the output obstack instead of throwing them away.
18023
6fc74234
AD
180242001-08-27 Akim Demaille <akim@epita.fr>
18025
18026 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18027
9c76d118
RA
180282001-08-25 Robert Anisko <robert.anisko@epita.fr>
18029
18030 * lib/Makefile.am: Adjust.
18031
a8289c62
RA
180322001-08-25 Robert Anisko <robert.anisko@epita.fr>
18033
18034 * src/bison.simple: Update and add '%%' directives.
18035
b6610515
RA
180362001-08-25 Robert Anisko <robert.anisko@epita.fr>
18037
18038 * src/reader.c (reader): Remove calls to 'output_headers' and
18039 'output_trailers'. Remove some C output.
18040 (readgram): Disable a piece of code that was writing a default
18041 definition for 'YYSTYPE'.
18042 (reader_output_yylsp): Remove.
18043 (packsymbols): Output token defintions to a macro.
18044 (copy_definition): Disable C output.
6fc74234 18045
b6610515
RA
18046 * src/reader.c (parse_macro_decl): New function used to parse macro
18047 declarations.
18048 (copy_string2): Put the body of copy_string into this new function.
18049 Add a parameter to let the caller choose whether he wants to copy the
18050 string delimiters or not.
18051 (copy_string): Be a simple call to copy_string2 with the last argument
18052 bound to true.
18053 (read_declarations): Add case for macro definition.
18054 (copy_identifier): New.
6fc74234 18055 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
18056 rather than lex.
18057
26f609ff
RA
180582001-08-25 Robert Anisko <robert.anisko@epita.fr>
18059
18060 * src/output.c (prepare): Add prefixed names.
18061 (output_parser): Output semantic actions.
18062 (output_parser): Fix bug on '%%line' directives.
6fc74234 18063
26f609ff
RA
18064 * src/output.c (output_headers): Remove. The C code printed by this
18065 function should now be in the skeletons.
18066 (output_trailers): Remove.
18067 (output): Disable call to 'reader_output_yylsp'.
18068 (output_rule_data): Do not output tables to the table obstack.
18069
18070 * src/output.c: Remove some C dedicated output.
18071 Improve the use of macro and output obstacks.
18072 (output_defines): Remove.
6fc74234 18073
26f609ff
RA
18074 * src/output.c (output_token_translations): Associate 'translate'
18075 table with a macro. No output to the table obstack.
18076 (output_gram): Same for 'rhs' and 'prhs'.
18077 (output_stos): Same for 'stos'.
18078 (output_rule_data): Same for 'r1' and 'r2'.
18079 (token_actions): Same for 'defact'.
18080 (goto_actions): Same for 'defgoto'.
18081 (output_base): Same for 'pact' and 'pgoto'.
18082 (output_table): Same for 'table'.
18083 (output_check): Same for 'check'.
6fc74234 18084
26f609ff
RA
18085 * src/output.c (output_table_data): New function.
18086 (output_short_table): Remove.
18087 (output_short_or_char_table): Remove.
6fc74234 18088
26f609ff
RA
18089 * src/output.c (output_parser): Replace most of the skeleton copy code
18090 with something new. Skeletons are now processed character by character
18091 rather than line by line, and Bison looks for '%%' macros. This is the
18092 first step in making Bison's output process (a lot) more flexible.
18093 (output_parser): Use the macro table.
18094
6f43b113
RA
180952001-08-25 Robert Anisko <robert.anisko@epita.fr>
18096
18097 * src/main.c (main): Initialize the macro table.
18098
dd3127cf
RA
180992001-08-25 Robert Anisko <robert.anisko@epita.fr>
18100
18101 * src/lex.c (percent_table): Add tok_define.
18102 * src/lex.h: Add tok_define.
18103
aa321494
RA
181042001-08-25 Robert Anisko <robert.anisko@epita.fr>
18105
18106 * src/macrotab.c: New file.
18107 * src/macrotab.h: New file.
18108 * src/Makefile.am: Update.
18109
68bd3b6b
RA
181102001-08-25 Robert Anisko <robert.anisko@epita.fr>
18111
18112 * lib/hash.c: New file.
18113 * lib/hash.h: New file.
18114 * lib/Makefile.am: Update.
18115
45f8dd1e
AD
181162001-08-15 Akim Demaille <akim@epita.fr>
18117
18118 Version 1.28c.
18119
40a64a7a 181202001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
18121
18122 * src/reader.c (readgram): Indent output macro YYSTYPE.
18123 (packsymbols): Likewise.
18124 (output_token_defines): Likewise.
18125 * src/files.c: Standardize.
18126 (compute_header_macro): New.
18127 (defines_obstack_save): New. Use compute_header_macro.
18128 (output_files): Update. Use defines_obstack_save.
18129
f9a8293a
AD
181302001-08-15 Akim Demaille <akim@epita.fr>
18131
18132 * doc/bison.texinfo (Table of Symbols): Document
18133 YYSTACK_USE_ALLOCA.
18134
150ca7a7
AD
181352001-08-15 Akim Demaille <akim@epita.fr>
18136
18137 * missing: Update from CVS Automake.
18138 * config/config.guess, config/config.sub, config/texinfo.tex:
18139 Update from gnu.org.
18140
69b5cec4
AD
181412001-08-15 Akim Demaille <akim@epita.fr>
18142
18143 * Makefile.maint: Sync with CVS Autoconf.
18144
f2b5126e
PB
181452001-08-14 Pascal Bart <pascal.bart@epita.fr>
18146
69b5cec4 18147 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
18148 `fdl.texi'.
18149 * doc/fdl.texi: Add to package.
18150
4ecbf796
MA
181512001-08-14 Marc Autret <autret_m@epita.fr>
18152
18153 Turn on %{source,header}_extension features.
18154
69b5cec4 18155 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
18156 source_extension.
18157 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 18158 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
18159 between options.
18160
95fb5662
MA
181612001-08-14 Marc Autret <autret_m@epita.fr>
18162
18163 * src/files.c (compute_base_names): Add extensions computing when
18164 `--file-prefix' used.
18165 Standardize function calls.
18166
78d09da9
MA
181672001-08-13 Marc Autret <autret_m@epita.fr>
18168
69b5cec4 18169 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
18170 defining it (defined but null disables alloca).
18171
5a009f2c
MA
181722001-08-13 Marc Autret <autret_m@epita.fr>
18173
18174 * src/bison.simple (_yy_memcpy): CPP reformat.
18175
1e41465a
PB
181762001-08-13 Pascal Bart <pascal.bart@epita.fr>
18177
18178 * tests/atconfig.in (CPPFLAGS): Fix.
18179
c67a198d
PB
181802001-08-10 Pascal Bart <pascal.bart@epita.fr>
18181
79282c6c 18182 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
18183 `gpl.texi'.
18184 * doc/gpl.texi: Add to package.
18185
09a6de7e
MA
181862001-08-10 Marc Autret <autret_m@epita.fr>
18187
18188 * src/print_graph.h: Fix.
18189 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18190
b77b9ee0
AD
181912001-08-10 Akim Demaille <akim@epita.fr>
18192
18193 * src/system.h: Provide default declarations for stpcpy, strndup,
18194 and strnlen.
18195
3e259915
MA
181962001-08-10 Robert Anisko <anisko_r@epita.fr>
18197
18198 * doc/bison.texinfo (Locations): Update @$ stuff.
18199
ca96bc2d
MA
182002001-08-09 Robert Anisko <anisko_r@epita.fr>
18201
18202 * src/bison.simple (YYLLOC_DEFAULT): Update.
18203 (yyparse): Adjust.
18204
fdc6758b
MA
182052001-08-08 Marc Autret <autret_m@epita.fr>
18206
b77b9ee0 18207 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
18208 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18209 Reported by Fabrice Bauzac.
957d4dbf 18210
600cad3b
MA
182112001-08-08 Marc Autret <autret_m@epita.fr>
18212
18213 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18214 * src/vcg.c (output_node): Fix.
18215 * src/vcg.h: Cleanup.
18216 * src/print_graph.c: Add comments.
b77b9ee0 18217 (node_output_size): New global variable. Simplify the formatting of
600cad3b 18218 the VCG graph output.
b77b9ee0 18219 (print_actions): Unused code is now used. It notifies the final state
600cad3b 18220 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 18221 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
18222 blue.
18223 Get the current node name and node_obstack by argument.
18224 (node_obstack): New variable.
18225 (print_state): Manage node_obstack.
18226 (print_core): Use node_obstack given by argument.
18227 A node is not only computed here but in print_actions also.
18228 (print_graph): CPP out useless code instead of commenting it.
18229
976e528f
AD
182302001-08-07 Pascal Bart <pascal.bart@epita.fr>
18231
18232 * tests/atconfig.in (CPPFLAGS): Fix.
18233
20e8e5ca
AD
182342001-08-07 Akim Demaille <akim@epita.fr>
18235
18236 * src/print_graph.c (quote): New.
18237 (print_core): Use it.
18238
957d4dbf 182392001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 18240
3e3da797
AD
18241 * src/vcg.c (complain.h): Include it.
18242 Unepitaize `return' invocations.
c4b66126 18243 [NDEBUG] (main): Remove.
79282c6c 18244 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
18245 * src/files.c (open_files): Initialize graph_obstack.
18246 * src/print_graph.c (print_actions): CPP out useless code.
18247 (print_core): Don't output the last `\n' in labels.
18248 Use `quote'.
18249 * src/files.c (output_files): Output the VCG file.
18250 * src/main.c (main): Invoke print_graph ();
3e3da797 18251
957d4dbf 182522001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
18253
18254 Automaton VCG graph output.
18255 Using option ``-g'' or long option ``--graph'', you can generate
18256 a gram_filename.vcg file containing a VCG description of the LALR (1)
18257 automaton of your grammar.
18258
18259 * src/main.c: Call to print_graph() function.
18260 * src/getargs.h: Update.
18261 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18262 (graph_flag): New flag.
18263 (longopts): Update.
18264 (getargs): Add case `g'.
18265 * src/files.c (graph_obstack): New obstack struct.
18266 (open_files): Initialize new obstack.
18267 (output_files): Saves graph_obstack if required.
18268 * src/files.h (graph_obstack): New extern declaration.
18269 * src/Makefile.am: Add new source files.
18270
927c1557 182712001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
18272
18273 * src/print_graph.c, src/print_graph.h (graph): New.
18274 * src/vcg.h: New file.
18275 * src/vcg.c: New file, VCG graph handling.
18276
7333d403
AD
182772001-08-06 Marc Autret <autret_m@epita.fr>
18278
18279 Add of %source_extension and %header_extension which specify
18280 the source or/and the header output file extension.
18281
18282 * src/files.c (compute_base_names): Remove initialisation of
18283 src_extension and header_extension.
18284 (compute_exts_from_gf): Update.
18285 (compute_exts_from_src): Update.
18286 (output_files): Update.
18287 * src/reader.c (parse_header_extension_decl): New.
18288 (parse_source_extension_decl): New.
18289 (read_declarations): New case statements for the new tokens.
18290 * src/lex.c (percent_table): Add entries for %source_extension
18291 and %header_extension.
18292 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18293
84163231
AD
182942001-08-06 Marc Autret <autret_m@epita.fr>
18295
18296 * configure.in: Bump to 1.28c.
18297 * doc/bison.texinfo: Texinfo thingies.
18298
8303fc42
AD
182992001-08-04 Pascal Bart <pascal.bart@epita.fr>
18300
18301 * tests/atconfig.in (CPPFLAGS): Add.
18302 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18303
70a84437
AD
183042001-08-03 Akim Demaille <akim@epita.fr>
18305
18306 Version 1.28b.
18307
2ce10144
AD
183082001-08-03 Akim Demaille <akim@epita.fr>
18309
18310 * tests/Makefile.am (check-local): Ship testsuite.
18311 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18312 Include `string.h'.
18313
1e3e4bc1
AD
183142001-08-03 Akim Demaille <akim@epita.fr>
18315
18316 * configure.in: Try using -Wformat when compiling.
18317
42b45b7f
AD
183182001-08-03 Akim Demaille <akim@epita.fr>
18319
18320 * configure.in: Bump to 1.28b.
18321
8f13fe33
AD
183222001-08-03 Akim Demaille <akim@epita.fr>
18323
18324 * src/complain.c: Adjust strerror_r portability issues.
18325
b37ba92c
AD
183262001-08-03 Akim Demaille <akim@epita.fr>
18327
18328 Version 1.28a.
18329
b0ce6046
AD
183302001-08-03 Akim Demaille <akim@epita.fr>
18331
18332 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18333 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18334 * src/getargs.c: Include complain.h.
18335 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18336 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18337
d01c415b
AD
183382001-08-03 Akim Demaille <akim@epita.fr>
18339
18340 * src/reader.c (readgram): Display hidden chars in error messages.
18341
459dd1a6
AD
183422001-08-03 Akim Demaille <akim@epita.fr>
18343
18344 Update to gettext 0.10.39.
18345
53b74c0c
AD
183462001-08-03 Akim Demaille <akim@epita.fr>
18347
18348 * lib/strspn.c: New.
18349
234a3be3
AD
183502001-08-01 Marc Autret <autret_m@epita.fr>
18351
18352 * doc/bison.texinfo: Update.
18353 * doc/bison.1 (mandoc): Update.
18354 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18355 * src/files.c: Support output files extensions computing.
18356 (src_extension): New static variable.
18357 (header_extension): New static variable.
18358 (tr): New function.
18359 (get_extension_index): New function, gets the index of an extension
18360 filename in a string.
18361 (compute_exts_from_gf): New function, computes extensions from the
18362 grammar file extension.
18363 (compute_exts_from_src): New functions, computes extensions from the
18364 C source file extension, file given by ``-o'' option.
18365 (compute_base_names): Update.
18366 (output_files): Update.
18367
847bf1f5
AD
183682001-08-01 Robert Anisko <anisko_r@epita.fr>
18369
d995fee7 18370 * doc/bison.texi: Document @$.
847bf1f5
AD
18371 (Locations): New section.
18372
d074a105
AD
183732001-07-18 Akim Demaille <akim@epita.fr>
18374
18375 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18376 * config/prev-version.txt, config/move-if-change: New.
18377 * Makefile.am: Adjust.
18378
3419715d
AD
183792001-07-08 Pascal Bart <pascal.bart@epita.fr>
18380
18381 * src/bison.simple (yyparse): Suppress warning `comparaison
18382 between signed and unsigned'.
18383
62ab6972
AD
183842001-07-05 Pascal Bart <pascal.bart@epita.fr>
18385
18386 * src/getargs.h (raw_flag): Remove.
18387 * src/getargs.c: Die on `-r'/`--raw'.
18388 * src/lex.c (parse_percent_token): Die on `%raw'.
18389 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18390 * tests/calc.at: Suppress test with option `--raw'.
18391
1e24cc5b
AD
183922001-07-14 Akim Demaille <akim@epita.fr>
18393
18394 * config/: New.
18395 * configure.in: Require Autoconf 2.50.
18396 Update to gettext 0.10.38.
18397
32dfccf8
AD
183982001-03-16 Akim Demaille <akim@epita.fr>
18399
18400 * doc/bison.texinfo: ANSIfy the examples.
18401
cd5bd6ac
AD
184022001-03-16 Akim Demaille <akim@epita.fr>
18403
18404 * getargs.c (skeleton): New variable.
18405 (longopts): --skeleton is a new option.
18406 (shortopts, getargs): -S is a new option.
18407 * getargs.h: Declare skeleton.
18408 * output.c (output_parser): Use it.
18409
5141b016
AD
184102001-03-16 Akim Demaille <akim@epita.fr>
18411
18412 * m4/strerror_r.m4: New.
18413 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18414 * lib/error.h, lib/error.c: Update.
18415
447992b9
AD
184162001-03-16 Akim Demaille <akim@epita.fr>
18417
18418 * src/getargs.c (longopts): Clean up.
18419
274d42ce
AD
184202001-02-21 Akim Demaille <akim@epita.fr>
18421
18422 * src/reader.c (gensym): `gensym_count' is your own.
18423 Use a static buf to create the symbol name, as token_buffer is no
18424 longer a buffer.
18425
22c821f3
AD
184262001-02-08 Akim Demaille <akim@epita.fr>
18427
18428 * src/conflicts.c (conflict_report): Be sure not to append to res
18429 between two calls, which could happen if both first sprintf were
18430 skipped, but not the first cp += strlen.
18431
18569462
AD
184322001-02-08 Akim Demaille <akim@epita.fr>
18433
18434 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18435 New, from fileutils 4.0.37.
18436 * configure.in: Require Autoconf 2.49c. I took some time before
18437 making this decision. This is the only way out for portability
18438 issues in Bison, it would mean way too much duplicate effort to
18439 import in Bison features implemented in 2.49c since 2.13.
18440 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18441
0d8f3c8a
AD
184422001-02-02 Akim Demaille <akim@epita.fr>
18443
18444 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 18445 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 18446
f17bcd1f
AD
184472001-01-19 Akim Demaille <akim@epita.fr>
18448
18449 Get rid of the ad hoc handling of token_buffer in the scanner: use
18450 the obstacks.
18451
18452 * src/lex.c (token_obstack): New.
18453 (init_lex): Initialize it. No longer call...
18454 (grow_token_buffer): this. Remove it.
18455 Adjust all the places which used it to use the obstack.
18456
511e79b3
AD
184572001-01-19 Akim Demaille <akim@epita.fr>
18458
18459 * src/lex.h: Rename all the tokens:
18460 s/\bENDFILE\b/tok_eof/g;
18461 s/\bIDENTIFIER\b/tok_identifier/g;
18462 etc.
18463 Let them be enums, not #define, to ease debugging.
18464 Adjust all the code.
18465
0d6508ef
AD
184662001-01-18 Akim Demaille <akim@epita.fr>
18467
18468 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18469 * src/lex.c (maxtoken, grow_token_buffer): Static.
18470
6deb4447
AD
184712001-01-18 Akim Demaille <akim@epita.fr>
18472
18473 Since we now use obstacks, more % directives can be enabled.
18474
18475 * src/lex.c (percent_table): Also accept `%yacc',
18476 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18477 `%debug'.
18478 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18479 instead of returning a token.
18480 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18481 * src/reader.c (read_declarations): Adjust.
18482 * src/files.c (open_files): Don't call `compute_base_names', don't
18483 compute `attrsfile' since they depend upon data which might be
18484 *in* the input file now.
18485 (output_files): Do it here.
18486 * src/output.c (output_headers): Document the fact that this patch
18487 introduces a guaranteed SEGV for semantic parsers.
18488 * doc/bison.texinfo: Document them.
18489 * tests/suite.at: Exercise these %options.
18490
ff4423cc
AD
184912000-12-20 Akim Demaille <akim@epita.fr>
18492
18493 Also handle the output file (--verbose) with obstacks.
18494
18495 * files.c (foutput): Remove.
18496 (output_obstack): New.
18497 Adjust all dependencies.
18498 * src/conflicts.c: Return a string.
18499 * src/system.h (obstack_grow_string): Rename as...
18500 (obstack_sgrow): this. Be ready to work with non literals.
18501 (obstack_fgrow4): New.
18502
956dba3a
AD
185032000-12-20 Akim Demaille <akim@epita.fr>
18504
18505 * src/files.c (open_files): Fix the computation of short_base_name
18506 in the case of `-o foo.tab.c'.
18507
337bab46
AD
185082000-12-20 Akim Demaille <akim@epita.fr>
18509
18510 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18511 (copy_dollar): Now that everything uses obstacks, get rid of the
18512 FILE * parameters.
18513
5d3214b8
AD
185142000-12-20 Akim Demaille <akim@epita.fr>
18515
18516 * src/files.c (open_files): Actually the `.output' file is based
18517 on the short_base_name, not base_name.
18518 * tests/suite.at (Checking output file names): Adjust.
18519
29092a57
AD
185202000-12-20 Akim Demaille <akim@epita.fr>
18521
18522 * src/bison.s1: Remove, we now use directly...
18523 * src/bison.simple: this.
18524 * src/Makefile.am: Use pkgdata instead of data.
18525
ea5607fd
AD
185262000-12-20 Akim Demaille <akim@epita.fr>
18527
18528 * src/files.c (guard_obstack): New.
18529 (open_files): Initialize it.
18530 (output_files): Dump it...
18531 * src/files.h: Export it.
18532 * src/reader.c (copy_guard): Use it.
18533
27110317
AD
185342000-12-19 Akim Demaille <akim@epita.fr>
18535
18536 * src/files.c (outfile, defsfile, actfile): Removed as global
18537 vars.
18538 (open_files): Don't compute them.
18539 (output_files): Adjust.
18540 (base_name, short_base_name): Be global.
18541 Adjust dependencies.
18542
19c50364
AD
185432000-12-19 Akim Demaille <akim@epita.fr>
18544
18545 * src/files.c (strsuffix): New.
18546 (stringappend): Be just like strcat but allocate.
18547 (base_names): Eve out from open_files.
18548 Try to simplify the rather hairy computation of base_name and
18549 short_base_name.
18550 (open_files): Use it.
18551 * tests/suite.at (Checking output file names): New test.
18552
573c1d9f
AD
185532000-12-19 Akim Demaille <akim@epita.fr>
18554
18555 * src/system.h (obstack_grow_literal_string): Rename as...
18556 (obstack_grow_string): this.
18557 * src/output.c (output_parser): Recognize `%% actions' instead of
18558 `$'.
18559 * src/bison.s1: s/$/%% actions/.
18560 * src/bison.hairy: Likewise.
18561
ef7ddedd
AD
185622000-12-19 Akim Demaille <akim@epita.fr>
18563
18564 * src/output.c (output_parser): Compute the `#line' lines when
18565 there are.
18566 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18567 Suggested by Hans Aberg.
18568
ff61dabd
AD
185692000-12-19 Akim Demaille <akim@epita.fr>
18570
18571 Let the handling of the skeleton files be local to the procedures
18572 that use it.
18573
18574 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18575 longer static.
18576 (fparser, open_extra_files): Remove.
18577 (open_files, output_files): Don't take care of fparser.
18578 * src/files.h: Adjust.
18579 * src/output.c (output_parser): Open and close the file to the
18580 skeleton.
18581 * src/reader.c (read_declarations): When %semantic_parser, open
18582 fguard.
18583
55b96341
AD
185842000-12-19 Akim Demaille <akim@epita.fr>
18585
18586 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18587 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18588
358c15b7
AD
185892000-12-19 Akim Demaille <akim@epita.fr>
18590
18591 * src/files.c (open_files): Yipee! We no longer need all the code
18592 looking for `/tmp' since we have no tmp file.
18593
7de3329e
AD
185942000-12-19 Akim Demaille <akim@epita.fr>
18595
18596 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18597 New macros.
18598 * src/files.c (open_files): Less dependency on MSDOS etc.
18599
3abcd459
AD
186002000-12-14 Akim Demaille <akim@epita.fr>
18601
18602 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18603 Provide a default definition.
18604 Use it when executing the default @ action.
18605 * src/reader.c (reader_output_yylsp): No longer include
18606 `timestamp' and `text' in the default YYLTYPE.
18607
2a91a95e
AD
186082000-12-12 Akim Demaille <akim@epita.fr>
18609
18610 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18611 (copy_guard): Quote the file names.
18612 Reported by Laurent Mascherpa.
18613
14d3eb9b
AD
186142000-12-12 Akim Demaille <akim@epita.fr>
18615
18616 * src/output.c (output_headers, output_program, output): Be sure
18617 to escape special characters when outputting filenames.
18618 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18619 (output_headers): Don't depend on them, Use ACTSTR.
18620
d7045ec6
AD
186212000-11-17 Akim Demaille <akim@epita.fr>
18622
18623 * lib/obstack.h: Formatting changes.
18624 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18625 prevents type checking.
18626 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18627 cast the value to (void *): assigning a `foo *' to a `void *'
18628 variable is valid.
18629 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18630 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18631 append characters.
18632
6fd54b73
AD
186332000-11-17 Akim Demaille <akim@epita.fr>
18634
18635 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18636 as...
18637 (suite.m4, regression.m4, calc.m4): these.
18638 * tests/atgeneral.m4: Update from CVS Autoconf.
18639
4c50eae6
AD
186402000-11-17 Akim Demaille <akim@epita.fr>
18641
18642 * tests/regression.m4 (%union and --defines): New test,
18643 demonstrating a current bug in the obstack implementation.
18644
a35f64ea
AD
186452000-11-17 Akim Demaille <akim@epita.fr>
18646
18647 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18648 macros.
18649 Use them to declare the variables which are global or local to
18650 `yyparse'.
18651
7de23534
AD
186522000-11-17 Akim Demaille <akim@epita.fr>
18653
18654 * acconfig.h: Remove, no longer used.
18655
aa7815f5
AD
186562000-11-07 Akim Demaille <akim@epita.fr>
18657
18658 * src: s/Copyright (C)/Copyright/g.
18659
5af1f549
AD
186602000-11-07 Akim Demaille <akim@epita.fr>
18661
18662 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18663 defining.
18664 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18665
553e2b22
AD
186662000-11-07 Akim Demaille <akim@epita.fr>
18667
18668 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18669 Merge in a single CPP if/else.
18670
8a4f41d6
AD
186712000-11-07 Akim Demaille <akim@epita.fr>
18672
18673 * src/output.c (output): Remove useless variables.
18674 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18675 argument `data' for consistency with the prototypes.
18676 Qualify it `const'.
18677 (obstack_copy, obstack_copy0): Rename the second argument as
18678 `address' for consistency. Qualify it `const'.
18679 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18680 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18681 `const' their input argument (`data' or `address').
18682 Adjust the corresponding macros to include `const' in casts.
18683
095a3fb5
AD
186842000-11-03 Akim Demaille <akim@epita.fr>
18685
18686 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18687 s/PFILE1/BISON_HAIRY/.
18688 Adjust dependencies.
18689
d1cdce7c
AD
186902000-11-03 Akim Demaille <akim@epita.fr>
18691
090c5ebf 18692 For some reason, this was not applied.
d1cdce7c
AD
18693
18694 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18695 `unlink': it's no longer used.
18696
9311529b
AD
186972000-11-03 Akim Demaille <akim@epita.fr>
18698
18699 * src/files.c (skeleton_find): New function, eved out of...
18700 (open_files, open_extra_files): here.
18701
d8880f69
AD
187022000-11-03 Akim Demaille <akim@epita.fr>
18703
18704 Don't use `atexit'.
18705
18706 * src/files.c (obstack_save): New function.
18707 (done): Rename as...
18708 (output_files): this.
18709 Use `obstack_save'.
18710 * src/main.c (main): Don't use `atexit' to register `done', since
18711 it no longer has to remove tmp files, just call `output_files'
18712 when there are no errors.
18713
0dbb648e
AD
187142000-11-02 Akim Demaille <akim@epita.fr>
18715
18716 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18717 `unlink': it's no longer used.
18718 * src/files.h: Formatting changes.
18719
896fe5c1
AD
187202000-11-02 Akim Demaille <akim@epita.fr>
18721
18722 Remove the last uses of mktemp and unlink/delete.
18723
18724 * src/files.c (fdefines, ftable): Removed.
18725 (defines_ostack, table_obstack): New.
18726 Adjust dependencies of the former into uses of the latter.
18727 * src/output.c (output_short_or_char_table, output_short_table):
18728 Convert to using obstacks.
18729 * src/reader.c (copy_comment2): Accept one FILE * and two
18730 obstacks.
18731 (output_token_defines, reader_output_yylsp): Use obstacks.
18732 * src/system.h (obstack_fgrow3): New.
1f65350a 18733 * po/POTFILES.in: Adjust.
896fe5c1 18734
dd60faec
AD
187352000-11-01 Akim Demaille <akim@epita.fr>
18736
18737 Change each use of `fattrs' into a use of `attrs_obstack'.
18738
18739 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18740 * src/files.c (fattrs): Remove.
18741 (attrs_obstack): New.
18742 Adjust all dependencies.
18743 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18744
8c7ebe49
AD
187452000-11-01 Akim Demaille <akim@epita.fr>
18746
18747 Introduce obstacks.
18748 Change each use of `faction' into a use of `action_obstack'.
18749
18750 * lib/obstack.h, lib/obstack.c: New files.
18751 * src/files.c (faction): Remove.
18752 (action_obstack): New.
18753 Adjust all dependencies.
18754
77aee789
AD
187552000-10-20 Akim Demaille <akim@epita.fr>
18756
18757 * lib/quote.h (PARAMS): New macro. Use it.
18758
43591cec
AD
187592000-10-16 Akim Demaille <akim@epita.fr>
18760
18761 * src/output.c (output_short_or_char_table): New function.
18762 (output_short_table, output_token_translations): Use it.
18763 (goto_actions): Use output_short_table.
18764
1e9798d5
AD
187652000-10-16 Akim Demaille <akim@epita.fr>
18766
18767 * src/symtab.c (bucket_new): New function.
18768 (getsym): Use it.
18769
18770 * src/output.c (output_short_table): New argument to display the
18771 comment associated with the table.
18772 Adjust dependencies.
18773 (output_gram): Use it.
18774 (output_rule_data): Nicer output layout for YYTNAME.
18775
f282676b
AD
187762000-10-16 Akim Demaille <akim@epita.fr>
18777
18778 * src/lex.c (read_typename): New function.
18779 (lex): Use it.
18780 * src/reader.c (copy_dollar): Likewise.
18781
550a72a3
AD
187822000-10-16 Akim Demaille <akim@epita.fr>
18783
18784 * src/reader.c (copy_comment2): Expect the input stream to be on
18785 the `/' which is suspected to open a comment, instead of being
18786 called after `//' or `/*' was read.
18787 (copy_comment, copy_definition, parse_union_decl, copy_action)
18788 (copy_guard): Adjust.
18789
131e2fef
AD
187902000-10-16 Akim Demaille <akim@epita.fr>
18791
18792 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18793 `read_signed_integer'.
18794
79282c5a
AD
187952000-10-16 Akim Demaille <akim@epita.fr>
18796
18797 * src/reader.c (copy_dollar): New function.
18798 (copy_guard, copy_action): Use it.
18799
ff4a34be
AD
188002000-10-16 Akim Demaille <akim@epita.fr>
18801
18802 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18803 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18804 New files, from Fileutils 4.0.27.
18805 * src/main.c (printable_version): Remove.
18806 * src/lex.c, src/reader.c: Use `quote'.
18807
188082000-10-04 Akim Demaille <akim@epita.fr>
18809
18810 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18811
14ded682
AD
188122000-10-04 Akim Demaille <akim@epita.fr>
18813
18814 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18815
8e03724b
AD
188162000-10-04 Akim Demaille <akim@epita.fr>
18817
18818 When a literal string is used to define two different tokens,
18819 `bison -v' segfaults.
18820 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18821
18822 * tests/regression.m4: New file.
18823 Include the core of the sample provided by Piotr Gackiewicz.
18824 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18825 properly.
18826
a9e64249
AD
188272000-10-04 Akim Demaille <akim@epita.fr>
18828
18829 * src/reader.c (parse_expect_decl): Keep `count' within the size
18830 of `buffer'.
18831 From Neil Booth.
18832
da9abf43
AD
188332000-10-02 Paul Eggert <eggert@twinsun.com>
18834
18835 * bison.s1 (yyparse): Assign the default value
18836 unconditionally, to avoid a GCC warning and make the parser a
18837 tad smaller.
18838
c33638bb
AD
188392000-10-02 Akim Demaille <akim@epita.fr>
18840
18841 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18842 options.
18843
444c570a
AD
188442000-10-02 Akim Demaille <akim@epita.fr>
18845
18846 * src/derives.c, src/print.c, src/reduce.c: To ease the
18847 translation, move some `\n' out of the translated strings.
18848
89cab50d
AD
188492000-10-02 Akim Demaille <akim@epita.fr>
18850
18851 The location tracking mechanism is precious for parse error
18852 messages. Nevertheless, it is enabled only when `@n' is used in
18853 the grammar, which is a different issue (you can use it in error
18854 message, but not in the grammar per se). Therefore, there should
18855 be another means to enable it.
18856
18857 * src/getargs.c (getargs): Support `--locations'.
18858 (usage): Report it.
18859 * src/getargs.h (locationsflag): Export it.
18860 * src/lex.c (percent_table): Support `%locations'.
18861 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18862 with `locationsflag'.
18863 * doc/bison.texinfo: Document `--locations' and `%locations'.
18864 Sort the options.
18865 * tests/calc.m4: Test it.
18866
18867 For regularity of the names, replace each
18868 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18869 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18870 In addition replace each `flag' with `_flag'.
18871
d6c2cba0
AD
188722000-10-02 Akim Demaille <akim@epita.fr>
18873
18874 Also test parse error messages, including with YYERROR_VERBOSE.
18875
18876 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18877 associative).
18878 Use it to check the computations.
18879 Use it to check `nonassoc' is honored.
18880 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18881 `--yyerror-verbose'.
18882 (_AT_CHECK_CALC): Adjust to this option.
18883 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18884
5a35a6cb
AD
188852000-10-02 Akim Demaille <akim@epita.fr>
18886
18887 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18888 the latter demonstrates a flaw in the handling of non debugging
18889 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18890 was used in order to simplify:
18891
18892 #if YYDEBUG
18893 if (yydebug)
18894 {
18895 ...
18896 }
18897 #endif
18898
18899 into
18900
18901 if (yydebug)
18902 {
18903 ...
18904 }
18905
18906 unfortunately this leads to a CPP conflict when
18907 `--name-prefix=foo' is used since it produces `#define yydebug
18908 foodebug'.
18909
18910 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18911 (YYDPRINTF): New macro.
18912 Spread its use.
18913 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18914 the bison options.
18915 Also test `--verbose', `--defines' and `--name-prefix'.
18916
71da9eea
AD
189172000-10-02 Akim Demaille <akim@epita.fr>
18918
18919 Improve the readability of the produced parsers.
18920
18921 * src/bison.s1: Formatting changes.
18922 Improve the comment related to the `$' mark.
18923 (yydefault): Don't fall through to `yyresume': `goto' there.
18924 * src/output.c (output_parser): When the `$' is met, skip the end
18925 of its line.
18926 New variable, `number_of_dollar_signs', to check there's exactly
18927 one `$' in the parser skeleton.
18928
95e36146
AD
189292000-10-02 Akim Demaille <akim@epita.fr>
18930
18931 * lib/xstrdup.c: New file, from the fileutils.
18932 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18933 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18934 instead of strlen + xmalloc + strcpy.
18935 * src/symtab.c (copys): Remove, use xstrdup instead.
18936
d7020c20
AD
189372000-10-02 Akim Demaille <akim@epita.fr>
18938
18939 * src/gram.h (associativity): New enum type which replaces the
18940 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18941 `right_assoc', `left_assoc' and `non_assoc'.
18942 Adjust all dependencies.
18943 * src/reader.c: Formatting changes.
18944 (LTYPESTR): Don't define it, use it as a literal in
18945 `reader_output_yylsp'.
18946 * src/symtab.h (symbol_class): New enum type which replaces the
18947 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18948 `sunknown', `stoken and `snterm'.
18949
1916f98e
AD
189502000-10-02 Akim Demaille <akim@epita.fr>
18951
18952 * src/getargs.c (fixed_outfiles): Rename as...
18953 (yaccflag): for consistency and accuracy.
18954 Adjust dependencies.
18955
d7913476
AD
189562000-10-02 Akim Demaille <akim@epita.fr>
18957
18958 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18959 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18960 difficult and introduced a lot of core dump. It turns out that
18961 Bison used an implementation of `xmalloc' based on `calloc', and
18962 at various places it does depend upon the initialization to 0. I
18963 have not tried to isolate the pertinent places, and all the former
18964 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18965 someone should address this issue.
18966
18967 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18968 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18969 files.
18970 Adjust dependencies.
18971 * src/warshall.h: New file.
18972 Propagate.
18973
340ef489
AD
189742000-10-02 Akim Demaille <akim@epita.fr>
18975
18976 Various anti-`extern in *.c' changes.
18977
18978 * src/system.h: Include `assert.h'.
18979
b2ca4022
AD
189802000-10-02 Akim Demaille <akim@epita.fr>
18981
18982 * src/state.h (nstates, final_state, first_state, first_shift)
18983 (first_reduction): Move their exportation from here...
18984 * src/LR0.h: to here.
18985 Adjust dependencies.
18986 * src/getargs.c (statisticsflag): New variable.
18987 Add support for `--statistics'.
18988 Adjust dependencies.
18989
18990 Remove a lot of now useless `extern' statements in most files.
18991
403b315b
AD
189922000-10-02 Akim Demaille <akim@epita.fr>
18993
18994 * src/LR0.h: New file.
18995 Propagate its use.
18996
07a58c13
AD
189972000-10-02 Akim Demaille <akim@epita.fr>
18998
18999 * src/print.h: New file.
19000 Propagate its use.
19001 * src/print.c: Formatting and ordering changes.
19002 (verbose, terse): Replace with...
19003 (print_results): this new function.
19004 Adjust dependencies.
19005
0619caf0
AD
190062000-10-02 Akim Demaille <akim@epita.fr>
19007
19008 * src/conflicts.c (conflict_report): New function.
19009 (conflict_log, verbose_conflict_log): Replace with...
19010 (print_conflicts): this function.
19011 Adjust dependencies.
19012 * src/conflicts.h: New file.
19013 Propagate its inclusion.
19014
3519ec76
AD
190152000-10-02 Akim Demaille <akim@epita.fr>
19016
19017 * src/nullable.h: New file.
19018 Propagate its inclusion.
19019 * src/nullable.c: Formatting changes.
19020
015acc48
AD
190212000-10-02 Akim Demaille <akim@epita.fr>
19022
19023 * src/reduce.h: New file.
19024 Propagate its inclusion.
19025 * src/reduce.c: Topological sort and other formatting changes.
19026 (bool, TRUE, FALSE): Move their definition to...
19027 * src/system.h: here.
19028
8963a27b
AD
190292000-10-02 Akim Demaille <akim@epita.fr>
19030
19031 * src/files.c: Formatting changes.
19032 (tryopen, tryclose, openfiles): Rename as...
19033 (xfopen, xfclose, open_files): this.
19034 (stringappend): static.
19035 * src/files.h: Complete the list of exported symbols.
19036 Propagate its use.
19037
a70083a3
AD
190382000-10-02 Akim Demaille <akim@epita.fr>
19039
19040 * src/reader.h: New file.
19041 Propagate its use instead of tedious list of `extern' and
19042 prototypes.
19043 * src/reader.c: Formatting changes, topological sort,
19044 s/register//.
19045
abadc117
AD
190462000-10-02 Akim Demaille <akim@epita.fr>
19047
19048 * src/lex.h: Prototype `lex.c' exported functions.
19049 * src/reader.c: Adjust.
19050 * src/lex.c: Formatting changes.
19051 (safegetc): Rename as...
19052 (xgetc): this.
19053
720d742f
AD
190542000-10-02 Akim Demaille <akim@epita.fr>
19055
19056 * src/lalr.h: New file.
19057 Propagate its inclusion instead of prototypes and `extern'.
19058 * src/lalr.c: Formatting changes, topological sorting etc.
19059
f2acea59
AD
190602000-10-02 Akim Demaille <akim@epita.fr>
19061
19062 * src/output.c (token_actions): Introduce a temporary array,
19063 YYDEFACT, that makes it possible for this function to use
19064 output_short_table.
19065
d019d655
AD
190662000-10-02 Akim Demaille <akim@epita.fr>
19067
19068 `user_toknums' is output as a `short[]' in `output.c', while it is
19069 defined as a `int[]' in `reader.c'. For consistency with the
19070 other output tables, `user_toknums' is now defined as a table of
19071 shorts.
19072
19073 * src/reader.c (user_toknums): Be a short table instead of an int
19074 table.
19075 Adjust dependencies.
19076
19077 Factor the short table outputs.
19078
19079 * src/output.c (output_short_table): New function.
19080 * src/output.c (output_gram, output_stos, output_rule_data)
19081 (output_base, output_table, output_check): Use it.
19082
6c89f1c1
AD
190832000-10-02 Akim Demaille <akim@epita.fr>
19084
19085 * src/output.c (output): Topological sort of the functions, in
19086 order to get rid of the `static' prototypes.
19087 No longer use `register'.
19088 * src/output.h: New file.
19089 Propagate its inclusion in files explicitly prototyping functions
19090 from output.c.
19091
d9efd181
AD
190922000-09-21 Akim Demaille <akim@epita.fr>
19093
19094 * src/atgeneral.m4: Update from Autoconf.
19095
c29240e7 190962000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
19097
19098 * src/closure.h: New file.
19099 * src/closure.c: Formatting changes, topological sort over the
19100 functions, use of closure.h.
19101 (initialize_closure, finalize_closure): Rename as...
19102 (new_closure, free_closure): these. Adjust dependencies.
19103 * src/LR0.c: Formatting changes, topological sort, use of
19104 cloture.h.
19105 (initialize_states): Rename as...
19106 (new_states): this.
19107 * src/Makefile.am (noinst_HEADERS): Adjust.
19108
499daa50
AD
191092000-09-20 Akim Demaille <akim@epita.fr>
19110
19111 * src/acconfig.h: Don't protect config.h against multiple
19112 inclusion.
19113 Don't define PARAMS.
19114 * src/system.h: Define PARAMS.
19115 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19116 purpose of config.h. system.h must not try to fix wrong
19117 definitions in config.h.
19118
cc84fd5d
AD
191192000-09-20 Akim Demaille <akim@epita.fr>
19120
19121 * src/derives.h: New file.
19122 * src/main.c, src/derives.h: Use it.
19123 Formatting changes.
19124 * src/Makefile.am (noinst_HEADERS): Adjust.
19125
db5b3a89
AD
191262000-09-20 Akim Demaille <akim@epita.fr>
19127
19128 * tests/atgeneral.m4: Update from Autoconf.
19129 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19130 (AT_CHECK_CALC): New macros.
19131 Use these macros to test bison with options `', `--raw',
19132 `--debug', `--yacc', `--yacc --debug'.
19133
ceed8467
AD
191342000-09-19 Akim Demaille <akim@epita.fr>
19135
19136 * src/output.c: Formatting changes.
19137 * src/machine.h: Remove, leaving its contents in...
19138 * src/system.h: here.
19139 Include stdio.h.
19140 Adjust all dependencies on stdio.h and machine.h.
19141 * src/getargs.h: New file.
19142 Let all `extern' declarations about getargs.c be replaced with
19143 inclusion of `getargs.h'.
19144 * src/Makefile.am (noinst_HEADERS): Adjust.
19145
19146 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19147 scope.
19148 (yyerror): Returns void, not int.
19149 * doc/bison.texinfo: Formatting changes.
19150
05a1d24b
AD
191512000-09-19 Akim Demaille <akim@epita.fr>
19152
19153 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19154 portable.
19155
cbd25751
AD
191562000-09-18 Akim Demaille <akim@epita.fr>
19157
19158 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19159 * src/Makefile.am (INCLUDES): Don't.
19160 Be ready to fetch headers in lib/.
19161
13863333
AD
191622000-09-18 Akim Demaille <akim@epita.fr>
19163
19164 * doc/bison.texinfo: Update the copyright.
19165 ANSIfy and GNUify the examples.
19166 Remove the old menu.
19167
0d533154
AD
191682000-09-18 Akim Demaille <akim@epita.fr>
19169
19170 First set of tests: use the `calc' example from the documentation.
19171
19172 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19173 is defined only when YYDEBUG is.
19174 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19175 * src/files.c (tryopen, tryclose): Formatting changes.
19176 Move to the top and be static.
19177 * src/reader.c (read_signed_integer): Likewise.
19178 * tests/calc.m4: New file.
19179 * Makefile.am, suite.m4: Adjust.
19180 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19181
e79137ac
AD
191822000-09-18 Akim Demaille <akim@epita.fr>
19183
19184 Add support for an Autotest test suite for Bison.
19185
19186 * m4/m4.m4, m4/atconfig.m4: New files.
19187 * m4/Makefile.am (EXTRA_DIST): Adjust.
19188 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19189 files.
19190 * src/getargs.c: Display a more standard --version message.
19191 * src/reader.c (reader): Formatting changes.
19192 No longer depend upon VERSION_STRING.
19193 * configure.in: No longer use `dnl'.
19194 Set up the test suite and the new directory `tests/.
19195 (VERSION_STRING): Remove.
19196
27821bff
AD
191972000-04-14 Akim Demaille <akim@epita.fr>
19198
19199 * src/reader.c (copy_comment2): New function, same as former
19200 `copy_comment', but outputs into two FILE *.
19201 (copy_comment): Use it.
19202 (parse_union_decl): Use it.
19203 (get_type, parse_start_decl): Use the same `invalid' message.
19204 (parse_start_decl, parse_union_decl): Use the same `multiple'
19205 message.
19206 (parse_union_decl, copy_guard, copy_action): Use the same
19207 `unmatched' message.
19208 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19209
cfe5fbc0
AD
192102000-03-31 Akim Demaille <akim@epita.fr>
19211
19212 * src/files.c (tryopen, tryclose): Move to the top.
19213 Be static.
19214
cb7db13e
AD
192152000-03-31 Akim Demaille <akim@epita.fr>
19216
19217 * src/main.c (main): Don't call `done', exit does it.
19218
a0f6b076
AD
192192000-03-31 Akim Demaille <akim@epita.fr>
19220
36281465
AD
19221 * allocate.c: s/return (foo)/return foo/.
19222 * lalr.c: Likewise.
19223 * LR0.c: Likewise.
19224 * output.c: Likewise.
19225 * reader.c: Likewise.
19226 * symtab.c: Likewise.
19227 * vmsgetargs.c: Likewise.
19228
192292000-03-31 Akim Demaille <akim@epita.fr>
19230
19231 Clean up the error reporting functions.
a0f6b076
AD
19232
19233 * src/report.c: New file.
19234 * src/report.h: Likewise.
19235 * src/Makefile.am: Adjust.
19236 * m4/error.m4: New file.
19237 * m4/Makefile.am: Adjust.
19238 * configure.in (jm_PREREQ_ERROR): Call it.
19239 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19240 Remove.
19241 (fatal, fatals): Remove. All callers use complain.c::fatal.
19242 (warn, warni, warns, warnss, warnss): Remove. All callers use
19243 complain.c::complain.
19244 (toomany): Remove, use fatal instead.
19245 * src/files.c (done): No argument, use complain_message_count.
19246 * src/main.c (main): Register `done' to `atexit'.
19247
19248 * src/getargs.c (usage): More `fputs', less `fprintf'.
19249
18539825
AD
192502000-03-28 Akim Demaille <akim@epita.fr>
19251
19252 * lib/: New directory.
19253 * Makefile.am (SUBDIRS): Adjust.
19254 * configure.in: Adjust.
19255 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19256 useless.
19257 * src/alloca.c: Moved to lib/.
19258 * src/getopt.c: Likewise.
19259 * src/getopt1.c: Likewise.
19260 * src/getopt.h: Likewise.
19261 * src/ansi2knr.c: Likewise.
19262 * src/ansi2knr.1: Likewise.
19263 * src/Makefile.am: Adjust.
19264 * lib/Makefile.am: New file.
19265
9f306f2a
AD
192662000-03-28 Akim Demaille <akim@epita.fr>
19267
19268 * src/getargs.c (usage): Refresh the help message.
19269
0ba347b6
AD
192702000-03-17 Akim Demaille <akim@epita.fr>
19271
19272 * src/getopt1.c: Updated from textutils 2.0e
19273 * src/getopt.c: Likewise.
19274 * src/getopt.h: Likewise.
19275
dbe7f271
AD
192762000-03-17 Akim Demaille <akim@epita.fr>
19277
19278 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19279 the file name, not the whole `#line LINE FILE'.
19280
75bbe78d
AD
192812000-03-17 Akim Demaille <akim@epita.fr>
19282
19283 On syntax errors, report the token on which we choked.
19284
aa5fd0ee
AD
19285 * src/bison.s1 (yyparse): In the label yyerrlab, when
19286 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 19287
7b306f52
AD
192882000-03-17 Akim Demaille <akim@epita.fr>
19289
aa5fd0ee 19290 * src/reader.c (copy_at): New function.
7b306f52
AD
19291 (copy_guard): Use it.
19292 (copy_action): Use it.
19293
e87b5700
AD
192942000-03-17 Akim Demaille <akim@epita.fr>
19295
19296 Be kind to translators, save some useless translations.
19297
aa5fd0ee 19298 * src/main.c (banner): New function.
e87b5700
AD
19299 (fatal_banner): Use it.
19300 (warn_banner): Use it.
19301
ae3c3164
AD
193022000-03-17 Akim Demaille <akim@epita.fr>
19303
aa5fd0ee
AD
19304 * src/reader.c (copy_definition): Use copy_string and
19305 copy_comment. Removed now unused `match', `ended',
19306 `cplus_comment'.
ae3c3164
AD
19307 (copy_comment, copy_string): Moved, to be visible from
19308 copy_definition.
19309
4dc58e7c
AD
193102000-03-17 Akim Demaille <akim@epita.fr>
19311
aa5fd0ee
AD
19312 * src/reader.c (copy_string): Declare `static inline'. No
19313 problems with inline, since it is checked by configure.
4dc58e7c
AD
19314 (copy_comment): Likewise.
19315
0a6384c4
AD
193162000-03-17 Akim Demaille <akim@epita.fr>
19317
aa5fd0ee 19318 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 19319
3cef001a
AD
193202000-03-17 Akim Demaille <akim@epita.fr>
19321
aa5fd0ee 19322 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
19323 (copy_action): Use it. Removed now unused `match', `ended',
19324 `cplus_comment'.
19325 (copy_guard): Likewise.
19326
ca36d2ef
AD
193272000-03-17 Akim Demaille <akim@epita.fr>
19328
aa5fd0ee 19329 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
19330 (copy_action): Use it.
19331 (copy_guard): Likewise.
19332
6666f98f
AD
193332000-03-17 Akim Demaille <akim@epita.fr>
19334
19335 Change the handling of @s so that they behave exactly like $s.
19336 There is now a pseudo variable @$ (readble and writable), location
19337 of the lhs of the rule (by default ranging from the location of
19338 the first symbol of the rhs, to the location of the last symbol,
19339 or, if the rhs is empty, YYLLOC).
19340
19341 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19342 yyval.
19343 (yyparse): When providing a default semantic action, provide a
19344 default location action.
19345 (after the $): No longer change `*YYLSP', just stack YYLOC the
19346 same way you stack YYVAL.
19347 * src/reader.c (read_declarations): Use warns.
19348 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19349 (copy_action, case '@'): Likewise.
19350 Use a standard error message, to save useless work from
19351 translators.
19352
41aca2e0
AD
193532000-03-17 Akim Demaille <akim@epita.fr>
19354
aa5fd0ee
AD
19355 * src/bison.s1: Formatting and cosmetics changes.
19356 * src/reader.c: Likewise.
41aca2e0
AD
19357 Update the Copyright notice.
19358
dc08c1d5
AD
193592000-03-17 Akim Demaille <akim@epita.fr>
19360
aa5fd0ee
AD
19361 * src/bison.s1 (#line): All set to `#line' only, since the
19362 Makefile now handles them.
dc08c1d5 19363
9ee3c97b
AD
193642000-03-16 Akim Demaille <akim@epita.fr>
19365
19366 * src/output.c (output_rule_data): Output the documentation of
19367 some of the tables.
19368 (Copyright notice): Update.
19369 Formatting changes.
19370
0de741ca
AD
193712000-03-16 Akim Demaille <akim@epita.fr>
19372
19373 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19374 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19375 One `#if YYDEBUG' remains, since it uses variables which are
19376 defined only if `YYDEBUG != 0'.
19377
bb10be54
AD
193782000-03-16 Akim Demaille <akim@epita.fr>
19379
19380 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19381 and related variables so that the similarities are highlighted.
19382
b07b484a
AD
193832000-03-16 Akim Demaille <akim@epita.fr>
19384
19385 * src/bison.s1: Properly indent CPP directives.
19386
361f60b3
AD
193872000-03-16 Akim Demaille <akim@epita.fr>
19388
19389 * src/bison.s1: Properly indent the `alloca' CPP section.
19390
8c44d3ec
AD
193912000-03-16 Akim Demaille <akim@epita.fr>
19392
19393 Do not hard code values of directories in `configure.in'.
19394 Update the `configure' tool chain.
19395
19396 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19397 src/makefile.am.
19398 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19399 (AC_OUTPUT): Add m4/Makefile.
19400 Bump to bison 1.28a, 1.29 has never been released.
19401 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19402 handled via src/Makefile.am.
19403 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19404 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19405 autoheader.
19406 * Makefile.am (SUBDIRS): Add m4.
19407 (ACLOCAL_AM_FLAGS): New variable.
19408 (AUTOMAKE_OPTIONS): Add check-news.
19409 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19410 the proper line number and file name.
19411 (DEFS): Propagate the location of bison library files and of the
19412 locale files.
19413 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19414 builddir.
19415 * acinclude.m4: Remove, replaced by the directory m4.
19416 * m4/Makefile.am (EXTRA_DIST): New variable.
19417 * m4/gettext.m4: New file, from the fileutils.
19418 * m4/lcmessage.m4: Likewise
19419 * m4/progtest.m4: Likewise.
19420 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19421
f95997e7
AD
194222000-03-10 Akim Demaille <akim@epita.fr>
19423
19424 * src/closure.c:
19425 Formatting changes of various comments.
19426 Respect the GNU coding standards at various places.
19427 Don't use `_()' when no translation is needed.
19428
194291999-12-13 Jesse Thilo <jthilo@gnu.org>
19430
19431 * src/files.c:
19432 OS/2 honors TMPDIR environment variable.
19433
194341999-12-13 Jesse Thilo <jthilo@gnu.org>
19435
19436 * doc/bison.texinfo: Tweaked spelling and grammar.
19437 Updated ISBN.
19438 Removed reference to price of printed copy.
19439 Mention BISON_SIMPLE and BISON_HAIRY.
19440
194411999-12-13 Jesse Thilo <jthilo@gnu.org>
19442
19443 * configure.in, NEWS:
19444 Bison 1.29 released.
19445
194461999-10-27 Jesse Thilo <jthilo@gnu.org>
19447
19448 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19449 Added reference card.
19450
194511999-07-26 Jesse Thilo <jthilo@gnu.org>
19452
19453 * po/ru.po: Added Russian translation.
19454
194551999-07-26 Jesse Thilo <jthilo@gnu.org>
19456
19457 * configure.in: Added Russian translation.
19458
194591999-07-06 Jesse Thilo <jthilo@gnu.org>
19460
19461 * configure.in, NEWS, README:
19462 Released version 1.28.
19463
194641999-06-14 Jesse Thilo <jthilo@gnu.org>
19465
19466 * src/system.h:
19467 Squashed redefinition warning on some systems.
19468
19469 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19470 Have configure build version string instead of relying on ANSI string
19471 concatentation.
19472
194731999-06-14 Jesse Thilo <jthilo@gnu.org>
19474
19475 * po/POTFILES.in: Got rid of version.c.
19476
194771999-06-14 Jesse Thilo <jthilo@gnu.org>
19478
19479 * acconfig.h, configure.in:
19480 Have configure build version string instead of relying on ANSI string
19481 concatentation.
19482
194831999-06-08 Jesse Thilo <jthilo@gnu.org>
19484
19485 * doc/bison.1:
19486 Dropped mention of `+' for long-named options.
19487
194881999-05-30 Jesse Thilo <jthilo@gnu.org>
19489
19490 * src/files.c: Added <unistd.h> for unlink().
19491
19492 * src/Makefile.am, src/system.h:
19493 I18n fixes.
19494
194951999-05-30 Jesse Thilo <jthilo@gnu.org>
19496
19497 * README: Added a FAQ list.
19498
19499 * configure.in, acconfig.h:
19500 I18n fixes.
19501
195021999-05-30 Jesse Thilo <jthilo@gnu.org>
19503
19504 * doc/FAQ, doc/Makefile.am:
19505 Added a FAQ list.
19506
195071999-05-19 Jesse Thilo <jthilo@gnu.org>
19508
19509 * src/alloc.h, src/symtab.h, src/version.c:
19510 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19511
195121999-04-18 Jesse Thilo <jthilo@gnu.org>
19513
19514 * src/.cvsignore, src/Makefile.am:
19515 Reorganized: sources in `src', documentation in `doc'.
19516
19517 * src/lex.c (literalchar):
19518 fixed the code for escaping double quotes (thanks
19519 Jonathan Czisny.)
19520
195211999-04-18 Jesse Thilo <jthilo@gnu.org>
19522
19523 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19524 Adjusted paths to reflect directory reorganization.
19525
195261999-04-18 Jesse Thilo <jthilo@gnu.org>
19527
19528 * doc/.cvsignore, doc/Makefile.am:
19529 Reorganized: sources in `src', documentation in `doc'.
19530
195311999-04-18 Jesse Thilo <jthilo@gnu.org>
19532
19533 * configure.in:
19534 Updated AC_INIT file to reflect directory reorganization.
19535
19536 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19537 Reorganized: sources in `src', documentation in `doc'.
19538
195391999-04-13 Jesse Thilo <jthilo@gnu.org>
19540
19541 * src/allocate.c:
19542 Don't declare calloc() and realloc() if not necessary.
19543
195441999-04-13 Jesse Thilo <jthilo@gnu.org>
19545
19546 * configure.in, acconfig.h, acinclude.m4:
19547 Don't declare calloc() and realloc() if not necessary.
19548
195491999-03-23 Jesse Thilo <jthilo@gnu.org>
19550
19551 * po/.cvsignore: Added i18n support.
19552
195531999-03-23 Jesse Thilo <jthilo@gnu.org>
19554
19555 * acconfig.h, configure.in, Makefile.am:
19556 Added i18n support.
19557
195581999-03-22 Jesse Thilo <jthilo@gnu.org>
19559
19560 * src/bison.s1: Fixed #line numbers.
19561
195621999-03-15 Jesse Thilo <jthilo@gnu.org>
19563
19564 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19565 Added PO files from Translation Project.
19566
195671999-03-03 Jesse Thilo <jthilo@gnu.org>
19568
19569 * Makefile.am:
19570 Added support for non-ANSI compilers (ansi2knr).
19571
195721999-02-16 Jesse Thilo <jthilo@gnu.org>
19573
19574 * configure.in: Bumped version number to 1.27.
19575
19576 * Makefile.am:
19577 Added `bison.simple' to list of files removed by `make distclean'.
19578
195791999-02-12 Jesse Thilo <jthilo@gnu.org>
19580
19581 * src/files.c, src/files.h:
19582 Defined locations of parser files in config.h instead of Makefile.
19583
195841999-02-12 Jesse Thilo <jthilo@gnu.org>
19585
19586 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19587 Defined locations of parser files in config.h instead of Makefile.
19588
195891999-02-09 Jesse Thilo <jthilo@gnu.org>
19590
19591 * Makefile.am:
19592 Removed inappropriate use of $< macro.
19593
195941999-02-05 Jesse Thilo <jthilo@gnu.org>
19595
19596 * po/Makefile.in.in, po/POTFILES.in:
19597 Add `po' directory skeleton.
19598
195991999-01-27 Jesse Thilo <jthilo@gnu.org>
19600
19601 * README: Document help-bison list.
19602
19603 * configure.in: Add check for mkstemp().
19604
196051999-01-20 Jesse Thilo <jthilo@gnu.org>
19606
19607 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19608 Hush a few compiler warnings.
19609
19610 * src/files.c:
19611 Add tryclose(), which verifies that fclose was successful.
19612 Hush a couple of compiler warnings.
19613
196141999-01-20 Jesse Thilo <jthilo@gnu.org>
19615
19616 * Makefile.am, OChangeLog:
19617 ChangeLog is now automatically generated. Include the old version as
19618 OChangeLog.
19619
196201999-01-14 Jesse Thilo <jthilo@gnu.org>
19621
19622 * 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:
19623 Update FSF address.
19624
196251999-01-14 Jesse Thilo <jthilo@gnu.org>
19626
19627 * doc/bison.texinfo: Fix formatting glitch.
19628
19629 * doc/bison.texinfo: Update FSF address.
19630
196311999-01-14 Jesse Thilo <jthilo@gnu.org>
19632
19633 * acconfig.h: Update FSF address.
19634
196351999-01-08 Jesse Thilo <jthilo@gnu.org>
19636
19637 * src/system.h:
19638 Don't define PACKAGE here, since config.h defines it.
19639
196401998-12-30 Jesse Thilo <jthilo@gnu.org>
19641
19642 * src/reader.c: Update copyright date.
19643
19644 * src/main.c:
19645 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19646 favor of output directly to stderr (avoids buffer overruns).
19647
19648 * src/reader.c: Some checks for premature EOF.
19649
19650 * 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:
19651 Use prototypes if the compiler understands them.
19652
19653 * src/files.c: Honor TMPDIR on Unix hosts.
19654 Use prototypes if the compiler understands them.
19655
19656 * src/reader.c:
19657 Fix a couple of buffer overrun bugs.
19658 Use prototypes if the compiler understands them.
19659
19660 * src/system.h: Include unistd.h and ctype.h.
19661 Use #ifdef instead of #if for NLS symbols.
19662
196631998-12-30 Jesse Thilo <jthilo@gnu.org>
19664
19665 * doc/bison.texinfo:
19666 Delete comment "consider using @set for edition number, etc..." since
19667 we now are doing so.
19668
196691998-12-30 Jesse Thilo <jthilo@gnu.org>
19670
19671 * configure.in:
19672 Use prototypes if the compiler understands them.
19673
19674 * NEWS: Document 1.26 highlights.
19675
19676 * Makefile.am: Require Automake 1.3 or later.
19677
19678 * acconfig.h:
19679 Use prototypes if the compiler understands them.
19680
196811998-12-29 Jesse Thilo <jthilo@gnu.org>
19682
19683 * src/version.c:
19684 Use VERSION symbol from automake for version number.
19685
196861998-12-29 Jesse Thilo <jthilo@gnu.org>
19687
19688 * acconfig.h, configure.in, version.cin:
19689 Use VERSION symbol from automake for version number.
19690
196911998-11-28 Jesse Thilo <jthilo@gnu.org>
19692
19693 * Makefile.am:
19694 Distribute original version of simple parser (bison.s1), not built
19695 version (bison.simple).
19696
196971998-11-28 Jesse Thilo <jthilo@gnu.org>
19698
19699 * doc/bison.texinfo: Add info dir entry.
19700
19701 * doc/bison.texinfo:
19702 Let automake put version number into documentation.
19703
197041998-11-26 Jesse Thilo <jthilo@gnu.org>
19705
19706 * src/bison.cld, src/build.com, src/vmshlp.mar:
19707 Add non-RCS files from /gd/gnu/bison.
19708
197091998-11-26 Jesse Thilo <jthilo@gnu.org>
19710
19711 * doc/bison.1:
19712 Document the BISON_HAIRY and BISON_SIMPLE variables.
19713
197141998-11-25 Jesse Thilo <jthilo@gnu.org>
19715
19716 * src/version.c: Build version.c automatically.
19717
19718 * src/reader.c:
19719 Fix token numbering (used to start at 258, not 257).
19720
19721 * src/system.h: Include config.h.
19722
19723 * src/getargs.c: Update bug report address.
19724
19725 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19726 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19727
197281998-11-25 Jesse Thilo <jthilo@gnu.org>
19729
19730 * Makefile.am:
19731 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19732
19733 * configure.in, version.cin:
19734 Build version.c automatically.
19735
19736 * AUTHORS: Add AUTHORS file.
19737
19738 * README: Update bug report address.
19739
19740 * bison.simple:
19741 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19742
19743 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19744 Add automake stuff.
19745
197461998-11-25 Jesse Thilo <jthilo@gnu.org>
19747
19748 * doc/bison.texinfo: Clean up some formatting.
19749
197501998-05-05 Richard Stallman <rms@gnu.org>
19751
19752 * doc/bison.texinfo:
19753 Explain better why to make a pure parser.
19754
197551998-01-05 Richard Stallman <rms@gnu.org>
19756
19757 * src/files.c (openfiles):
19758 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19759 find a temporary directory, if possible. Do not unlink files while
19760 they are open.
19761
197621997-08-25 Richard Stallman <rms@gnu.org>
19763
19764 * src/reader.c (stack_offset;):
19765 Change some warni to warns.
19766
19767 * src/lex.c (literalchar): Use warns, not warni.
19768
197691997-06-28 Richard Stallman <rms@gnu.org>
19770
19771 * src/bison.s1: Add a Bison version comment.
19772
19773 * src/main.c (fatal, warn, berror):
19774 Use program_name.
19775
197761997-06-28 Richard Stallman <rms@gnu.org>
19777
19778 * Makefile.in (bison_version): New variable.
19779 (dist): Use that variable.
19780 (bison.s1): Substitute the Bison version into bison.simple.
19781
19782 * bison.simple: Add a Bison version comment.
19783
197841997-06-18 Richard Stallman <rms@gnu.org>
19785
19786 * src/main.c (fatal, warn, berror):
19787 Make error messages standard.
19788 (toomany): Improve error message text.
19789
19790 * 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:
19791 new.h renamed to alloc.h.
19792
197931997-06-18 Richard Stallman <rms@gnu.org>
19794
19795 * Makefile.in: new.h renamed to alloc.h.
19796
197971997-05-24 Richard Stallman <rms@gnu.org>
19798
19799 * src/lex.c (literalchar):
19800 Fix the code for escaping \, " and '.
19801
19802 (lex): Avoid trouble when there are many chars
19803 to discard in a char literal with just several chars in it.
19804
198051997-05-17 Richard Stallman <rms@gnu.org>
19806
19807 * src/bison.s1:
19808 Use malloc, if using alloca is troublesome.
19809 (YYSTACK_USE_ALLOCA): New flag macro.
19810 Define it for some systems and compilers.
19811 (YYSTACK_ALLOC): New macro.
19812 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19813 If it was malloc'd, free it.
19814
198151997-05-17 Richard Stallman <rms@gnu.org>
19816
19817 * bison.simple:
19818 Use malloc, if using alloca is troublesome.
19819 (YYSTACK_USE_ALLOCA): New flag macro.
19820 Define it for some systems and compilers.
19821 (YYSTACK_ALLOC): New macro.
19822 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19823 If it was malloc'd, free it.
19824
198251997-04-23 Richard Stallman <rms@gnu.org>
19826
19827 * src/bison.s1:
19828 (alloca) [__hpux]: Always define as __builtin_alloca.
19829
198301997-04-23 Richard Stallman <rms@gnu.org>
19831
19832 * bison.simple:
19833 (alloca) [__hpux]: Always define as __builtin_alloca.
19834
198351997-04-22 Richard Stallman <rms@gnu.org>
19836
19837 * src/bison.s1:
19838 [__hpux]: Include alloca.h (right for HPUX 10)
19839 instead of declaring alloca (right for HPUX 9).
19840
19841 * src/bison.s1 (__yy_memcpy):
19842 Declare arg `count' as unsigned int.
19843 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19844
198451997-04-22 Richard Stallman <rms@gnu.org>
19846
19847 * bison.simple:
19848 [__hpux]: Include alloca.h (right for HPUX 10)
19849 instead of declaring alloca (right for HPUX 9).
19850
19851 * bison.simple (__yy_memcpy):
19852 Declare arg `count' as unsigned int.
19853 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19854
198551997-01-03 Richard Stallman <rms@gnu.org>
19856
19857 * src/allocate.c: [__STDC__ or _MSC_VER]:
19858 Declare calloc and realloc to return void *.
19859
198601997-01-02 Richard Stallman <rms@gnu.org>
19861
19862 * src/system.h:
19863 [_MSC_VER]: Include stdlib.h and process.h.
19864 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19865
19866 * src/main.c (main): Return FAILURE as a value.
19867 (printable_version): Declare arg as int, not char.
19868
198691997-01-02 Richard Stallman <rms@gnu.org>
19870
19871 * Makefile.in (dist):
19872 Explicitly check for symlinks, and copy them.
19873
198741996-12-19 Richard Stallman <rms@gnu.org>
19875
19876 * src/files.c:
19877 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19878
198791996-12-18 Paul Eggert <eggert@gnu.org>
19880
19881 * src/bison.s1 (yyparse):
19882 If __GNUC__ and YYPARSE_PARAM are both defined,
19883 declare yyparse to have a void * argument.
19884
198851996-12-18 Paul Eggert <eggert@gnu.org>
19886
19887 * bison.simple (yyparse):
19888 If __GNUC__ and YYPARSE_PARAM are both defined,
19889 declare yyparse to have a void * argument.
19890
198911996-12-17 Richard Stallman <rms@gnu.org>
19892
19893 * src/reduce.c (nbits): Add some casts.
19894
198951996-08-12 Richard Stallman <rms@gnu.org>
19896
19897 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19898
198991996-08-12 Richard Stallman <rms@gnu.org>
19900
19901 * bison.simple: Test _MSDOS as well as _MSDOS_.
19902
199031996-07-31 Richard Stallman <rms@gnu.org>
19904
19905 * src/bison.s1:
19906 [__sun && __i386]: Include alloca.h.
19907
199081996-07-31 Richard Stallman <rms@gnu.org>
19909
19910 * bison.simple:
19911 [__sun && __i386]: Include alloca.h.
19912
199131996-07-30 Richard Stallman <rms@gnu.org>
19914
19915 * src/bison.s1: Comment change.
19916
19917 * src/bison.s1: Test _MSDOS_, not MSDOS.
19918
199191996-07-30 Richard Stallman <rms@gnu.org>
19920
19921 * bison.simple: Comment change.
19922
19923 * bison.simple: Test _MSDOS_, not MSDOS.
19924
199251996-06-01 Richard Stallman <rms@gnu.org>
19926
19927 * 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:
19928 Insert `_' macro around many string constants.
19929
19930 * src/main.c:
19931 Insert `_' macro around many string constants.
19932
19933 (main): Call setlocale, bindtextdomain and textdomain.
19934
19935 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19936 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19937 [ENABLE_NLS]: Include libintl.h.
19938 [ENABLE_NLS] (gettext): Define.
19939 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19940 (N_, PACKAGE, LOCALEDIR): New macros.
19941
199421996-06-01 Richard Stallman <rms@gnu.org>
19943
19944 * POTFILES.in: New file.
19945
19946 * Makefile.in (allocate.o):
19947 Define target explicitly.
19948
19949 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19950 (LDFLAGS): Set to @LDFLAGS@.
19951 (configure): Run autoconf only if preceding `cd' succeeds.
19952 (bison.s1): Redirect output to temporary file then move the
19953 temporary to the target, rather than redirecting directly to bison.s1.
19954 (clean): Remove config.status and config.log.
19955 (distclean): Don't remove config.status here.
19956
199571996-05-12 Richard Stallman <rms@gnu.org>
19958
19959 * src/bison.s1:
19960 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19961
199621996-05-12 Richard Stallman <rms@gnu.org>
19963
19964 * bison.simple:
19965 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19966
199671996-05-11 Richard Stallman <rms@gnu.org>
19968
19969 * src/bison.s1 (__yy_memcpy):
19970 Really reorder the args, as was supposedly done on Feb 14 1995.
19971 (yyparse): Calls changed accordingly.
19972
199731996-05-11 Richard Stallman <rms@gnu.org>
19974
19975 * Makefile.in (dist): Don't use $(srcdir).
19976
19977 * bison.simple (__yy_memcpy):
19978 Really reorder the args, as was supposedly done on Feb 14 1995.
19979 (yyparse): Calls changed accordingly.
19980
199811996-01-27 Richard Stallman <rms@gnu.org>
19982
19983 * src/output.c (output_rule_data):
19984 Test YYERROR_VERBOSE in the conditional
19985 around the definition of ttyname.
19986
199871995-12-29 Richard Stallman <rms@gnu.org>
19988
19989 * src/bison.s1:
19990 Fix line numbers in #line commands.
19991
199921995-12-29 Richard Stallman <rms@gnu.org>
19993
19994 * bison.simple:
19995 Fix line numbers in #line commands.
19996
199971995-12-27 Richard Stallman <rms@gnu.org>
19998
19999 * src/bison.s1 (YYPARSE_PARAM_DECL):
20000 In C++, make it always null.
20001 (YYPARSE_PARAM_ARG): New macro.
20002 (yyparse): Use YYPARSE_PARAM_ARG.
20003
200041995-12-27 Richard Stallman <rms@gnu.org>
20005
20006 * bison.simple (YYPARSE_PARAM_DECL):
20007 In C++, make it always null.
20008 (YYPARSE_PARAM_ARG): New macro.
20009 (yyparse): Use YYPARSE_PARAM_ARG.
20010
200111995-11-29 Richard Stallman <rms@gnu.org>
20012
20013 * doc/bison.texinfo:
20014 Describe literal string tokens, %raw, %no_lines, %token_table.
20015
200161995-11-29 Daniel Hagerty <hag@gnu.org>
20017
20018 * doc/bison.texinfo: Fixed update date
20019
200201995-10-16 Richard Stallman <rms@gnu.org>
20021
20022 * src/version.c: Version 1.25.
20023
200241995-10-16 Richard Stallman <rms@gnu.org>
20025
20026 * NEWS: *** empty log message ***
20027
200281995-10-16 Richard Stallman <rms@gnu.org>
20029
20030 * doc/bison.1, doc/bison.rnh:
20031 Add new options.
20032
200331995-10-15 Richard Stallman <rms@gnu.org>
20034
20035 * src/vmsgetargs.c, src/getargs.c:
20036 Added -n, -k, and -raw switches.
20037 (noparserflag, toknumflag, rawtoknumflag): New variables.
20038
20039 * src/symtab.h (SALIAS):
20040 New #define for adding aliases to %token.
20041 (struct bucket): Added `alias' field.
20042
20043 * src/reduce.c (reduce_grammar):
20044 Revise error message.
20045 (print_notices): Remove final `.' from error message.
20046
20047 * src/reader.c (reader_output_yylsp):
20048 New function.
20049 (readgram): Use `#if 0' around code that accepted %command
20050 inside grammar rules: The documentation doesn't allow it,
20051 and it will fail since the %command processors scan for the next %.
20052 (parse_token_decl): Extended the %token
20053 declaration to allow a multi-character symbol as an alias.
20054 (parse_thong_decl): New function.
20055 (read_declarations): Added %thong declarations.
20056 (read_declarations): Handle NOOP to deal with allowing
20057 % declarations as another means to specify the flags.
20058 (readgram): Allow %prec prior to semantics embedded in a rule.
20059 (skip_to_char, read_declarations, copy_definition)
20060 (parse_token_decl, parse_start_decl, parse_type_decl)
20061 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20062 (get_type_name, copy_guard, copy_action, readgram)
20063 (get_type, packsymbols): Revised most error messages.
20064 Changed `fatal' to `warnxxx' to avoid aborting for error.
20065 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20066 (read_declarations): Improve the error message for
20067 an invalid character. Do not abort.
20068 (read_declarations, copy_guard, copy_action): Use
20069 printable_version to avoid unprintable characters in printed output.
20070 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20071 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20072 Allow the type of a non-terminal can be given
20073 more than once, as long as all specifications give the same type.
20074
20075 * src/output.c:
20076 (output_headers, output_trailers, output, output_gram)
20077 (output_rule_data): Implement noparserflag variable.
20078 Implement toknumflag variable.
20079 (output): Call reader_output_yylsp to output LTYPESTR.
20080
20081 * src/main.c (main):
20082 If reader sees an error, don't process the grammar.
20083 (fatals): Updated to not use VARARGS1.
20084 (printable_version, int_to_string, warn, warni, warns, warnss)
20085 (warnsss): New error reporting functions. Avoid abort for error.
20086
20087 * src/lex.h:
20088 Added THONG and NOOP for alias processing.
20089 Added SETOPT for the new code that allows setting options with %flags.
20090
20091 * src/lex.c:
20092 Include getopt.h. Add some extern decls.
20093 (safegetc): New function to deal with EOF gracefully.
20094 (literalchar); new function to deal with reading \ escapes.
20095 (lex): Use literalchar.
20096 (lex): Implemented "..." tokens.
20097 (literalchar, lex, parse_percent_token): Made tokenbuffer
20098 always contain the token. This includes growing the token
20099 buffer while reading an integer.
20100 (parse_percent_token): Replaced if-else statement with percent_table.
20101 (parse_percent_token): Added % declarations as another
20102 way to specify the flags -n, -l, and -r. Also added hooks for
20103 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20104 major changes to files.c.
20105 (lex) Retain in the incoming stream a character following
20106 an incorrect '/'.
20107 (skip_white_space, lex): Revised most error messages
20108 and changed fatal to warn to avoid aborting.
20109 (percent_table): Added %thong declarations.
20110
20111 * src/gram.h: Comment changes.
20112
20113 * src/files.c (openfiles, open_extra_files, done):
20114 Add faction flag
20115 and actfile file. Handle noparserflag. Both for -n switch.
20116
20117 * src/conflicts.c (resolve_sr_conflict):
20118 Remove use of alloca.
20119
201201995-06-01 Jim Meyering <meyering@gnu.org>
20121
20122 * doc/bison.texinfo: *** empty log message ***
20123
201241995-05-06 Richard Stallman <rms@gnu.org>
20125
20126 * src/bison.s1: Comment change.
20127
201281995-05-06 Richard Stallman <rms@gnu.org>
20129
20130 * bison.simple: Comment change.
20131
201321995-05-03 Richard Stallman <rms@gnu.org>
20133
20134 * src/version.c: Version now 1.24.
20135
20136 * src/bison.s1: Change distribution terms.
20137
20138 * src/version.c: Version now 1.23.
20139
201401995-05-03 Richard Stallman <rms@gnu.org>
20141
20142 * doc/bison.texinfo:
20143 Rewrite "Conditions for Using Bison".
20144 Update version to 1.24.
20145
201461995-05-03 Richard Stallman <rms@gnu.org>
20147
20148 * bison.simple: Change distribution terms.
20149
201501995-02-23 Richard Stallman <rms@gnu.org>
20151
20152 * src/files.c: Test __VMS_POSIX as well as VMS.
20153
201541995-02-14 Jim Meyering <meyering@gnu.org>
20155
20156 * src/bison.s1 (__yy_memcpy):
20157 Renamed from __yy_bcopy to avoid
20158 confusion. Reverse FROM and TO arguments to be consistent with
20159 those of memcpy.
20160
201611995-02-14 Jim Meyering <meyering@gnu.org>
20162
20163 * bison.simple (__yy_memcpy):
20164 Renamed from __yy_bcopy to avoid
20165 confusion. Reverse FROM and TO arguments to be consistent with
20166 those of memcpy.
20167
201681994-11-10 David J. MacKenzie <djm@gnu.org>
20169
20170 * NEWS: reformat
20171
20172 * NEWS: New file.
20173
20174 * Makefile.in (DISTFILES): Include NEWS.
20175
20176 * Makefile.in (DISTFILES):
20177 Include install-sh, not install.sh.
20178
20179 * configure.in: Update to Autoconf v2 macro names.
20180
201811994-10-05 David J. MacKenzie <djm@gnu.org>
20182
20183 * Makefile.in: fix typo
20184
20185 * Makefile.in (prefix, exec_prefix):
20186 Let configure set them.
20187
201881994-09-28 David J. MacKenzie <djm@gnu.org>
20189
20190 * Makefile.in: Set datadir to $(prefix)/share.
20191
201921994-09-15 Richard Stallman <rms@gnu.org>
20193
20194 * src/bison.s1:
20195 Update copyright notice and GPL version.
20196
201971994-09-15 Richard Stallman <rms@gnu.org>
20198
20199 * bison.simple:
20200 Update copyright notice and GPL version.
20201
202021994-07-12 Richard Stallman <rms@gnu.org>
20203
20204 * src/reduce.c, src/reader.c:
20205 entered into RCS
20206
202071994-05-05 David J. MacKenzie <djm@gnu.org>
20208
20209 * Makefile.in: entered into RCS
20210
202111994-03-26 Richard Stallman <rms@gnu.org>
20212
20213 * src/bison.s1: entered into RCS
20214
202151994-03-26 Richard Stallman <rms@gnu.org>
20216
20217 * bison.simple: entered into RCS
20218
202191994-03-25 Richard Stallman <rms@gnu.org>
20220
20221 * src/main.c: entered into RCS
20222
202231994-03-24 Richard Stallman <rms@gnu.org>
20224
20225 * src/conflicts.c: entered into RCS
20226
202271994-01-02 Richard Stallman <rms@gnu.org>
20228
20229 * Makefile.in: *** empty log message ***
20230
202311993-11-21 Richard Stallman <rms@gnu.org>
20232
20233 * src/bison.s1: *** empty log message ***
20234
202351993-11-21 Richard Stallman <rms@gnu.org>
20236
20237 * doc/bison.texinfo: entered into RCS
20238
20239 * doc/bison.texinfo: *** empty log message ***
20240
202411993-11-21 Richard Stallman <rms@gnu.org>
20242
20243 * bison.simple: *** empty log message ***
20244
202451993-10-25 David J. MacKenzie <djm@gnu.org>
20246
20247 * doc/bison.texinfo: *** empty log message ***
20248
202491993-10-19 Richard Stallman <rms@gnu.org>
20250
20251 * src/bison.s1: *** empty log message ***
20252
202531993-10-19 Richard Stallman <rms@gnu.org>
20254
20255 * bison.simple: *** empty log message ***
20256
202571993-10-14 Richard Stallman <rms@gnu.org>
20258
20259 * src/bison.s1: *** empty log message ***
20260
202611993-10-14 Richard Stallman <rms@gnu.org>
20262
20263 * bison.simple: *** empty log message ***
20264
202651993-09-14 David J. MacKenzie <djm@gnu.org>
20266
20267 * doc/bison.texinfo: *** empty log message ***
20268
202691993-09-13 Noah Friedman <friedman@gnu.org>
20270
20271 * Makefile.in: *** empty log message ***
20272
202731993-09-10 Richard Stallman <rms@gnu.org>
20274
20275 * src/conflicts.c: *** empty log message ***
20276
20277 * src/system.h: entered into RCS
20278
202791993-09-10 Richard Stallman <rms@gnu.org>
20280
20281 * doc/bison.1: entered into RCS
20282
202831993-09-06 Noah Friedman <friedman@gnu.org>
20284
20285 * src/version.c: entered into RCS
20286
202871993-09-06 Noah Friedman <friedman@gnu.org>
20288
20289 * Makefile.in: *** empty log message ***
20290
202911993-07-30 David J. MacKenzie <djm@gnu.org>
20292
20293 * Makefile.in: *** empty log message ***
20294
202951993-07-24 Richard Stallman <rms@gnu.org>
20296
20297 * src/bison.s1: *** empty log message ***
20298
202991993-07-24 Richard Stallman <rms@gnu.org>
20300
20301 * bison.simple: *** empty log message ***
20302
203031993-07-08 David J. MacKenzie <djm@gnu.org>
20304
20305 * Makefile.in: *** empty log message ***
20306
203071993-07-04 Richard Stallman <rms@gnu.org>
20308
20309 * src/bison.s1: *** empty log message ***
20310
203111993-07-04 Richard Stallman <rms@gnu.org>
20312
20313 * bison.simple: *** empty log message ***
20314
203151993-06-26 David J. MacKenzie <djm@gnu.org>
20316
20317 * src/getargs.c: entered into RCS
20318
203191993-06-26 David J. MacKenzie <djm@gnu.org>
20320
20321 * doc/bison.texinfo: *** empty log message ***
20322
20323 * doc/bison.1: New file.
20324
203251993-06-25 Richard Stallman <rms@gnu.org>
20326
20327 * src/getargs.c: New file.
20328
203291993-06-16 Richard Stallman <rms@gnu.org>
20330
20331 * src/bison.s1: *** empty log message ***
20332
203331993-06-16 Richard Stallman <rms@gnu.org>
20334
20335 * bison.simple: *** empty log message ***
20336
203371993-06-03 Richard Stallman <rms@gnu.org>
20338
20339 * src/bison.s1: New file.
20340
203411993-06-03 Richard Stallman <rms@gnu.org>
20342
20343 * doc/bison.texinfo: *** empty log message ***
20344
203451993-06-03 Richard Stallman <rms@gnu.org>
20346
20347 * bison.simple: New file.
20348
203491993-05-19 Richard Stallman <rms@gnu.org>
20350
20351 * doc/bison.texinfo: New file.
20352
203531993-05-07 Noah Friedman <friedman@gnu.org>
20354
20355 * Makefile.in: *** empty log message ***
20356
203571993-04-28 Noah Friedman <friedman@gnu.org>
20358
20359 * src/reader.c: *** empty log message ***
20360
203611993-04-23 Noah Friedman <friedman@gnu.org>
20362
20363 * src/alloc.h: entered into RCS
20364
203651993-04-20 David J. MacKenzie <djm@gnu.org>
20366
20367 * src/version.c: *** empty log message ***
20368
20369 * src/files.c, src/allocate.c:
20370 entered into RCS
20371
20372 * src/reader.c: *** empty log message ***
20373
20374 * src/lex.c: entered into RCS
20375
20376 * src/conflicts.c: New file.
20377
20378 * src/symtab.c: entered into RCS
20379
20380 * src/alloc.h: New file.
20381
20382 * src/LR0.c: entered into RCS
20383
203841993-04-18 Noah Friedman <friedman@gnu.org>
20385
20386 * src/reader.c: New file.
20387
20388 * src/version.c: *** empty log message ***
20389
203901993-04-18 Noah Friedman <friedman@gnu.org>
20391
20392 * Makefile.in: *** empty log message ***
20393
203941993-04-17 Noah Friedman <friedman@gnu.org>
20395
20396 * Makefile.in: *** empty log message ***
20397
203981993-04-15 Richard Stallman <rms@gnu.org>
20399
20400 * src/main.c, src/files.c:
20401 New file.
20402
204031993-04-15 Noah Friedman <friedman@gnu.org>
20404
20405 * configure.in: entered into RCS
20406
20407 * configure.in: *** empty log message ***
20408
20409 * configure.in: New file.
20410
204111993-04-14 Richard Stallman <rms@gnu.org>
20412
20413 * Makefile.in: New file.
20414
204151993-04-13 Richard Stallman <rms@gnu.org>
20416
20417 * src/version.c: New file.
20418
204191993-03-25 Richard Stallman <rms@gnu.org>
20420
20421 * src/output.c: entered into RCS
20422
204231992-09-25 Richard Stallman <rms@gnu.org>
20424
20425 * configure.bat: entered into RCS
20426
204271992-06-22 Richard Stallman <rms@gnu.org>
20428
20429 * src/vmsgetargs.c: entered into RCS
20430
204311992-06-22 Richard Stallman <rms@gnu.org>
20432
20433 * doc/bison.rnh: entered into RCS
20434
204351992-04-20 David J. MacKenzie <djm@gnu.org>
20436
20437 * README: entered into RCS
20438
204391992-01-22 Richard Stallman <rms@gnu.org>
20440
20441 * src/machine.h: entered into RCS
20442
204431991-12-21 Richard Stallman <rms@gnu.org>
20444
20445 * src/lalr.c, src/closure.c:
20446 entered into RCS
20447
204481991-12-20 Richard Stallman <rms@gnu.org>
20449
20450 * src/state.h: entered into RCS
20451
204521991-12-18 Richard Stallman <rms@gnu.org>
20453
20454 * src/print.c, src/nullable.c, src/derives.c:
20455 entered into RCS
20456
204571991-11-03 David J. MacKenzie <djm@gnu.org>
20458
20459 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20460 entered into RCS
20461
204621988-09-09 Richard Stallman <rms@gnu.org>
20463
20464 * src/bison.hairy: entered into RCS
20465
204661987-12-16 Richard Stallman <rms@gnu.org>
20467
20468 * REFERENCES: entered into RCS
dc546b0f 20469
f294a2c2 20470
04098407 20471 -----
f294a2c2 20472
04098407 20473 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
95021767
JD
20474 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20475 Free Software Foundation, Inc.
f294a2c2 20476
04098407
PE
20477 Copying and distribution of this file, with or without
20478 modification, are permitted provided the copyright notice and this
20479 notice are preserved.
e9071366
AD
20480
20481$Id$