]> git.saurik.com Git - bison.git/blame - ChangeLog
Update to the current gnulib CVS repository, and fix trigraph handling
[bison.git] / ChangeLog
CommitLineData
1cfe6375
JD
12008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Update to the current gnulib CVS repository, and fix trigraph handling
4 in Bison.
5 * bootstrap: Update gnulib CVS repository URL.
6 (symlink_to_dir): Encapsulate the code that guarantees the destination
7 directory exists into...
8 (check_dst_dir): ... this new function, and...
9 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
10 fail when copying files into lib/uniwidth/.
11 * src/output.c (prepare_symbols): When writing yytname muscles, where
12 symbol names will be encoded in C-string literals, tell quotearg to
13 escape trigraphs. This used to be the default in gnulib.
14 * tests/regression.at (Token definitions): Because of the change in
15 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
16 escapes trigraphs in symbol names. Thus, yytname no longer has
17 trigraphs unnecessarily doubly escaped. Update test case output.
18 Extend test case to be sure Bison's own error messages will no longer
19 have trigraphs in symbol names unnecessarily escaped once.
20
74c52fc8
JD
212008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
22
23 Fix make dist infinite loop reported by Juan Manuel Guerrero at
24 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
25 * .cvsignore: Add .version.
26 * .version.in: New.
27 * bootstrap.conf (gnulib_modules): Add git-version-gen.
28 * configure.ac (AC_CONFIG_FILES): Add .version.
29 * build-aux/.cvsignore: Add git-version-gen.
30
8e55b3aa
JD
312008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
32
33 * NEWS (2.3a+): Mention that -g now takes an argument.
34 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
35 consistency. Update the -g and -x entries now that they take
36 arguments. Use brackets to indicate optional arguments.
37 * src/getargs.c (usage): Explain the relationship between arguments of
38 long and short options more completely. Document --defines and -d
39 separately since the former takes an argument but, for POSIX Yacc, the
40 latter does not.
41 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 42 (getargs): Sort cases.
8e55b3aa 43
59c5ac72
AD
442008-02-28 Akim Demaille <demaille@gostai.com>
45
46 * doc/bison.texinfo: Fix a few typos.
47
118d4978
AD
482008-02-28 Akim Demaille <akim@epita.fr>
49
50 * doc/bison.texinfo (Bison Options): Document -W.
51 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
52
7020f1e9
AD
532008-02-28 Akim Demaille <akim@epita.fr>
54
55 * src/getargs.c (short_options): Split and sort for readability.
56 -g and -x take optional arguments, just like their long options.
57 * build-aux/cross-options.pl: Use /x to make the regexp easier to
58 understand.
59 Fix the handling of $opt which resulted in all the argument to be
60 considered as optional.
61
59da312b
JD
622008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
63
64 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
65 say its interface is experimental.
66 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
67 Java.
68 (Bison Options): In the -L and --language entry, mention Java.
69 (Java Bison Interface): Say the interface is experimental.
70 * src/getargs.c (usage): Mention -L and --language.
71
72 * NEWS (2.3a+): Say the push parsing interface is experimental.
73 * doc/bison.texinfo (Push Decl): Likewise.
74 (Decl Summary): Likewise in the "%define api.push_pull" entry.
75 (Push Parser Function): Likewise.
76 (Pull Parser Function): Likewise.
77 (Parser Create Function): Likewise.
78 (Parser Delete Function): Likewise.
79 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
80 yypull_parse, and yypush_parse entries.
81
82 * NEWS (2.3a+): Mention XML support, and say the schema is
83 experimental.
84 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
85 * src/getargs.c (usage): Say the XML schema is experimental.
86
87 * NEWS (2.3a+): Say option instead of flag.
88
2bb3ebec
WP
892008-02-21 Wojciech Polak <polak@gnu.org>
90
91 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
92 text.
93
333e670c
JD
942008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
95
96 Fix impure push parser compile error reported by Bob Rossi at
97 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
98 * data/yacc.c: Clean up whitespace in the output a little.
99 (yypstate_allocated): Define for impure push parsers regardless of
100 whether the pull interface is also requested.
101 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
102 check impure push parsers without the pull interface.
103
104 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
105 yyerror takes arguments specified by %parse-param while yypstate_new
106 does not.
107 * doc/bison.texinfo (Parser Create Function): Document that
108 yypstate_new returns 0 for multiple impure parser instances.
109 * tests/push.at (Push Parsing: Multiple impure instances): Update
110 expected stderr output.
111
798096e1
JD
1122008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
113
114 * runtime-po/POTFILES.in (push.c): Remove.
115
9ca7f077
JD
1162008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
117
118 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
119 * data/push.c: Rename to...
120 * data/yacc.c: ... this, overwriting it.
121 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
122 `%push-pull-parser' -> `%define api.push_pull "both"'.
123 Remove old yacc.c tests, and update push.c tests to yacc.c.
124
42ee26bb
JD
1252008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
126
127 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
128 `"%code top" blocks' instead of `%code "top" blocks'.
129 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
130 Clean up whitespace in the output a little.
131
b1cc23c4
JD
1322008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
133
134 Fix documentation problems reported by Tim Josling at
135 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
136 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
137 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
138 integers. Explain the effect of literal string aliases on error
139 messages. Copy token 0 documentation from the C++ skeleton
140 documentation.
141
ab7f29f8
JD
1422008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
143
144 Accept a token number in a %left, %right, or %nonassoc for POSIX
145 conformance. Reported by Tim Josling at
146 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
147 * NEWS (2.3a+): Mention.
148 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
149 and code numbers are treated by precedence declarations.
150 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
151 of symbols.1.
152 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
153 of symbol.
154 (symbol.prec): New, just like symbol but allows INT.
155 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
156 longer holds.
157 * tests/regression.at (Token number in precedence declaration): New
158 test case.
159
a924ef36
JMG
1602008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
161
162 DJGPP specific issues.
163 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
164 be changed. Copyright timestamp adjusted.
165 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
166 be changed. Copyright timestamp adjusted.
167 * djgpp/config.site: Copyright timestamp adjusted.
168 * djgpp/config_h.sed: Copyright timestamp adjusted.
169 * djgpp/djunpack.bat: Copyright timestamp adjusted.
170 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
171 filename translation list.
172 * djgpp/subpipe.c (init_subpipe): Check the environment variables
173 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
174 files shall be created. Before trying to use the temp dir where the
175 environment variable points to check that the dir really exists. If
176 not default to the cwd as temp dir. Copyright timestamp adjusted.
177 * djgpp/subpipe.h: Copyright timestamp adjusted.
178 * djgpp/testsuite.sed: Copyright timestamp adjusted.
179
389c8cfd
PE
1802008-01-30 Paul Eggert <eggert@cs.ucla.edu>
181
182 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
183
5d1cfef4
PE
1842008-01-09 Paul Eggert <eggert@cs.ucla.edu>
185
186 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
187 Problem reported by Claudio Saavedra in
188 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
189
e2dcf996
WP
1902008-01-05 Wojciech Polak <polak@gnu.org>
191
192 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
193 document's title with the input grammar file name.
194
da730230
JD
1952007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
196
197 Automate regression testing of the XML/XSLT implementation. Discussed
198 starting at
199 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
200 * configure.ac (XSLTPROC): New substitution.
201 * Makefile.am (maintainer-xml-check): New phony target invoking...
202 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
203 invoking make maintainer-check with BISON_TEST_XML=1.
204 * tests/atlocal.in (XSLTPROC): New.
205 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
206 not to report reachable memory when Bison is expected to have a
207 non-zero exit status and (2) to compare XML/XSLT output with --graph
208 and --report=all output for every working grammar when
209 BISON_TEST_XML=1.
210 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
211 (AT_BISON_CHECK_XML): New.
212 (AT_QUELL_VALGRIND): New.
213 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
214 (AT_CHECK): ... don't redefine this since this was the old way to
215 quell Valgrind.
216 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
217 AT_BISON_CHECK invocations.
218 * tests/c++.at: Likewise.
219 * tests/calc.at: Likewise.
220 * tests/conflicts.at: Likewise.
221 * tests/cxx-type.at: Likewise.
222 * tests/existing.at: Likewise.
223 * tests/glr-regression.at: Likewise.
224 * tests/headers.at: Likewise.
225 * tests/input.at: Likewise.
226 * tests/java.at: Likewise.
227 * tests/output.at: Likewise.
228 * tests/push.at: Likewise.
229 * tests/reduce.at: Likewise.
230 * tests/regression.at: Likewise.
231 * tests/sets.at: Likewise.
232 * tests/skeletons.at: Likewise.
233 * tests/synclines.at: Likewise.
234 * tests/torture.at: Likewise.
235 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
236 tends to hang xsltproc.
237 (Big horizontal): Likewise.
238
408476bc
JD
2392007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
240
241 In XML output, remove redundant class attribute on symbol element.
242 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
243 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
244 look up a symbol to determine whether it's a nonterminal or terminal.
245 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
246 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
247
248 Add prec/assoc information to XML output.
249 * src/gram.c (grammar_rules_print_xml): For each rule that has a
250 %prec, add a percent_prec attribute.
251 * src/print-xml.c (print_grammar): For each terminal that has a
252 precedence or associativity, add a prec or assoc attribute.
253 (xml_indent): New.
254 (xml_puts): Use xml_indent.
255 (xml_printf): Use xml_indent.
256 * src/print-xml.h (xml_indent): Prototype.
257
258 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
259 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
260
d4a26c48
JD
2612007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
262
263 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
264 (bison:ruleByNumber): ... this for clarity.
265 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
266 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
267 (xsl:template match="reduction"): Update.
268 (xsl:template match="item"): Update.
269 (xsl:template match="reduction"): Update.
270
271 In the XML output, don't print the list of rules where symbols appear.
272 Compute it in XSLT instead. Discussed at
273 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
274 * data/xslt/bison.xsl (bison:ruleByLhs): New.
275 (bison:ruleByRhs): New.
276 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
277 bison:ruleByRhs.
278 (xsl:template match="terminal/rule"): Remove.
279 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
280 bison:ruleByRhs.
281 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
282 Remove.
283 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
284 bison:ruleByRhs and mode="number-link" for rule template.
285 (xsl:template match="terminal/rule"): Remove.
286 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
287 bison:ruleByRhs and mode="number-link" for rule template.
288 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
289 Rewrite as...
290 (xsl:template match="rule" mode="number-link"): ... this.
291 * src/print-xml.c (print_grammar): Don't print the list of rules.
292
ef1b4273
JD
2932007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
294
295 Don't let --report affect XML output; always print all information.
296 Discussed at
297 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
298 * src/conflicts.c (log_resolution): Implement.
299 * src/print-xml.c (print_core): Implement.
300 (print_state): Implement.
301 (print_xml): Implement.
302
303 * NEWS (2.3a+): Fix quotes.
304 * src/parse-gram.y (prologue_declaration): For consistency with -v,
305 don't let %verbose clear the list specified by --report.
306
0f6cd9e3
AD
3072007-11-26 Akim Demaille <akim@epita.fr>
308
309 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
310
d80fb37a
JD
3112007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
312
313 In the XML output, list useless and unused symbols and rules with the
314 useful ones and add a "usefulness" attribute. Discussed starting at
315 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
316 * src/gram.c (grammar_rules_partial_print_xml): Remove.
317 (grammar_rules_print_xml): Print all rules instead of just those
318 useful in the grammar, and add a "usefulness" attribute.
319 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
320 * src/print-xml.c (print_rules_useless_in_parser): Remove.
321 (print_grammar): Print all nonterminals instead of just useful ones,
322 and add a "usefulness" attribute to nonterminals and terminals.
323 (print_xml): Don't print a separate "reductions" or
324 "rules-useless-in-parser" element.
325 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
326 (reduce_xml): Remove.
327 (reduce_token_unused_in_grammar): New.
328 (reduce_nonterminal_useless_in_grammar): New.
329 * src/reduce.h (reduce_xml): Remove prototype.
330 (reduce_token_unused_in_grammar): Add prototype.
331 (reduce_nonterminal_useless_in_grammar): Add prototype.
332 * data/xslt/xml2text.xsl: Update for XML changes.
333 * data/xslt/xml2xhtml.xsl: Update for XML changes.
334 * tests/reduce.at (Useless Terminals): Update output.
335 (Useless Rules): Update output.
336 (Reduced Automaton): Update output.
337
338 Say "Terminals unused in grammar" instead of "Unused terminals".
339 * NEWS (2.3a+): Update.
340 * doc/bison.texinfo (Understanding): Update example output.
341 * src/reduce.c (reduce_output): Implement.
342 * data/xslt/xml2text.xsl: Implement.
343 * data/xslt/xml2xhtml.xsl: Implement.
344
1bb2bd75
JD
3452007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
346
347 Accept --report-file=FILE to override the default `.output' filename.
348 * NEWS (2.3a+): Mention.
349 * doc/bison.texinfo (Bison Options): Add an entry.
350 * src/files.c (compute_output_file_names): Don't override
351 spec_verbose_file if already set.
352 * src/getargs.c (usage): Document --report-file.
353 (REPORT_FILE_OPTION): New anonymous enum member.
354 (long_options): Add entry for it.
355 (getargs): Add case for it setting spec_verbose_file.
356
357 * build-aux/cross-options.pl: Don't record a short option just because
358 there's an arg.
359 * doc/.cvsignore: Add yacc.1.
360
a005a9c4
AD
3612007-11-14 Akim Demaille <akim@epita.fr>
362
363 * doc/yacc.1.in: New.
364 * configure.ac, doc/Makefile.am: Adjust.
365 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
366 config.h symbol.
367 Use AC_SUBST for assignments too.
368 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
369
cff03fb2
JD
3702007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
371
372 * src/gram.c: Remove comments that duplicate comments in gram.h.
373
374 When reporting useless rules and nonterminals, say "useless in grammar"
375 instead of "useless", and say "useless in parser" instead of "never
376 reduced". Discussed starting at
377 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
378 * NEWS (2.3a+): Mention this change.
379 * data/xslt/xml2text.xsl: Update output text and expected input XML
380 element names to match changes below.
381 * data/xslt/xml2xhtml.xsl: Likewise.
382 (xsl:template match="bison-xml-report"): Add missing entry in Table of
383 Contents: "Rules useless in parser due to conflicts".
384 * doc/bison.texinfo (Decl Summary): Reword a little.
385 (Understanding): Update example output for changes below.
386 * src/gram.c: (rule_useful_p): Rename to...
387 (rule_useful_in_grammar_p): ... this.
388 (rule_useless_p): Rename to...
389 (rule_useless_in_grammar_p): ... this.
390 (rule_never_reduced_p): Rename to...
391 (rule_useless_in_parser_p): ... this.
392 (grammar_rules_print): Update for renames.
393 (grammar_rules_print_xml): Update for renames.
394 (grammar_rules_never_reduced_report): Rename to...
395 (grammar_rules_useless_report): ... this since it is used for either
396 kind of useless rule.
397 * src/gram.h: Reword comments and update function names in prototypes.
398 * src/main.c (main): Say "rule useless in parser due to conflicts".
399 * src/print-xml.c (print_rules_never_reduced): Rename to...
400 (print_rules_useless_in_parser): ... this, and rename output XML
401 element "rules-never-reduced" to "rules-useless-in-parser".
402 (print_xml): Update for rename.
403 * src/print.c (print_results): Say "Rules useless in parser due to
404 conflicts".
405 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
406 (nonterminals_reduce): Say "nonterminal useless in grammar".
407 (reduce_output): Say "Nonterminals useless in grammar".
408 Say "Rules useless in grammar".
409 (reduce_xml): Rename output XML element "useless" to
410 "useless-in-grammar".
411 (reduce_print): Don't report the count of grammatically useless rules
412 as "rules never reduced" just because %yacc is specified.
413 In the correct report of this count, say nonterminal(s) and rule(s)
414 "useless in grammar".
415 * tests/conflicts.at (S/R in initial): Update expected output.
416 (Defaulted Conflicted Reduction): Likewise.
417 (Unreachable States After Conflict Resolution): Likewise.
418 * tests/existing.at (GNU pic Grammar): Likewise.
419 * tests/reduce.at (Useless Nonterminals): Likewise.
420 (Useless Rules): Likewise.
421 (Reduced Automaton): Likewise.
422 (Underivable Rules): Likewise.
423 (Empty Language): Likewise.
424
66f0441d
JD
4252007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
426
427 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
428 here document and before the EOF so that BSD's implementation of Bourne
429 shell doesn't parse the delimiter as part of the here document.
430 * doc/.cvsignore: Add cross-options.texi.
431 * src/getargs.c (usage): Add a blank line after the warning categories.
432
d0ee4105
PB
4332007-11-08 Paolo Bonzini <bonzini@gnu.org>
434
435 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
436
e8b1fb9b
AD
4372007-11-05 Akim Demaille <akim@epita.fr>
438
439 Remove Id: from bison.1.
440 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
441 (perl -0777 -pi -e 's/\.PP\nId): New.
442 (.x.1): Use it to ignore the version control revision.
443
2f7a96b5
AD
4442007-11-05 Akim Demaille <demaille@gostai.com>
445
446 * build-aux/Makefile.am: Ship cross-options.pl.
447 * doc/Makefile.am: Always refer to cross-options.texi with
448 $(srcdir).
449 (MAINTAINERCLEANFILES): Add it.
450
f4101aa6
AD
4512007-11-04 Akim Demaille <demaille@gostai.com>
452
453 Generate the long/short option cross-table.
454 * build-aux/cross-options.pl: New.
455 * doc/Makefile.am (cross-options.texi): New.
456 * doc/bison.texinfo: Use it.
457
727a1401
AD
4582007-11-04 Akim Demaille <demaille@gostai.com>
459
460 Generate bison.1 using help2man.
461 * doc/common.x, doc/bison.x: New.
462 * doc/Makefile.am (bison.1, .x.1): New.
463 The code is taken from autoconf-2.61/man/Makefile.am.
464 * configure.ac: Look for help2man.
465
6aeb9c57
AD
4662007-11-04 Akim Demaille <demaille@gostai.com>
467
468 Complete --help.
469 * src/getargs.c (usage): Document -W, make it clear that -d,
470 -g and -x have optional arguments.
471
d7be4085
AD
4722007-11-04 Akim Demaille <demaille@gostai.com>
473
474 Find sha1sum when named gsha1sum.
475 * bootstrap (find_tool): New.
476 ($SHA1SUM): New.
477
d9df47b6
JD
4782007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
479
480 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
481 at
482 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
483 * NEWS (2.3a+): Mention.
484 * data/bison.m4 (b4_pure_if): Don't define it here.
485 * data/c.m4 (b4_identification): Depend on individual skeletons to
486 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
487 values of the %define variables api.pure or api.push_pull. Define
488 YYPURE, YYPUSH, and YYPULL accordingly.
489 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
490 glr.cc has already defined b4_pure_flag.
491 * data/push.c: Define b4_pure_if based on `%define api.pure'.
492 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 493 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
494 * doc/bison.texinfo (Pure Decl): Update.
495 (Push Decl): Update.
496 (Decl Summary): Add api.pure to %define entry.
497 In %pure-parser entry, say it's deprecated and reference %define.
498 (Pure Calling): Update.
499 (Error Reporting): Update.
500 (C++ Scanner Interface): Update.
501 (How Can I Reset the Parser): Update.
502 (Table of Symbols): In %pure-parser entry, say it's deprecated and
503 reference %define.
504 * src/getargs.c (pure_parser): Remove global variable.
505 * src/getargs.h (pure_parser): Remove extern.
506 * src/output.c (prepare): Don't define pure_flag muscle.
507 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
508 wrapper around `%define api.pure'.
509 * tests/calc.at (Simple LALR Calculator): Update.
510 (Simple GLR Calculator): Update.
511 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
512 Update.
513 (GLR: Resolve ambiguity, pure, locations): Update.
514 (GLR: Merge conflicting parses, pure, no locations): Update.
515 (GLR: Merge conflicting parses, pure, locations): Update.
516 * tests/glr-regression.at (Uninitialized location when reporting
517 ambiguity): Update
518 * tests/input.at (Unused %define api.pure): New test case.
519 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
520 AT_PURE_IF and AT_PURE_AND_LOC_IF.
521 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
522
c373bf8b
JD
5232007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
524
525 %define push_pull -> %define api.push_pull. Discussed starting at
526 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
527 * data/push.c: Expect the new name.
528 * data/yacc.c: Likewise.
529 * doc/bison.texinfo (Push Decl): Update.
530 (Decl Summary): Update %define entry.
531 (Push Parser Function): Update.
532 (Pull Parser Function): Update.
533 (Parser Create Function): Update.
534 (Parser Delete Function): Update.
535 * tests/calc.at (Simple LALR Calculator): Update.
536 * tests/input.at (%define enum variables): Update.
537 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
538 (Push Parsing: Multiple impure instances): Update.
539 (Push Parsing: Unsupported Skeletons): Update.
540 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
541 (Exploding the Stack Size with Malloc): Update.
542
543 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
544 other entries some.
545
32f19b6b
JD
5462007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
547
548 For the XML output's terminal element, rename @number to @token-number,
549 and add @symbol-number. In the nonterminal element, rename @number to
550 @symbol-number. Discussed starting at
551 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
552 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
553 renames.
554 (xsl:template match="nonterminal"): Likewise.
555 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
556 (xsl:template match="nonterminal"): Likewise.
557 * src/print-xml.c (print_grammar): Implement.
558
255a6b90
JD
5592007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
560
561 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
562 2007-10-11 change, the child elements here are items not rules.
408476bc 563 (xsl:template match="item"): New.
255a6b90
JD
564 (xsl:template match="rule"): Update for new reduced itemset.
565 (xsl:template match="point"): Remove.
566 (xsl:template match="empty"): For consistency with --graph, don't
567 output "/* empty */".
568 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
569 line-wrap, don't pass a negative value as first-line-length since this
570 won't work with the following changes.
571 (xsl:template name="line-wrap"): Simplify slightly.
572 (xsl:template name="ws-search"): Eliminate recursion.
573 * src/print_graph.c (print_core): Don't print a reduction's lookahead
574 set next to an item whose dot is not at the end of the RHS even if it
575 happens to be associated with the same rule.
576
88c78747
JD
5772007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
578
31984206
JD
579 Add %define lr.keep_unreachable_states.
580 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
581 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
582 * src/main.c (main): Implement it.
583 * tests/conflicts.at (Unreachable States After Conflict Resolution):
584 Extend to test it, and fix a typo.
585
5862007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
587
588 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
589 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
590 the example .output text.
591 * tests/regression.at (Extra lookahead sets in report): Improve wording
592 of comments.
593
b7a70162
WP
5942007-10-17 Wojciech Polak <polak@gnu.org>
595
596 * src/print-xml.c (print_grammar): Renamed
597 <terminal> and <nonterminal> attributes:
598 "type" to "number" and "symbol" to "name".
599 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
600 Use new attribute names.
601 (xsl:template match="nonterminal"): Likewise.
602 * data/xslt/xml2xhtml.xsl: Likewise.
603
a0de5091
JD
6042007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
605
606 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
607 (Option Cross Key): Likewise.
608
609 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
610 next to an item whose dot is not at the end of the RHS even if it
611 happens to be associated with the same rule.
612 * src/print.c (print_core): Likewise.
613 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
614 (Resolved SR Conflicts): Update output.
615 * tests/regression.at (Extra lookahead sets in report): New test case.
616
4c20d18d
WP
6172007-10-11 Wojciech Polak <polak@gnu.org>
618
619 * src/print-xml.c (print_core): Remove item set
620 redundancy.
621 * data/xslt/bison.xsl (bison:ruleNumber): New key.
622 Improve processing time. Suggested by Joel E. Denny.
623 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
624 Write xsl:param "required" attribute as comment.
625 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
626 (xsl:template match="rule"): Support new reduced itemset.
627 (xsl:template match="point"): Remove.
628 * data/xslt/xml2xhtml.xsl: Likewise.
629
f506ad1c
JD
6302007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
631
632 * src/getargs.c (version): Update copyright year.
633
21f1b063
JD
6342007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
635
636 Make xml2dot.xsl and --graph produce the same output.
637 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
638 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
639 escaped later.
640 (xsl:template name="output-node"): Use the new escape template instead
641 of the string-replace template directly.
642 (xsl:template name="output-edge"): Likewise.
643 (xsl:template name="escape"): New, escapes backslashes and newlines in
644 addition to quotation marks.
645 * src/graphviz.c (start_graph, output_node, output_edge): Add
646 whitespace to output for legibility.
647
648 Make xml2text.xsl and --report produce the same output, and remove the
649 XML "conflicts" element since a conflict summary is easily extracted
650 from the automaton.
651 * data/xslt/bison.xsl: New.
652 (xsl:template match="state" mode="bison:count-conflicts): New.
653 * data/xslt/xml2text.xsl: Import bison.xsl.
654 (xsl:template match="bison-xml-report"): Instead of styling the
655 "conflicts" element, style the "automaton" element with mode
656 "conflicts". Unlike the former, the latter lists S/R and R/R
657 conflicts for a state on the same line.
658 (xsl:template match="conflicts"): Remove.
659 (xsl:template match="conflict"): Remove.
660 (xsl:template match="terminal"): Line-wrap the list of rules in which
661 the terminal is used.
662 (xsl:template match="nonterminal"): Likewise for nonterminals.
663 (xsl:template match="automaton" mode="conflicts"): New.
664 (xsl:template match="state" mode="conflicts"): New.
665 (xsl:template name="line-wrap"): New.
666 (xsl:template name="ws-search"): New.
667 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
668 (xsl:template match="bison-xml-report"): Instead of styling the
669 "conflicts" element, style the "automaton" element with mode
670 "conflicts."
671 (xsl:template match="conflicts"): Remove.
672 (xsl:template match="conflict"): Remove.
673 (xsl:template match="automaton" mode="conflicts"): New.
674 (xsl:template match="state" mode="conflicts): New.
675 * src/conflicts.c (conflicts_output_xml): Remove.
676 * src/conflicts.h (conflicts_output_xml): Remove prototype.
677 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
678 * src/print.c (print_grammar): Consistently wrap at the 66th column so
679 the corresponding XSLT is easier. Also, never wrap between a word and
680 the comma that follows it.
681
793fbca5
JD
6822007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
683
684 Improve C++ namespace support. Discussed starting at
685 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
686 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
687 b4_namespace_close): New macros that interpret the %define variable
688 "namespace" so its value can contain "::" to indicate nested
689 namespaces.
690 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
691 the above macros.
692 * data/lalr1.cc (b4_namespace): Likewise.
693 * data/location.cc (b4_namespace): Likewise.
694 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
695 inside a new table in the general %define entry. Document `%define
696 namespace' there as well. Point the %name-prefix entry to it since it
697 explains it more completely in the case of C++.
698 (C++ Bison Interface): Mention `%define namespace' instead of
699 %name-prefix.
700 (Table of Symbols): Remove the `%define push_pull' entry. The %define
701 entry suffices.
702 * tests/c++.at (Relative namespace references): New test case.
703 (Absolute namespace references): New test case.
704 (Syntactically invalid namespace references): New test case.
705 * tests/input.at (C++ namespace reference errors): New test case.
706
35b8730d
JD
7072007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
708
709 Add syncline support and location accessor to internal %define
710 interfaces.
711 * data/bison.m4 (b4_percent_define_get_loc): New.
712 (b4_percent_define_get_syncline): New.
713 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
714 (b4_percent_define_default): Record defining location as line 1 rather
715 than 0 for the sake of synchronizing #line's, and define
716 b4_percent_define_syncline(VARIABLE).
717 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
718 * src/muscle_tab.c (muscle_syncline_grow): New.
719 (muscle_code_grow): Use muscle_syncline_grow.
720 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
721 define b4_percent_define_syncline(VARIABLE).
722 (muscle_percent_define_get_loc): New.
723 (muscle_percent_define_get_syncline): New.
724 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
725 remove some unused variables.
726 (muscle_percent_define_default): Record defining location as line 1
727 rather than 0 for the sake of synchronizing #line's, and define
728 b4_percent_define_syncline(VARIABLE).
729 (muscle_percent_define_check_values): Use
730 muscle_percent_define_get_loc.
731 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
732 (muscle_percent_define_get_syncline): Prototype.
733 * tests/skeletons.at (%define Boolean variables: invalid skeleton
734 defaults): Update output for location change.
735 (Complaining during macro argument expansion): Extend to test
736 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
737
7dc4a694
JD
7382007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
739
740 Fix some error-reporting macro bugs.
741 * data/bison.m4 (b4_cat): New.
742 (b4_error, b4_error_at): Use b4_cat to send error directives directly
743 to stdout so they don't become arguments to other macros. Update
744 comments and add examples.
745 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
746 add examples.
747 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
748 after printing the error directive so that M4 doesn't report subsequent
749 problems that are induced by this problem.
750 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
751 instead of just in them. Recognize @\n in both places. Both expand to
752 the empty string. Needed by b4_cat.
753 * tests/skeletons.at (Complaining during macro argument expansion):
754 New test case.
755 (Fatal errors make M4 exit immediately): New test case.
756
d4bd2295
JD
7572007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
758
759 Implement --print-datadir.
760 * src/getargs.c (usage): Mention.
761 (PRINT_DATADIR_OPTION): New anonymous enum member.
762 (long_options): Add entry for it.
763 (getargs): Add case for it calling compute_pkgdatadir.
764 * src/output.c (output_skeleton): Encapsulate data directory
765 computation from here...
766 (prepare): ... and from here...
767 (compute_pkgdatadir): ... into this new function.
768 * src/output.h (compute_pkgdatadir): Prototype.
769
34cdeddf
JD
7702007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
771
772 * src/print-xml.c (escape_bufs): New static global variable
773 replacing...
774 (xml_escape_n): ... the static local variable buf here.
775 (print_xml): Free memory for escape_bufs.
776 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
777
d782395d
JD
7782007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
779
780 Replace `%push-parser' and `%push-pull-parser' with
781 `%define push_pull "push"' and `%define push_pull "both"'.
782 `%define push_pull "pull"' is the default.
783 * doc/bison.texinfo (Push Decl, Push Parser Function,
784 Pull Parser Function, Parser Create Function, Parser Delete Function):
785 Update declarations.
786 (Decl Summary, Table of Symbols): Replace %push-parser and
787 %push-pull-parser entries with a %define push_pull entry.
788 * data/bison.m4 (b4_percent_define_check_values): New macro.
789 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
790 definitions...
791 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
792 definitions...
793 * data/push.c: ... to here and compute them from the value of the
794 %define variable push_pull.
795 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
796 parsing requests here...
797 * data/yacc.c: ... hack this to switch to push.c any time
798 b4_use_push_pull_flag or the %define variable push_pull is set. This
799 will go away when we mv push.c yacc.c.
800 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
801 push parsing is not supported since unused %define variables are
802 reported anyway.
803 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
804 * src/muscle_tab.h (muscle_percent_define_check_values): Update
805 comments for consistency with b4_percent_define_check_values.
806 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
807 muscles.
808 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
809 Remove.
810 (prologue_declaration): Remove %push-parser and %push-pull-parser
811 rules.
812 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
813 * tests/calc.at: Update declarations.
814 * tests/input.at (%define enum variables): New test case.
815 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
816 declaration.
817 (Push Parsing: Multiple impure instances): Update declaration.
818 (Push Parsing: Unsupported Skeletons): New test case.
819 * tests/torture.at (Exploding the Stack Size with Alloca): Update
820 declaration.
821 (Exploding the Stack Size with Malloc): Update declaration.
822
3f999f78
WP
8232007-09-24 Wojciech Polak <polak@gnu.org>
824
825 Add XSLT transformations.
826
827 * data/xslt/xml2dot.xsl: Transform XML into DOT.
828 * data/xslt/xml2text.xsl: Transform XML into plain text.
829 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
830 * data/Makefile.am (xsltdir): New variable.
831 (dist_xslt_DATA): Add xslt/*.xsl files.
832
a4f75309
PE
8332007-09-23 Paul Eggert <eggert@cs.ucla.edu>
834
835 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
836 Problem reported by Wojciech Polak.
837 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
838 (xml_printf): Undo change I made on 21 September; that is,
839 indent 2 spaces, not 1.
840
ad5feac4
JD
8412007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
842
843 Pacify ./configure --enable-gcc-warnings.
844 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
845 `char const *' instead of `char *'.
846 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
847 local variable `sep'.
848
41d7a5f2
PE
8492007-09-21 Paul Eggert <eggert@cs.ucla.edu>
850
851 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
852 elsewhere.
853 * src/print-xml.c: Prefer "const" after types; that's more consistent.
854 (xml_printf): Indent just 1 space for level.
855 (e_char, xlate_char): Remove.
856 (xml_escape_string): Rewrite to avoid undefined behavior (used
857 storage that was freed from the stack).
858 (xml_escape_n): Don't bother checking for subscript error.
859
3f999f78
WP
8602007-09-21 Wojciech Polak <polak@gnu.org>
861
862 Add Bison XML Automaton Report.
41d7a5f2
PE
863
864 Add support for an -x option to generate an XML report.
865 It is not documented yet.
866 * src/print-xml.c: New file.
867 * src/print-xml.h: Likewise.
868 * lib/timevar.def (TV_XML): New var.
869 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
870 * src/conflicts.c: Include print-xml.h.
871 (solved_conflicts_xml_obstack): New var.
872 (log_resolution, conflicts_solve, conflicts_free):
873 Add support for XML report.
874 (conflicts_output_val): New function.
875 * src/conflicts.h (conflicts_output_val): New decl.
876 * src/files.c (spec_xml_file): New var.
877 (compute_output_file_names, output_file_names_free): Add XML support.
878 * src/files.h (spec_xml_file): New decl.
879 * src/getargs.c (xml_flag): New var.
880 (usage, short_options, long_options, getargs): Add XML support.
881 * src/getargs.h (xml_flag): New decl.
882 * src/gram.c: Include print-xml.h.
883 (rule_lhs_print_xml, rule_rhs_print_xml):
884 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
885 New functions.
886 * src/gram.h: Declare external ones.
887 * src/main.c: Include print-xml.h.
888 (main): Add XML support.
889 * src/reduce.c: Include print-xml.h.
890 (reduce_xml): New function.
891 * src/reduce.h: Declare it.
892 * src/state.c: Include print-xml.h.
893 (state_new): Add XML support.
894 (state_rule_lookahead_tokens_print_xml): New function.
895 * src/state.h: Declare it.
896 (struct state): New member solved_conflicts_xml.
897 * src/symtab.c (symbol_class_get_string): New function.
898 * src/symtab.h: Declare it.
899
6d8e724d
PE
9002007-09-21 Paul Eggert <eggert@cs.ucla.edu>
901
902 * GNUmakefile: Switch to coreutils's version.
903 * bootstrap: Likewise.
904 * Makefile.cfg: Adjust to new GNUmakefile.
905 * README-hacking: Likewise.
906
907 Import from gnulib:
908
909 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
910 Bruno Haible <bruno@clisp.org>
911
912 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
913 and is a script that invokes bison. Tighten the code. Add comments.
914
922bdd7f
JD
9152007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
916
917 Spell "boolean" as "Boolean". Reported by Akim Demaille.
918 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
919 * doc/bison.texinfo (Decl Summary): Fix.
920 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
921 * tests/input.at (Boolean %define variables): Update output.
922 * tests/skeletons.at (%define boolean variables: invalid skeleton
923 defaults): Rename to...
924 (%define Boolean variables: invalid skeleton defaults): ... this and
925 update output.
926
1b17b01d
JD
9272007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
928
929 In impure push mode, don't allow more than one yypstate to be allocated
930 since multiple impure parsers would corrupt yynerrs.
931 * data/push.c (yypstate_allocated): New static global variable
932 initialized to 0.
933 (yypull_parse): If yypstate_new returns 0, don't report it as memory
934 exhaustion if yypstate_allocated is 1, but still return 2.
935 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
936 already 1. Otherwise, set it to 1.
937 (yypstate_delete): Set it to 0.
938 * tests/push.at (Push Parsing: Multiple impure instances): New test
939 case.
940
9987d1b3
JD
9412007-08-17 Bob Rossi <bob@brasko.net>
942
943 * doc/bison.texinfo (Push Decl): Document the push parser.
944 (Table of Symbols): Ditto.
945 (Pure Decl): Ditto.
946 (Decl Summary): Ditto.
947 (Multiple Parsers, Push Parser Function, Pull Parser Function,
948 Parser Create Function, Parser Delete Function):
949 Add new push parser symbols.
950 (Table of Symbols): Document push-parser, push-pull-parser,
951 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
952
f16b0819
PE
9532007-08-15 Paul Eggert <eggert@cs.ucla.edu>
954
955 Update to GPLv3.
956 * doc/gpl-3.0.texi: New file.
957 * doc/gpl.texi: Remove.
958 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
959 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
960 * README-hacking, TODO, bootstrap, bootstrap.conf:
961 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
962 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
963 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
964 * data/lalr1.cc, data/lalr1.java, data/location.cc:
965 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
966 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
967 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
968 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
969 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
970 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
971 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
972 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
973 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
974 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
975 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
976 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
977 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
978 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
979 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
980 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
981 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
982 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
983 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
984 * src/complain.c, src/complain.h, src/conflicts.c:
985 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
986 * src/files.h, src/flex-scanner.h, src/getargs.c:
987 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
988 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
989 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
990 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
991 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
992 * src/print.c, src/print.h, src/print_graph.c:
993 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
994 * src/reduce.h, src/relation.c, src/relation.h:
995 * src/revision.h, src/scan-code.h, src/scan-code.l:
996 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
997 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
998 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
999 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1000 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1001 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1002 * tests/existing.at, tests/glr-regression.at:
1003 * tests/headers.at, tests/input.at, tests/java.at:
1004 * tests/local.at, tests/output.at, tests/push.at:
1005 * tests/reduce.at, tests/regression.at, tests/sets.at:
1006 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1007 * tests/torture.at:
1008 Update to GPLv3.
1009
728c4be2
JD
10102007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1011
1012 Get rid of broken %no-parser, -n, and --no-parser implementation and
1013 documentation.
1014 * TODO: Don't mention them.
1015 * doc/bison.1: Likewise.
1016 * doc/bison.texinfo (Decl Summary): Likewise.
1017 (Bison Options): Likewise.
1018 (Option Cross Key): Likewise.
1019 * src/getargs.c (no_parser_flag): Remove global variable.
1020 (usage): Don't print description of -n and --no-parser.
1021 (long_options): Remove --no-parser entry here.
1022 (getargs): Remove -n case in the switch here.
1023 * src/getargs.h (no_parser_flag): Remove extern.
1024 * tests/regression.at (Web2c Actions): Remove comment that mentions
1025 --no-parser.
1026
5d31a216
JD
10272007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1028
1029 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1030 name user variables starting with `yy'. Just pass NULL instead of a
1031 dummy local &yylval to yypush_parse.
1032 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1033 starting with `yy'.
1034
a2ea208d
JD
10352007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1036
1037 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1038 true since it's then always used regardless of whether yyoverflow is
1039 defined. Reported by Christian Burger at
1040 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1041 * THANKS: Add Christian Burger.
1042
91661ebb
JD
1043 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1044 node names: say "Decl Summary" not "Bison Declaration Summary".
1045
cbd50549
JD
10462007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1047
1048 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1049 determine whether this function has already complained about an invalid
1050 value for a %define boolean variable, don't check whether Bison has
1051 ever examined the value. As written, the check was a tautology.
1052 Instead, record and check for this complaint using a separate muscle.
1053
eb1b0740
JD
10542007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1055
1056 Fix push parsing memory leak reported by Brandon Lucia at
1057 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1058 * THANKS: Add Brandon Lucia.
1059 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1060 but the parse never completed and thus freed it.
1061 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1062 * tests/testsuite.at: Include push.at.
1063 * test/push.at: New.
1064 (Push Parsing: Memory Leak for Early Deletion): New test case.
1065
9d774aff
JD
10662007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1067
1068 Improve handling of multiple S/R conflicts in the same state and of S/R
1069 conflicts involving multiple reductions.
1070 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1071 set for a state here or Bison will abort if it is reassigned on a
1072 later conflicted reduction in the same state.
1073 Similarly, don't finalize and assign the solved conflicts report here
1074 or it will be lost if it is reassigned on a later conflicted reduction
1075 in the same state.
1076 (set_conflicts): Instead, assign them both here after all S/R conflicts
1077 in the state have been fully examined.
1078 * src/print.c (shift_set): Rename to...
1079 (no_reduce_set): ... this.
1080 (print_reductions): Update for rename, and add %nonassoc error action
1081 tokens to no_reduce_set so that, when printing the first remaining
1082 reduction on an error action token, the reduction is enclosed in
1083 brackets.
1084 (print_results): Update for rename.
1085 * tests/conflicts.at (Solved conflicts report for multiple reductions
1086 in a state): New test case.
1087 (%nonassoc error actions for multiple reductions in a state): New test
1088 case.
1089
1090 * src/main.c (main): Don't depend on C99 features.
1091
10159d2a
JD
10922007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1093
1094 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
1095 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1096 uniwidth.
10159d2a 1097
953b3935
JD
10982007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1099
1100 * bootstrap (slurp): Create target directories that don't exist.
1101 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1102
6ce2d93a
JD
11032007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1104
1105 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1106 than item number.
1107 * closure.c (closure): Likewise.
1108 * state.h (reductions): Comment sorting of rules.
1109 (state): Comment sorting of items.
1110
ce3448d5
JD
11112007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1112
1113 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1114 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1115 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1116 definition in order to avoid Gnulib headers since we don't use config.h
1117 here.
1118 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1119 rather than AT_DATA so that config.h is included.
1120
8a86eef0
JD
11212007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1122
1123 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1124 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1125 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1126 and so that YYFPRINTF is guaranteed to be defined here.
1127
b1a81613
JD
11282007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1129
1130 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1131 with...
1132 (muscle_percent_define_check_values): ... this more helpful function.
1133 Again, it's not used yet, but it will be.
1134 * src/muscle_tab.h: Likewise.
1135
71b61d4d
JD
1136 Improve some comments in parser table construction.
1137 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1138 (generate_states): Don't mention ruleset, which is internal to closure.
1139 * src/closure.c (closure): Explain sorting of core and itemset, which
1140 is required for this function to behave correctly.
1141 * src/closure.h (closure): Mention sorting.
1142
2a6b783d
JD
11432007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1144
1145 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1146 move the check for disabled transitions to an aver since conflict
1147 resolution hasn't happened yet.
1148
1149 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1150 labels a state as inconsistent just because it has error transitions.
1151 The original form of this check appeared in revision 1.1 of lalr.c,
1152 which was committed on 1991-12-21. Now (at least), changing the
1153 consistency label on such a state appears to have no useful effect in
1154 any of the places it is examined, which I enumerate below. The key
1155 point to understanding each item in this enumeration is that a state
1156 with an error transition is labelled consistent in the first place only
1157 if it has no rules, so the check cannot matter for states that have
1158 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1159 to try to identify its conflicts, and a state must have *rules* to have
1160 conflicts. (2) Labelling a state as inconsistent will affect how
1161 action_row sets the default *rule* for the state. (3) Labelling a
1162 state as inconsistent will cause build_relations to add lookback edges
1163 to *rules* in that state.
1164 * src/state.h (struct state): Word the comment for member consistent
1165 more carefully.
1166
14462c2b
JD
11672007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1168
1169 Don't depend on C99 features.
1170 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1171 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1172 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1173 * src/state.c (state_mark_reachable_states): Fix for-loop.
1174 (state_remove_unreachable_states): Fix for-loop.
1175
1176 Don't widen struct state with member reachable just to temporarily
1177 record reachability. Instead, use a local bitset.
1178 * src/state.h (struct state): Remove member.
1179 * src/state.c (state_new): Don't initialize it.
1180 (state_mark_reachable_states): Rename to...
1181 (state_record_reachable_states): ... this, and use bitset.
1182 (state_remove_unreachable_states): Use bitset.
1183
5a43d418
JD
11842007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1185
1186 * src/Makefile.am (yacc): Quote target action commands properly so
1187 that the yacc script isn't corrupt. Reported by Hans Aberg at
1188 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1189
0c650a20
JD
1190 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1191 the case of pure parsers. Reported by Frans Englich at
1192 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1193 * THANKS: Add Frans Englich.
1194
61fee93e
JD
1195 * NEWS (2.3a+): In the %code entry, reference section `Bison
1196 Declaration Summary' from the manual now since the %code summary has
1197 moved there.
1198 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1199 in the rules section must be terminated by semicolons.
1200
f124d423
JD
12012007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1202
1203 Extend the front-end API for %define variables to more completely
1204 mirror the back-end. This will be useful in the future.
1205 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1206 Update comments to mention the new front-end counterparts of these
1207 macros.
1208 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1209 for muscle_string_decode and muscle_location_decode.
1210 (muscle_string_decode): New static function.
1211 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1212 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1213 functions.
1214 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1215 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1216 implementation more closely.
1217 (muscle_percent_define_invalid_value): New function.
1218 * src/muscle_tab.h (muscle_percent_define_get,
1219 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1220 Prototype.
1221
75ad86ee
JD
12222007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1223
1224 * NEWS (2.3a+): Mention yesterday's state-removal change.
1225 (2.3a): Remove the %language entry, which was added after 2.3a.
1226 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1227 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1228 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1229 tests/existing.at: Update copyright date.
1230
5967f0cf
JD
12312007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1232
1233 If conflict resolution makes states unreachable, remove those states,
1234 report rules that are then unused, and don't report conflicts in those
1235 states.
1236 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1237 New global function.
1238 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1239 function.
1240 * src/main.c (main): After conflict resolution, remove the unreachable
1241 states and update all data structures that reference states by number.
1242 * src/state.c (state_new): Initialize each state's reachable member to
1243 false.
1244 (state_mark_reachable_states): New static function.
1245 (state_remove_unreachable_states): New global function.
1246 * src/state.h (struct state): Add member bool reachable.
1247 (state_remove_unreachable_states): Prototype.
1248 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1249 New test case.
1250 * tests/existing.at (GNU pic Grammar): Update test case output now that
1251 an unused rule is discovered.
1252
b09f4f48
JD
12532007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1254
1255 Minor code cleanup in parser table construction.
1256 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1257 (new_itemsets, save_reductions): Update for rename to nitemset.
1258 * src/closure.c (nritemset): Rename to...
1259 (nitemset): ... this since the "r" appears to meaningless and isn't
1260 used in the comments.
1261 (closure): Update for rename.
1262 * src/closure.h (nritemset): Update extern to...
1263 (nitemset): ... this.
1264 * src/lalr.c (LA): Fix a typo in comments.
1265 * src/print.c (print_core): Update for rename to nitemset.
1266 * src/print_graph.c (print_graph): Likewise.
1267 * src/state.h: Fix some typos in header comments.
1268
bbb44d83
PE
12692007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1270
9b33de72
PE
1271 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1272 still sticks to ASCII. Sorry!
1273
bbb44d83
PE
1274 * README-hacking: New file, taken mostly from coreutils, with changes
1275 for Bison. Contains much of the contents of:
1276 * README-cvs: Remove.
1277 * bootstrap: Sync from gnulib.
1278 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1279 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1280
29553547
JD
12812007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1282
1283 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1284 Setzer.
1285 (Java Differences): Fix some typos.
1286 * THANKS: Add Sebastian Setzer.
1287
01b477c6
PB
12882007-03-07 Paolo Bonzini <bonzini@gnu.org>
1289
730739e4
AD
1290 * data/java.m4 (b4_single_class_if): Remove.
1291 (b4_abstract_if): Look at "%define abstract".
1292 (b4_lexer_if): New.
1293 (b4_union_name): Rename...
1294 (b4_yystype): ... to this. Map to "%define stype".
1295 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1296 b4_maybe_throws): Fix quoting.
1297 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1298 * data/lalr1.java (Lexer interface): Always define.
1299 (Lexer interface within parser class): Remove.
1300 (YYLexer class): New, used when "%code lexer" is present.
1301 (constructor): When "%code lexer" is used, pass %lex-param
1302 to the lexer constructor.
1303 (yylex, yyparse): Remove %lex-param from method invocations
1304 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1305
1306 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1307 abstract". Rename "%define union_name" to "%define stype".
1308 Rename method names according to previous patch.
1309 (Java Scanner Interface): Describe "%code lexer" instead of
1310 "%pure-parser" and "%define single_class".
1311 (Java Differences): Mention "%code lexer".
1312
1313 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1314 Include scanner here, using macros from tests/local.at.
1315 (AT_DATA_CALC_Y): Remove final argument.
1316 (_AT_CHECK_JAVA_CALC): Likewise.
1317 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1318 of %locations and %error-verbose.
1319 (main): Test with and without %lex-param.
1320 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1321 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 1322
122bea3a
JMG
13232007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1324
1325 DJGPP spefic issue. Inhibit the use of disallowed characters for
1326 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1327 and concern testsuite case 46.
1328 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1329 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1330 * djgpp/config.bat: Inhibit the use of disallowed characters.
1331
9611cfa2
JD
13322007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1333
1334 Miscellaneous %define and %code cleanup.
1335 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1336 values are interpreted.
1337 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1338 documentation a little more.
1339 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1340 muscle_percent_define_insert, muscle_percent_code_grow): New
1341 functions/macros.
1342 * src/muscle_tab.h (muscle_percent_define_insert,
1343 muscle_percent_code_grow): Prototype.
1344 * src/parse-gram.y (prologue_declaration): Use
1345 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1346 %define and %code directives.
1347
1348 Make it easy to share %define boolean variables between the front-end
1349 and back-end. Though not used yet, this will be useful in the future.
1350 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1351 Bison uses of names rather than just skeleton uses of names.
1352 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1353 b4_percent_define_skeleton_variables(VARIABLE) to
1354 b4_percent_define_bison_variables(VARIABLE).
1355 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1356 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1357 b4_percent_code_bison_qualifiers(QUALIFIER).
1358 (b4_check_user_names_wrap): Update for renames.
1359 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1360 muscle_percent_define_default): New functions mimicking
1361 b4_percent_define_flag_if and b4_percent_define_default.
1362
1363 For %define variables, report locations for invalid values and
bbb44d83 1364 redefinitions.
9611cfa2
JD
1365 * data/bison.m4 (b4_percent_define_flag_if): Read
1366 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1367 value for VARIABLE.
1368 (b4_percent_define_default): Save a special location in
1369 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1370 must later be reported as invalid.
1371 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1372 functions.
1373 (muscle_percent_define_insert): Record the location of VARIABLE in
1374 muscle percent_define_loc(VARIABLE), and use it to report the previous
1375 location for a redefinition.
1376 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1377 (muscle_percent_define_default): Update like b4_percent_define_default.
1378 (muscle_grow_user_name_list): Rename to...
1379 (muscle_user_name_list_grow): ... this for consistency and use
1380 muscle_location_grow.
1381 * src/muscle_tab.h (muscle_location_grow): Prototype.
1382 * tests/input.at (%define errors): Update expected output.
1383 * tests/skeletons.at (%define boolean variables: invalid skeleton
1384 defaults): New test case.
1385
0bf92491
JD
13862007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1387
1388 * src/print.c (lookahead_set, state_default_rule): Remove.
1389 (print_reductions): Replace state_default_rule invocation with
1390 equivalent use of yydefact, which was computed in token_actions in
1391 tables.c.
1392 (print_results): Don't allocate lookahead_set.
1393
d3b12988
PB
13942007-02-27 Paolo Bonzini <bonzini@gnu.org>
1395
1396 * data/lalr1.java: Prefix all private members with yy.
1397
f57a7536
JD
13982007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1399
1400 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 1401 Sebastien Fricker at
f57a7536 1402 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 1403 * THANKS: Add Sebastien Fricker.
f57a7536
JD
1404 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1405 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1406 accept a variable number of arguments.
1407
6404a5bf
JD
14082007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1409
1410 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1411
e4e09639
JMG
14122007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1413
1414 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1415 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1416 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1417
d7e0a1a7
PE
14182007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1419
1420 Undo my 2007-02-07 change, switching back to the c-strcase module
1421 introduced in the 2007-02-03 change. Bruno Haible reported that
1422 the 2007-02-07 change would be dangerous in Turkish if we add a
1423 language whose name contains "i", since "i" is not lowercase "I"
1424 in Turkish.
1425 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1426 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1427 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1428 * m4/.cvsignore: Remove strcase.m4.
1429 * src/getargs.c: Revert 2007-02-07 change, as follows.
1430 Include c-strcase.h.
1431 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1432
deee93a1
JD
14332007-02-11 Bruno Haible <bruno@clisp.org>
1434
1435 Enable the Java related testsuite tests when the only Java compiler
1436 found is a gcj < 4.3. Discussed at
1437 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1438 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1439
574add85
JD
14402007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1441
1442 * data/Makefile.am: Update copyright date.
1443 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1444 yypstate_new returns NULL.
1445 (yypstate_new): Return NULL if malloc does.
1446 * src/reader.c (packgram): Move translation of rule actions from the
1447 beginning of packgram to...
1448 (check_and_convert_grammar): ... here right before packgram is invoked
1449 so it's easier to write more complete comments, and remove redundant
1450 code.
1451
e785ccf7
JD
14522007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1453
1454 As in semantic actions, make @$ in %initial-action, %destructor, and
1455 %printer imply %locations.
1456 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1457 scanning @$.
1458 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1459 (@$ in %initial-action implies %locations,
1460 @$ in %destructor implies %locations,
1461 @$ in %printer implies %locations): ... these new test cases.
1462
1cfe1ed7
PE
14632007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1464
1465 Undo most of the 2007-02-03 change, switching to the strcase module
1466 now that gnulib strcase has been fixed.
1467 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1468 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1469 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1470 * m4/.cvsignore: Add strcase.m4.
1471 * src/getargs.c: Revert 2007-02-03 change, as follows.
1472 Don't include c-strcase.h.
1473 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1474 strcasecmp has "unspecified behavior" outside the POSIX locale,
1475 but it works fine in practice if at least one argument is ASCII,
1476 as is the case in Bison.
1477
0049ec86
PB
14782007-02-07 Paolo Bonzini <bonzini@gnu.org>
1479
1480 * tests/java.at: Skip tests if only one of javac/java is present.
1481 Reported by Joel E. Denny.
1482 * tests/atlocal.in: Adjust copyright years.
1483
14842007-02-05 Paolo Bonzini <bonzini@gnu.org>
1485
1486 * data/lalr1.java (Stack): Work around old verifiers that disallow
1487 access to the private fields of an inner class, from the outer class.
1488 We can make Stack's fields public because user code doesn't have access
1489 to the instance of Stack used by parse(). Reported by Paul Eggert.
1490
2c2b7220
PE
14912007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1492
1493 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1494 the right spot for these files?
1495 * bootstrap.conf (gnulib_modules): Add c-strcase.
1496 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1497 c-strncasecmp.c.
1498 * src/getargs.c: Include c-strcase.h.
1499 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1500 to avoid unspecified behavior.
1501
b2b81dae
JD
15022007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1503
1504 * doc/bison.texinfo (Decl Summary): Correct typo.
1505
c1d19e10
PB
15062007-01-30 Paolo Bonzini <bonzini@gnu.org>
1507
1508 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1509 Complain if the value does not match empty, "true" or "false".
1510 * data/c++.m4: Adjust default definitions of %define variables.
1511 * data/java.m4: Adjust default definitions of %define variables.
1512 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1513 to above behavior.
1514 * tests/input.at (Boolean %define variables): Test new behavior.
1515
8405b70c
PB
15162007-01-29 Paolo Bonzini <bonzini@gnu.org>
1517
1518 * NEWS: Mention java.
1519 * TODO: Remove things that are done.
1520 * bootstrap.conf: Add javacomp-script and javaexec-script.
1521 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1522
1523 * data/Makefile.am: Add new files.
1524 * data/java-skel.m4: New.
1525 * data/java.m4: New.
1526 * data/lalr1.java: New.
1527
1528 * doc/bison.texinfo: Put "A Complete C++ Example" under
1529 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1530 under Other Languages.
1531
1532 * src/getargs.c (valid_languages): Add Java.
1533 * src/getargs.h (struct bison_language): Update size of string fields.
1534
1535 * tests/Makefile.am: Add java.at.
1536 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1537 * tests/java.at: New.
1538 * tests/testsuite.at: Include it.
1539
3eb82471
JD
15402007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1541
1542 Clean up.
1543 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1544 at_directive_argv arguments so these no longer have to be global
1545 variables. Also, update the implementation for the following changes.
1546 (fail_for_at_directive_too_many_args,
1547 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1548 (at_directive_name): Remove as at_directive_argv[0] will be used for
1549 this now.
1550 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1551 for the directive name.
1552 (at_directive_argc, at_directive_argv): Make these local within
1553 skel_lex instead of global.
1554 (INITIAL): Update directive start action for above changes.
1555 (SC_AT_DIRECTIVE_ARG): Rename to...
1556 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1557 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1558 (scan_skel): Move yylex_destroy to...
1559 (skel_scanner_free): ... here.
1560 * tests/skeletons.at (installed skeleton file name): Rename to...
1561 (installed skeleton file names): ... this.
1562
148d66d8
JD
15632007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1564
1565 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1566 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1567 Summary" not "Directives".
1568 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1569 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1570 since the former is now the more complete one.
1571 (Prologue Alternatives): Likewise and do the same for %defines.
1572 (Table of Symbols): Add summary of %code, add summary of %define, and
1573 move full %code documentation to...
1574 (Decl Summary): ... here for consistency with other entries in these
1575 sections.
1576 Move %define entry in order to keep this list alphabetized.
1577 Reword %define entry a little to put less emphasis on the skeleton
1578 concept, which most users shouldn't have to think about.
1579
665f0c24
PE
15802007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1581
1582 Adjust to recent gnulib changes.
1583 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1584 Add string.h, string_.h, unistd_.h, wchar_.h.
1585 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1586 * src/system.h: Don't include <stpcpy.h>; this is now done by
1587 <string.h>.
1588
592d0b1e
PB
15892007-01-23 Paolo Bonzini <bonzini@gnu.org>
1590
1591 Simplify implementation of unqualified %code, implement macros for
1592 uniform treatment of boolean %define flags. Document %define.
1593 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1594 b4_percent_code_ifdef): New.
1595 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1596 * data/c++.m4: Define default value for global_tokens_and_yystype.
1597 * data/glr.cc: Likewise.
1598 * data/location.cc: Use b4_percent_define_flag_if.
1599
148d66d8 1600 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
1601
1602 * src/parse-gram.y (Unqualified %code): Change muscle name to
1603 b4_percent_code().
1604 (content.opt): Default to empty.
1605
a7867f53
JD
16062007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1607
1608 Implement support for relative and absolute skeleton file names.
1609 Discussed starting at
1610 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1611 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1612 (Bison Options): Document in --skeleton entry.
1613 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1614 full_skeleton can't necessarily hold all of pkgdatadir.
1615 If the specified skeleton file name contains a `/', don't prepend
1616 pkgdatadir.
1617 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1618 file name contains a `/', prepend the grammar file directory.
1619 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1620 * skeletons.at: New file.
1621 (relative skeleton file names): New test case.
1622 (installed skeleton file names): New test case.
1623 * tests/testsuite.at: Include skeletons.at.
1624
1625 * bootstrap: Update copyright to 2007.
1626
830c9b18
PB
16272007-01-17 Paolo Bonzini <bonzini@gnu.org>
1628
1629 * bootstrap: Remove occurrences of .#bootmp from the files.
1630
a8c2e813
AD
16312007-01-17 Akim Demaille <akim@epita.fr>
1632
1633 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1634 nonterminals.
1635 Use per-type %printer.
1636
279cabb6
JD
16372007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1638
1639 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1640 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1641 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1642 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1643 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1644 tests/glr-regression.at, tests/input.at, tests/local.at,
1645 tests/output.at, tests/torture.at: Update copyright to 2007.
1646
bb32f4f2
AD
16472007-01-16 Akim Demaille <akim@epita.fr>
1648
1649 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1650 error code.
1651 (Calc++ Scanner): Exit with failure if we can't open the input
1652 file.
1653 Accept "-" standing for stdin.
1654 (Calc++ Top Level): Print the result only if the parsing was
1655 successful.
1656
7cff04b5
AD
16572007-01-16 Akim Demaille <akim@epita.fr>
1658
1659 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1660
a4e25e1d
JD
16612007-01-15 Paolo Bonzini <bonzini@gnu.org>
1662 and Joel E. Denny <jdenny@ces.clemson.edu>
1663
1664 Clean up %define and %code implementation in M4 some. Most
1665 importantly, rename all related macros to be in the b4_percent_define
1666 and b4_percent_code namespaces. Also, complete support for `.' in
1667 %define variable names and %code qualifiers.
1668 * data/bison.m4 (b4_check_user_names): Check for special
1669 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1670 m4_foreach loops.
1671 (b4_get_percent_define, b4_get_percent_code): Rename to...
1672 (b4_percent_define_get, b4_percent_code_get): ... these.
1673 Extend documentation with examples.
1674 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1675 b4_percent_define_skeleton_variables and
1676 b4_percent_code_skeleton_qualifiers.
1677 Expect any value for the %define variable `foo' to be stored in the
1678 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1679 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1680 expect any unqualified %code blocks to be stored in a macro named
1681 `b4_percent_code_unqualified'.
1682 Use m4_indir so that %define variable names and %code qualifiers can
1683 contain `.', which is allowed by the grammar parser.
1684 (b4_percent_define_default): New macro to set a default value for a
1685 %define variable.
1686 (m4_wrap): Update wrapped code, and fix some underquoting.
1687 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1688 Expect grammar uses of %define variables and %code qualifiers to be
1689 defined in b4_percent_define_user_variables and
1690 b4_percent_code_user_qualifiers.
1691 * data/c++.m4: Use b4_percent_define_default rather than
1692 m4_define_default. Fix some underquoting. Skeleton usage of %define
1693 variable define_location_comparison now implies skeleton usage of
1694 %define variable filename_type.
1695 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1696 data/push.c, data/yacc.c: Update macro names.
1697 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1698 muscle names.
1699
e37c665c
JMG
17002007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1701
1702 DJGPP specific issues.
1703
1704 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1705 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1706
7d2d521f
JD
17072007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1708
1709 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1710 run parsers in all tests so that Valgrind is invoked during
1711 maintainer-check-valgrind.
1712 (Duplicate representation of merged trees): Free all semantic values.
1713 (Duplicated user destructor for lookahead): Likewise.
1714
e0ac9b4b
JD
17152007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1716
1717 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1718 command-line prefix.
1719 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1720 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1721 miss Valgrind messages.
1722 (Exploding the Stack Size with Malloc): Likewise.
1723
78143faa
JD
17242007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1725
1726 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1727 locals. Reported by Juan Manuel Guerrero at
1728 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1729 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1730 Fix some indentation also.
1731 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1732 explaining this issue.
1733
7ecec4dd
JD
17342007-01-09 Paolo Bonzini <bonzini@gnu.org>
1735 and Joel E. Denny <jdenny@ces.clemson.edu>
1736
1737 Simplify union and prologue handling, and escape union and lex/parse
1738 params with digraphs.
1739 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1740 values to the empty string since these are no longer guaranteed
1741 initialized by the front-end.
1742 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1743 braces around b4_user_stype since this is no longer done by the
1744 front-end.
1745 * src/files.c, src/files.h (pre_prologue_obstack,
1746 post_prologue_obstack): Remove.
1747 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1748 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1749 with digraphs. This fixes lex params and parse params.
1750 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1751 * src/output.c (prepare): Remove muscle insertion of the prologues.
1752 (output): Remove freeing of pre_prologue_obstack and
1753 post_prologue_obstack.
1754 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1755 than prologue_augment for prologue parsing so you don't need prologue
1756 obstacks.
5c80250c
JD
1757 (grammar_declaration): For %union RHS, use `braceless' instead of
1758 "{...}" so that braces are already stripped and code is escaped with
1759 digraphs.
7ecec4dd
JD
1760 * src/reader.c (prologue_augment): Remove.
1761 (reader): Remove initialization of pre_prologue_obstack and
1762 post_prologue_obstack.
1763 * src/reader.h (prologue_augment): Remove.
1764
1765 * data/c.m4: Remove stray parenthesis.
1766
16dc6a9e
JD
17672007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1768
1769 Remove quotes from variables names in %define directives and from
1770 qualifiers in %code directives, and restrict the characters that are
1771 allowed in them to M4-friendly ones. For %define, continue to support
1772 the quoted form as a deprecated feature. Discussed starting at
1773 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1774 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1775 %code.
1776 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
1777 (Decl Summary): In %defines entry, update mention of `%code requires'
1778 and `%code provides'.
16dc6a9e
JD
1779 (C++ Location Values): Update %define uses.
1780 (Calc++ Parser Interface): Likewise.
1781 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 1782 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
1783 * src/parse-gram.y (prologue_declaration): For %define variables, use
1784 `variable' instead of `STRING'.
1785 (grammar_declaration): For %code qualifiers, use `ID' instead of
1786 `STRING'.
1787 (variable): New nonterminal that takes an `ID' or a `STRING'.
1788 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1789 and %define uses.
1790 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1791 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1792 (%define errors): Update %define uses.
1793
e9813cd4
JD
17942007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1795
1796 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1797 instead of muscle_insert for %define values so that M4-special
1798 characters are replaced with digraphs.
1799 * tests/input.at (%define errors): Extend to check weird values.
1800
6afc30cc
JD
18012007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1802
1803 Instead of having skeletons declare all valid %define variables and
1804 %code qualifiers, provide macros that retrieve the associated values
1805 and build these lists automatically. Thus Bison will now warn when a
1806 variable or qualifier is not used by the skeleton in the current
1807 invocation regardless of whether it might sometimes be used by that
1808 skeleton in other invocations. Also, move all %define value macros to
1809 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1810 form, which is replaced by %code.
1811 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1812 (b4_check_user_names): ... this, and change the series of valid name
1813 arguments to a single list argument for names used in the skeleton
1814 similar to the existing list argument for names used in the grammar.
1815 Warn instead of complaining.
1816 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1817 values and %code code, to format %code code properly, and to build
1818 lists of all %define variables and %code qualifiers used in the
1819 skeleton: b4_skeleton_percent_define_variables and
1820 b4_skeleton_percent_code_qualifiers.
1821 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1822 Remove, and...
1823 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1824 the skeleton names lists can finish building first. In place of
1825 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1826 expect the lists b4_user_percent_define_variables and
1827 b4_user_percent_code_qualifiers.
1828 * data/c++.m4: Where setting default values for b4_parser_class_name,
1829 b4_location_type, b4_filename_type, b4_namespace, and
1830 b4_define_location_comparison, update their names to the
1831 b4_percent_define_ namespace.
1832 * data/glr.c: Don't use b4_check_percent_define_variables and
1833 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1834 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1835 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 1836 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
1837 * data/location.cc: Use b4_get_percent_define.
1838 * data/push.c: Don't use b4_check_percent_define_variables and
1839 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1840 * data/yacc.c: Likewise, and don't call m4_exit in
1841 b4_use_push_for_pull_if or m4_wrap code will never execute.
1842 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1843 Rename to...
1844 (muscle_grow_user_name_list): ... this for consistency with the
1845 terminology used in bison.m4.
1846 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1847 %define variable names, and rename muscle used_percent_define_variables
1848 to user_percent_define_variables.
1849 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1850 user_percent_code_qualifiers.
1851 (content): Remove.
1852 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1853 {CODE} form is no longer accepted.
1854 * tests/input.at (Reject bad %code qualifiers): Rename to...
1855 (Reject unused %code qualifiers): ... this, and update test output.
1856 (%define error): Update test output.
1857
7eb8a0bc
JD
18582007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1859
1860 Check for unrecognized %define variables similar to checking for
1861 unrecognized %code qualifiers. Check for redefined %define variables.
1862 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1863 generalizes...
1864 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1865 (b4_check_percent_define_variables): New, also wraps it.
1866 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1867 variables using b4_check_percent_define_variables.
1868 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1869 all those exercised in the test suite and all those listed in the
1870 `Default values' section of c++.m4. Are there others?
1871 * data/push.c, data/yacc.c: Declare no valid %define variables.
1872 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1873 similar to muscle_find, but it works even when the muscle stores a
1874 const value.
1875 (muscle_grow_used_name_list): New function for constructing the used
1876 name list muscles that b4_check_for_unrecognized_names requires.
1877 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1878 %define'd more than once. Define the b4_used_percent_define_variables
1879 muscle with muscle_grow_used_name_list.
1880 (grammar_declaration): Abbreviate %code code with
1881 muscle_grow_used_name_list.
1882 * tests/input.at (%define errors): New.
1883
3fc65ead
JD
18842007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1885
1886 Provide warn_at, complain_at, and fatal_at function callbacks to the
1887 skeletons, and use this for %code qualifier complaints.
1888 * data/bison.m4 (b4_error_at): New, invoked by...
1889 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1890 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1891 @fatal_at(...@) directives.
1892 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1893 qualifiers in b4_used_percent_code_qualifiers and to use
1894 b4_complain_at.
1895 * src/location.c, src/location.h (boundary_set_from_string): New global
1896 function.
1897 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1898 function.
1899 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1900 to b4_used_percent_code_qualifiers.
1901 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1902 function.
1903 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1904 (lineno): Rename to...
1905 (out_lineno): ... this so I don't misunderstand it again.
1906 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1907 here; these newlines are in the input but not the output file.
1908 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1909 (at_directive_perform): ... this new static function, and add handling
1910 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1911 directives.
1912 * tests/input.at (Reject bad %code qualifiers): Update test output with
1913 locations and extend.
1914
1915 * tests/output.at (Output file name: [, Output file name: ]): Remove
1916 bogus comment about these tests failing.
1917
1c7b7e1d
JD
19182007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1919
1920 Clean up b4_check_percent_code_qualifiers a little.
1921 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1922 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1923 documentation and add examples.
1924 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1925 qualifiers here.
1926
08af01c2
JD
19272007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1928
1929 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1930 unreliable -- especially when they're hidden inside another macro.
1931 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1932 data/c.m4: Remove m4_divert(-1).
1933 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1934 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1935 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 1936 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
1937 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1938 pushed and popped by m4sugar, should be first on the stack.
1939
1940 Provide warn, complain, and fatal function callbacks to the skeletons.
1941 This provides more flexibility than m4_fatal, improves the error
1942 message format, and captures messages for translation. Discussed
1943 starting at
1944 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1945 * data/bison.m4 (b4_error): New, invoked by...
1946 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1947 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1948 directives. Because these M4 macros might be called when the current
1949 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1950 the previous removal of uses of m4_divert, which caused trouble.
1951 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1952 m4_fatal to report unrecognized %code qualifiers.
1953 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1954 push parser requests.
1955 * data/glr.c: Use b4_complain instead of m4_fatal to report
1956 non-deterministic push parser requests.
1957 Update @output usage to @output(...@) form.
1958 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1959 report missing %defines. Update @output usage to @output(...@) form.
1960 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1961 @output(...@) form.
1962 * src/main.c (main): Invoke skel_scanner_free.
1963 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1964 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1965 obstack_for_string from flex-scanner.h.
1966 (YY_DECL): Use to declare skel_lex static.
1967 (decode_at_digraphs): Remove; now handled in the new
1968 SC_AT_DIRECTIVE_ARG start condition.
1969 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1970 functions.
1971 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1972 at_directive_argv): New static globals.
1973 (INITIAL): Use fail_for_invalid_at.
1974 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1975 recognize the start of a generalized `@directive(...@)' form and
1976 start...
1977 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1978 directive args (using the new obstack_for_string), to decode the
1979 contained @ diagraphs, and to perform the directive. It recognizes
1980 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1981 @output(...@).
1982 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1983 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1984 `@,'.
1985 (scan_skel): Initialize obstack_for_string on the first call.
1986 (skel_scanner_free): New function to free obstack_for_string.
1987 * tests/input.at (Reject bad %code qualifiers): Update test output.
1988
8e0a5e9e
JD
19892007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1990
1991 Consolidate the 4 prologue alternative directives (%code, %requires,
1992 %provides, and %code-top) into a single %code directive with an
1993 optional qualifier field. Discussed at
1994 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
1995 * NEWS (2.3a+): Rewrite the existing entry for the prologue
1996 alternatives.
1997 * doc/bison.texinfo (Prologue Alternatives): Update.
1998 (Decl Summary): Update to %code "requires" and %code "provides".
1999 (Calc++ Parser): Update to %code "requires".
148d66d8 2000 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
2001 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2002 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2003 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2004 which are skeleton-specific.
2005 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2006 declare what %code qualifiers it supports and to complain if any other
2007 qualifiers were used in the grammar.
2008 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2009 and b4_user_code([b4_percent_code_provides]) in place of
2010 b4_user_requires and b4_user_provides.
2011 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2012 Add b4_user_code([b4_percent_code_top]) and
2013 b4_user_code([b4_percent_code]).
2014 Invoke b4_check_percent_code_qualifiers.
2015 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2016 PERCENT_REQUIRES): Remove.
2017 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2018 %requires. Rewrite the %code RHS as the unqualified form defining the
2019 muscle b4_percent_code. Add another RHS for the qualified %code form,
2020 which defines muscles of the form b4_percent_code_QUALIFIER and the
2021 b4_used_percent_code_qualifiers muscle.
2022 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2023 PERCENT_REQUIRES): Remove.
2024 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2025 %code "requires" and %code "provides".
2026 * tests/input.at (Reject bad %code qualifiers): New.
2027
95021767
JD
20282007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2029
2030 Use the new code_props interface for destructors and printers.
2031 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2032 printer_location members, and change the type of the destructor and
2033 printer members to code_props.
2034 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2035 symbol_printer_get, semantic_type_destructor_set,
2036 semantic_type_printer_set, default_tagged_destructor_set,
2037 default_tagless_destructor_set, default_tagged_printer_set,
2038 default_tagless_printer_set): Use code_props in arguments and return
2039 types in place of char const * and location.
2040 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2041 since the locations are now contained in the return of
2042 symbol_destructor_get and symbol_printer_get.
2043 * src/output.c (symbol_destructors_output, symbol_printers_output):
2044 Replace with...
2045 (symbol_code_props_output): ... this to eliminate duplicate code.
2046 (output_skeleton): Update to use symbol_code_props_output.
2047 * src/reader.c (symbol_should_be_used): Update use of
2048 symbol_destructor_get.
2049 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2050 Update uses of the various _destructor_set and _printer_set functions.
2051 * src/symtab.c: (default_tagged_destructor_location,
2052 default_tagless_destructor_location, default_tagged_printer_location,
2053 default_tagless_printer_location): Remove since we...
2054 (default_tagged_destructor, default_tagless_destructor,
2055 default_tagged_printer, default_tagless_printer): ... change the type
2056 of these to code_props.
2057 (symbol_new, semantic_type_new, symbol_destructor_set,
2058 semantic_type_destructor_set, symbol_destructor_get,
2059 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2060 symbol_check_alias_consistency, default_tagged_destructor_set,
2061 default_tagless_destructor_set, default_tagged_printer_set,
2062 default_tagless_printer_set): Update.
2063 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2064 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2065 code_props members.
2066 (symbol_print): Use SYMBOL_CODE_PRINT.
2067
f6857bbf
JD
20682007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2069
2070 Use the new code_props interface for rule actions.
2071 * src/symlist.h (symbol_list): Replace action, action_location, and
2072 used members with a code_props action_props member.
2073 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2074 grammar_midrule_action, grammar_current_rule_merge_set,
2075 grammar_current_rule_symbol_append, packgram): Update.
2076 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2077 * src/scan-code.l (handle_action_dollar): Update.
2078 (translate_rule_action): Remove, no longer used.
2079 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2080
7c0c6181
JD
20812007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2082
2083 Use the new code_props interface in parse-gram.y.
2084 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2085 Update all uses of translate_* functions to use the new code_props
2086 interface and to use gram_scanner_last_string_free and
2087 code_scanner_last_string_free where possible.
2088 (grammar_declaration): symbol_list_destructor_set and
2089 symbol_list_printer_set now perform the translation, so don't do it
2090 here. Use gram_scanner_last_string_free where possible.
2091 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2092 translate_code): Remove, no longer used.
2093 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2094 symbol_list_printer_set): Perform code translation here rather than
2095 depending on the caller to do so.
2096
2097 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2098 * src/scan-gram.h (gram_last_string): Remove declaration.
2099 * src/scan-gram.l (last_string): Declare it static.
2100
28e52c0d
JD
21012007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2102
2103 Encapsulate code properties and related functionality for the various
2104 destructors, printers, and actions into a code_props structure and
2105 interface. This patch merely implements code_props in scan-code.h and
2106 scan-code.l. Future patches will rewrite other modules to use it.
2107 Discussed starting at
2108 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2109 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2110 consistently initialize const structs that have an empty location
2111 field.
2112 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2113 to ensure consistency.
2114 * src/scan-code.h (code_props): New structure.
2115 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2116 function, macro, and const global variable for initializing a
2117 code_props with no code.
2118 (code_props_plain_init, code_props_symbol_action_init,
2119 code_props_rule_action_init, code_props_translate_code): The rest of
2120 the new code_props functional interface. Among other things, the init
2121 functions set the code_props kind field so that
2122 code_props_translate_code will know whether to behave like
2123 translate_symbol_action, translate_rule_action, or translate_code.
2124 These old translate functions must remain until all other modules are
2125 updated to use the new code_props interface.
2126 (code_scanner_last_string_free): New function similar to
2127 gram_scanner_last_string_free.
2128 (code_scanner_free): Add documentation.
2129 * src/scan-code.l: Implement the new interface.
2130 (code_lex): Make it static, add a code_props* argument, and remove the
2131 rule argument.
2132 (last_string): New static global similar to the one in scan-gram.l.
2133 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2134 instead of rule.
2135 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2136 code_props since Bison may one day use this information for destructors
2137 and printers.
2138 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2139 (handle_action_dollar): Use symbol_list_n_get and set used flag
2140 directly since symbol_list_n_used_set is removed.
2141 (translate_action): Add a code_props* argument and remove the rule,
2142 action, and location arguments. Pass the code_props* on to code_lex.
2143 (translate_rule_action, translate_symbol_action, translate_code):
2144 Rewrite as wrappers around the new code_props interface.
2145 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2146 it would eventually need to break the encapsulation of code_props.
2147
96034983
JD
21482007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2149
2150 * etc/.cvsignore: New.
2151
945e396c
JD
21522007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2153
2154 Add maintainer-push-check to run maintainer-check using push parsing in
2155 place of pull parsing where available.
2156 * Makefile.am (maintainer-push-check): New.
2157 * data/bison.m4 (b4_use_push_for_pull_if): New.
2158 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2159 appropriately based on their existing values.
2160 (yypush_parse): Don't print push-parser-specific diagnostics if push
2161 parsing is being used in place of pull parsing.
2162 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2163 push.c.
2164 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2165 variable, and insert b4_use_push_for_pull_flag into muscles.
2166 * tests/Makefile.am (maintainer-push-check): New.
2167
7d596384
JD
21682006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2169
2170 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2171 (whether successful or failed) so that yypush_parse can be invoked
2172 again to start a new parse using the same yypstate.
2173 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2174 check multiple yypull_parse invocations on the same yypstate. For pull
2175 mode, extend to check multiple yyparse invocations.
2176 (Exploding the Stack Size with Alloca): Extend to try with
2177 %push-pull-parser.
2178 (Exploding the Stack Size with Malloc): Likewise.
2179
2180 * tests/calc.at (Simple LALR Calculator): Don't specify
2181 %skeleton "push.c" since %push-pull-parser implies that now.
2182 * tests/headers.at (export YYLTYPE): Don't check for the push
2183 declarations. Otherwise, this test case can't be used to see if push
2184 mode can truly emulate pull mode.
2185 * tests/input.at (Torturing the Scanner): Likewise.
2186 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2187 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2188 AT_YACC_IF, which now includes the case of push mode since %skeleton
2189 need not be used for push mode. This will be more intuitive once
2190 push.c is renamed to yacc.c.
2191
7172e23e
JD
21922006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2193
2194 For push mode, convert yyparse from a macro to a function, invoke yylex
2195 instead of passing a yylexp argument to yypull_parse, and don't
2196 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2197 Discussed starting at
2198 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2199 * data/bison.m4 (b4_pull_if): New.
2200 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2201 * data/push.c: Improve M4 quoting a little.
2202 (b4_generate_macro_args, b4_parenthesize): Remove.
2203 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2204 any time a pull parser is requested.
2205 Don't #define this as a wrapper around yypull_parse. Instead, when
2206 both push and pull are requested, make it a function that does that
2207 same thing.
2208 (yypull_parse): If there's a b4_prefix, #define this to
2209 b4_prefix[pull_parse] when both push and pull are requested.
2210 Don't define this as a function unless both push and pull are
2211 requested.
2212 Remove the yylexp argument and hard-code yylex invocation instead.
2213 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2214 %push-parser.
2215 * src/getargs.c (pull_parser): New global initialized to true.
2216 * getargs.h (pull_parser): extern it.
2217 * src/output.c (prepare): Insert pull_flag muscle.
2218 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2219 (prologue_declaration): Set both push_parser and pull_parser = true for
2220 %push-pull-parser. Set push_parser = true and pull_parser = false for
2221 %push-parser.
2222 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2223 %push-parser since there's no backward-compatibility concern here.
2224 Scan %push-pull-parser.
2225 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2226 instead of %push-parser.
2227 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2228 prototype it in the module that calls yyparse.
2229 * tests/input.at (Torturing the Scanner): Likewise.
2230 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2231
2e7944cb
JD
22322006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2233
2234 Update etc/bench.pl. Optimize push mode a little (the yyn change
2235 deserves most of the credit).
2236 * Makefile.am (SUBDIRS): Add etc subdirectory.
2237 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2238 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2239 yytoken, yyval, and yyloc declarations to...
2240 (yyparse or yypush_parse): ... here to improve performance. For
2241 yypush_parse invocations after the first, be sure to assign yyn its old
2242 value again.
2243 (yypstate_new): Don't bother initializing the yyresult field since the
2244 initial value isn't used.
2245 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2246 remove the #define that, in push mode, set it to yyps->NAME.
2247 * etc/Makefile.am: New.
2248 * etc/bench.pl: Remove and build it instead from...
2249 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2250 "tests/bison" from the build directory by default rather than just
2251 invoking "bison" from $PATH.
2252 (calc_grammar): Update push parser code: don't declare yylval globally,
2253 don't define yyparse_wrapper, and don't #define yyparse.
2254 (bench_grammar): Update to check all working combinations of yacc.c,
2255 push.c, impure, pure, pull, and push.
2256
c3d50342
JD
22572006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2258
2259 For push mode, add pull wrappers around yypush_parse.
2260 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2261 (yypull_parse): New function wrapping yypush_parse.
2262 (yyparse): New #define wrapping yypull_parse.
2263 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2264 is declared.
2265 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2266 prototype yylex in the module that calls yyparse, and don't prototype
2267 yyparse there. Otherwise, the yyparse expansion won't compile.
2268 * tests/input.at (Torturing the Scanner): Likewise.
2269
94ebeba5
JD
22702006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2271
2272 Enable push parsers to operate in impure mode. Thus, %push-parser no
2273 longer implies %pure-parser. The point of this change is to move
2274 towards being able to test the push parser code by running the entire
2275 test suite as if %push-parser had been declared.
2276 * data/push.c (yypush_parse): For impure mode, remove the
2277 yypushed_char, yypushed_val, and yypushed_loc arguments.
2278 Instead, declare these as local variables initialized to the global
2279 yychar, yylval, and yylloc.
2280 For the first yypush_parse invocation only, restore the initial values
2281 of these global variables when it's time to read a token since they
2282 have been overwritten.
2283 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2284 %push-parser.
2285 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2286 %pure-parser along with %push-parser since this test case was designed
2287 for pure push parsers.
2288 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2289 (AT_YACC_OR_PUSH_IF): New.
2290 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2291 add a note that it's still wrong for some cases (as it has been for a
2292 while).
2293 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2294 %push-parser no longer implies %pure-parser.
2295
a0633178
JD
22962006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2297
2298 Remove some unnecessary differences between the pull parser code and
2299 the push parser code. This patch enables yynerrs in push mode.
2300 * data/push.c: Reformat M4 a little.
2301 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2302 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2303 because push mode is on. Instead, if pure mode is on, move yynerrs
2304 to...
2305 (b4_declare_parser_state_variables): ... here.
2306 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2307 to yyps->NAME so it can be used in yypush_parse.
2308 (yypush_parse): Don't omit uses of yynerrs in push mode.
2309
8646b6a3
JD
23102006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2311
2312 Fix bug such that the first pushed token's value and location are
2313 sometimes overwritten (sometimes by %initial-action) before being used.
2314 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2315 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2316 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2317 more closely mimic the pull parser logic.
2318 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2319 time to read a token, which is after any initialization of yylval and
2320 yylloc.
2321 (gottoken): Rename label to...
2322 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2323 user namespace.
2324
9baf4d74
JD
23252006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2326
2327 Rearrange initialization of the parser state variables so that the
2328 skeleton doesn't have to have a copy for pull mode and another for push
2329 mode. This patch also fixes at least a bug such that yylloc was not
2330 initialized (with b4_location_initial_line and
2331 b4_location_initial_column) upon calling yypush_parse. However, that
2332 initialization now overwrites the first token's location;
2333 %initial-action assigning @$ already did the same thing, and both bugs
2334 will be fixed in a later patch.
2335 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2336 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2337 yyss, yyvs, yyls, and yystacksize.
2338 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2339 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2340 yylsp.
2341 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2342 yyps->NAME so it can be used in yypush_parse.
2343 (yyparse or yypush_parse): For yypush_parse, don't print the
2344 "Starting parse" diagnostic for invocations after the first.
2345 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2346 yypush_parse, only do it for the first invocation.
2347 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2348 initialization to occur in yypush_parse but only on the first
2349 invocation.
2350
23522164
JD
23512006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2352
2353 * data/push.c: Add CPP guards around push parser declarations in both
2354 the header and the code file.
2355 In the code file, move the push parser declarations to the same place
2356 they appear in the header file.
2357 Clean up the M4 some, especially the inconsistent underquoting in
2358 some b4_c_function_def and b4_c_function_decl uses.
2359
bb010fe5
JD
23602006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2361
2362 Encapsulate the push parser state variables into an M4 macro so the
2363 push skeleton doesn't have to list them again for pull mode's yyparse.
2364 For push mode, remove yypush_parse's local equivalents of these
2365 variables to eliminate unnecessary copying between the two sets at
2366 run-time. This patch also fixes at least a bug related to multiple
2367 %initial-action invocations in push mode.
2368 * data/push.c (b4_declare_parser_variables): Rename to...
2369 (b4_declare_scanner_communication_variables): ... this for clarity and
2370 update both uses.
2371 (b4_declare_yyparse_variables): Remove and move its contents to the one
2372 spot where it was invoked.
2373 (b4_declare_parser_state_variables): New macro containing the parser
2374 state variables required by push mode.
2375 (struct yypstate): Replace all fields but yynew with
2376 b4_declare_parser_state_variables.
2377 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2378 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2379 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2380 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2381 parser state variable declarations with
2382 b4_declare_parser_state_variables.
2383 Don't initialize parser state variables when calling yypush_parse since
2384 yypstate_new already does that.
2385 Invoke the user's initial action only upon the first yypush_parse
2386 invocation.
2387 Remove all code that copies between the local parser state variables
2388 and the yypstate.
2389
2d212f8c
JD
23902006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2391
2392 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2393 prevent a name collision in a future patch where these names will
2394 sometimes be #define'd.
2395 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2396 since it no longer has the same name as the existing argument.
2397 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2398
e6e704dc
JD
23992006-12-19 Paolo Bonzini <bonzini@gnu.org>
2400 and Joel E. Denny <jdenny@ces.clemson.edu>
2401
2402 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2403 that the argument is case-insensitive, and there's no `=' here.
2404 For the %skeleton entry, mention that %language is better.
2405 (Bison Options): Likewise for --language and --skeleton. Move the
2406 --skeleton entry so that the `Tuning the parser' section is sorted
2407 alphabetically on long options.
2408 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2409 %language directive in detail here; cross-reference the %language
2410 documentation instead.
2411 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2412 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 2413 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
2414 * examples/extexi (normalize): Instead of replacing every %require
2415 argument with the current Bison version, just substitute for
2416 `@value{VERSION}'. This guarantees that we're testing what actually
2417 appears in the documentation.
2418 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2419 rather than `@VERSION@'.
2420
0e021770
PE
24212006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2422
fd575f05
PE
2423 * NEWS: Reword the %language news a bit, and put it earlier.
2424
0e021770
PE
2425 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2426 Rewrite to simplify the logic.
2427 (language_argmatch): Likewise.
fd575f05
PE
2428 (program_name): We now own this var.
2429 * src/getargs.h (struct bison_language): Use char[] rather than
2430 const char *.
0e021770
PE
2431
2432 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2433 Java is supported.
2434 * src/complain.c (program_name): Remove decl; no longer needed.
2435 * src/main.c (program_name): Remove; now belongs to getargs.
2436
24372006-12-18 Paolo Bonzini <bonzini@gnu.org>
2438
2439 * NEWS: Document %language.
2440
2441 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2442
2443 * data/c-skel.m4, data/c++-skel.m4: New files.
2444 * data/glr.c: Complain on push parsers.
2445
2446 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2447 over %skeleton.
148d66d8 2448 (Decl Summary): Document %language and %skeleton.
0e021770
PE
2449 (Command line): Document -L.
2450
2451 * examples/extexi: Rewrite %require directive.
2452 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2453
2454 * src/files.c (compute_exts_from_gc): Look in language structure
2455 for .y extension.
2456 (compute_file_name_parts): Check whether .tab should be added.
2457 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2458 (language, skeleton_arg, language_argmatch): New.
2459 (long_options): Add --language.
2460 (getargs): Use skeleton_arg, add -L/--language.
2461 * src/getargs.h: Include location.h.
2462 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2463 * src/output.c (prepare): Pick default skeleton from struct language.
2464 Don't dispatch C skeletons here.
2465 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2466 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2467 * src/scan-gram.l ("%language"): New rule.
2468
2469 * tests/calc.at: Test %skeleton and %language.
2470 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2471 (AT_GLR_IF): Look for %skeleton "glr.cc".
2472 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2473 (AT_YACC_IF): Reject %language.
2474
5691bf57
PE
24752006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2476
db06f0ce
PE
2477 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2478 since it wasn't used; only the typedef name 'semantic_type' is needed.
2479 Also, omit trailing white space.
2480
5691bf57
PE
2481 * bootstrap: Sync from coreutils.
2482 (gnulib_extra_files): Add build-aux/announce.gen.
2483 (slurp): Adjust .gitignore files like .cvsignore files.
2484 * build-aux/announce-gen: Remove from CVS, since bootstrap
2485 now creates this.
2486
791934e4
JD
24872006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2488
2489 Make %push-parser imply %pure-parser. This fixes several bugs; see
2490 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2491 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2492 pure_parser = true.
2493 * data/push.c: Don't bother testing b4_push_if when deciding whether
2494 to expand b4_declare_parser_variables globally.
2495 (yypush_parse): Likewise in here.
2496
2497 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2498 (yy_reduce_print): Reformat M4 for readability.
2499
ee5abb37
JD
25002006-12-15 Bob Rossi <bob@brasko.net>
2501 and Joel Denny <jdenny@ces.clemson.edu>
2502
2503 * data/push.c (yypstate): Add typedef, and update all uses of
2504 struct yypstate to just yypstate.
2505 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2506
16ca01f9
JD
25072006-12-14 Bob Rossi <bob@brasko.net>
2508
2509 * data/push.c (yypush_parse): Declare prototype regardless of
2510 %locations option.
2511
ab8e7e1a
JD
25122006-12-14 Bob Rossi <bob@brasko.net>
2513
2514 * data/push.c (yyparse): Remove the prototype and the #define when in
2515 push-parser mode.
2516
9bf32be3
JD
25172006-12-13 Bob Rossi <bob@brasko.net>
2518
2519 * data/push.c (yypstate_init): Rename to...
2520 (yypstate_new): ... this and use b4_c_function_def.
2521 (yypstate_delete): New.
2522 (yypush_parse): Change parameters yynval and yynlloc to be const.
2523 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2524 yypstate_delete functions.
2525
f02e2948
JD
25262006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2527
2528 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2529 strange test case titles. Reported by Bob Rossi.
2530
38eb7751
PE
25312006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2532
2533 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2534 of potential ambiguities in GLR grammers.
2535
bd9d212b
JD
25362006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2537
2538 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2539 `bison ', use m4_index instead of m4_substr since chopping up a string
2540 containing M4-special characters causes problems here.
2541
2542 Fix a couple of bugs related to special characters in user-specified
2543 file names, and make it easier for skeletons to compute output file
2544 names with the same file name prefix as Bison-computed output file
2545 names.
2546 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2547 b4_parser_file_name and b4_spec_defines_file instead of
2548 @output_parser_name@ and @output_header_name@, which are now redundant.
2549 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2550 b4_parser_file_name, b4_spec_defines_file, and the new
2551 @basename(FILENAME@) instead of @output_parser_name@ and
2552 @output_header_name@, which inappropriately escaped the file names as
2553 C string literals.
2554 * src/files.c (all_but_ext): Remove static qualifier.
2555 (compute_output_file_names): Move `free (all_but_ext)' to...
2556 (output_file_names_free): ... here since all_but_ext is needed later.
2557 * src/files.h (all_but_ext): Extern.
2558 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2559 exactly what MUSCLE_INSERT_STRING used to do.
2560 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2561 characters are escaped properly.
2562 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2563 all_but_ext.
2564 For pkgdatadir muscle, maintain previous functionality by using
2565 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2566 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2567 digraphs would never be expanded. Hopefully no one has M4-special
2568 characters in his Bison installation path.
2569 * src/scan-skel.l: Don't parse @output_header_name@ and
2570 @output_parser_name@ anymore since they're now redundant.
2571 In @output, use decode_at_digraphs.
2572 Parse a new @basename command that invokes last_component.
2573 (decode_at_digraphs): New.
2574 (BASE_QPUTS): Remove unused.
2575 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2576 (Output file name): New tests.
2577
3f7ca628
JD
25782006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2579
2580 Warn about output files that are generated by the skeletons and that
2581 conflict with other output files.
2582 * data/glr.c: Don't generate the header file here when glr.cc does.
2583 * src/files.c (file_names, file_names_count): New static globals.
2584 (compute_output_file_names): Invoke output_file_name_check for files
2585 not generated by the skeletons and remove existing checks.
2586 (output_file_name_check): New function that warns about conflicting
2587 output file names.
2588 (output_file_names_free): Free file_names.
2589 * src/files.h (output_file_name_check): Declare.
2590 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2591 the skeletons.
2592 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2593 (Conflicting output files): New tests.
2594
178e123e
PE
25952006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2596
2597 * doc/bison.texinfo: Fix a couple of typos.
2598
25992006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
2600
2601 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2602 Rename to...
2603 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2604 update all uses.
2605 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2606 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2607 local pv.
2608 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2609 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2610
ea17f233
JD
26112006-12-07 Bob Rossi <bob@brasko.net>
2612 and Joel Denny <jdenny@ces.clemson.edu>
2613
2614 * data/push.c (yypvarsinit): Change return type from void* to struct
2615 yypvars*. No longer cast to void* on return.
2616 (struct yypvars): Remove yylen since it need not be remembered between
2617 yypushparse invocations.
2618 (yypushparse): Don't copy between yylen and pv->yylen.
2619
55a30bda
JD
26202006-12-05 Bob Rossi <bob@brasko.net>
2621
2622 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2623 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2624 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2625 (struct yypvars): Remove b4_declare_parser_variables.
2626 (yypvarsinit): Remove init code for removed variables.
2627 (global scope): Do not declare b4_declare_parser_variables if
2628 push or pure mode.
2629 (yypushparse): Add b4_declare_parser_variables.
2630 Init new local variables, and remove init code for removed
2631 yypvars variables.
2632 (yyparse): Delete.
2633 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2634 and yyparse for other modes.
2635 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2636 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2637 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2638 (AT_PURE_LEX_IF): True if pure or push parser.
2639
85894313
JD
26402006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2641
2642 Document Yacc prologue alternatives and default %destructor's and
2643 %printer's as experimental. Don't mention Java yet. Discussed at
2644 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2645 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2646 (2.3a): Annotate this entry to say the old forms of these features were
2647 also experimental.
2648 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 2649 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
2650 of Java (we'll want this back eventually).
2651
02975b9a
JD
26522006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2653
2654 Support a file name argument to %defines. Deprecate `=' in
2655 %file-prefix, %name-prefix, and %output. Discussed at
2656 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2657 * NEWS (2.3a+): Mention.
148d66d8 2658 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
2659 form of %defines, and remove `=' from entries for %file-prefix,
2660 %name-prefix, and %output.
2661 * src/parse-gram.y (prologue_declaration): Implement.
2662 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2663 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2664 all but one occurrence of %name-prefix.
2665 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2666 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2667 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2668 occurrence of each of %file-prefix and %output. Add check for %defines
2669 with argument.
2670 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2671 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2672 Remove the `=' from %output.
2673
287b314e
JD
26742006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2675
2676 Don't escape $ in test case titles since Autoconf 2.61 now does that
2677 correctly.
2678 * tests/actions.at (Default %printer and %destructor are not for error
2679 or $undefined): Here.
2680 (Default %printer and %destructor are not for $accept): Here.
2681 * tests/input.at (Invalid $n and @n): Here.
2682
3ebecc24
JD
26832006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2684
2685 Rename <!> to <>. Discussed starting at
2686 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2687 * NEWS (2.3a+): Update.
148d66d8 2688 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
2689 Update.
2690 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2691 * src/scan-gram.l (INITIAL): Implement.
2692 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2693 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2694 comment.
2695 * tests/actions.at (Default tagless %printer and %destructor,
2696 Default tagged and per-type %printer and %destructor,
2697 Default %printer and %destructor are not for error or $undefined,
2698 Default %printer and %destructor are not for $accept,
2699 Default %printer and %destructor for mid-rule values): Update.
2700 * tests/input.at (Default %printer and %destructor redeclared,
2701 Unused values with default %destructor): Update.
2702
26b8a438
JD
27032006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2704
2705 Don't let %prec take a nonterminal.
2706 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2707 token.
2708 * tests/input.at (%prec takes a token): New test checking that %prec
2709 won't take a nonterminal.
2710
07c39ae9
JD
27112006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2712
405d53b7
JD
2713 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2714 it was double-quoted.
07c39ae9
JD
2715 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2716 grammar is maintained with Bison's highest standards.
2717 * src/getargs.c: Fix some typos in Doxygen comments.
2718
580b8926
JD
27192006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2720
2721 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2722 later. Reported by Paul Eggert in
2723 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2724 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2725 * src/scan-code.l (translate_action): Don't bother invoking
2726 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2727 (code_scanner_free): Instead of invoking
2728 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2729 which frees more.
2730 * src/scan-gram.l (gram_scanner_free): Likewise.
2731 * src/scan-skel.l (scan_skel): Likewise.
2732
4502eadc
JD
27332006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2734
2735 * src/files.c (tr): Change return type to void.
2736 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2737 has been called previously for the same key.
2738 (muscle_find): Return storage instead of value so that
2739 --enable-gcc-warnings doesn't produce warnings that the return discards
2740 const. aver that the value and storage are the same since storage
2741 could potentially be NULL when value is not.
2742 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2743 same as 0.
2744
7746c8f6
PE
27452006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2746
2747 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2748 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2749 us a slightly cleaner distribution, and also works.
2750 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2751 gnulib changes.
2752
eb095650
PE
27532006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2754 and Paul Eggert <eggert@cs.ucla.edu>
2755
2756 Don't let Bison leak memory except when it complains.
2757 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2758 (spec_defines_file, dir_prefix): Now char *, not const char *,
2759 since they are freed.
2760 * src/files.c: Likewise.
2761 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2762 Likewise.
2763 (tr): Now operates in-place. All uses changed.
2764 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2765 values.
2766 (compute_file_name_parts, compute_output_file_names): Don't store
2767 read-only data in variables that will be freed.
2768 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2769 src_extension, and header_extension.
2770 (output_file_names_free): New public function to free
2771 spec_verbose_file, spec_graph_file, spec_defines_file,
2772 parser_file_name, and dir_prefix.
2773 * src/getargs.c (getargs): Don't store read-only data in variables that
2774 will be freed.
2775 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2776 (which previously existed but was unused), and quotearg_free.
2777 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2778 * src/muscle_tab.c: Likewise.
2779 (muscle_entry): Make the value char const *,
2780 and add a new storage member that is char * and can be freed.
2781 (muscle_entry_free): New private function.
2782 (muscle_init): Use it instead of free.
2783 (muscle_insert, muscle_grow): Update and use new storage member.
2784 (muscle_code_grow): Free the string passed to muscle_grow
2785 since it's not needed anymore.
2786 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2787 add a new `char *code' member.
2788 ("{...}"): Declare semantic type as code.
2789 * src/scan-code.h (translate_rule_action):
2790 (translate_symbol_action, translate_code, translate_action): Return
2791 `char const *' rather than `char *' since external code should not free
2792 these strings.
2793 * src/scan-code.l: Likewise.
2794 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2795 which is "{...}" in the parser.
2796 * tests/Makefile.am (maintainer-check-valgrind): Set
2797 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2798 Valgrind.
2799 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2800 complain.
2801 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2802 expecting a non-zero exit status sets --leak-check=summary and
2803 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2804 this case, and we don't want to hear about it.
2805
ac564be4
PE
28062006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2807
2808 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2809 instead of from the template, to simplify configuration a bit.
2810 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2811 and m4/wint_t.m4, as they are needed with the latest gnulib.
2812
17bd8a73
JD
28132006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2814
2815 Disable unset/unused mid-rule value warnings by default, and recognize
2816 --warnings=midrule-values to enable them. Discussed starting at
2817 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2818 * NEWS (2.3a+): Mention.
2819 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2820 warnings): Add entry for midrule-values subargument.
2821 * src/reader.c (symbol_should_be_used): Don't return true just because
2822 the value is a set/used mid-rule value unless
2823 --warnings=midrule-values was specified.
2824 * tests/input.at (Unused values, Unused values before symbol
2825 declarations): Run tests with and without --warnings=midrule-values.
2826
2827 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2828 than LIST_FREE directly.
2829
89eb3c76
JD
28302006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2831
2832 Finish implementing --warnings=error, which should not be implied by
2833 --warnings=all (or by its synonyms -W and --warnings without
2834 subarguments).
2835 * src/complain.c (set_warning_issued): New function to report that
2836 warnings are being treated as errors and to record an error if so.
2837 Invoke...
2838 (warn_at, warn): ... here.
2839 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2840 "error - warnings are errors" does not appear above "all - all of the
2841 above".
2842 (getargs): For -W and --warnings without subarguments, don't let
2843 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2844 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2845
ba7560e2
JD
28462006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2847
2848 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2849 empty subargument list. For example: `bison --warnings= parser.y'.
2850
31283fc3
JD
28512006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2852
2853 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2854 the parser header file so that gcc doesn't warn.
2855
12e35840
JD
28562006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2857
2858 Split the default %destructor/%printer into two kinds: <*> and <!>.
2859 Discussed starting at
2860 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2861 * NEWS (2.3a+): Mention.
2862 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2863 previous change today related to mid-rules.
148d66d8 2864 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 2865 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
2866 (TYPE_TAG_ANY): Add as <*>.
2867 (TYPE_TAG_NONE): Add as <!>.
2868 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2869 for <*> and <!>.
2870 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2871 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2872 * src/symlist.c (symbol_list_default_new): Split into tagged and
2873 tagless versions.
2874 (symbol_list_destructor_set, symbol_list_printer_set): Split
2875 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2876 SYMLIST_DEFAULT_TAGLESS.
2877 * src/symlist.h: Update symbol_list_default*_new prototypes.
2878 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2879 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2880 * src/symtab.c (default_destructor, default_destructor_location,
2881 default_printer, default_printer_location): Split each into tagged and
2882 tagless versions.
2883 (symbol_destructor_get, symbol_destructor_location_get,
2884 symbol_printer_get, symbol_printer_location_get): Implement tagged
2885 default and tagless default cases.
2886 (default_destructor_set, default_printer_set): Split each into tagged
2887 and tagless versions.
2888 * src/symtab.h: Update prototypes.
2889 * tests/actions.at (Default %printer and %destructor): Rename to...
2890 (Default tagless %printer and %destructor): ... this, and extend.
2891 (Per-type %printer and %destructor): Rename to...
2892 (Default tagged and per-type %printer and %destructor): ... this, and
2893 extend.
2894 (Default %printer and %destructor for user-defined end token): Extend.
2895 (Default %printer and %destructor are not for error or $undefined):
2896 Update.
2897 (Default %printer and %destructor are not for $accept): Update.
2898 (Default %printer and %destructor for mid-rule values): Extend.
2899 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2900 (Unused values with default %destructor): Extend.
2901
f91b1629
JD
29022006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2903
2904 Don't apply the default %destructor/%printer to an unreferenced midrule
2905 value. Mentioned at
2906 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2907 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2908 like $@n instead of just @n so that the default %destructor/%printer
2909 logic doesn't see them as user-defined symbols.
2910 (symbol_is_dummy): Check for both forms of the name.
2911 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2912 name for which the midrule value is referenced in any action.
2913 * tests/actions.at (Default %printer and %destructor for mid-rule
2914 values): New test.
2915 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2916 for change to dummy symbol names.
2917
519d0004
JD
29182006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2919
2920 Warn about unset midrule $$ if the corresponding $n is used.
2921 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2922 $n usage.
2923 (packgram): Before invoking grammar_rule_check on any rule, make sure
2924 all actions have already been scanned in order to set `used' flags.
2925 Otherwise, checking that a midrule's $$ is set will not always work
2926 properly because the midrule check must forward-reference the midrule's
2927 parent rule.
2928 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2929 warning.
2930
a501eca9
JD
29312006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2932
2933 More improvements to the documentation of the prologue alternatives:
2934 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2935 Bison manual.
2936 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2937 some text to clarify the relative importance of the new directives and
2938 to show how these directives may be viewed as code labels.
2939
2cbe6b7f
JD
29402006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2941
2942 Similar to the recently removed %before-header, add %code-top as the
2943 alternative to the pre-prologue. Mentioned at
2944 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2945 Also, let the prologue alternatives appear in the grammar section.
2946 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2947 (prologue_declaration): Move the existing prologue alternatives to...
2948 (grammar_declaration): ... here and add %code-top.
2949 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2950
2951 Clean up and extend documentation for the prologue alternatives.
2952 * NEWS (2.3a+): Describe prologue alternatives.
2953 * doc/bison.texinfo (Prologue): Move discussion of prologue
2954 alternatives to...
2955 (Prologue Alternatives): ... this new section, and extend it to discuss
2956 all 4 directives in detail.
148d66d8
JD
2957 (Table of Symbols): Clean up discussion of prologue alternatives and
2958 add %code-top.
2cbe6b7f 2959
e557d3ea
JMG
29602006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2961
2962 DJGPP specific issues.
2963
2964 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2965 config.bat accordingly.
2966 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2967 * djgpp/config.site: Likewise.
2968
136a0f76
PB
29692006-10-16 Paolo Bonzini <bonzini@gnu.org>
2970
27bd5d67
PB
2971 Replace %*-header with %provides, %requires, %code. See discussion at
2972 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2973
136a0f76
PB
2974 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2975 (b4_user_start_header): Remove.
2976 * data/glr.c: Use new macros instead of b4_*start_header
2977 and b4_*end_header.
2978 * data/glr.cc: Likewise.
2979 * data/lalr1.cc: Likewise.
2980 * data/push.c: Likewise.
2981 * data/yacc.c: Likewise.
2982
2983 * doc/bison.texinfo: Remove %before-header, rename
2984 %{start,end,after}-header to %requires, %provides, %code.
2985
2986 * src/parse-gram.y: Likewise (also rename token names accordingly).
2987 * src/scan-gram.l: Likewise.
2988 * tests/actions.at: Likewise.
2989
10f429ef
PE
29902006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2991
2992 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2993 Problem reported by Joel E. Denny.
2994
29952006-10-14 Jim Meyering <jim@meyering.net>
2996
2997 (Sync from coreutils.)
2998 Work also when the working directory (with e.g. coreutils sources)
2999 is version controlled with git, rather than CVS.
3000 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3001 rather than CVS.
3002 In messages and comments, say e.g., "checked-out sources",
3003 rather than "CVS sources".
3004 (version_controlled_file): New function. Work for git as well as
3005 for CVS. Don't use grep's -q option.
3006 (slurp): Call it here, in place of CVS-specific code.
3007
c4bd5bf7
JD
30082006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3009
3010 Fix testsuite for ./configure --enable-gcc-warnings:
3011 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3012 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3013 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3014 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3015 * test/regression.at (Diagnostic that expects two alternatives):
3016 Likewise.
3017
46356ea4
PE
30182006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3019
231ed89a
PE
3020 * bootstrap.conf (gnulib_modules): Add config-h.
3021 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3022 worry about HAVE_CONFIG_H.
3023 * lib/abitset.c: Likewise.
3024 * lib/bitset.c: Likewise.
3025 * lib/bitset_stats.c: Likewise.
3026 * lib/bitsetv-print.c: Likewise.
3027 * lib/bitsetv.c: Likewise.
3028 * lib/ebitset.c: Likewise.
3029 * lib/get-errno.c: Likewise.
3030 * lib/lbitset.c: Likewise.
3031 * lib/subpipe.c: Likewise.
3032 * lib/timevar.c: Likewise.
3033 * lib/vbitset.c: Likewise.
3034 * lib/bitset.c: Include "bitset.h" first, to test interface.
3035 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3036 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3037 * lib/bitsetv.c: Include "bitsetv.h" first.
3038 * lib/get-errno.c: Include "get-errno.h" first.
3039 * m4/.cvsignore: Add config-h.m4.
3040 * tests/actions.at (Default %printer and %destructor for ...):
3041 Adjust expected line numbers in output to reflect removal of #if
3042 HAVE_CONFIG_H lines.
3043 * tests/glr-regression.at (Missed %merge type warnings when ...):
3044 Likewise.
3045 * tests/regression.at (Braced code in declaration in rules section):
3046 Likewise.
3047 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3048 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3049 Include <config.h> unconditionally.
3050
46356ea4
PE
3051 * bootstrap: Sync from coreutils, as follows:
3052
3053 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3054
3055 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3056 variable was sometimes used without being initialized. This
3057 messed up the installation of the INSTALL file in some cases.
3058
3059 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3060
3061 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3062 --copy. Inspired by a suggestion from Bruno Haible.
3063
3064 2006-10-03 Jim Meyering <jim@meyering.net>
3065
3066 * bootstrap: Undo last change to this file, since now gnulib-tool
3067 sticks with the automake default in generating dependencies.
3068
dd4bf078
PE
30692006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3070
cf2a5f7c
PE
3071 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3072 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3073
3074 * doc/bison.1: Add copyright notice.
3075
3076 * data/glr.c: Don't include <stdarg.h>; not used.
3077
35fe0834
PE
3078 * NEWS: The -g and --graph options now output graphs in Graphviz
3079 DOT format, not VCG format.
3080 * doc/bison.1: Likewise.
3081 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
3082 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3083 of this change in
3084 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
3085 * TODO: Remove Graphviz entry.
3086 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3087 remove vcg.c, vcg.h, vcg_defaults.h.
3088 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3089 * src/graphviz.c, src/graphviz.h: New files.
3090 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3091 * src/files.h: Make comment more generic.
3092 * src/main.c (main): Likewise.
3093 * src/print_graph.h: Likewise.
3094 * src/getargs.c (usage): Make usage description more generic.
3095 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3096 (static_graph, fgraph): Remove. All uses changed to pass
3097 arguments instead of sharing a static var.
3098 (print_core, print_actions, print_state, print_graph):
3099 Output graphviz format rather than VCG format.
3100 * tests/.cvsignore: Remove *.vcg; add *.dot.
3101 * tests/output.at: Expect *.dot files, not *.vcg files.
3102
dd4bf078
PE
3103 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3104 accommodates the 2006-10-08 change.
3105
efdd7421
PE
31062006-10-11 Bob Rossi <bob@brasko.net>
3107
3108 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3109 (b4_yyssa, b4_yyerror_range): New macros.
3110 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3111 (yypvarsinit): Remove init of removed fields.
3112 (yypushparse): Remove use of removed fields; use new macros instead.
3113
96a1981a
PE
31142006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3115
3116 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3117 in a push parser. Reindent slightly to match yacc.c better.
3118
31192006-10-11 Bob Rossi <bob@brasko.net>
3120
46356ea4
PE
3121 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3122 yymsg_alloc fields.
3123 (yypvarsinit, yypushparse): Remove init of removed fields.
3124 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 3125
c1630a8b
PE
31262006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3127
3128 * THANKS: Add Paolo Bonzini and Bob Rossi.
3129
90b9908d
PB
31302006-10-08 Paolo Bonzini <bonzini@gnu.org>
3131
3132 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3133 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3134 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3135 b4_define_user_cde and uses): Remove.
3136 (b4_comment, b4_prefix, b4_sync_start): New.
3137 * data/bison.m4: New file, with most of the content removed from c.m4.
3138 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3139 * src/output.c (output_skeleton): Pass bison.m4.
3140 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3141 only if specified.
3142
cf806753
PE
31432006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3144
3145 Fix test failure reported by Tom Lane in
3146 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3147 and try to make such failures easier to catch in the future.
3148 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3149 that's now the caller's responsibility.
3150 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3151 Set yychar = YYEOF if it's negative.
3152 * tests/actions.at (yylex): Abort if asked to read past EOF.
3153 * tests/conflicts.at (yylex): Likewise.
3154 * tests/cxx-type.at (yylex): Likewise.
3155 * tests/glr-regression.at (yylex): Likewise.
3156 * tests/input.at (yylex): Likewise.
3157 * tests/regression.at (yylex): Likewise.
3158 * tests/torture.at (yylex): Likewise.
3159
0e2f006a
PE
31602006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3161
3162 Fix problems with translating English-language diagnostics.
3163 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3164 respect to bison-runtime pot generation. The YY_ stuff
3165 wasn't being captured.
3166 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3167 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3168 * runtime-po/POTFILES.in: Add data/push.c.
3169
e3ddc1e3
PE
31702006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3171
3172 Merge bootstrap changes from coreutils.
3173
3174 2006-09-28 Jim Meyering <jim@meyering.net>
3175
3176 Automatically generated dependencies are important even
3177 when all of the sources in a directory come from gnulib.
3178 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3179 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3180
3181 2006-09-23 Jim Meyering <jim@meyering.net>
3182
3183 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3184
3185 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3186
3187 * bootstrap: Add support for --force.
3188 (usage): New function. Describe usage less tersely.
3189 (CVS_only_file): New var.
3190
01e972b3
PE
31912006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3192
3193 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3194 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3195 Adjust white space and comments to match GNU style better.
3196
c63d3e90
PE
31972006-09-20 Bob Rossi <bob@brasko.net>
3198
3199 * data/push.c (yyresult_get): Remove function.
3200 (YYPUSH_MORE): Add #define.
3201 (yypushparse): Modify return value.
3202
e70f46d1
PE
32032006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3204
3205 * stamp-h.in: Remove; no longer needed.
3206 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3207 Remove config.h, config.hin, intl (no longer created).
3208 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3209 stamp-h1.
3210
3211 Sync bootstrap from coreutils, as follows:
3212
3213 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3214
3215 * bootstrap (symlink_to_gnulib): New function.
3216 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3217 to copies-of-gnulib.
3218 (cp_mark_as_generated, slurp, gnulib_files):
3219 Avoid making a copy if it's the same as the old version.
3220 (gnulib_files): Add support for this variable (used by Bison).
3221
a92be413
PE
32222006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3223
3224 * src/getargs.c (usage): Rework to use conventions similar to
3225 coreutils, to make translation a bit easier and the code a bit
3226 smaller. Problem reported by Tim Van Holder.
3227
4f82b42a
PE
32282006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3229
3b2942e6
PE
3230 Use some of gnulib's new modules, taken from coreutils.
3231
3232 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3233 * bootstrap.conf: New file.
3234 (gnulib_modules): Add configmake, inttypes, unistd.
3235 (XGETTEXT_OPTIONS): Add complain, complain_at,
3236 fatal, fatal_at, warn, warn_at, unexpected_end.
3237 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3238 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3239 (gl_EARLY): Add.
3240 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3241 (gl_INIT): Add
3242 (GNULIB_AUTOCONF_SNIPPET): Remove.
3243 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3244 the pickiest.
3245 * lib/.cvsignore: Add inttypes_.h.
3246 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3247 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3248 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3249 no-longer-necessary initializations.
3250 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3251 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3252 use the unistd module.
3253 * src/system.h: Likewise.
3254 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3255 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3256 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3257 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3258 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3259 * src/system.h: Include inttypes.h unconditionally, now that we
3260 use the inttypes module. Don't bother to include stdint.h, since
3261 inttypes.h now does that for us.
3262 (LOCALEDIR): Remove, now that we use the configmake module.
3263 * src/getargs.c: Include configmake.h.
3264 * src/main.c: Likewise.
3265 * src/output.c: Likewise.
3266 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3267 not from $abs_top_builddir, since config.h moved.
3268
3269
4f82b42a
PE
3270 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3271 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3272
3273 * src/parse-gram.y (symbol_declaration): Don't put statements
3274 before declarations; it's not portable to C89.
3275 * src/scan-code.l (handle_action_at): Likewise.
3276
3277 * src/scan-code.l: Always initialize braces_level; the old code
3278 left it uninitialized and therefore had undefined behavior.
3279
3280 Don't attempt to redefine 'assert', since it runs afoul of
3281 systems where standard headers (mistakenly) include <assert.h>.
3282 Instead, define and use our own alternative, called 'aver'.
3283 * src/reader.c: Don't include assert.h, since we no longer
3284 use assert.
3285 * src/scan-code.l: Likewise.
3286 * src/system.h (assert): Remove, replacing with....
3287 (aver): New function, taking a bool arg. All uses changed.
3288 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3289 not merely an integer.
3290
31c10e38
PE
32912006-09-15 Bob Rossi <bob@brasko.net>
3292
3293 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3294 * data/c.m4 (YYPUSH): New.
3295 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3296 * src/getargs.c (push_parser): New var.
3297 * src/getargs.h (push_parser): New declaration.
3298 * src/output.c (prepare): Add macro insertion of `push_flag'.
3299 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3300 (prologue_declaration): Parse %push-parser.
3301 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3302 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3303 list of removed lines from the traces observed.
3304 (AT_CHECK_CALC_LALR): Added push parser tests.
3305
fa7b79c0
PE
33062006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3307
21fe08ca
PE
3308 * NEWS: Version 2.3a.
3309 * configure.ac (AC_INIT): Likewise.
3310
e8ec4d9b
PE
3311 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3312 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3313 due to header ordering dependencies. I don't know why the #define
3314 was there.
3315
fa7b79c0
PE
3316 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3317 runtime cost when YYDEBUG is not defined, and so that some tests
3318 that used to fail now work. Problem and initial suggestion by
3319 Paolo Bonzini.
3320 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3321 * data/glr.cc (b4_parser_class_name):
3322 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3323 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3324 (yydebug_) [YYDEBUG]: New member.
3325 (yycdebug_): Now defined only if YYDEBUG.
3326 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3327 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3328 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3329 if YYYDEBUG.
3330 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3331 Define only if YYDEBUG.
3332 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3333 set_debug_level.
3334 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3335 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3336 AT_CHECK_CALC_GLR_CC that are working now.
3337
4ec13d60
PE
33382006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3339
3340 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3341 We don't need them in glr.cc, and glr.c defines them.
3342 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3343 assumes that defining it to anything is the same as defining
3344 it to 1. Problem reported by Paolo Bonzini.
3345
8e1687ae
PE
33462006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3347
3348 * data/c.m4 (b4_null, b4_case): Define.
3349 * src/output.c (prepare_symbols): Use b4_null.
3350 (user_actions_output): Use b4_case.
3351
3dc5e96b
PE
33522006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3353
aef3da86
PE
3354 * data/glr.c (b4_shared_declarations): Put start-header first,
3355 before any #includes that we generate, so that feature-test
3356 macros work. Problem reported by Michael Deutschmann in
3357 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3358 * data/lalr1.cc: Likewise.
3359 * doc/bison.texinfo (Prologue): Document that feature-test macros
3360 should be defined before any Bison declarations.
3361 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3362 that depend on location.hh after, not before, Bison decls, since
3363 we now include location.hh after the first user prologue.
3364
3dc5e96b
PE
3365 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3366 Sander Brandenburg in
3367 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3368 Also, fix minor white space and comment issues.
aef3da86
PE
3369 (Prologue): Mention that it's better to define feature-test macros
3370 before Bison declarations. Problem reported by Michael Deutschmann.
3371
3372 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3373 by Jim Meyering.
3374 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3375 This adjusts to recent gnulib changes.
3dc5e96b 3376
b2a0b7ca
JD
33772006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3378
3379 Finish implementation of per-type %destructor/%printer. Discussed
3380 starting at
3381 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3382 and
3383 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3384 * NEWS (2.3+): Add a description of this feature to the default
3385 %destructor/%printer description.
3386 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3387 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3388 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3389 list node contains a semantic type.
3390 * src/symtab.c, src/symtab.h: Extend with a table that associates
3391 semantic types with their %destructor's and %printer's.
3392 (semantic_type_from_uniqstr, semantic_type_get,
3393 semantic_type_destructor_set, semantic_type_printer_set): New functions
3394 composing the public interface of that table.
3395 (symbol_destructor_get, symbol_destructor_location_get,
3396 symbol_printer_get, symbol_printer_location_get): If there's no
3397 per-symbol %destructor/%printer, look up the per-type before trying
3398 the default.
3399 * tests/actions.at (Per-type %printer and %destructor): New test case.
3400 * tests/input.at (Default %printer and %destructor redeclared):
3401 Extend to check that multiple occurrences of %symbol-default in a
3402 single %destructor/%printer declaration is an error.
3403 (Per-type %printer and %destructor redeclared, Unused values with
3404 per-type %destructor): New test cases.
3405
3be03b13
JD
34062006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3407
3408 Require default %destructor/%printer to be declared using
3409 %symbol-default instead of an empty symbol list, and start working on
3410 new per-type %destructor/%printer. Discussed at
3411 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3412 * NEWS (2.3+): Add %symbol-default to example.
3413 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 3414 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
3415 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3416 (generic_symlist, generic_symlist_item): New nonterminals for creating
3417 a list in which each item is a symbol, semantic type, or
3418 %symbol-default.
3419 (grammar_declaration): Use generic_symlist in %destructor and %printer
3420 declarations instead of symbols.1 or an empty list.
3421 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3422 for changes to symbol_list.
3423 * src/reader.c: Update for changes to symbol_list.
3424 * src/scan-code.l: Likewise.
3425 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3426 * src/symlist.c, src/symlist.h: Extend such that a list node may
3427 represent a semantic type or a %symbol-default in addition to just an
3428 ordinary symbol. Add switched functions for setting %destructor's and
3429 %printer's.
3430 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3431 %destructor/%printer declarations.
3432
3508ce36
JD
34332006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3434
3435 Whether the default %destructor/%printer applies to a particular symbol
3436 isn't a question of whether the user *declares* that symbol (in %token,
3437 for example). It's a question of whether the user by any means
3438 *defines* the symbol at all (by simply using a char token, for
3439 example). $end is defined by Bison whereas any other token with token
3440 number 0 is defined by the user. The error token is always defined by
3441 Bison regardless of whether the user declares it with %token, but we
3442 may one day let the user define error as a nonterminal instead.
3443 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3444 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3445 the meaning of "user-defined".
3446 * tests/actions.at (Default %printer and %destructor for user-declared
3447 end token): Rename to...
3448 (Default %printer and %destructor for user-defined end token): ...
3449 this.
3450
3451 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3452 computation of whether to apply the default, don't maintain a list of
3453 every Bison-defined symbol. Instead, just check for a first character
3454 of '$', which a user symbol cannot have, and check for the error token.
3455
9350499c
JD
34562006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3457
3458 Don't apply the default %destructor or %printer to the error token,
3459 $undefined, or $accept. This change fits the general rule that the
3460 default %destructor and %printer are only for user-declared symbols,
3461 and it solves several difficulties that are described in the new test
3462 cases listed below.
3463 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3464 * tests/actions.at (Default %printer and %destructor are not for error
3465 or $undefined, Default %printer and %destructor are not for $accept):
3466 New test cases.
3467
4d7370cb
JD
34682006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3469
3470 Allow %start after the first rule.
3471 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3472 when parsing the first rule.
3473 (check_and_convert_grammar): Search for it here after all grammar
3474 declarations have been parsed. Skip midrules, which have dummy LHS
3475 nonterminals.
3476 * src/symtab.c (symbol_is_dummy): New function.
3477 * src/symtab.h (symbol_is_dummy): Declare it.
3478 * tests/input.at (%start after first rule): New test.
3479
6d0ef4ec
JD
34802006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3481
3482 Redo some of the previous commit: add back the ability to use
3483 non-aliased/undeclared string literals since it might be useful to
3484 those declaring %token-table.
3485 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3486 commit: don't worry about complaints from symbols_pack.
3487 * src/symtab.c (symbol_new, symbol_class_set,
3488 symbol_check_alias_consistency): Undo changes in previous commit: count
3489 each string literal as a new symbol and token, assign it a symbol
3490 number, and don't complain about non-aliased string literals.
3491 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3492 and token counts but does still set aliased tokens to the same number,
3493 symbol_pack_processor now leaves empty slots in the symbols array.
3494 Remove those slots.
3495 * tests/regression.at (Undeclared string literal): Remove test case
3496 added in previous commit since non-aliased string literals are allowed
3497 again.
3498 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3499 remove unnecessary string literal declarations.
3500 * tests/sets.at (Firsts): Likewise.
3501
965537bc
JD
35022006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3503
3504 Don't allow an undeclared string literal, but allow a string literal to
3505 be used before its declaration.
3506 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3507 symbols_pack complained.
3508 * src/symtab.c (symbol_new): Don't count a string literal as a new
3509 symbol.
3510 (symbol_class_set): Don't count a string literal as a new token, and
3511 don't assign it a symbol number since symbol_make_alias does that.
3512 (symbol_make_alias): It's not necessary to decrement the symbol and
3513 token counts anymore. Don't assume that an alias declaration occurs
3514 before any uses of the identifier or string, and thus don't assert that
3515 one of them has the highest symbol number so far.
3516 (symbol_check_alias_consistency): Complain if there's a string literal
3517 that wasn't declared as an alias.
3518 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3519 symbol_pack asserts that every token has been assigned a symbol number
3520 although undeclared string literals have not.
3521 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 3522 string literal): New test cases.
965537bc
JD
3523 (Characters Escapes, Web2c Actions): Declare string literals as
3524 aliases.
3525 * tests/sets.at (Firsts): Likewise.
3526
47aee066
JD
35272006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3528
3529 In the grammar scanner, STRING_FINISH unclosed constructs and return
3530 them to the parser in order to improve error messages.
3531 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3532 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3533 * tests/input.at (Unclosed constructs): New test case.
3534 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3535 seen.
3536
3537 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3538 unused global.
3539
1f6b3679
JD
35402006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3541
3542 Handle string aliases for character tokens correctly.
3543 * src/symtab.c (symbol_user_token_number_set): If the token has an
3544 alias, check and set its alias's user token number instead of its own,
3545 which is set to indicate the alias. Previously, every occurrence of
3546 the character token in the grammar overwrote that alias indicator with
3547 the character code.
3548 * tests/input.at (String aliases for character tokens): New test.
3549
219741d8
JD
35502006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3551
3552 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3553
11daa4e7
PE
35542006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3555
3556 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3557 to prevent failures when building on older platforms.
3558 Check for autopoint failure.
3559 Set XGETTEXT_OPTIONS to values that check for C format strings,
3560 so that translators are warned about them (this also helps
3561 prevent core dumps).
3562
3563 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3564 function, since it simplifies our code a bit.
3565
3566 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3567 rather than -W, so we don't get bogus warnings about sign comparisons.
3568 Add -Wpointer-arith, since that warning is useful (it reports code
3569 that does not conform to C89 and that some compilers reject).
3570 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3571 since it's no longer needed.
3572
f9bfc42a
JD
35732006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3574
3575 Clean up scanners a bit.
3576 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3577 definitions so gcc won't warn when obstack_for_string is unused.
3578 * src/scan-code.l: config.h and system.h are already #include'd by
3579 scan-code-c.c, so get rid of them here.
3580 * src/scan-gram.l: Likewise.
3581 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3582 definitions rather than duplicating the rest of it.
3583 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3584
06e8700a
JD
35852006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3586
3587 Suppress signed/unsigned comparison warnings for yycheck.
3588 * data/c.m4 (b4_safest_int_type): New macro.
3589 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3590 a signed int type, cast it to b4_safest_int_type first.
3591 * data/yacc.c: Likewise.
3592 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3593 also overwritten.
3594
9c437126
PE
35952006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3596
3597 * doc/bison.texinfo: Fix some typos.
3598
284d8a13
PE
35992006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3600
3601 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3602 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3603
3604 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3605 the latest gnulib does this a different way.
3606 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3607 translation was patched, so stop omitting it.
3608
ec5479ce
JD
36092006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3610
3611 Enable declaration of default %printer/%destructor. Make the parser
3612 use these for all user-declared grammar symbols for which the user does
3613 not declare a specific %printer/%destructor. Thus, the parser uses it
3614 for token 0 if the user declares it but not if Bison generates it as
3615 $end. Discussed starting at
3616 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3617 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3618 and
3619 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3620 * NEWS (2.3+): Mention.
3621 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3622 declare a %destructor for a mid-rule's semantic value. It's just
3623 impossible to declare one specific to it.
3624 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3625 code. Describe default %destructor form.
3626 * src/parse-gram.y (grammar_declaration): Parse default
3627 %printer/%destructor declarations.
3628 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3629 and symbol_destructor_location_get rather than accessing the destructor
3630 and destructor_location members of struct symbol.
3631 (symbol_printers_output): Likewise but for %printer's.
3632 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3633 again.
3634 * src/symtab.c (default_destructor, default_destructor_location,
3635 default_printer, default_printer_location): New static global
3636 variables to record the default %destructor and %printer.
3637 (symbol_destructor_get, symbol_destructor_location_get,
3638 symbol_printer_get, symbol_printer_location_get): New functions to
3639 compute the appropriate %destructor and %printer for a symbol.
3640 (default_destructor_set, default_printer_set): New functions to set the
3641 default %destructor and %printer.
3642 * src/symtab.h: Prototype all those new functions.
3643 * tests/actions.at (Default %printer and %destructor): New test to
3644 check that the right %printer and %destructor are called, that they're
3645 not called for $end, and that $$ and @$ work correctly.
3646 (Default %printer and %destructor for user-declared end token): New
3647 test to check that the default %printer and %destructor are called for
3648 a user-declared end token.
3649 * tests/input.at (Default %printer and %destructor redeclared, Unused
3650 values with default %destructor): New tests to check related grammar
3651 warnings and errors.
3652
868d2d96
JD
36532006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3654
3655 Clean up handling of %destructor for the end token (token 0).
3656 Discussed starting at
3657 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3658 and
3659 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3660
3661 Make the skeletons consistent in how they pop the end token and invoke
3662 its %destructor.
3663 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3664 state, which has token number 0, since this would invoke the
3665 %destructor for the end token.
3666 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3667 until after shifting the end token, or else it won't be popped.
3668 * data/yacc.c (yyparse): Likewise.
3669
3670 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3671 it's the end token. Upon termination, destroy an unshifted lookahead
3672 even when it's the end token.
3673 * data/lalr1.cc (yy::parser::parse): Likewise.
3674 * data/yacc.c (yyparse): Likewise.
3675
3676 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3677 value warnings for the end token when the user gives the end token a
3678 %destructor.
3679
3680 * tests/actions.at (Printers and Destructors): Test all the above.
3681
62a9592d
PE
36822006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3683
3684 Update to latest gnulib and gettext versions.
3685 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3686 Add fopen-safer.
3687 (gnulib_files): Add m4/warning.m4. Don't worry about files
3688 overwritten by autopoint.
3689 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3690 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3691 rejects them.
3692 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3693 so that we can remove the intl files at a better time.
3694 (intl_files_to_remove): Remove aclocal.m4, since it gets
3695 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3696 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3697 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3698 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3699 Remove datarootdir hack; no longer needed.
3700 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3701 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3702 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3703 strdup.h.
3704 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3705 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3706
10d6970f
PE
37072006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3708
3709 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3710 it with --assume-autoconf='latest-stable'.
3711
50a33993
JD
37122006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3713
3714 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3715 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3716 YYSTYPE' and `{'.
3717 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3718 those from muscle_tab.c since the old ones are misleading.
3719
2ce4ed68
AD
37202006-07-13 Akim Demaille <akim@epita.fr>
3721
3722 Support %define "KEY" {VALUE}.
3723 * src/scan-code.h, src/scan-code.l (translate_action)
3724 (translate_rule_action, translate_symbol_action, translate_code):
3725 Return char *, not const char *.
3726 * src/parse-gram.y (declaration): Rename as...
3727 (prologue_declaration): this.
3728 (string_content): Remove this nonterminal, use STRING.
3729 (braceless, content, content.opt): New nonterminal.
3730 Use them.
3731 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3732 as value.
3733 * src/scan-gram.l (getargs.h): Don't include it.
3734
db7e5eb5
PE
37352006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3736
3737 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3738 rather than a for-loop that declares a local bool variable. This
3739 should work around a compatibility problem with a Cray x1e C++
3740 compiler reported by Hung Nguyen in
3741 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3742 The for-loop was introduced in the 2004-11-17 change but I don't
3743 know why it was needed.
3744
a5d80ba5
AD
37452006-07-12 Akim Demaille <akim@epita.fr>
3746
3747 * data/c.m4: Comment changes.
3748
23eb2a69
AD
37492006-07-10 Akim Demaille <akim@lrde.epita.fr>
3750
3751 * src/complain.c (error_message, ERROR_MESSAGE): New.
3752 To factor...
3753 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3754 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3755
ddc8ede1
PE
37562006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3757
3758 * NEWS: Instead of %union, you can define and use your own union type
3759 YYSTYPE if your grammar contains at least one <type> tag.
3760 Your YYSTYPE need not be a macro; it can be a typedef.
3761 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3762 (Union Decl, Decl Summary): Document this.
3763 * data/glr.c (YYSTYPE): Implement this.
3764 * data/glr.cc (YYSTYPE): Likewise.
3765 * data/lalr1.cc (YYSTYPE): Likewise.
3766 * data/yacc.c (YYSTYPE): Likewise.
3767 * src/output.c (prepare): Output tag_seen_flag.
3768 * src/parse-gram.y (declaration, grammar_declaration):
3769 Use 'union_seen' rather than 'typed' to determine whether
3770 %union has been seen, since grammars can now be typed without
3771 %union.
3772 (symbol_declaration, type.opt, symbol_def):
3773 Keep track of whether a tag has been seen.
3774 * src/reader.c (union_seen, tag_seen): New vars.
3775 (typed): remove.
3776 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3777 * src/scan-code.l (untyped_var_seen): New variable.
3778 (handle_action_dollar): Adjust to above changes.
3779 (handle_action_dollar, handle_action_at):
3780 Improve overflow checking for outlandish numbers.
3781 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3782 avoid new diagnostics generated by above changes.
3783 * tests/regression.at (YYSTYPE typedef): Add test to check
3784 for type tags without %union.
3785
3786 * src/symlist.c (symbol_list_length): Return int, not unsigned
3787 int, since callers expect int. This may need to get revisited
3788 once we have proper integer overflow checking.
3789
3790 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3791 object is now static.
3792
3793 * src/getargs.c (flags_argmatch): Return void, not int,
3794 to pacify ./configure --enable-gcc-warnings.
3795
3796 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3797 since last_string is already defined to FLEX_PREFIX (last_string).
3798
7b42569e
AD
37992006-07-09 Akim Demaille <akim@lrde.epita.fr>
3800
3801 Implement --warnings/-W.
3802 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3803 replaced by...
3804 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3805 Adjust callers.
3806 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3807 (warnings_args, warnings_types): New.
3808 (getargs, short_options, long_options): Accept -W/--warnings.
3809 Sort the options by alphabetical order, upper case letter right
3810 before its lower case.
3811
3b452f4e
JD
38122006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3813
3814 Change %merge result type clash warnings to errors. Discussed at
3815 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3816 * src/reader.c (record_merge_function_type): Use complain_at.
3817 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3818 declared later): Update test case results.
3819
b8a41559
AD
38202006-07-09 Akim Demaille <akim@lrde.epita.fr>
3821
3822 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3823 to be in alphabetical order.
3824 (trace_args): Spelling fixes.
3825
cd9e1ba2
PE
38262006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3827
3828 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3829 so they don't collide with user-defined macros.
3830 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3831 this was never guaranteed, and now that we're using gnulib stdint,
3832 which defines int_fast16_t to long int, the problem is exposed.
3833
cb48f191
PE
38342006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3835
b8445a15
PE
3836 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3837 need the full POSIX semantics (and weren't implementing them
3838 anyway).
3839
cb48f191
PE
3840 Adjust to Autoconf 2.60 and today's gnulib.
3841 * bootstrap (gnulib_modules): Add stdint.
3842 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3843 no longer copies it.
3844 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3845 since stdint needs the former and wcwidth (which is now required
3846 by mbswidth) needs the latter.
3847 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3848 work around a compatibility glitch between gettext 0.14.6 and
3849 Autoconf 2.60.
3850 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3851 Do not check for uintptr_t, since new stdint module does the right
3852 thing.
3853 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3854 Add stdint.h, stdint_.h, wcwidth.h.
3855 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3856 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3857 stdint.m4, wchar_t.m4, wcwidth.m4.
3858 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3859 usual order for ../lib/*.h files.
3860 (file_name_split): Use last_component, not base_name, to adjust
3861 to gnulib changes.
3862 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3863 for ../lib/*.h files.
3864 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3865 Define unconditionally, since we now assume the stdint module.
3866 * src/scan-skel.l: Include <dirname.h>.
3867 (BASE_QPUTS): Use last_component, not base_name.
3868 * src/system.h: Include <unlocked-io.h> in the usual order
3869 for ../lib/*.h files. Include <stdint.h> unconditionally,
3870 since we now use the stdint module.
3871 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3872 HAVE_UINTPTR_T, since we now use the stdint module.
3873 (base_name): Remove decl, since files now include <dirname.h>
3874 to get the decl.
3875
cd48d21d
AD
38762006-07-08 Akim Demaille <akim@lrde.epita.fr>
3877
3878 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3879 New, default to 1.
3880 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3881 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3882 default.
3883 * tests/calc.at: Adjust.
3884
8ec0a172
AD
38852006-07-08 Akim Demaille <akim@lrde.epita.fr>
3886
b8445a15 3887 * data/c.m4 (b4_basename): New.
8ec0a172
AD
3888 (b4_syncline): Also output the location of its invocation (from
3889 the skeleton).
3890 (b4_user_action, b4_define_user_action, b4_user_actions)
3891 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3892 (b4_user_stype): New.
3893 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3894
4a678af8
JD
38952006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3896
3897 In the grammar file, the first column is 1 not 0 on the first line as
3898 on every other line.
3899 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3900 * tests/input.at (Torturing the Scanner): Update output.
3901
3902 * src/scan-gram.l (scanner_cursor): Declare it static.
3903
dd60572a
JD
39042006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3905
3906 In warnings, say "previous declaration" rather than "first
3907 declaration".
3908 * src/symtab.c (redeclaration): Do that here.
3909 * src/reader.c (record_merge_function_type): In the case of a result
3910 type clash, report the previous declaration rather than the very first
3911 one in the grammar file.
3912 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3913 declared later): Add a third declaration to check this behavior.
3914 * tests/input.at (Incompatible Aliases): Update output.
3915
2073e1b6
AD
39162006-06-27 Akim Demaille <akim@epita.fr>
3917
3918 * doc/Doxyfile.in: New.
3919 * doc/Makefile.am: Use it.
3920 * src/lalr.h, src/symtab.h: Initial doxygenation.
3921
8ee5b538
JD
39222006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3923
3924 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
3925 declared after the %merge. This continues the effort of the previous
3926 patch.
8ee5b538
JD
3927 * src/reader.c (get_merge_function): Don't set the merger type yet.
3928 (record_merge_function_type): New function for setting the merger type
3929 and checking for clashes.
3930 (grammar_current_rule_merge_set): Set the location of the %merge for
3931 the current rule.
3932 (packgram): Invoke record_merge_function_type for each rule now that
3933 all symbol type declarations have been parsed.
3934 * src/reader.h (merger_list.type_declaration_location): New member
3935 storing the location of the first %merge from which the type for this
3936 merging function was derived.
3937 * src/symlist.h (symbol_list.merger_declaration_location): New member
3938 storing the location of a rule's %merge, if any.
3939 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3940 declared later): New test to catch the error fixed by the above patch.
3941
ffa4ba3a
JD
39422006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3943
3944 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
3945 declarations appear after the rules. Discussed at
3946 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3947 and
3948 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3949 Don't mistake the type of $$ in a midrule to be that of its parent
3950 rule's $$.
ffa4ba3a
JD
3951 * src/reader.c (grammar_current_rule_end): Don't invoke
3952 grammar_rule_check yet since not all symbol declarations may have been
3953 parsed yet.
3954 (grammar_midrule_action): Likewise.
3955 Don't record whether the midrule's $$ has been used yet since actions
3956 haven't been translated yet.
3957 Record the midrule's parent rule and its RHS index within the parent
3958 rule.
3959 (grammar_current_rule_action_append): Don't translate the action yet
3960 since not all symbol declarations may have been parsed yet and, thus,
3961 warnings about types for $$, $n, @$, and @n can't be reported yet.
3962 (packgram): Translate the action and invoke grammar_rule_check now that
3963 all symbol declarations have been parsed.
3964 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3965 after parsing the entire grammar file, the symbol list here in the case
3966 of a midrule is actually the midrule's empty RHS, so reference its
3967 parent rule's RHS where necessary.
3968 On the other hand, now that you can already know it's a midrule, you
3969 aren't forced to think $$ has the same type as its parent rule's $$.
3970 (handle_action_at): In the case of a midrule, reference the parent rule
3971 where necessary.
3972 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3973 members.
3974 (symbol_list_length): Now that this is invoked after all rules have
3975 been parsed, a NULL symbol (rather than a NULL symbol list node)
3976 terminates a rule. symbol_list_print already does this correctly.
3977 * src/symlist.h (symbol_list.midrule_parent_rule,
3978 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3979 remember their relationships with their parents.
3980 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3981 fixed by the above patch.
3982 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3983 implementing...
3984 (Unused values): ... this old test case and...
3985 (Unused values before symbol declarations): ... this new test case.
3986 This one is the same as `Unused values' except that all symbol
3987 declarations appear after the rules in order to catch the rest of the
3988 errors fixed by the above patch.
3989
e256e17f
JD
39902006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3991
300a1930
JD
3992 More cleanup.
3993 * src/reader.c (current_rule): Declare it static since it's no longer
3994 used outside this file.
3995 (grammar_current_rule_action_append): Remove redundant arguments from
3996 translate_rule_action invocation.
3997 * src/reader.h (current_rule): Remove this unused extern.
3998 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
3999 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 4000
381ecb06
JD
40012006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4002
4003 Clean up yesterday's patch.
4004 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4005 to...
4006 * src/reader.c (grammar_current_rule_action_append): ... here for
4007 consistency with grammar_current_rule_symbol_append.
4008 * tests/regression.at (Braced code in declaration in rules section):
4009 Make yyerror and yylex static as usual.
4010
4210cd0b
JD
40112006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4012
4013 Fix bug that mistakes braced code in a declaration in the rules section
4014 to be a rule action. Mentioned at
4015 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4016 * src/scan-gram.l: Move midrule action detection from the start of the
4017 scanning of any braced code to...
4018 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4019 action. For readability, use $2 and @2 rather than the equivalent
4020 global variables.
4021 * tests/regression.at (Braced code in declaration in rules section):
4022 New test to catch the error fixed by the above patch.
4023
4024 Work on code readability some.
4025 * src/scan-code.l (current_rule): Get rid of this misleading and
4026 redundant declaration: it's actually extern'ed in reader.h.
4027 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4028 translate_action): Add a rule argument and use it instead of the global
4029 current_rule.
4030 (translate_rule_action): This already receives current_rule through an
4031 argument, so pass it on to translate_action instead of assigning
4032 current_rule to current_rule.
4033 (translate_symbol_action, translate_code): Pass rule = NULL to
4034 translate_action.
4035
34f98f46
JD
40362006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4037
4038 Rename %before-definitions to %start-header and %after-definitions to
4039 %end-header. Don't use these declarations to separate pre-prologue
4040 blocks from post-prologue blocks. Add new order-independent
4041 declarations %before-header and %after-header as alternatives to the
4042 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4043 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4044 * NEWS (2.3+): Update for these changes.
4045 * data/glr.c (b4_before_definitions): Update to...
4046 (b4_start_header): ... this.
4047 (b4_after_definitions): Update to...
4048 (b4_end_header): ... this.
4049 * data/glr.cc: Likewise.
4050 * data/lalr1.cc: Likewise.
4051 * data/yacc.c: Likewise.
4052 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4053 prologue blocks with %*-header declarations.
4054 (Calc++ Parser): Likewise.
91661ebb 4055 (Decl Summary): Update names.
148d66d8 4056 (Table of Symbols): Update description.
34f98f46
JD
4057 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4058 (PERCENT_END_HEADER): ... this.
4059 (PERCENT_BEFORE_DEFINITIONS): Update to...
4060 (PERCENT_START_HEADER): ... this.
4061 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4062 (declaration): Update token names and m4 macro names.
4063 When parsing %end-header and %start-header, invoke translate_code
4064 before muscle_code_grow, and no longer set global booleans to remember
4065 whether these declarations have been seen.
4066 Parse new %after-header and %before-header.
4067 * src/reader.c (before_definitions, after_definitions): Remove.
4068 (prologue_augment): Accept a new bool argument to specify whether to
4069 augment the pre-prologue or post-prologue.
4070 * src/reader.h (before_definitions, after_definitions): Remove these
4071 extern's.
4072 (prologue_augment): Add new bool argument.
4073 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4074 (PERCENT_END_HEADER): ... this.
4075 (PERCENT_BEFORE_DEFINITIONS): Update to...
4076 (PERCENT_START_HEADER): ... this.
4077 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4078 * tests/actions.at (Printers and Destructors): Update names.
4079
31b2b07e
JD
40802006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4081
4082 Add comparison operators for C++ location classes. Discussed at
4083 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4084 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4085 declaration indicating whether filename_type has an operator==. If
4086 filename_type is `std::string', it defaults to `1', `0' otherwise.
4087 * data/location.cc: Iff b4_define_location_comparison is `1', add
4088 operator== and operator!= for class position and for class location.
4089
4090 Some minor fixes.
4091 * src/scan-action.l: Remove unused file.
4092 * src/symtab.c (symbol_printer_set): Use printer_location not
4093 destructor_location.
4094 * src/symtab.h (struct symbol): Replace incorrect source comment for
4095 printer members.
4096 * tests/input.at (Incompatible Aliases): Update output with correct
4097 printer location.
4098
9bc0dd67
JD
40992006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4100
4101 Don't put the pre-prologue in the header file. For the yacc.c code
4102 file and the glr.c header and code files, move the pre-prologue before
4103 the token definitions. Add new %before-definitions and
4104 %after-definitions to declare code that will go in both the header file
4105 and code file. Discussed at
4106 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4107 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4108 and
4109 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4110 * NEWS (2.3+): Describe these changes.
4111 * data/glr.c (b4_pre_prologue): Move from within to before...
4112 (b4_shared_declarations): ... this.
4113 Add new b4_before_definitions before b4_token_enums.
4114 Add new b4_after_definitions at the end.
4115 * data/glr.cc (b4_pre_prologue): Replace with...
4116 (b4_before_definitions): ... this in the header file.
4117 (b4_after_definitions): New near the end of the header file.
4118 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4119 code file right before including the header file.
4120 (b4_before_definitions): New in the previous position of
4121 b4_pre_prologue in the header file.
4122 (b4_after_definitions): New near the end of the header file.
4123 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4124 (b4_token_enums_defines): In the code file, move to right before
4125 YYSTYPE for consistency with the header file.
4126 (b4_before_definitions): New right before b4_token_enums_defines in
4127 both the header and code file.
4128 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4129 header and code file.
4130 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4131 of prologues for %union dependencies.
91661ebb
JD
4132 (Decl Summary): In %defines description, mention the effect of
4133 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
4134 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4135 than in the pre-prologue so that make check succeeds.
148d66d8 4136 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
4137 %after-definitions.
4138 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4139 %before-definitions.
4140 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4141 (declaration): Parse those declarations and append to
4142 b4_before_definitions and b4_after_definitions, respectively.
4143 * src/reader.c (before_definitions, after_definitions): New bools to
4144 track whether those declarations have been seen.
4145 (prologue_augment): Add to the post-prologue if %union,
4146 %before-definitions, or %after-definitions has been seen.
4147 * src/reader.h (before_definitions, after_definitions): New extern's.
4148 * src/scan-gram.l: Scan the new declarations.
4149 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4150 prologue block in a %before-definitions or a %after-definitions based
4151 on whether the %union is declared.
4152 * tests/regression.at (Early token definitions with --yacc, Early token
4153 definitions without --yacc): Move tests for token definitions into the
4154 post-prologue since token names are no longer defined in the
4155 pre-prologue.
4156
203b9274
AD
41572006-06-20 Akim Demaille <akim@epita.fr>
4158
4159 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4160 (symbol_get): Use it.
4161 * src/parse-gram.y: Use it.
4162
a7ee59cf
JD
41632006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4164
4165 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4166 build succeeds when configured with --enable-gcc-warnings.
4167
5a2baae7
PE
41682006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4169
33ad1a9c
PE
4170 * src/parse-gram.y (char_name): New function.
4171 (CHAR, STRING, string_content): For %printer, properly escape.
4172 (ID): Prefer fputs to fprintf.
4173 (id): Reindent to be consistent with other rules.
4174 Properly quote char.
4175
5a2baae7
PE
4176 The Translation Project changed its way of publishing translations
4177 to maintainers. I haven't received any responses to my request
4178 for supporting the old way, or for documenting the new way. I
4179 have modified 'bootstrap' to use screen scraping
4180 (in this case, HTML scraping). This is unreliable and inelegant,
4181 but I don't see any better way. Yuck.
4182 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4183 (get_translations): New function, which uses HTML scraping to
4184 deduce locations of latest translations.
4185 Use this function to grab both bison and bison-runtime .po files.
4186 Don't bother priming the pump for the runtime-po domain any more,
4187 as it's now translated better than bison is.
4188
58d7a1a1
AD
41892006-06-19 Akim Demaille <akim@epita.fr>
4190
4191 * src/scan-gram.l: No longer "parse" things after `%union' until
4192 `{'. Rather, return a single "%union" token.
4193 No longer make symbols: return strings, and leave the conversion
4194 to symbols to the parser.
4195 (SC_PRE_CODE, token_type): Remove.
4196 * src/parse-gram.y (%union): New field `character'.
4197 Sort tokens.
4198 (CHAR): New token.
4199 (ID, ID_COLON): Now that the scanner no longer makes them
4200 identifiers, adjust all uses to invoke symbol_get.
4201 (id_colon): New, wraps the conversion from string to symbol.
4202 (%union): Accept a possible union_name.
4203 (symbol): Now can be a char.
4204 * data/c.m4 (b4_union_name): Leave a default value.
4205 * data/glr.c, data/yacc.c: Use it.
4206
b931235e
JD
42072006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4208
4209 For associating token numbers with token names for "yacc.c", don't use
4210 #define statements unless `--yacc' is specified; always use enum
4211 yytokentype. Most important discussions start at:
4212 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4213 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4214 and
4215 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4216 * NEWS (2.3+): Mention.
4217 * data/c.m4 (b4_yacc_if): New.
4218 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4219 token #define's.
4220 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4221 on token name definitions.
4222 * src/getargs.c (usage): Capitalize `Yacc' in English.
4223 * src/output.c (prepare): Define b4_yacc_flag.
4224 * tests/regression.at (Early token definitions): Test that tokens names
4225 are defined before the pre-prologue not just before the post-prologue.
4226 Remove this test case and copy to...
4227 (Early token definitions with --yacc): ... this to test #define's.
4228 (Early token definitions without --yacc): ... and this to test enums.
4229
9e6e7ed2
PE
42302006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4231
4232 * NEWS: Reword the post-2.3 change to not be so optimistic about
4233 removing the old "look-ahead" spelling.
4234 Update previous look-ahead/lookahead change reports.
4235 * REFERENCES: look-ahead -> lookahead (since that's
4236 what he actually wrote).
4237 * doc/refcard.tex: look ahead -> lookahead,
4238 look-ahead -> lookahead
4239
742e4900
JD
42402006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4241
4242 For consistency, use `lookahead' instead of `look-ahead' or
4243 `look_ahead'. Discussed starting at
4244 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4245 and then at
4246 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4247 * NEWS: For the next release, note the change to `--report'.
4248 * TODO, doc/bison.1: Update English.
4249 * doc/bison.texinfo: Update English.
4250 (Understanding Your Parser, Bison Options): Document as
4251 `--report=lookahead' rather than `--report=look-ahead'.
4252 * src/conflicts.c: Update English in comments.
4253 (lookahead_set): Rename from look_ahead_set.
4254 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4255 (resolve_sr_conflict): Rename local look_ahead_tokens to
4256 lookahead_tokens, and update other uses.
4257 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4258 count_rr_conflicts, conflicts_free): Update uses.
4259 * src/getargs.c (report_args): Move "lookahead" before alternate
4260 spellings.
4261 (report_types): Update uses.
4262 (usage): For `--report' usage description, state `lookahead' spelling
4263 rather than `look-ahead'.
4264 * src/getargs.h (report.report_lookahead_tokens): Rename from
4265 report_look_ahead_tokens.
4266 * src/lalr.c: Update English in comments.
4267 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4268 (state_lookahead_tokens_count): Rename from
4269 state_look_ahead_tokens_count.
4270 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4271 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4272 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4273 Update other uses.
4274 Update English in output.
4275 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4276 * src/print.c: Update English in comments.
4277 (lookahead_set): Rename from look_ahead_set.
4278 (print_reduction): Rename argument lookahead_token from
4279 look_ahead_token.
4280 (print_core, state_default_rule, print_reductions, print_results):
4281 Update uses.
4282 * src/print_graph.c: Update English in comments.
4283 (print_core): Update uses.
4284 * src/state.c: Update English in comments.
4285 (reductions_new): Update uses.
4286 (state_rule_lookahead_tokens_print): Rename from
4287 state_rule_look_ahead_tokens_print, and update other uses.
4288 * src/state.h: Update English in comments.
4289 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4290 (state_rule_lookahead_tokens_print): Rename from
4291 state_rule_look_ahead_tokens_print.
4292 * src/tables.c: Update English in comments.
4293 (conflict_row, action_row): Update uses.
4294 * tests/glr-regression.at
4295 (Incorrect lookahead during deterministic GLR,
4296 Incorrect lookahead during nondeterministic GLR): Rename
4297 print_look_ahead to print_lookahead.
4298 * tests/torture.at: Update English in comments.
4299 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4300 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4301 (Many lookahead tokens): Update uses.
4302 * data/glr.c: Update English in comments.
4303 * lalr1.cc: Likewise.
4304 * yacc.c: Likewise.
4305 * src/conflicts.h: Likewise.
4306 * src/lalr.h: Likewise.
4307 * src/main.c: Likewise.
4308 * src/output.c: Likewise.
4309 * src/parse-gram.c: Likewise.
4310 * src/tables.h: Likewise.
4311 * tests/calc.at: Likewise.
4312
3c40d0b5
JD
43132006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4314
4315 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4316
5d278082
PE
43172006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4318
4319 * TODO: Add request from Nelson H. F. Beebe to be able to install
4320 Bison without installing the yacc script.
4321
9e668899
JD
43222006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4323
4324 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4325 and yytext if they're already #define'd.
4326 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4327 * src/scan-code-c.c: ... here.
4328 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4329 <config.h>.
4330
0c8e079f
JD
43312006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4332
4333 Get Bison to build again when configured with --enable-gcc-warnings.
4334 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4335 missing #include's.
4336 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4337 loc argument as it shadows a global.
4338 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4339 invocation.
4340
4341 * src/.cvsignore: Add scan-code.c.
4342
2346344a
AD
43432006-06-07 Akim Demaille <akim@epita.fr>
4344
4345 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4346 to...
4347 * src/scan-code.l: here.
4348 * tests/input.at (Torturing the Scanner): Fix another location
4349 error.
4350
4862bdfd
AD
43512006-06-07 Akim Demaille <akim@epita.fr>
4352
4353 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4354
e9071366
AD
43552006-06-06 Akim Demaille <akim@epita.fr>
4356
4357 Extract the parsing of user actions from the grammar scanner.
4358 As a consequence, the relation between the grammar scanner and
4359 parser is much simpler. We can also split "composite tokens" back
4360 into simple tokens.
4361 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4362 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4363 rename as...
4364 * src/location.h, src/location.c (add_column_width)
4365 (location_compute): these.
4366 Fix the column count: the initial column is 0.
4367 (location_print): Be robust to ending column being 0.
4368 * src/location.h (boundary_set): New.
4369 * src/main.c: Adjust to scanner_free being renamed as
4370 gram_scanner_free.
4371 * src/output.c: Include scan-code.h.
4372 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4373 Use boundary_set.
4374 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4375 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4376 which is now, again, a separate token.
4377 Adjust all dependencies.
4378 Whereever actions with $ and @ are used, use translate_code.
4379 (action): Remove this nonterminal which is now useless.
4380 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4381 (grammar_current_rule_action_append): Use translate_code.
4382 (packgram): Bound check ruleno, itemno, and rule_length.
4383 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4384 (last_string, last_braced_code_loc, max_left_semantic_context)
4385 (scanner_initialize, scanner_free, scanner_last_string_free)
4386 (gram_out, gram_lineno, YY_DECL_): Move to...
4387 * src/scan-gram.h: this new file.
4388 (YY_DECL): Rename as...
4389 (GRAM_DECL): this.
4390 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4391 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4392 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4393 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4394 Move these declarations, and...
4395 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4396 these to...
4397 * src/flex-scanner.h: this new file.
4398 * src/scan-gram.l (rule_length, rule_length_overflow)
4399 (increment_rule_length): Remove.
4400 (last_braced_code_loc): Rename as...
4401 (gram_last_braced_code_loc): this.
4402 Adjust to the changes of the parser.
4403 Move all the handling of $ and @ into...
4404 * src/scan-code.l: here.
4405 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4406 (handle_action_dollar, handle_action_at): Move to...
4407 * src/scan-code.l: here.
4408 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4409 scan-code.h, scan-code-c.c, scan-gram.h.
4410 (EXTRA_bison_SOURCES): Add scan-code.l.
4411 (BUILT_SOURCES): Add scan-code.c.
4412 (yacc): Be robust to white spaces.
4413
4414 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4415 * tests/regression.at: Adjust the column numbers.
4416 * tests/regression.at: Adjust the error message.
7891a7c4 4417
184e42f0
JD
44182006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4419
4420 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4421 Use Akim's wording from
4422 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4423
7891a7c4
JD
44242006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4425
4426 Between Bison releases, manually append `+' to the previous Bison
4427 release number, and use that as a signal to automatically print the
4428 ChangeLog's CVS Id keyword from --version. Discussed starting at
4429 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4430 * ChangeLog: Add Id header.
4431 * configure.ac (AC_INIT): Append `+' to `2.3'.
4432 * src/.cvsignore: Add revision.c.
4433 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4434 (BUILT_SOURCES): Add revision.c.
4435 (revision.c): New target rule. This file defines a new global variable
4436 named revision. It initializes it with either the Id from ChangeLog
4437 or, if VERSION doesn't contain `+', with the empty string.
4438 * src/getargs.c (version): Print the value of revision.
4439 * src/revision.h: Extern revision.
4440
4ad3ed84
PE
44412006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4442
4443 * NEWS: Version 2.3.
4444 * configure.ac (AC_INIT): Likewise.
4445
02103984
PE
44462006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4447
4448 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4449 with no arguments, not as an object-like macro. This is for
4450 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4451 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4452 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4453 Document this.
4454
2c08afa5
JD
44552006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4456
4457 * src/getargs.c (usage): Back out yesterday's modification of the
4458 --help output so that we don't have to wait for translation before
4459 releasing 2.3.
4460
6077da58
PE
44612006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4462
4463 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4464 Problem reported by Akim Demaille.
4465
2a26b6c2
JD
44662006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4467
4468 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4469
aefef0d6
PE
44702006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4471
4472 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4473 generated source code. Problem reported by Frans Englich in
4474 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4475
fcd8e201
PE
44762006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4477
4478 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4479 shell, not within 'make', so that 'make' by an ordinary builder
4480 (using GNU make) does not worry about configuring gzip. This also
4481 works around a bug reported independently by Keith Thompson and by
4482 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4483 stderr rather than stdout, messing up the build logs.
4484
7b5cdcbd
JD
44852006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4486
4487 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4488 to make sure that YYID will never be unused. This fixes a 'make
4489 maintainer-check' failure caused by the recent changes to the 'Trivial
4490 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4491 not used.
4492 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4493
5ad0a449
JD
44942006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4495
4496 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4497 state before an empty RHS is always resolved here. Only the location
4498 of that state is guaranteed to be resolved, and that's enough. This
4499 fixes the remaining bug reported by Derek M. Jones in
4500 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4501 * tests/glr-regression.at (Uninitialized location when reporting
4502 ambiguity): Test the above case.
4503 Also, the embedded comments in this test case claim it checks the case
4504 of an empty RHS that has inherited the initial location. However, the
4505 corresponding LHS was already resolved, so yyresolveLocations didn't
4506 actually have reason to modify it. Fix this by forcing
4507 nondeterministic operation at the beginning of the parse.
4508
50cce58e
PE
45092006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4510
4511 * data/c.m4 (b4_yy_symbol_print_generate):
4512 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4513 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4514 of the bugs reported today by Derek M Jones in
4515 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4516 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4517 defined to be a type name without parens or brackets.
4518 (Location Type): Similarly for YYLTYPE.
4519 * tests/regression.at (Trivial grammars): Put in a test for this
4520 bug that will be caught by 'make maintainer-check' (though not,
4521 alas, by 'make check' unless your compiler is picky).
4522
ab8d9dc5
PE
45232006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4524
0d2c8934 4525 * NEWS: Version 2.2.
ab8d9dc5
PE
4526 * configure.ac (AC_INIT): Likewise.
4527
9138c575
JD
45282006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4529
4530 * data/glr.c (yyreportTree): Make room in yystates for the state
4531 preceding the RHS. This fixes the segmentation fault reported by Derek
4532 M. Jones in
4533 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4534 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4535 to the user. Reported for yyreportTree by Derek M. Jones later in the
4536 same thread.
4537 * THANKS: Add Derek M. Jones.
4538 Update my email address.
4539 Fix typo in Steve Murphy's name.
4540
276f48df
PE
45412006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4542
d6645148
PE
4543 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4544 checking against YYLAST that caused the parser to miss a potential
4545 alternative in its diagnostic.
4546 Problem reported by Maria Jose Moron Fernandez in
4547 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4548 * data/lalr1.cc (yysyntax_error_): Likewise.
4549 * data/yacc.c (yysyntax_error): Likewise.
4550 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4551 tokens, in case we run into an older C compiler.
4552 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4553 Use them to check for the off-by-one error fixed above.
4554
276f48df
PE
4555 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4556 YYSIZE_T, not size_t.
4557 * tests/regression.at (Trivial grammars): New test, to catch
4558 the error fixed by the above patch.
4559
cd8b5791
AD
45602006-05-14 Akim Demaille <akim@lrde.epita.fr>
4561
4562 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4563 scheme.
4564 Reported by Steve Murphy.
4565
34376418
AD
45662006-05-14 Akim Demaille <akim@lrde.epita.fr>
4567
4568 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4569 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4570
327afc7c
AD
45712006-05-14 Akim Demaille <akim@lrde.epita.fr>
4572
4573 Implement --trace=m4.
4574 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4575 * src/output.c (output_skeleton): When set, pass -dV to m4.
4576
4577 Factor the handling of flags in m4.
4578 * src/output.c (prepare): Rename the muscle names debug, defines,
4579 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4580 * data/c.m4: Adjust.
4581 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4582 Use b4_define_flag_if to define other b4_FLAG_if macros.
4583 (b4_location_if): As a consequence, rename as...
4584 (b4_locations_if): this, for consistency.
4585 Adjust all the skeletons.
4586
ba9ecd19
AD
45872006-05-14 Akim Demaille <akim@lrde.epita.fr>
4588
4589 * etc/bench.pm: Shorten bench names.
4590
4e83ea15
AD
45912006-05-14 Akim Demaille <akim@lrde.epita.fr>
4592
4593 * src/output.h, src/output.c (error_verbose): Move to...
4594 * src/getargs.h, src/getargs.c: here.
4595 Sort the flags.
4596 Adjust dependencies.
4597
6e93d810
PE
45982006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4599
4600 * data/c.m4 (b4_copyright): Put the special exception for Bison
4601 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
4602 uses changed. Suggested by Akim Demaille. Also, wrap the
4603 copyright notice, in case it is longer than 80 columns. Replace
4604 comma by newline after title.
6e93d810 4605
eaea13f5
PE
46062006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4607
4608 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4609 incompatibility, not a bug. Mention that it wasn't fixed as of
4610 flex 2.5.33.
4611
3cf084ec
AD
46122006-05-11 Akim Demaille <akim@lrde.epita.fr>
4613
4614 * examples/extexi: Enforce the precedence of concatenation over
4615 >>.
0a9f1c7d 4616 Reported by Tommy Nordgren.
3cf084ec 4617
32c96bd7
AD
46182006-05-11 Akim Demaille <akim@lrde.epita.fr>
4619
4620 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4621 with the member "token".
f94705b2 4622 Reported by Martin Nylin.
32c96bd7 4623
eaea13f5
PE
46242006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4625
4626 * data/glr.c: Switch to Bison 2.2 special-exception language in
4627 the copyright notice. Use more-regular format for titles and
4628 copyright notices.
4629 * data/glr.cc: Likewise.
4630 * data/location.cc: Likewise.
4631 * data/yacc.cc: Likewise.
4632 * doc/bison.texinfo (Conditions): Document this.
4633 * NEWS: likewise. Upgrade version to 2.2.
4634
6e2d1146
AD
46352006-04-27 Akim Demaille <akim@lrde.epita.fr>
4636
4637 * data/glr.cc: Remove dead code.
4638
47671055
PE
46392006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4640
4641 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4642 that variable and the line breaks the bootstrap. Problem reported
4643 by Juan M. Guerrero.
4644
ed2e6384
AD
46452006-04-24 Akim Demaille <akim@lrde.epita.fr>
4646
4647 * doc/bison.texinfo (Multiple start-symbols): New.
4648
3cedc2dc
AD
46492006-04-24 Akim Demaille <akim@lrde.epita.fr>
4650
4651 * etc/README, etc/bench.pl: New.
4652
b2ddc3f3
AD
46532006-04-03 Akim Demaille <akim@lrde.epita.fr>
4654
4655 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4656 rule.
4657 Reported by Mickael Labau.
4658 * tests/input.at (Torturing the Scanner): Test it.
4659
91e3ac9a
PE
46602006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4661
4662 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4663 Problem reported by Bob Rossi.
4664
46652006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4666
4667 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4668 and didn't really work.
4669 For the index, use @ifnotinfo, not @iftex.
4670 Minor cleanups of spacing and terminology.
4671
5cf61e93
AD
46722006-03-12 Akim Demaille <akim@lrde.epita.fr>
4673
4674 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4675 of AT_NAME_PREFIX when %name-prefix is not used.
4676
aa08666d
AD
46772006-03-12 Akim Demaille <akim@lrde.epita.fr>
4678
4679 Apply --prefix to C++ skeletons too: they change the namespace.
4680 The test suite already exercize these cases.
4681 * data/c++.m4 (b4_namespace): New.
4682 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4683 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4684 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4685 * doc/bison.texinfo: Document it.
4686 (Option Cross Key): Use @multitable in all formats. It looks
4687 nicer, even in TeX outputs.
4688 (Rules): Use the same code whatever the output type is.
4689 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4690 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4691 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 4692
45567173
AD
46932006-03-10 Akim Demaille <akim@lrde.epita.fr>
4694
4695 * TODO: Remove dead items.
4696
e9d8f881 46972006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
4698
4699 * doc/FAQ: Remove, merged into...
4700 * doc/bison.texinfo (FAQ): this.
4701 * doc/Makefile.am (EXTRA_DIST): Adjust.
4702
c095d689
AD
47032006-03-10 Akim Demaille <akim@lrde.epita.fr>
4704
4705 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4706 even if empty.
4707 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4708 * doc/bison.texinfo (Calc++ Scanner): Use it.
4709
6e0f8287
PE
47102006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4711
4712 Fix two nits reported by twlevo, plus one more that I discovered.
4713
4714 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4715 this is the usual Bison style.
4716 * src/location.h (location_print): Likewise.
4717
4718 * src/reader.h (token_name): Likewise.
4719
d6b771c3
PE
47202006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4721
4722 Fix some nits reported by twlevo.
4723 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4724 and "POSIX". Use more-modern syntax for URLs. Mention C++
4725 and ask for Java. Don't hardwire OS version numbers. Add
4726 copyright notice.
4727 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4728 * src/conflicts.c (solved_conflicts_obstack): Now static.
4729
1e137b71
JD
47302006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4731
4732 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4733 page. Say "you can use it" not "you may use it" as on the web page;
4734 we're describing capabilities not granting permission.
4735
73f2e47e
PE
47362006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4737
6d05403d
PE
4738 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4739 shadowing warnings. Use usual patter for iterating through RHS.
4740 * tests/glr-regression.at
4741 (Uninitialized location when reporting ambiguity):
4742 Modify yylex so that it uses its argument, rather than trying
4743 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4744 const char -> char const.
4745
73f2e47e
PE
4746 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4747 Don't use tabs inside commands; it messes up 'ps'.
4748 Problem reported by twlevo.
4749
8710fc41
JD
47502006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4751
4752 * tests/glr-regression.at (Uninitialized location when reporting
4753 ambiguity): New test case.
4754 * data/glr.c (yyresolveLocations): New function, which uses
4755 YYLLOC_DEFAULT.
4756 (yyresolveValue): Invoke yyresolveLocations before reporting an
4757 ambiguity.
4758 * doc/bison.texinfo (Default Action for Locations): Note
4759 YYLLOC_DEFAULT's usage for ambiguity locations.
4760 (GLR Semantic Actions): Cross-reference those notes.
4761
ae952af2
JD
47622006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4763
4764 * tests/glr-regression.at (Leaked semantic values when reporting
4765 ambiguity): Remove unnecessary union and type declarations.
4766 (Leaked lookahead after nondeterministic parse syntax error): New test
4767 case.
4768 * data/glr.c (yyparse): Check for zero stacks remaining before
4769 attempting to shift the lookahead so that you don't lose it.
4770
35ee866a
JD
47712006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4772
4773 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4774 * tests/glr-regression.at (Leaked semantic values when reporting
4775 ambiguity): New test case.
4776 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4777 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4778 now unnecessary yystackp parameter.
4779 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4780 destructors can be called.
4781
4782 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4783 in existing testcases.
4784
520181ab
JD
47852006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4786
4787 Don't leak semantic values for parent RHS when a user action cuts the
4788 parser, and clean up related code a bit.
4789 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
4790 cuts parse): Rename to...
4791 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
4792 for leaked parent RHS values.
4793 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4794 between an unresolved state (non-empty chain of semantic options) and
4795 an incomplete one (signaled by an empty chain).
ae952af2 4796 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
4797 successfully or unsuccessfully resolved yyGLRState to...
4798 (yyresolveValue): ... here so that yyresolveValue always leaves a
4799 yyGLRState with consistent data and thus is easier to understand.
4800 Remove the yyvalp and yylocp parameters since they are always just
4801 taken from the yys parameter. When reporting a discarded merged value
4802 in debugging output, note that it is incompletely merged. Document the
4803 interface.
4804 (yyresolveAction): If resolving any of the RHS states fails, destroy
4805 them all rather than leaking them. Thus, as long as user actions are
4806 written to clean up the RHS correctly, yyresolveAction always cleans up
4807 the RHS of a semantic option. Document the interface.
4808
18d9185c
PE
48092006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4810
4811 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4812 led to a segmentation fault in GNU Pascal. Problem reported
4813 by Waldek Hebisch.
4814
841a7737
JD
48152006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4816
4817 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4818 mid-rule action inside a nonterminal symbol in order to declare a
4819 destructor for its semantic value.
4820
fc3f467f
PE
48212006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4822
4823 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4824 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4825 __cplusplus && ! defined _STDLIB_H && !
4826 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4827 defined free))]: Include <stdlib.h> rather than rolling our own
4828 declarations of malloc and free, to avoid problems with
4829 incompatible declarations (using 'throw') C++'s stdlib.h. This
4830 should fix Debian bug 340012
4831 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4832 reported by Guillaume Melquiond.
4833
a3af26dd
PE
48342006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4835
4d7bc38c
PE
4836 * NEWS: Clarify symbols versus types in unused-value warnings.
4837
a3af26dd
PE
4838 * configure.ac (AC_INIT): Bump version number.
4839
4e26c69e
PE
48402006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4841
4842 * NEWS: Version 2.1a.
4843 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4844 since C99 requires this.
4845
498e897c
PE
48462006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4847
4848 * m4/c-working.m4: New file.
4849 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4850
57bb17ca
PE
48512006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4852
4853 * Makefile.maint: Merge from coreutils.
4854
0be105dc
PE
48552006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4856
4857 More portability fixes for problems summarized by Nelson H. F. Beebe.
4858
4859 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4860 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4861 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4862 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4863 messes up because C++ code is compiled in 32-bit mode but linked
4864 in 64-bit mode.
4865
6fc0c024
PE
48662006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4867
4868 More portability fixes for problems summarized by Nelson H. F. Beebe.
4869
7870f699
PE
4870 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4871 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4872
6fc0c024
PE
4873 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4874 nodist_PROGRAMS, since we don't need to actually compile the
4875 example if we're just doing a plain 'make'. This avoids bothering
4876 the installer unnecessarily about problems due to weird C++
4877 compilers.
4878
fe6c2fde
PE
48792006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4880
4881 More portability fixes for problems summarized by Nelson H. F. Beebe.
4882
4883 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4884 than #include "...", and compile with -I'.'. The old method was
4885 not portable, according to Posix and the C standard, and it does
4886 not work with Sun C 5.7, where previous #line directives affect
4887 the working directory used in later #include "..." directives.
4888
927b425b
JMG
48892006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4890
4891 Various DJGGP specific issues in /djgpp
4892
d9735e9e
PE
48932006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4894
4895 More portability fixes for problems summarized by Nelson H. F. Beebe.
4896
4897 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4898 '#include <map>' works and that you can apply ++ to iterators.
4899
5a6755af
PE
49002006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4901
67a0dc4f
PE
4902 Work around portability problems summarized by Nelson H. F. Beebe in
4903 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4904
8c86f0ef
PE
4905 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4906 that '#include <string>' works.
4907
de35dd59
PE
4908 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4909 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4910 "warning: sorry: semantics of inline function static data `const
4911 unsigned char translate_table[262]' are wrong (you'll wind up with
4912 multiple copies)".
4913
67a0dc4f
PE
4914 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4915 or, xor to not_, and_, or_, and xor_, respectively. This works
4916 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4917 random system header somewhere that includes the equivalent of
4918 <iso646.h>.
4919
5a6755af
PE
4920 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4921 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 4922 Suite Version 2.0.
5a6755af 4923
3f001415
JD
49242006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4925
4926 During deterministic GLR operation, user actions should be able to
4927 influence the parse by changing yychar. To make this easier to fix and
4928 to make glr.c easier to evolve in general, don't maintain yytoken in
4929 parallel with yychar; just compute yytoken when needed.
4930 * tests/glr-regression.at (Incorrect lookahead during deterministic
4931 GLR): Check that setting yychar in a user action has the intended
4932 effect.
4933 * data/glr.c (yyGLRStack): Remove yytokenp member.
4934 (yyclearin): Don't set *yytokenp.
4935 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4936 yychar rather than *yytokenp to determine the current lookahead.
4937 Compute yytoken locally when needed.
4938 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4939 point to.
4940
4941 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4942 after `--report' documentation.
4943
e2a8c0f5
PE
49442006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4945
4946 * src/parse-gram.y (grammar_declaration): Location of printer
4947 symbol is @1, not list->location. Bug reported by twlevo.
4948 * tests/input.at (Incompatible Aliases): Adjust to above change.
4949
6b702268
PE
49502006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4951
27622431
PE
4952 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4953 all the test at once. This makes the output easier to read in the
4954 normal case.
4955
6b702268
PE
4956 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4957 got from <http://bro-ids.org/download.html>. The bug is that
4958 when two actions appeared in succession, the second one was
4959 scanned before the first one was added to the grammar rule
4960 as a midrule action. Bison then output the incorrect warning
4961 "parse.y:905.17-906.36: warning: unused value: $3".
4962 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4963 associated with a value.
4964 (rhs): Don't invoke grammar_current_rule_action_append.
4965 (action): Invoke it here instead.
4966 * src/reader.c (grammar_midrule_action): Now extern.
4967 (grammar_current_rule_action_append): Don't invoke
4968 grammar_midrule_action; that is now the scanner's job.
4969 * src/reader.h (last_string, last_braced_code_loc):
4970 (grammar_midrule_action): New decls.
4971 * src/scan-gram.l (last_string): Now extern, sigh.
4972 (last_braced_code_loc): New extern variable.
4973 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4974 rule already has an action.
4975 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4976 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4977 Add some tests to check that the above changes fixed the bug.
4978
d40ba6c2
PE
49792006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4980
4981 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4982 All used changed. Check whether the symbol has a destructor,
4983 not whether it is typed.
4984 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4985 that the values are still reported as unused. All line numbers
4986 adjusted.
4987
401aace6
PE
49882006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4989
4990 Work around a bug in bro 0.8, which underparenthesizes its
4991 definition of YYLLOC_DEFAULT.
4992 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4993 their arguments.
4994 * data/lalr1.cc: Likewise.
4995 * data/yacc.cc: Likewise.
4996
06f01bc4
PE
49972006-01-22 Paul Eggert <eggert@cs.ucla.edu>
4998
401aace6
PE
4999 Work around a bug in Pike 7.0, and give the Pike folks a
5000 better way to override the usual int widths.
5001 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5002 user can override the types.
5003 (short): #undef, to work around a bug in Pike 7.0.
5004 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5005 (union yyalloc.yyss): Use yytype_int16 rather than short.
5006 All uses changed.
5007 (yysigned_char): Remove.
5008 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5009 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5010 * tests/regression.at (Web2c Actions): Adjust to above changes.
5011
5012 * src/reader.c (check_and_convert_grammar): New function.
5013 (reader): Close the input file even if something went wrong during
5014 parsing. Minor file descriptor leak reported by twlevo.
5015
06f01bc4
PE
5016 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5017 to pacify gcc -Wswitch-default.
5018 * src/scan-gram.l (adjust_location): Use a default: break; case
5019 to pacify gcc -Wswitch-default.
5020 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5021 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5022 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5023 Move these decls to scan-skel.l, since they don't need to be
5024 visible elsewhere.
5025 * src/scan-skel.l: Accept the above decls.
5026 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5027 is used.
5028
02650b7f
PE
50292006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5030
5031 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5032 since we don't want to insist on a version number at the start
5033 of the changelog every time.
5034 * Makefile.maint: Sync from coreutils a bit better.
5035 (sc_trailing_blank): Renamed from sc_trailing_space.
5036 All uses changed.
5037 (sc_no_if_have_config_h, sc_require_config_h):
5038 (sc_prohibit_assert_without_use): New rules.
5039 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5040 (sc_dd_max_sym_length): Fix leading spaces in rule.
5041 (sc_system_h_headers): Prefix with @.
5042 (sc_useless_cpp_parens, m4-check): Output line numbers.
5043 (changelog-check): Allow version only in head.
5044 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5045 satisfy new Makefile.maint rule.
5046 * data/glr.c: Likewise.
5047 * data/glr.cc: Likewise.
5048 * data/lalr1.cc: Likewise.
5049 * data/yacc.c: Likewise.
5050 * lib/ebitsetv.c: Likewise.
5051 * lib/lbitset.c: Likewise.
5052 * lib/subpipe.c: Likewise.
5053 * lib/timevar.c: Likewise.
5054 * src/system.h: Likewise.
5055 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5056 * djgpp/Makefile.maint: Add copyright notice.
5057 * djgpp/README.in: Likewise.
5058 * djgpp/config.bat: Likewise.
5059 * djgpp/config.site: Likewise.
5060 * djgpp/config_h.sed: Likewise.
5061 * djgpp/djunpack.bat: Likewise.
5062 * djgpp/config.sed: Fix copyright notice to match standard format.
5063 * djgpp/subpipe.h: Likewise.
5064 * lib/bitsetv-print.c: Likewise.
5065 * lib/bitsetv.c: Likewise.
5066 * lib/subpipe.h: Likewise.
5067 * lib/timevar.c: Likewise.
5068 * lib/timevar.h: Likewise.
5069 * djgpp/subpipe.c: Use standard recipe for config.h.
5070 * lib/abitset.c: Likewise.
5071 * lib/bitset.c: Likewise.
5072 * lib/bitset_stats.c: Likewise.
5073 * lib/bitsetv-print.c: Likewise.
5074 * lib/bitsetv.c: Likewise.
5075 * lib/ebitsetv.c: Likewise.
5076 * lib/get-errno.c: Likewise.
5077 * lib/lbitset.c: Likewise.
5078 * lib/subpipe.c: Likewise.
5079 * lib/timevar.c: Likewise.
5080 * lib/vbitset.c: Likewise.
5081 * tests/local.at: Likewise.
5082 * src/scan-gram.l: Don't include verify.h, since system.h does
5083 that for us.
5084 * .x-sc_require_config_h: New file.
5085 * .x-sc_unmarked_diagnostics: New file.
5086
287c78f6
PE
50872006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5088
287c78f6
PE
5089 Be a bit more systematic about using 'abort'.
5090 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5091 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5092 Put 'default: abort ();' before some other case, to satisfy older
5093 pedantic compilers.
5094 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5095 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5096 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5097 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
5098 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5099 (get_decision_str, get_orientation_str, get_node_alignment_str):
5100 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5101 (get_linestyle_str, get_arrowstyle_str): Likewise.
5102 * src/conflicts.c (resolve_sr_conflict):
5103 Use a default case rather than one for the one remaining enum
5104 value, to catch invalid enum values as well.
5105 * src/lalr.c (set_goto_map, map_goto):
5106 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5107 * src/nullable.c (nullable_compute, token_definitions_output):
5108 Likewise.
5109 * src/reader.c (packgram, reader): Likewise.
5110 * src/state.c (transitions_to, state_new, state_reduction_find):
5111 Likewise.
5112 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5113 (symbol_pack): Likewise.
5114 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
5115 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5116 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
5117 * src/system.h: Don't include <assert.h>.
5118 (assert): New macro.
5119
5120 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5121 (Destructor Decl, Parser Function, Pure Calling):
5122 Describe rules for braces inside C code more carefully.
287c78f6 5123
c66dfadd
PE
51242006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5125
c21493b8
PE
5126 Fix some porting glitches found by Nelson H. F. Beebe.
5127 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5128 compilers that don't understand that abort () does not return.
5129 * src/state.c (transitions_to): Likewise.
5130 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5131 that '#include <cstdlib>' works.
5132 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5133 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5134 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5135 for the benefit of some pre-C99 compilers.
5136
b6e3facf
PE
5137 * bootstrap: Undo changes to gnulib files that autoreconf made.
5138
c66dfadd
PE
5139 Minor fixups to get 'make maintainer-check' to work.
5140 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5141 with the new verify.h implementation.
5142 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5143 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5144 * data/yacc.c (YYUSE): Likewise.
5145 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5146 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5147 * src/parse-gram.y (declaration): Don't pass a string constant
5148 to a function that expects char *, since GCC might complain
5149 about the constant value.
5150 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5151 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5152 before #defining them.
5153 * tests/glr-regression.at
5154 (Incorrectly initialized location for empty right-hand side in GLR):
5155 In yyerror, use the msg arg.
5156 (Corrupted semantic options if user action cuts parse):
5157 (Incorrect lookahead during deterministic GLR):
5158 (Incorrect lookahead during nondeterministic GLR):
5159 Don't name a local var 'index'; it shadows string.h's 'index'.
5160
ed94ef2a
AD
51612006-01-19 Akim Demaille <akim@epita.fr>
5162
5163 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5164 location, not just parts of it.
5165
e9ad4aec
PE
51662006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5167
d6ca7905
PE
5168 * NEWS: Document the fact that multiple %unions are now allowed.
5169 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
5170 * TODO: This feature is now implemented, so remove it from
5171 the wishlist.
d6ca7905 5172
ef1b70e0
PE
5173 * Makefile.maint: Merge with coreutils Makefile.maint.
5174 (CVS_LIST): Use build-aux version if available.
5175 (VERSION_REGEXP): New macro.
5176 (syntax-check-rules): Add sc_no_if_have_config_h,
5177 sc_prohibit_assert_without_use, sc_require_config_h,
5178 sc_useless_cpp_parens.
5179 (sc_obsolete_symbols): Check for O_NDELAY.
5180 (sc_dd_max_sym_length): Track coreutils.
5181 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5182 (sc_useless_cpp_parens): New rule.
5183 (news-date-check): Look for version or today's date.
5184 (changelog-check): Don't require version number near head.
5185 (copyright-check): Use current year instead of hardwiring 2005.
5186 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5187 (announcement): Add --gpg-key-ID.
5188
5189 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5190 with "file system".
5191
2073ce56 5192 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
5193 array. Problem reported by twlevo.
5194 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5195 * src/lalr.c (build_relations): Rely on new sentinel.
5196 * src/gram.c (gram_free): Adjust to new sentinel.
5197
b7691f15
JD
51982006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5199
5200 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5201 yylookaheadNeeds. All uses updated.
5202 (yysplitStack): Rename local yynewLookaheadStatuses to
5203 yynewLookaheadNeeds.
5204 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5205 GLR): In comments, change `lookahead status' to `lookahead need'.
5206
ddee1b06
PH
52072006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5208
5209 * data/glr.c (yysplitStack): A little stylistic rewrite.
5210
12f4614d
PH
52112006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5212
5213 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5214
32c29292
JD
52152006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5216
5217 * doc/bison.texinfo: Fix some typos.
5218 (GLR Semantic Actions): New subsection discussing special
5219 considerations because GLR semantic actions might be deferred.
5220 (Actions): Mention look-ahead usage of yylval.
5221 (Actions and Locations): Mention look-ahead usage of yylloc.
5222 (Special Features for Use in Actions): Add YYEOF entry and mention it
5223 in the yychar entry.
5224 In the yychar entry, remove mention of the local yychar case (pure
5225 parser) since this is irrelevant information when writing semantic
148d66d8 5226 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
5227 yychar is otherwise described as an external variable.
5228 In the yychar entry, don't call it the `current' look-ahead since it
5229 isn't when semantic actions are deferred.
5230 In the yychar and yyclearin entries, add note about deferred semantic
5231 actions.
5232 Add yylloc and yylval entries discussing look-ahead usage.
5233 (Look-Ahead Tokens): When discussing yychar, don't call it the
5234 `current' look-ahead, and do mention yylval and yylloc.
5235 (Error Recovery): Cross-reference `Action Features' when mentioning
5236 yyclearin.
148d66d8 5237 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
5238 look-ahead.
5239 In the yylloc and yylval entries, mention look-ahead usage.
5240
de366a2f 52412006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
5242
5243 * tests/glr-regression.at: Update copyright year to 2006.
5244
bf70fa87
JD
52452006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5246
5247 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5248 use during nondeterministic operation to track which stacks have
5249 actually needed the current lookahead.
5250 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5251 Allocate, deallocate, resize, and otherwise shuffle space for
5252 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5253 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5254 appropriately during nondeterministic operation.
5255 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5256 members to store the current lookahead to be used by the deferred
5257 user action.
5258 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5259 from which the RHS is taken. Set the lookahead members of the new
5260 yySemanticOption according to the lookahead status for stack yyk.
5261 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5262 yyaddDeferredAction.
5263 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5264 members of yySemanticOption before invoking yyuserAction, and then set
5265 them back to their current values afterward.
5266 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5267 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5268 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5269 titles for consistency.
5270 (Leaked merged semantic value if user action cuts parse): In order to
5271 suppress lint warnings, use arguments in merge function, and assign
5272 char value < 128 in main.
5273 (Incorrect lookahead during deterministic GLR): New test case.
5274 (Incorrect lookahead during nondeterministic GLR): New test case.
5275
05449a2c
JD
52762006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5277
de366a2f 5278 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
5279 !yyvaluep as signal that no semantic value is available to print.
5280 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5281 to print a semantic value.
5282
4158e0a1 52832006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 5284
4158e0a1
JD
5285 * tests/glr-regression.at: For consistency with my newer test cases,
5286 don't thank myself.
5287
d659304d
JD
52882006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5289
5290 * data/glr.c (yyresolveValue): When merging semantic options, if at
5291 least one user action succeeds but a later one cuts the parse, then
5292 destroy the semantic value before returning rather than leaking it.
5293 (yyresolveStates): If a user action cuts the parse and thus
5294 yyresolveValue fails, ignore the (unset) semantic value rather than
5295 corrupting the yyGLRState, and empty the semantic options list since
5296 the user actions should have called all necessary destructors.
5297 Simplify code with YYCHK.
5298 * tests/glr-regression.at (Corrupted semantic options if user action
5299 cuts parse): New test case.
5300 (Undesirable destructors if user action cuts parse): New test case.
5301 Before applying any of this patch, this test case never actually failed
5302 for me... but only because the corrupted semantic options usually
5303 masked this bug.
5304 (Leaked merged semantic value if user action cuts parse): New test
5305 case.
5306
6ec2c0f2
AD
53072006-01-05 Akim Demaille <akim@epita.fr>
5308
5309 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5310
1b9c21fb
PE
53112006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5312
5313 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5314 _MSC_VER. Problem reported by Cenzato Marco.
5315 (b4_c_function_def): Use it.
5316 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5317 b4_c_modern.
5318 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5319 than rolling our own.
5320
84866159
AD
53212006-01-04 Akim Demaille <akim@epita.fr>
5322
5323 Also warn about non-used mid-rule values.
5324 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5325 member.
5326 (symbol_list_new): Adjust.
5327 * src/reader.c (symbol_typed_p): New.
5328 (grammar_rule_check): Use it.
5329 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5330 Check its rule.
5331 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5332 Use it.
5333 * tests/actions.at (Exotic Dollars): Adjust.
5334
378f4bd8
AD
53352006-01-04 Akim Demaille <akim@epita.fr>
5336
5337 * src/reader.c (grammar_midrule_action): If $$ is set in a
5338 mid-rule, move the `used' bit to its lhs.
5339 * tests/input.at (Unused values): New.
5340 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5341
e2a21b6f
PE
53422006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5343
54662697
PE
5344 * doc/bison.texinfo (Bison Options): Say more accurately what
5345 --yacc does.
5346 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5347 about declarations in the grammar when in Yacc mode, as POSIX does
5348 not require a diagnostic when the grammar uses extensions.
5349
5350 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5351
073f9288
PE
5352 Warn about dubious constructions like "%token T T".
5353 Reported by twlevo.
5354 * src/symtab.h (struct symbol.declared): New member.
5355 * src/symtab.c (symbol_new): Initialize it to false.
5356 (symbol_class_set): New arg DECLARING, specifying whether
5357 this is a declaration that we want to warn about, if there
5358 is more than one of them. All uses changed.
5359
1221b78a
PE
5360 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5361 Allow multiple %union directives, whose contents concatenate.
5362 * src/parse-gram.y (grammar_declaration): Likewise.
5363 Use muscle_code_grow, so that we don't need stype_line any more.
5364 All uses changed.
5365
5366 * src/muscle_tab.c (muscle_grow): Fix comment.
5367
e2a21b6f
PE
5368 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5369 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5370 Update copyright year to 2006.
5371
8f7e3cf9
AD
53722006-01-03 Akim Demaille <akim@epita.fr>
5373
5374 Have glr.cc pass (some of) the calc.at tests.
5375 * data/glr.cc (b4_parse_param_orig): New.
5376 (b4_parse_param): Improve its definition, and bound it more
5377 clearly in the skeleton.
5378 (b4_epilogue): Append, instead of prepending, in order to keep
5379 #line consistency.
5380 Simplify the generation of auxiliary functions: locations and
5381 purity are mandated.
5382 (b4_global_tokens_and_yystype): Honor it.
5383 * data/location.cc (c++.m4): Don't include it.
5384 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5385 and AT_SKEL_CC_IF.
5386 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5387 AT_LALR1_CC_IF.
5388 Be sure to initialize the first position's filename.
5389 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5390 mandated anyway.
5391 (AT_CHECK_CALC_GLR_CC): New.
5392 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5393
3953ed88
AD
53942006-01-02 Akim Demaille <akim@epita.fr>
5395
5396 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5397 c.m4.
0a96ba81 5398 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
5399 * data/glr.cc: Do not include stack.hh.
5400
9ecafbbf
AD
54012006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5402
5403 * data/glr.c: Reformat whitespace with tabs.
5404 (b4_lpure_formals): Remove this unused m4 macro.
5405 * tests/cxx-type.at: Reformat whitespace with tabs.
5406 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5407 since it's a member. Rename type to isNterm for clarity.
5408
c4d497a0
AD
54092005-12-29 Akim <akim@sulaco.local>
5410
5411 Let glr.cc catch up with symbol_value_print.
5412 * data/glr.cc (b4_yysymprint_generate): Replace by...
5413 (b4_yy_symbol_print_generate): this.
5414 (yy_symbol_print, yy_symbol_value_print): Declare them.
5415
4517da37
PE
54162005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5417
5418 * src/location.h (boundary): Note that a line or column equal
5419 to INT_MAX indicates an overflow.
5420 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5421 (rule_length_overflow, increment_rule_length, add_column_width):
5422 New functions.
5423 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5424 (<SC_BRACED_CODE>"}"):
5425 Use increment_rule_length rather than incrementing it by hand.
5426 (adjust_location, handle_syncline): Diagnose overflow.
5427 (handle_action_dollar, handle_action_at):
5428 Fix bug with monstrosities like $-2147483648.
5429 Remove now-unnecessary checks.
5430 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5431 (convert_ucn_to_byte): Verify assumptions.
5432 (handle_syncline): New arg LOC. All callers changed.
5433 Don't store through a value derived from char const * pointer.
5434
5435 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5436 GCC warnings.
5437
e3233bf6
PE
54382005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5439
5440 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5441 Remove unnecessary forward static decls.
5442
8f3596a6
AD
54432005-12-27 Akim Demaille <akim@epita.fr>
5444
5445 * src/reader.c (grammar_current_rule_check): Also check that $$
5446 is used.
5447 Take the rule to check as argument, hence rename as...
5448 (grammar_rule_check): this.
5449 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5450 Rename as...
5451 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5452 (grammar_midrule_action, grammar_symbol_append): Now static.
5453 * tests/torture.at (input): Don't rely on the default action
5454 being always performed.
5455 * tests/calc.at: "Set" $$ even when the action is "cut" with
5456 YYERROR or other.
5457 * tests/actions.at (Exotic Dollars): Instead of using unused
5458 values, check that the warning is issued.
5459
721be13c
PE
54602005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5461
5462 * NEWS: Improve wording for unused-value warnings.
5463
a0af42fc
AD
54642005-12-22 Akim Demaille <akim@epita.fr>
5465
5466 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5467 (b4_yysymprint_generate): Rename as...
5468 (b4_yy_symbol_print_generate): this.
5469 Generate yy_symbol_print instead of yysymprint.
5470 Generate also yy_symbol_value_print, and use it.
5471
affac613
AD
54722005-12-22 Akim Demaille <akim@epita.fr>
5473
721be13c 5474 * NEWS: Warn about unused values.
affac613
AD
5475 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5476 a `used' member.
5477 (symbol_list_n_get, symbol_list_n_used_set): New.
5478 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5479 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5480 * src/reader.c (grammar_current_rule_check): Check that values are
5481 used.
5482 * src/symtab.c (symbol_print): Accept 0.
5483 * tests/existing.at: Remove the type information.
5484 Empty the actions.
5485 Remove useless actions (beware of mid-rule actions: perl -000
5486 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5487 * tests/actions.at (Exotic Dollars): Use unused values.
5488 * tests/calc.at: Likewise.
5489 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5490 Likewise.
5491
5492 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5493 rule_useful_p.
5494
9d9b8b70
PE
54952005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5496
8bb4c753
PE
5497 Undo 2005-12-01 tentative license wording change. The wording is
5498 still being reviewed by the lawyers, and we don't want to wait for
5499 them before publishing a test release. For now, revert to the
5500 previous wording.
5501 * NEWS: Undo 2005-12-01 change.
5502 * data/glr.c: Revert to previous license wording.
5503 * data/glr.cc: Likewise.
5504 * data/lalr1.cc: Likewise.
5505 * data/location.cc: Likewise.
5506 * data/yacc.c: Likewise.
5507
9d9b8b70
PE
5508 * NEWS: Reword %destructor vs YYABORT etc.
5509 * data/glr.c: Use American spacing, for consistency.
5510 * data/glr.cc: Likewise.
5511 * data/lalr1.cc: Likewise.
5512 * data/yacc.c: Likewise.
5513 * data/yacc.c: Reformat comments slightly.
5514 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5515 for consistency. Fix some spelling errors and reword recently-included
5516 text slightly.
5517 * tests/cxx-type.at: Cast results of malloc, for C++.
5518
2c3b392a
AD
55192005-12-21 Joel E. Denny <address@hidden>
5520
5521 * tests/cxx-type.at: Construct a tree, count the parents of shared
5522 nodes, and free each node once and only once. Previously, the memory
5523 for semantic values was leaked instead.
5524
d6cff4dc
AD
55252005-12-21 Joel E. Denny <address@hidden>
5526
5527 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5528 (yylval, yylloc): If pure, #define to yystackp->yyval and
5529 yystackp->yyloc similar to yychar and yynerrs.
5530 (yyparse): If pure, remove local yylval and yylloc. Add local
5531 yystackp to accommodate pure definitions of yylval and yylloc.
5532 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5533 yylvalp and yyllocp to &yylval and &yylloc.
5534 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5535 namespace. Previously, nerrs and char were missing, but lval and lloc
5536 weren't necessary.
5537 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5538 yylvalp and yyllocp parameters since, if pure, these are now always
5539 accessible through yystackp. If not pure, they are still accessible
5540 globally.
5541 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5542 `if (YYID (N))' to pacify lint.
5543
a85284cf
AD
55442005-12-21 Akim Demaille <akim@epita.fr>
5545
5546 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5547 destroy the RHS symbols of a rule.
5548 * data/yacc.c (yylen): Initialize to 0.
5549 Keep its value to the number of items to possibly shift.
5550 In particular, a regular successful parse that ends on YYFINAL by
5551 a (internal) YYACCEPT must not have yylen != 0.
5552 (yyerrorlab, yyreturn): Pop the RHS.
5553 Reorder a bit to emphasize the `shifting' bits of code.
5554 (YYPOPSTACK): Now accept a number of items to pop.
5555 * data/lalr1.cc: Likewise.
5556 * data/glr.c: Formatting changes.
5557 Use goto instead of fall through.
5558 * doc/bison.texinfo (Destructor Decl): Complete.
5559
d508c281
JMG
55602005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5561
5562 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5563 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5564 * djgpp/config.bat: Replace every occurence of the file name
5565 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5566 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5567 * djgpp/config.sed: Replace every occurence of the file name
5568 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5569 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5570 * djgpp/djunpack.bat: DJGPP specific file.
5571 * djgpp/fnchange.lst: DJGPP specific file.
5572 * djgpp/README.in: Add new information about how to unpack the bison
5573 source on MSDOS and other systems which have 8.3 file name restrictions
5574 using djunpack.bat and fnchange.lst.
5575
3e7a2cd9
PE
55762005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5577
5578 * bootstrap (build_cvs_prefix): Remove; unused.
5579 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5580 when getting gnulib.
5581
55822005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5583
5584 * data/glr.c: Reorder typedef declarations for structs to match order
5585 of struct declarations.
5586 Rename yystack everywhere to yystackp except in yyparse where it's not
5587 a pointer.
5588 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5589 consistency.
5590 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5591 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5592 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5593 lint.
5594
877519f8
PE
55952005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5596
0eca5a39
PE
5597 * tests/sets.at (Accept): Fix typos in regular expression used to
5598 sed out the final state number.
5599
2cec9080
PE
5600 Work around portability problem on Solaris 10: flex-generated
5601 files include <stdio.h> before <config.h>, which messes up
5602 because the latter defines __EXTENSIONS__. Address the problem
5603 by creating two new little files that include <config.h> first,
5604 then include the flex-generated files. Rewrite everyone else
5605 to include <config.h> first, as well.
5606 * lib/timevar.c: Always include "config.h".
5607 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5608 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5609 (EXTRA_bison_SOURCES): New macro.
5610 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5611 * src/system.h: Don't include config.h.
5612 * src/LR0.c: Include <config.h> first.
5613 * src/assoc.c: Likewise.
5614 * src/closure.c: Likewise.
5615 * src/complain.c: Likewise.
5616 * src/conflicts.c: Likewise.
5617 * src/derives.c: Likewise.
5618 * src/files.c: Likewise.
5619 * src/getargs.c: Likewise.
5620 * src/gram.c: Likewise.
5621 * src/lalr.c: Likewise.
5622 * src/location.c: Likewise.
5623 * src/main.c: Likewise.
5624 * src/muscle_tab.c: Likewise.
5625 * src/nullable.c: Likewise.
5626 * src/output.c: Likewise.
5627 * src/parse-gram.y: Likewise.
5628 * src/print.c: Likewise.
5629 * src/print_graph.c: Likewise.
5630 * src/reader.c: Likewise.
5631 * src/reduce.c: Likewise.
5632 * src/relation.c: Likewise.
5633 * src/state.c: Likewise.
5634 * src/symlist.c: Likewise.
5635 * src/symtab.c: Likewise.
5636 * src/tables.c: Likewise.
5637 * src/uniqstr.c: Likewise.
5638 * src/vcg.c: Likewise.
5639
877519f8
PE
5640 * src/parse-gram.y: Fix minor problems uncovered by lint.
5641 (current_lhs, current_lhs_location): Now static.
5642 (current_assoc): Remove unused variable.
5643
5644 Cleanups so that Bison-generated parsers have less lint.
5645 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5646 Prepend /*ARGSUSED*/, for lint's sake.
5647 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5648 definition if 'lint' is defined.
5649 (YYID): New macro (or function, if lint).
5650 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5651 * data/yacc.c: Likewise.
5652 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5653 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5654 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5655 is C++ only.
5656 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5657 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5658 Use YYID(0) rather than 0, for lint.
5659 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5660 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5661
f5228370
PE
56622005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5663
5664 * tests/glr-regression.at
5665 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5666 Close memory leak reported by twlevo.
5667
69ce078b
PE
56682005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5669
6ff99711
PE
5670 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5671 all stacks.
5672 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
5673 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5674 New test case.
5675 (Duplicated user destructor for lookahead): This test now is expected
5676 to succeed.
5677
af3412cd
PE
56782005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5679
32b5b719 5680 * NEWS: Document the following change.
af3412cd
PE
5681 * data/yacc.c: Say "parser skeleton" rather than "file", since
5682 it's no longer just a file.
5683 * data/glr.c: Grant a special exception for C GLR parsers, that
5684 reads like the already-existing exception for C LALR(1) parsers.
5685 * data/glr.cc: Likewise.
5686 * data/lalr1.cc: Likewise.
5687 * data/location.cc: Likewise.
5688 * data/yacc.c: Reword the "written by" statement to clarify that
5689 it was the parser skeleton, not the entire output file.
5690 * data/glr.c: Written by Paul Hilfinger.
5691 * data/glr.cc: Written by Akim Demaille.
5692 * data/lalr1.cc: Likewise.
5693
035aa4a0
PE
56942005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5695
d9963c85
PE
5696 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5697 Fix typos in previous change that broke 'make check'.
5698 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5699 supported in C.
5700 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5701 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5702 We can revert this once things settle down.
5703
035aa4a0
PE
5704 * src/conflicts.c (conflicts_print): Don't print file name twice
5705 when %expect fails because there were no conflicts.
5706 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5707 change.
5708 * tests/conflicts.at (%expect not enough, %expect too much):
5709 (%expect with reduce conflicts): Adjust to new behavior.
5710
57112005-11-18 Akim Demaille <akim@epita.fr>
5712
5713 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5714 errors.
5715 * NEWS: Document this.
5716 * doc/bison.texinfo (Expect Decl): Likewise.
5717
d1ff7a7c
AD
57182005-11-16 Akim Demaille <akim@epita.fr>
5719
5720 Generalize the display of semantic values and locations in traces.
5721 * data/glr.c (yy_reduce_print): Fix indices (again).
5722 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5723 literal integers.
5724 * data/lalr1.cc (yyreduce_print): Rename as...
5725 (yy_reduce_print): this.
5726 Display values and locations.
5727 * data/yacc.c (yy_reduce_print): Likewise.
5728 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5729 (yysymprint): Move higher to be visible from yy_reduce_print).
5730 (yyparse): Adjust.
5731 * tests/calc.at: Adjust the expected length of the traces.
5732
6de5398d
AD
57332005-11-14 Akim Demaille <akim@epita.fr>
5734
5735 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5736 from 1 to N, while values and location start at 0.
5737 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5738
a1373f55
AD
57392005-11-14 Akim Demaille <akim@epita.fr>
5740
5741 * data/glr.c (yy_reduce_print): Fix the $ number.
5742
613d8952
AD
57432005-11-14 Akim Demaille <akim@epita.fr>
5744
5745 "Use" parse parameters.
5746 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5747 * data/glr.c, data/glr.cc: Use them.
5748 * data/glr.c (YYUSE): Have a C++ definition that supports
5749 non-pointer types.
5750
b2741627
AD
57512005-11-14 Akim Demaille <akim@epita.fr>
5752
5753 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5754
5059b5c8
AD
57552005-11-14 Akim Demaille <akim@epita.fr>
5756
42249483
AD
5757 * data/glr.cc: New.
5758 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 5759
4626a15d
AD
57602005-11-12 Akim Demaille <akim@epita.fr>
5761
5762 Let position and location be PODs.
5763 * data/location.cc (position::initialize, location::initialize): New.
5764 (position::position, location::location): Define only if
5765 b4_location_constructors is defined.
5766 * data/lalr1.cc (b4_location_constructors): Define it for backward
5767 compatibility.
5768 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5769
57702005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
5771
5772 * data/lalr1.cc: Move the body of the ctor and dtor into the
5773 parser file (instead of the header).
5774 Wrap the implementations in a "namespace yy".
5775
57762005-11-12 Akim Demaille <akim@epita.fr>
5777
5778 Have glr.c include its header file when created.
5779 * data/glr.c (b4_shared_declarations): New.
5780 Output them verbatim in the parser if !%defines, otherwise
5781 output then in the header file, and include it instead.
5782
1989d947
AD
57832005-11-11 Akim Demaille <akim@epita.fr>
5784
5785 * data/glr.c: Comment changes.
5786
57872005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
5788
5789 When yydebug, report semantic and location values for reductions.
5790 * data/glr.c (yy_reduce_print): Report the semantic values and the
5791 locations.
5792 (YY_REDUCE_PRINT): Adjust.
5793 (yyglrReduce): Use them.
5794 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5795 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5796 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5797 traces.
5798
02998094
AD
57992005-11-10 Akim Demaille <akim@epita.fr>
5800
5801 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5802 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5803 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5804
5210672f
PE
58052005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5806
5807 * m4/cxx.m4, examples/Makefile.am: Don't build
5808 examples/calc++ if no C++ compiler is available. (trivial change)
5809
a8991a1d
AD
58102005-11-09 Akim Demaille <akim@epita.fr>
5811
5812 * src/scan-skel.l: Use a couple of asserts.
5813
36b5e963
AD
58142005-11-03 Akim Demaille <akim@epita.fr>
5815
5816 In some (weird) cases, the final state number is incorrect.
5817 Reported by Alexandre Duret-Lutz.
5818 * src/LR0.c (state_list_append): Remove the computation of
5819 final_state.
5820 (save_reductions): Do it here.
5821 (get_state): Alpha conversion.
5822 (generate_states): Use a for loop.
5823 * src/gram.h (item_number_is_rule_number)
5824 (item_number_is_symbol_number): New.
5825 * src/state.c: Use assert.
5826 * src/system.h: Include assert.h.
5827 * tests/sets.at (Accept): New.
5828
44e7ead1
PH
58292005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5830
5831 * data/glr.c (yyfill): Adjust comment.
36b5e963 5832 (yyresolveAction): Initialize default location properly
44e7ead1
PH
5833 for empty right-hand sides.
5834 (yydoAction): Ditto.
5835 Add comment explaining apparently dead code.
36b5e963
AD
5836 * tests/glr-regression.at
5837 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 5838 New test.
36b5e963 5839
e10a80ee
PE
58402005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5841
5842 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5843 gnulib when interrupted. This fixes some race conditions and
5844 works around some portability problems (one noted by Paul
5845 Hilfinger).
5846
067b32ee
AD
58472005-10-22 Akim <akim@epita.fr>
5848
5849 * Makefile.cfg: Adjust to config -> build-aux.
5850 Reported by twledo.
5851
4b367315
AD
58522005-10-21 Akim Demaille <akim@epita.fr>
5853
5854 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5855 the %parse-params.
5856 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5857 * data/yacc.c (b4_Pure_if): Rename as...
5858 (b4_yacc_pure_if): this.
5859 (YY_SYMBOL_PRINT, yyparse): Adjust.
5860 * doc/bison.texinfo: Formatting changes.
5861
24cc23d9
AD
58622005-10-21 Akim Demaille <akim@epita.fr>
5863
5864 Finish the transition config -> build-aux.
5865 * configure.ac, Makefile.am: Use build-aux.
5866 * config/prev-version, config/announce-gen, config/Makefile.am:
5867 Move to...
5868 * build-aux/prev-version, build-aux/announce-gen,
5869 * build-aux/Makefile.am: here.
5870
d4476375
AD
58712005-10-14 Akim Demaille <akim@epita.fr>
5872
5873 * examples/calc++/test: Use set -x only when VERBOSE.
5874
302c0aee
PE
58752005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5876
5877 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5878 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5879
7625ec2c
AD
58802005-10-13 Akim Demaille <akim@epita.fr>
5881
5882 * src/scan-skel.l: Output the base name parts of the parser and
5883 header file names.
302c0aee 5884 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
5885 additional checks.
5886 Use this to exercise C++ outputs in subdirs.
5887 Reported by Oleg Smolsky.
5888
ba0fe3c7
PE
58892005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5890
5891 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5892 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5893 Problem reported by John P. Hartmann.
5894 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5895 already defined it.
5896
9b8a5ce0
AD
58972005-10-12 Akim Demaille <akim@epita.fr>
5898
5899 * src/parse-gram.y (version_check): Exit 63 to please missing
5900 (stands for "version mismatch).
5901 * tests/input.at, doc/bison.texinfo: Adjust.
5902
4f6e011e
PE
59032005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5904
5905 Work around portability problems with Visual Age C compiler
5906 (xlc and xlC_r) reported by John P. Hartmann.
5907 * data/location.cc (initial_column, initial_line): Remove.
5908 All uses replaced by 0 and 1.
5909 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5910 that xlc complains about.
5911 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 5912 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 5913 as __STDC__.
4d7aa45e
PE
5914 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5915 __STDC_VERSION__. Use it everywhere instead of looking at
5916 __STDC__ and __cplusplus.
4f6e011e 5917
a1b3bf8c
AD
59182005-10-10 Akim Demaille <akim@epita.fr>
5919
5920 * examples/calc++/test: Be quiet unless VERBOSE.
5921
412e44aa
PE
59222005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5923
2a4647a3
PE
5924 * data/c.m4 (yydestruct, yysymprint):
5925 Use YYUSE instead of casting to void.
5926 * data/glr.c (YYUSE): New macro.
5927 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5928 Use it instead of rolling our own.
5929 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5930 (YYCHK1):
5931 Use /*CONSTCOND*/ to suppress lint warnings.
5932 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5933 (YY_STACK_PRINT): Use 'false' not '0'.
5934 (YYUSE): New macro.
5935 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5936 * data/yacc.c (YYUSE): New macro.
5937 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5938 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5939 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5940
5941
412e44aa
PE
5942 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5943 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5944
88c6637f
PE
59452005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5946
2f4f028d
PE
5947 Undo the parts of the unlocked-I/O change that substituted
5948 putc or puts for printf. This might hurt performance a bit,
5949 but some people prefer the printf style.
5950 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5951 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5952 All uses replaced by YYFPRINTF and YYDPRINTF.
5953 * data/yacc.c: Likewise.
5954 * lib/bitset.c (bitset_print): Likewise.
5955 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5956 putc and puts.
5957 * lib/lbitset.c (debug_lbitset): Likewise.
5958 * src/closure.c (print_firsts, print_fderives): Likewise.
5959 * src/gram.c (grammar_dump): Likewise.
5960 * src/lalr.c (look_ahead_tokens_print): Likewise.
5961 * src/output.c (escaped_output): Likewise.
5962 (user_actions_output): Break apart two printfs.
5963 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5964 * src/reduce.c (reduce_print): Likewise.
5965 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5966 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5967
88c6637f
PE
5968 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5969 Use assignments rather than casts-to-void to suppress
5970 unused-variable warnings. This pacifies 'lint'.
5971 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5972 unused-variable warnings.
5973
fb32e373
JMG
59742005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5975
5976 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5977
edb8f44f
PE
59782005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5979
fb9c0b33
PE
5980 Use unlocked I/O for a minor performance improvement on hosts like
5981 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5982 is to use the gnlib unlocked-io module, and to prefer putc and
5983 puts to printf when either will work (since the latter doesn't
5984 come in an unlocked flavor).
5985 * bootstrap (gnulib_modules): Add unlocked-io.
5986 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5987 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5988 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5989 and similarly for puts and putc and printf.
5990 * data/yacc.c: Likewise.
5991 * lib/bitset.c (bitset_print): Likewise.
5992 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5993 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5994 to printf.
5995 * lib/lbitset.c (debug_lbitset): Likewise.
5996 * src/closure.c (print_firsts, print_fderives): Likewise.
5997 * src/gram.c (grammar_dump): Likewise.
5998 * src/lalr.c (look_ahead_tokens_print): Likewise.
5999 * src/output.c (escaped_output): Likewise.
6000 (user_actions_output): Coalesce two printfs.
2f4f028d 6001 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
6002 * src/reduce.c (reduce_print): Likewise.
6003 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 6004 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 6005
edb8f44f
PE
6006 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6007 this confuses xgettext.
6008
b50d2359
AD
60092005-10-02 Akim Demaille <akim@epita.fr>
6010
6011 * bootstrap (gnulib_modules): Add strverscmp.
6012 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6013 * m4/.cvsignore: Add strverscmp.m4.
6014 * src/parse-gram.y (%require): New token, new rule.
6015 (version_check): New.
6016 * src/scan-gram.l (%require): Adjust.
6017 * tests/input.at (AT_REQUIRE): New.
6018 Use it.
6019 * doc/bison.texinfo (Require Decl): New.
6020 (Calc++ Parser): Use %require.
6021
21667f64
AD
60222005-10-02 Akim Demaille <akim@epita.fr>
6023
6024 * data/location.cc: New.
6025
2b81e969
AD
60262005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6027 Akim Demaille <akim@epita.fr>
6028
6029 Make sure -odir/foo.cc creates dir/location.hh etc.
6030 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6031 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6032 (spec_defines_file): Now const.
6033 (dir_prefix): New.
6034 (short_base_name): Remove.
6035 * src/files.c: Adjust.
6036 (dirname.h): Include.
6037 (base_name): Don't prototype it.
6038 (finput): Remove, duplicates gram_in.
6039 (full_base_name, short_base_name): Replace by...
6040 (all_but_ext, all_but_tab_ext): these.
6041 (compute_base_names): Rename as...
6042 (compute_file_name_parts): this.
6043 Update to compute the new variables, including dir_prefix.
6044 Adjust dependencies.
6045 * src/output.c (prepare): Output them.
6046 * src/reader.c: Adjust to use gram_in, not finput.
6047 * src/scan-skel.l (@dir_prefix@): New.
6048
ad6a9b97
JMG
60492005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6050
6051 * lib/subpipe.c: New function end_of_output_subpipe() added
6052 to allow support for non-posix systems. This is a no-op function
6053 for posix systems.
6054
6055 * lib/subpipe.h: New function end_of_output_subpipe() added
6056 to allow support for non-posix systems. This is a no-op function
6057 for posix systems.
6058
6059 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6060 handle the lack of pipe/fork functionality on non-posix systems.
6061
6062 * djgpp/Makefile.maint: DJGPP specific file.
6063
6064 * djgpp/README.in: DJGPP specific file.
6065
6066 * djgpp/config.bat: DJGPP specific configuration file.
6067
6068 * djgpp/config.sed: DJGPP specific configuration file.
6069
6070 * djgpp/config.site: DJGPP specific configuration file.
6071
6072 * djgpp/config_h.sed: DJGPP specific configuration file.
6073
6074 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6075
6076 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6077
fc695704
AD
60782005-10-02 Akim Demaille <akim@epita.fr>
6079
6080 * data/location.cc: New, extract from...
6081 * data/lalr1.cc: here.
6082 (location.hh): Include it after the user prologue, in case the
6083 filename type is defined by the user.
6084 Forward declation location and position before the pre-prologue.
6085 (yyresult_): Rename as...
6086 (yyresult): this, it's a local variable, not an attribute.
6087 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6088
60892005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
6090
6091 * examples/extexi: Restore the #line generation.
6092
fb9712a9
AD
60932005-09-30 Akim Demaille <akim@epita.fr>,
6094 Alexandre Duret-Lutz <adl@gnu.org>
6095
6096 Move the token type and YYSTYPE in the parser class.
6097 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6098 (parser::token): New, from the moved free definition of tokens.
6099 (parser::semantic_value): Now a full definition instead of an
6100 indirection to YYSTYPE.
6101 (b4_post_prologue): No longer included in the header file, but
6102 in the implementation file.
6103 * doc/bison.texi (C+ Language Interface): Update.
6104 * src/parse-gram.y: Support unary %define.
6105 * tests/actions.at: Define global_tokens_and_yystype for backward
6106 compatibility until we update the tests.
6107 * tests/calc.at: Idem.
6108 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6109 to simplify the code.
6110
55f0c7b1
PE
61112005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6112
6113 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6114 Ah, the good old days! Problem reported by Peter Klein.
6115 * bootstrap (gnulib_modules): Add strerror, strtoul.
6116 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6117 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6118
fb9712a9 61192005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
6120
6121 * data/c.m4 (b4_error_verbose_if): New.
6122 * data/lalr1.cc: Use it.
6123 (YYERROR_VERBOSE_IF): Remove.
6124 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6125 parser members, replaced by...
6126 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6127 local variables.
6128 (yysyntax_error_): Takes the state number as argument.
6129 (yyreduce_print_): Use the argument yyrule, not the former
6130 attribute yyn_.
6131
8a6f72f3
PE
61322005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6133
6134 * bootstrap (gnulib_modules): Add verify.
6135 * lib/.cvsignore: Add verify.h.
6136 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6137 * src/system.h (verify): Remove.
6138 Include verify.h instead.
6139 * src/tables.c (tables_generate): Use new API for 'verify'.
6140
0d50976f
PE
61412005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6142
ebc3737e
PE
6143 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6144 local variables whose names begin with 'yy'.
6145 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6146 Trivial changes from Joel E. Denny.
6147
0d50976f
PE
6148 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6149 it itself.
6150 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6151 don't use alloca any more.
6152
6153 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6154 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 6155 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
6156 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6157 to match yacc.c, to test more hosts.
6158
a05b79df
PE
61592005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6160
55289366
PE
6161 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6162 doesn't affect behavior.
6163 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6164 Solaris, AIX, MSC.
6165 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6166 This works a bit better with glibc, if user code has already included
6167 stdlib.h.
6168 * doc/bison.texinfo (Bison Parser): Document that users can't
6169 arbitrarily use malloc and free for other purposes. Document
6170 that <alloca.h> and <malloc.h> might be included.
6171 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6172 user must declare alloca.
6173
a05b79df
PE
6174 * HACKING (release): Forwarn the Translation Project about
6175 stable releses.
6176
3ab2ca22
AD
61772005-09-20 Akim Demaille <akim@epita.fr>
6178
6179 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6180
a9739e7c
PE
61812005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6182
a702593e
PE
6183 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6184 (YYSTACK_ALLOC_MAXIMUM): Use it.
6185 (yysyntax_error): New function.
6186 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6187 multiple syntax errors are reported, and alloca is being used.
6188 Instead, reallocate buffers twice as big each time, so that
6189 we waste at most half the allocated memory. Start with a small
6190 (128-byte) buffer that will suffice in most cases anyway.
6191 Use yysyntax_error to do most of the work.
6192
6193 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6194 yynerrs is the number of errors reported, not the number of
6195 errors encountered.
6196
a9739e7c
PE
6197 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6198 Mark it as expected to fail.
6199 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6200 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6201 Don't start user-code symbols with "yy", to avoid name space problems.
6202
f479c6c6
AD
62032005-09-19 Akim Demaille <akim@epita.fr>
6204
6205 Remove the traits, failed experiment.
6206 It never proved useful, and anyway because of the current
6207 definition, it was not possible to have several specialization of
6208 this traits, making it useless.
6209 * data/lalr1.cc (yy:traits): Remove.
6210 Inline its definitions in the parser class.
6211
e2586f82
AD
62122005-09-19 Akim Demaille <akim@epita.fr>
6213
6214 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6215 least Mac OSX with a /usr/local install of gettext.
6216
2e8cf949
AD
62172005-09-19 Akim Demaille <akim@epita.fr>
6218
6219 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6220 and yytoken for similarity with the other skeletons.
6221
c7fb0b90
AD
62222005-09-19 Akim Demaille <akim@epita.fr>
6223
4e26c69e 6224 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 6225
1bd0deda
PE
62262005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6227
6228 * NEWS: Version 2.1.
6229
6230 * NEWS: Remove notice of yytname change, since it was never in an
6231 official release.
6232 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6233 diagnostic.
6234 * src/output.c (prepare): Likewise.
6235 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6236 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6237 is not defined. This is an awful hack, but it's enough for now.
6238 All callers changed.
6239 * tests/glr-regression-at (make_value): Args are const pointers now,
6240 to avoid GCC warning.
6241 (Duplicated user destructor for lookahead): New test. Currently
6242 skipped. It fails on my host but I'm not sure it'll always fail.
6243
62442005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
6245
6246 * src/symtab.h (struct symbol): Declare the printer and destructor
6247 as const, to avoid accidental calls to free.
6248 (symbol_destructor_set, symbol_printer_set): Adjust.
6249 * src/symtab.c: Adjust.
6250
1bd0deda 62512005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
6252
6253 * data/c.m4 (b4_token_enums): New.
6254 (b4_token_defines): Rename as...
6255 (b4_token_enums_defines): this.
6256 (b4_token_defines): New, output only the #defines.
6257 * data/yacc.c, data/glr.c: Adjust.
6258 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6259 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6260 as default values.
6261
dbcdae2d
AD
62622005-09-16 Akim Demaille <akim@epita.fr>
6263
6264 * data/lalr1.cc (yylex_): Remove, inline its code.
6265 (yyreport_syntax_error_): Remove, replaced by...
6266 (yysyntax_error_): this which returns a string and leaves to the
6267 caller the call to the users' error function.
6268 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6269 Move from members of the parser object...
6270 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6271 to local variables of the parse function.
6272
70d8f291
AD
62732005-09-16 Akim Demaille <akim@epita.fr>
6274
6275 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6276 since it's in Bison's name space.
6277
b47dbebe
PE
62782005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6279
ae199bf1
PE
6280 * data/glr.c (yyresolveValue): Add default case to pacify
6281 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6282
b47dbebe
PE
6283 * NEWS: Document when yyparse started to return 2.
6284 * doc/bison.texinfo (Parser Function): Document when yyparse
6285 returns 2.
6286
6287 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6288 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6289 changed.
6290 (class position): file_name -> filename (reverting). All uses changed.
6291
62922005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6293
6294 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6295 do anything if $@ exists. This reverts part of the 2005-07-07
6296 patch.
6297
00292f66
PE
62982005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6299
6300 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6301 contains obsolete information and isn't worth distributing as a
6302 separate file anyway.
6303 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6304 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6305 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6306 (yyparse): Abort if user code uses longjmp to throw an unexpected
6307 value.
6308
a420f962
PE
63092005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6310
00292f66
PE
6311 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6312 Suggested by twlevo@xs4all.nl.
6313
127287e9
PE
6314 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6315 This avoids a diagnostic from gcc -Wswitch-enum.
6316 Problem reported by twlevo@xs4all.nl.
6317
a420f962
PE
6318 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6319 standards. Use "file name" or "file" or "name", depending on
6320 the context.
6321 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6322 not to hack/foo.tab.c.
6323 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
6324 * data/glr.c: b4_filename -> b4_file_name.
6325 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6326 All uses changed.
6327 (class position): filename -> file_name. All uses changed.
6328 * data/yacc.c: b4_filename -> b4_file_name.
6329 * lib/bitset.h: filename -> file_name in local vars.
6330 * lib/bitset_stats.c: Likewise.
6331 * src/files.c: Likewise.
6332 * src/scan-skel.l ("@output ".*\n): Likewise.
6333 * src/files.c (file_name_split): Renamed from filename_split.
6334 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
6335
63362005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6337
6338 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6339 to accommodate latest gnulib.
6340
6341 * tests/glr-regression.at (Duplicate representation of merged trees):
6342 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6343
6344 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6345 needed.
6346
42a6501d
PE
63472005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6348
6349 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6350 All uses changed. Invoke user destructor after an error during a
6351 split parse (trivial change from Joel E. Denny).
6352
6353 * tests/glr-regression.at
6354 (User destructor after an error during a split parse): New test case.
6355 Problem reported by Joel E. Denny in:
6356 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6357
ef9a1faf
PE
63582005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6359
5b4aaf78
PE
6360 * README-cvs: Give URLs for recommended tools.
6361 Mention Gzip version problem, and bootstrapping issues.
6362 Remove troubleshooting section, as it's somewhat obsolete.
6363
b5240ba5
PE
6364 * bootstrap (no_cache): New var, to accommodate different wget
6365 variants. Use it instead of '-C off'. Problem reported by
6366 twlevo@xs4all.nl.
6367
ef9a1faf
PE
6368 * data/glr.c (yydestroyStackItem): New function.
6369 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6370 debugging information. Problem reported by Joel E. Denny.
6371
e6efa9da
AD
63722005-08-25 Akim Demaille <akim@epita.fr>
6373
6374 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6375
adc90f13
PE
63762005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6377
6378 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6379 Don't invoke destructor on unresolved entries.
6380 * tests/glr-regression.at
6381 (User destructor for unresolved GLR semantic value): New test case.
6382 Problem reported by Joel E. Denny in:
6383 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6384
f9315de5
PE
63852005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6386
15d29c1f
PE
6387 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6388 Add strnlen.c.
6389 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6390 lib-prefix.m4, po.m4.
6391
dd5f2af2
PE
6392 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6393 in yydestruct diagnostic, since it might not be an error.
6394 Problem reported by Joel Denny near end of
6395 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 6396 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
6397 * data/yacc.c (yyreturn): Likewise.
6398 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6399
6400 * src/files.c: Remove obsolete FIXME comment.
6401
6402 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6403 with the other templates, and to fix bogus run-on messages such
6404 as the one reported at the end of
6405 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6406 All callers changed to avoid the newline.
6407 (yyprocessOneStack): Output two lines rather than one, to accommodate
6408 the above change. This changes the debug output format slightly.
6409
f9315de5
PE
6410 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6411 reported by Joel E. Denny in
6412 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6413 (trivial change).
6414 * tests/glr-regression.at (Duplicate representation of merged trees):
6415 New test, from Joel E. Denny in:
6416 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6417 * THANKS: Add Joel E. Denny.
6418
6419 * configure.ac (AC_INIT): Bump to 2.0c.
6420
04098407
PE
64212005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6422
6423 * NEWS: Version 2.0b.
6424
ca5d2013
PE
6425 * Makefile.am (SUBDIRS): Put examples before tests, so that
6426 "make check" doesn't finish with "All 1 tests passed".
6427
3d54b576
PE
6428 * tests/regression.at (Token definitions): Don't rely on
6429 AT_PARSER_CHECK for data that contains backslashes. It currently
6430 uses 'echo', and 'echo' isn't portable if its argument contains
6431 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6432 that the byte '\0xff' is not printable in the C locale; it is,
6433 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6434 not printable, so use '\0x81' to test.
6435
d53ae497
PE
6436 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6437 version of GCC, since the macro is used with non-GCC compilers.
6438
fc01665e
PE
6439 Fix core dump reported by Pablo De Napoli in
6440 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6441 * tests/regression.at (Invalid inputs with {}): New test.
6442 * src/parse-gram.y (token_name): Translate type before using
6443 it as an index.
6444
04098407
PE
6445 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6446 the user's name space. All uses changed to __attribute__
6447 ((__unused__)).
6448 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6449 Add __attribute__ ((__noreturn__)).
6450
6451 * etc/clcommit: Remove. We weren't using it, and it failed
6452 "make maintainer-distcheck".
6453 * Makefile.maint: Merge from coreutils.
6454 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6455 (syntax-check-rules): Change list of rules as described below.
6456 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6457 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6458 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6459 (sc_trailing_space): New rules.
6460 (sc_xalloc_h_in_src): Remove.
6461 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6462 (sc_space_tab, sc_error_exit_success, sc_changelog):
6463 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6464 (makefile-check, po-check, author_mark_check):
6465 (makefile_path_separator_check, copyright-check):
6466 Use grep -n, to make it easier to find violations.
6467 Use CVS_LIST and CVS_LIST_EXCEPT.
6468 (header_regexp, h_re): Remove.
6469 (dd_c): New macro.
6470 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6471 (my-distcheck): Use more-modern GCC flags.
6472 (signatures, %.asc): Remove.
6473 (rel-files, announcement): Remove signatures.
6474 Restore old updating code, even though we don't use it, so
6475 that we're the same as coreutils.
6476 (alpha, beta, major): Depend on news-date-check.
6477 Make the upload commands.
6478
6479 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6480 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6481 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6482 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6483 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6484 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6485 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6486 * tests/sets.at: Likewise.
6487
6488 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6489 we comment out the Autoconf version number.
6490 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6491 it's error-prone and "make maintainer-distcheck" rejects it.
6492
6493 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6494 Indent calls to "error" to pacify "make maintainer-distcheck",
6495 when the calls are not intended to be translated.
6496 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6497
6498 * src/Makefile.am (DEFS): Use +=, to pacify
6499 "make maintainer-distcheck".
6500 (bison_SOURCES): Add scan-skel.h.
6501 (sc_tight_scope): New rule, from coreutils.
6502
6503 * src/files.c (src_extension, header_extension):
6504 Now static, not extern.
6505 * src/getargs.c (short_options): Likewise.
6506 * src/muscle_tab.c (muscle_table): Likewise.
6507 * src/parse-gram.y (current_class, current_type, current_prec):
6508 Likewise.
6509 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6510 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6511 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6512 void, to avoid warning when NLS is disabled.
6513 * src/output.c: Include scan-skel.h.
6514 (scan_skel): Remove decl, since scan-skel.h does this.
6515 (output_skeleton):
6516 Indent calls to "error" to pacify "make maintainer-distcheck".
6517 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6518 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6519 "make maintainer-distcheck".
6520 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6521 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6522 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6523 (skel_lex_destroy, scan_skel): Move these decls to...
6524 * src/scan-skel.h: New file.
6525 * src/uniqstr.c (uniqstr_assert):
6526 Indent calls to "error" to pacify "make maintainer-distcheck".
6527
6528 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6529 not @VAR@.
6530
6531 * tests/torture.at: Revamp to avoid misuse of atoi that
6532 "make maintainer-distcheck" complained about.
6533
6534 * examples/extexi (message): Don't print a message more than once,
6535 and omit line-number decoration that makes Emacs compile think
6536 that informative messages are worth worrying about.
6537
65382005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6539
6540 * configure.ac: Update version number.
6541
6542 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6543 accidentally.
6544 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6545 autogenerated by the maintainer.
6546 * examples/calc++/.cvsignore: Add *.yy.
6547
6548 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6549 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6550 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6551
6552 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6553
6554 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6555 from maintainer-distcheck about casting the argument of 'free'.
6556
6557 * NEWS: Mention recent yytname changes.
6558 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6559
6560 * bootstrap: For translations that have not yet been upgraded to
6561 the new runtime-po domain, prime the pump by extracting the
6562 relevant strings from the obsolete translations. This code can be
6563 removed once the bison-runtime domain has been translated by each
6564 team.
6565
6566 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6567 now that token names are already quoted.
6568
6569 Fix problem reported by Anthony Heading.
6570 * data/glr.c (YYTOKEN_TABLE): New macro.
6571 (yytname): Define if YYTOKEN_TABLE.
6572 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6573 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6574 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6575 * src/output.c (prepare_symbols): Output token_table_flag.
6576
0ffda363
PE
65772005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6578
6579 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6580 again if the first call fails.
6581
6582 * data/glr.c (yytnamerr): New function.
6583 (yyreportSyntaxError): Use it to dequote most string literals.
6584 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6585 with other skeletons. All uses changed.
6586 (yytnameerr_): New function.
6587 (yyreport_syntax_error): Use it to dequote most string literals.
6588 * data/yacc.c (yytnamerr): New function.
6589 (yyerrlab): Use it to decode most string literals.
6590 * doc/bison.texinfo (Decl Summary, Calling Convention):
6591 Clarify quoting convention of yytname.
6592 * src/output.c (prepare_symbols): Quote all names. This undoes
6593 the 2005-04-17 change, which is now accomplished (mostly) via
6594 changes in the parsers as described above.
6595 * tests/regression.at (Token definitions, Web2c Actions):
6596 Undo most 2005-04-17 change here, too.
6597
65982005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6599
6600 Fix more problems reported by twlevo@xs4all.nl.
6601 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6602 remove trailing spaces. This loses the exit status of ./types,
6603 and isn't needed since ./types shouldn't be emitting trailing
6604 spaces.
6605 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6606 as the stack isn't valid in that case.
6607
6608 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6609 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6610 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6611 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6612 is used.
6613 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6614 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6615 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6616 Likewise.
6617
6618 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6619 overly-picky compilers that reject 'char *foo = "bar";'.
6620
6621 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6622 to FILE * parameter, not to stderr. This fixes a typo introduced
6623 in the 2005-07-12 change.
6624
6625 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6626 warnings from GCC 4.
6627
6628 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6629 (yyglrShiftDefer, yysplitStack):
6630 Remove unused parameters b4_pure_formals. All uses changed.
6631 (yyglrShift): Remove unused parameters b4_user_formals.
6632 All uses changed.
6633 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6634
6100a9aa
PE
66352005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6636
258b75ca
PE
6637 Destructor cleanups and regularization among the three skeletons.
6638 * NEWS: Document the behavior changes.
6639 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6640 stack before failing, as the cleanup code will do it for us now.
6641 * data/lalr1.cc (yyerrlab): Likewise.
6642 * data/glr.c (yyparse): Pop everything off the stack before
6643 freeing it, so that destructors get called properly.
6644 * data/lalr1.cc (yyreturn): Likewise.
6645 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6646 This is more consistent.
6647 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6648 why destructors might be called. 1.875 -> 2.1.
6649 (Destructor Decl, Decl Summary, Table of Symbols):
6650 Some English-language cleanups for %destructor.
6651 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6652 Add output line for destructor of start symbol.
6653 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6654 because of that same extra output line.
6655
1a059451
PE
6656 * NEWS: Document minor wording changes in diagnostics of
6657 Bison-generated parsers.
6658 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6659 Remove unused formals. All uses changed.
6660 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6661 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6662 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6663 Rename yyoverflowab to yyexhaustedlab.
6664 When memory exhaustion occurs during syntax-error reporting,
6665 report it separately rather than in a single diagnostic; this
6666 eases translation.
6667 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6668 (Memory Exhausted): Renamed from Parser Stack Overflow.
6669 Revamp wording slightly to prefer "memory exhaustion".
6670 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6671
97460c78
PE
6672 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6673
30757c8c
PE
6674 Add i18n support to the GLR skeleton. Partially fix the C++
6675 skeleton; a C++ expert needs to finish this. Remove debugging
6676 msgids; there's little point to having them translated, since they
6677 can be understood only by someone who can read the
6678 (English-language) source code.
6679
6680 Generate runtime-po/bison-runtime.pot automatically, so that we
6681 don't have to worry about garbage getting in that file. We'll
6682 make sure after the next official release that old msgids don't
6683 get lost. See
6684 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6685
6686 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6687 Now auto-generated.
6688 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6689 Fix typos in explanations of the runtime file.
6690 * bootstrap: Change gettext keyword from YYI18N to YY_.
6691 Use standard Makefile.in.in in runtime-po, since we'll arrange
6692 for backward-compatible bison-runtime.po files in a different way.
6693 * data/glr.c (YY_): New macro, from yacc.c.
6694 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6695 Translate messages intended for users.
6696 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6697 the wording in the other skeletons. We don't know that the memory
6698 is virtual.
6699 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6700 Use same method that yacc.c uses.
6701 Don't translate debugging messages.
6702 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6703 it doesn't work (yet), and requires C++ expertise to fix.
6704 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6705 Move defn to a more logical place, to be consistent with other
6706 skeletons.
6707 Don't translate debugging messages.
6708 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6709 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6710 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6711 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6712
ac8c5689
PE
6713 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6714 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6715 void, not int.
6716 * tests/glr-regression.at (Badly Collapsed GLR States):
6717 Likewise.
6718 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6719 yylex should return 0 at EOF rather than aborting.
6720
6100a9aa
PE
6721 Improve tests for stack overflow in GLR parser.
6722 Problem reported by twlevo@xs4all.nl.
6723 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6724 All uses removed.
6725 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6726 can handle the problem.
6727 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6728 (yyparse): New local variable yyresult to record the result.
6729 Use result of setjmp to set it, rather than storing itinto
6730 struct.
6731 (yyDone): Remove label.
6732 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6733 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6734 if YYABORT is used).
6735 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6736 yyparse status; put status > 1 into diagnostic.
6737 Check that status==2 works.
6738 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6739 Use exit status 3 for failure to open (which shouldn't happen).
6740
15f40952
PE
67412005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6742
67fd79c4
PE
6743 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6744 1 on syntax error; just let yyparse do its thing.
6745 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6746 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6747 (Exploding the Stack Size with Alloca):
6748 (Exploding the Stack Size with Malloc):
6749 Expect exit status 2, not 1, since the parser is supposed to blow
6750 its stack. Problem reported by twlevo@xs4all.nl.
6751
15f40952
PE
6752 * data/glr.c (yyparse): Don't assume that the initial calls
6753 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6754 Print a stack-overflow message and fail instead.
6755 Initialize the line-number information before creating the stack,
6756 so that the stack-overflow message can report line zero safely.
6757
f32c66b5
PE
67582005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6759
a22ff96f 6760 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
6761 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6762 (yyuserMerge): Provide a default case if b4_mergers is empty.
6763 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6764 * tests/glr-regression.at
6765 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 6766 Add casts to pacify C++ compilers.
1beb0b24
PE
6767 * tests/glr-regression.at (Improper merging of GLR delayed action
6768 sets): Declare yylex before using it.
f32c66b5 6769 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
6770 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6771 test for valgrind; valgrind is independent of g++.
6772 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6773 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6774 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6775 Use a destructor, so that we can expand the stack. Change
6776 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 6777
d741bd1b
PE
67782005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6779
6780 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6781 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6782
0410a6e0
PE
67832005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6784
6785 * PACKAGING: New file, suggested by Bruno Haible and taken from
6786 similar wording in gettext's PACKAGING file.
6787 * NEWS: Mention PACKAGING.
6788 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6789
f7ab6a50
PE
67902005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6791
baf785db 6792 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
6793 * bootstrap: Get runtime translations into runtime-po.
6794 Create runtime-po files automatically, if possible.
6795 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6796 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6797 does not infringe on the user's name space.
6798 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6799 * doc/bison.texinfo (Internationalization): Revamp the English
6800 and Texinfo syntax a bit, to try to make it clearer.
6801 (Bison Options, Option Cross Key): Mention --print-localedir.
6802 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6803 YYENABLE_NLS. Quote a bit more.
6804 * runtime-po/.cvsignore: New file.
6805 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6806 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6807 * runtime-po/quot.sed: Likewise.
6808 * runtime-po/boldquot.sed: Likewise.
6809 * runtime-po/en@quot.header: Likewise.
6810 * runtime-po/en@boldquot.header: Likewise.
6811 * runtime-po/insert-header.sin: Likewise.
6812 * runtime-po/remove-potcdate.sin: Likewise.
6813 * runtime-po/Makevars: Likewise.
6814 * runtime-po/LINGUAS: Likewise.
6815 * runtime-po/de.po: Likewise; we will rely on the translation project
6816 to maintain this, so "bootstrap" should get it.
0410a6e0 6817 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
6818 its value.
6819 * src/main.c (main): Bind the bison-runtime domain, too.
6820
68212005-07-12 Bruno Haible <bruno@clisp.org>
6822
6823 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6824 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6825 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6826 * runtime-po: New directory.
6827 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6828 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6829 * runtime-po/Rules-quot: New file, copied from po/.
6830 * runtime-po/quot.sed: Likewise.
6831 * runtime-po/boldquot.sed: Likewise.
6832 * runtime-po/en@quot.header: Likewise.
6833 * runtime-po/en@boldquot.header: Likewise.
6834 * runtime-po/insert-header.sin: Likewise.
6835 * runtime-po/remove-potcdate.sin: Likewise.
6836 * runtime-po/Makevars: New file.
6837 * runtime-po/POTFILES.in: New file.
6838 * runtime-po/LINGUAS: New file.
6839 * runtime-po/bison-runtime.pot: New file.
6840 * runtime-po/de.po: New file.
6841 * m4/bison.m4: New file.
6842 * Makefile.am (SUBDIRS): Add runtime-po.
6843 (aclocaldir, aclocal_DATA): New variables.
6844 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6845 Define aclocaldir.
6846 * src/getargs.c (usage): Document --print-localedir option.
6847 (PRINT_LOCALEDIR_OPTION): New enum item.
6848 (long_options): Add --print-localedir option.
6849 (getargs): Handle --print-localedir option.
6850 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6851 (Internationalization): New section.
6852
22dda0f0
AD
68532005-07-12 Akim Demaille <akim@epita.fr>
6854
6855 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6856 for consistency with the rest of the code.
6857 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6858 Add separators.
6859
82b248ad
AD
68602005-07-12 Akim Demaille <akim@epita.fr>
6861
6862 * src/parse-gram.y: Use %printer instead of YYPRINT.
6863
fa0e9314
AD
68642005-07-12 Akim Demaille <akim@epita.fr>
6865
867a3e00
AD
6866 * src/symtab.h, src/symtab.c (symbol_print): New.
6867 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6868 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6869
68702005-07-12 Akim Demaille <akim@epita.fr>
6871
6872 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
6873 b4_at_dollar and b4_dollar_dollar.
6874
e054b190
PE
68752005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6876
6877 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6878 and Pennello's paper.
6879
34160ec4
PE
68802005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6881
407d4a75
PE
6882 * data/yacc.c (yyparse): Undo previous patch. Instead,
6883 set yylsp[0] and yyvsp[0] only if the initial action
6884 sets yylloc and yylval, respectively.
6885
34160ec4
PE
6886 * data/yacc.c (yyparse): In the initial action, set
6887 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6888 This avoids the use of undefined variables if the initial
6889 action does not set yylloc and/or yylval.
6890
c3d5a4a7
PE
68912005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6892
b34d96c1
PE
6893 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6894 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6895 Remove from CVS. These files are automatically generated.
6896 * examples/extexi: Clarify that this file is now part of Bison,
6897 not GNU M4, and that it works with any POSIX-compatible Awk.
6898 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6899 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6900 so that we also get calc++-parser.yy. Geneate it.
6901 Use $(AWK), not gawk, since any conforming Awk will do.
6902 Put comment before action, since older 'make' can't handle comment
6903 in action.
6904 $(BUILT_SOURCES): List all built sources, not just some of them.
6905 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6906 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6907 $($(calc_sources_generated)): Remove unnecessary test for existence
6908 of target. (This had a shell syntax error anyway; a stray "x".)
6909 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6910 calc++-parser.yy.
6911 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6912
c3d5a4a7
PE
6913 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6914 implied by the other modules.
6915
828c373b
AD
69162005-07-06 Akim Demaille <akim@epita.fr>
6917
6918 Bind examples/calc++ to the package.
6919 * examples/calc++/Makefile: Remove, replaced by...
6920 * examples/calc++/Makefile.am: ... this new file.
6921 * examples/calc++/test: Remove input.
6922 * examples/calc++/compile: Remove.
6923 * examples/Makefile.am: New.
6924 * configure.ac, Makefile.am: Adjust.
6925 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6926
63cb01d6
PE
69272005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6928
fd2df2ed
PE
6929 * data/glr.c (yyFail): Drastically simplify; since the format argument
6930 never had any % directives, we can simply pass it to yyerror.
6931 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6932 be modified later, as that is the usual style in glr.c.
6933 Problems reported by Paul Hilfinger.
6934
63cb01d6
PE
6935 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6936 and size overflow errors.
6937 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6938 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6939 (YYSIZEMAX): New macro.
6940 (yystpcpy): New function, taken from yacc.c.
6941 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6942 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6943 so that we don't have to maintain their signatures.
6944 (yyFail): Check for buffer overflow, by using vsnprintf rather
6945 than vsprintf. Allocate a bigger buffer if possible.
6946 Report an error if buffer allocation fails.
6947 (yyStackOverflow): New function.
6948 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6949 the initialization was successful. It might fail if storage was
6950 exhausted.
6951 (yyexpandGLRStack): Add more checks for storage allocation failure.
6952 Use yyStackOverflow to report failures.
6953 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6954 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6955 Don't assume stack number fits in int.
6956 (yysplitStack): Check for storage allocation failure.
6957 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6958 can print diagnostics on storage allocation failure. All callers
6959 changed.
6960 (yyresolveValue): Use yybool for boolean.
6961 (yyreportSyntaxError): Check for size-calculation overflow.
6962 This code is taken from yacc.c.
6963 (yyparse): Check for storage allocation errors when allocating
6964 the initial stack.
6965
1c59e0a1
AD
69662005-07-05 Akim Demaille <akim@epita.fr>
6967
6968 Extract calc++ from the documentation.
6969 * doc/bison.texinfo (Calc++): Add the extraction marks.
6970 * examples/extexi: New, from the aborted GNU Programming 2E.
6971 Separate the different paragraph of a file with empty lines.
6972 * examples/Makefile: Use it to extract the whole calc++ example.
6973
8a0adb01
AD
69742005-06-24 Akim Demaille <akim@epita.fr>
6975
6976 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6977 class typedefs.
6978
12545799
AD
69792005-06-22 Akim Demaille <akim@epita.fr>
6980
6981 * doc/bison.texinfo (C++ Language Interface): First stab.
6982 (C++ Parsers): Remove.
6983
99be0235
AD
69842005-06-22 Akim Demaille <akim@epita.fr>
6985
6986 * data/lalr1.cc (yylex_): Honor %lex-param.
6987
0ffd4fd1
AD
69882005-06-22 Akim Demaille <akim@epita.fr>
6989
6990 Start a set of simple examples.
6991 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6992 * examples/calc++/calc++-driver.hh,
6993 * examples/calc++/calc++-parser.yy,
6994 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
6995 * examples/calc++/compile, examples/calc++/test: New.
6996
0925ebb4
PE
69972005-06-09 Paul Eggert <eggert@cs.ucla.edu>
6998
6999 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7000 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7001 which stems from the 2005-05-27 patch.
7002
43d3b664
PH
70032005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7004
7005 * data/glr.c: Modify treatment of unused parameters to permit use
7006 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7007
3062864d
PE
70082005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7009
7010 Fix infringement on user name space reported by Janos Zoltan Szabo.
7011 * data/yacc.c (yyparse): strlen -> yystrlen.
7012
989b5b8e
AD
70132005-05-30 Akim Demaille <akim@epita.fr>
7014
7015 * data/lalr1.cc (_): New.
7016 Translate the various messages.
7017
bedf57f5
PE
70182005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7019
7020 Fix infringement on user name space reported by Bruno Haible.
7021 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7022 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7023 the user's name space.
7024 (alloca): Include <stdlib.h> to get it, if it's not built in.
7025 (YYMALLOC, YYFREE): Define only if needed.
7026 (malloc, free): Declare, but only if needed, as this infringes on
7027 the user name space.
7028
4d1801f1
PE
70292005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7030
7031 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7032 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7033 with %d format.
7034 * lib/ebitset.c (min, max): Undef before defining.
7035 * lib/vbitset.c (min, max): Likewise.
7036 * lib/subpipe.c (create_subpipe): Save local variables in case
7037 vfork clobbers them.
7038
70392005-05-24 Bruno Haible <bruno@clisp.org>
7040
7041 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7042 error message syntax used by gcc-4.0.
7043
b94a9e1e
PE
70442005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7045
85ac3861
PE
7046 * README: Mention m4 1.4.3. Remove obsolete advice about
7047 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7048
b94a9e1e
PE
7049 * bootstrap: Remove workaround for problem I encountered with
7050 gettext 0.14.1; it seems to be fixed now.
7051
51c30d21
PE
70522005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7053
009ce67d
PE
7054 * NEWS: Version 2.0a.
7055
f2a97c62
PE
7056 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7057 the previous change.
7058
c8775f93
PE
7059 Various maintainer cleanups.
7060 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7061 conftest*, for benefit of CVS commands run at the same time as
7062 "configure". Add build-aux, since "bootstrap" now creates it and
7063 its subfiles.
7064 * Makefile.cfg (move_if_change): Remove.
7065 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7066 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7067 (po_repo, do-po-update, po-update, wget_files, get-targets):
7068 (config.guess-url_prefix, config.sub-url_prefix):
7069 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7070 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7071 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7072 Remove.
7073 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7074 this is now the recommended name.
7075 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7076 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7077 ylwrap. These files now go into build-aux.
7078 * config/move-if-change: Remove.
7079 * config/prev-version.txt: Bump from 1.75 to 2.0.
7080
3ea5f0ec
PE
7081 * bootstrap: Add stdio-safer, unistd-safer modules.
7082 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7083 we don't need it).
7084 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7085 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7086 * lib/subpipe.c: Include "unistd-safer.h".
7087 (create_subpipe): Make sure all the newly-created
7088 file descriptors are > 2, so that diagnostics don't
7089 get sent down them (which might cause Bison to hang, in theory).
7090 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7091 * src/files.c (xfopen): Use fopen_safer, not fopen.
7092
51c30d21
PE
7093 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7094 yesterday's yacc.c fix.
7095
cea1469d
PE
70962005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7097
3ea5f0ec
PE
7098 * data/glr.c, data/lalr1.cc: Update copyright date.
7099
cea1469d
PE
7100 Fix a destructor bug reported by Wolfgang Spraul in
7101 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7102 * data/yacc.c (yyabortlab): Don't call destructor, and
7103 don't set yychar to EMPTY.
7104 (yyoverflowlab): Don't call destructor.
7105 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7106 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7107 since we no longer output the message "discarding lookahead token
7108 end of input ()".
7109
5e6f62f2
PH
71102005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7111
7112 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7113 fix a small glitch in debugging output.
7114 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7115 after YY_SYMBOL_PRINT where needed.
7116
7117 (struct yyGLRState): Add some comments.
7118 (struct yySemanticOption): Add some comments.
7119 (union yyGLRStackItem): Add comment.
7120
7121 (yymergeOptionSets): Correct this to properly perform the union,
7122 avoiding infinite reported by Michael Rosien.
7123 Update comment.
7124
7125 * tests/glr-regression.at: Add test for GLR merging error reported
7126 by M. Rosien.
cea1469d 7127
0fb669f9
PE
71282005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7129
7130 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7131 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7132 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7133 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7134 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7135 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7136 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7137 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7138 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7139 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7140 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7141 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7142 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7143 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7144 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7145 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7146 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7147 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7148 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7149 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7150 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7151 src/output.h, src/parse-gram.c, src/parse-gram.h,
7152 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7153 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7154 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7155 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7156 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7157 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7158 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7159 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7160 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7161 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7162 tests/reduce.at, tests/regression.at, tests/sets.at,
7163 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7164 Update FSF postal mail address.
7165
51f4735e
PE
71662005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7167
7168 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7169 Problem reported by Ralf Menzel.
7170
80ce3401
PE
71712005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7172
7173 * tests/actions.at: Test that stack overflow invokes destructors.
7174 From Marcus Holland-Moritz.
7175 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7176 from here....
7177 (yyreturn): to here. That way, destructors are called properly
7178 even if the stack overflows, or the user calls YYACCEPT or
7179 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7180 (yyoverflowlab): Destroy the lookahead.
7181
71822005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7183
7184 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7185
72f000b0
PE
71862005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7187
7188 * NEWS: Bison-generated C parsers no longer quote literal strings
7189 associated with tokens.
7190 * src/output.c (prepare_symbols): Don't escape strings,
7191 since users don't want to see C escapes.
7192 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7193 in diagnostics.
c19683bb 7194 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
7195 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7196
1094323f
PE
71972005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7198
7199 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7200 the data size is known to be too small and we can't increase it.
7201 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7202
ca407bdf
PE
72032005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7204
7205 * src/parse-gram.y: Include quotearg.h.
7206 (string_as_id): Quote $1 before using it as a key, since the
7207 lexer no longer quotes it for us.
7208 (string_content): Don't strip quotes, since lexer no longer
7209 quotes it for us.
7210 * src/scan-gram.l: Include quotearg.h.
7211 ("\""): Omit quote.
7212 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7213 a key, since the rest of the lexer doesn't quote it.
7214 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7215 * tests/regression.at (Token definitions): Check for backslashes
7216 in token strings.
7217
7218 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7219 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7220 (yyparse): Revamp code to generate long syntax error message, to
7221 make it easier to translate, and to avoid problems with arithmetic
7222 overflow. Change "virtual memory" to "memory" in diagnostic, since
7223 we don't know whether the memory is virtual.
7224
1ce59070
PE
72252005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7226
7227 * NEWS: Bison-generated C parsers now use the _ macro to
7228 translate strings.
7229 * data/yacc.c (_) [!defined _]: New macro.
7230 All English strings wrapped inside this macro.
7231 * doc/bison.texinfo (Bison Parser): Document _.
7232 * po/POTFILES.in: Include src/parse-gram.c, since it now
7233 includes translateable strings that parse-gram.y doesn't.
7234
a749a695
PE
72352005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7236
7237 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7238 reverting the 2004-10-11 change to this function.
7239 (symbol_check_alias_consistency): Don't call symbol_type_set
7240 if the type name is already correct.
7241 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7242
8fb1053b
PE
72432005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7244
7245 * tests/regression.at (Token definitions): Don't use a token named
7246 c, as that generates a "#define c ..." that runs afoul of buggy
7247 stdlib.h that uses the identifier c as a member of struct
7248 drand48_data. Problem reported by Horst Wente.
7249
ff498c4a
PE
72502005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7251
7252 * bootstrap: Change translation URL from
7253 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7254 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7255 redirection glitches. Problem reported by twlevo@xs4all.nl.
7256
65211d70
PE
72572005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7258
7259 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7260 after operands; POSIX says this isn't portable for the c99 command.
7261
9577fb1f
PE
72622005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7263
7264 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7265 immediately if a data overrun has occurred; this may help us track
7266 down what may be a spurious failure on MacOS.
7267
78b178f7
PE
72682005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7269
a2599d0f
PE
7270 Respond to problems reported by twlevo@xs4all.nl.
7271
7272 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7273
78b178f7
PE
7274 * src/vcg.h: Comment fix.
7275 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7276 (G_CMAX): Change to -1 instead of INT_MAX.
7277
7278 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 7279
7296e729
PE
72802005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7281
7282 * src/tables.c (state_number_to_vector_number): Put it inside an
7283 "#if 0", since it's not currently used. Problem reported by
7284 Roland McGrath.
7285
05ac60f3
PE
72862005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7287
7288 * src/output.c (escaped_output): Renamed from
7289 escaped_file_name_output, since we now use it for symbol tags as
7290 well. All uses changed.
7291 (symbol_destructors_output, symbol_printers_output):
7292 Escape symbol tags too.
7293 Problem reported by Matyas Forstner in
7294 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7295
7296 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7297 not needed.
7298 * src/output.c (user_actions_output, token_definitions_output,
7299 symbol_destructors_output, symbol_printers_output): Likewise.
7300 * src/reader.c (prologue_augment): Likewise.
7301 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7302
7303 * src/vcg.c (output_edge): Don't quote linestyle arg.
7304 Problem reported by twlevo@xs4all.nl.
7305
7eb453ac
PE
73062005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7307
7308 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7309 example, reported by Derek M Jones. Also, make the example even
7310 more outrageous, to better illustrate how bad the problem is.
7311
4c04c52a
PE
73122005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7313
7314 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7315 putsym. Typo reported by Sebastian Piping.
7316
a61e1620
PE
73172005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7318
7319 * doc/bison.texinfo (Language and Grammar): some -> same
7320 (Epilogue): int he -> in the
7321 Typos reported by Sebastian Piping via Justin Pence.
7322
9ec93868
PE
73232005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7324
7325 * tests/glr-regression.at (Improper handling of embedded actions
7326 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7327 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7328 with dollar signs in test names.
7329 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7330 for a similar reason.
7331
73ce7e7e
PE
73322005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7333
7334 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7335 wants to redefine G_VIEW.
7336
2e72b98e
PE
73372005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7338
7339 * src/vcg.c (get_view_str): Remove case for normal_view.
7340 Problem reported by twlevo@xs4all.nl.
7341
e0d634e5
PE
73422005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7343
ccf830a4
PE
7344 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7345 Problem reported by twlevo@xs4all.nl.
7346
e0d634e5
PE
7347 * doc/bison.texinfo: Change @dircategory from "GNU programming
7348 tools" to "Software development". Requested by Richard Stallman
7349 via Karl Berry.
7350
7bbc8cb0
PE
73512005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7352
7353 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7354 Problem reported by twlevo@xs4all.nl.
7355
08b770bc
PE
73562005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7357
7358 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7359 keyword; it's not needed with modern compilers, and it doesn't
7360 affect correctness with older compilers. Suggested by
7361 twlevo@xs4all.nl.
7362
95f22ad2
PE
73632005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7364
7365 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7366 gcc -Wswitch-default.
7367 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7368 * data/yacc.c (yyparse): Likewise.
7369
d229d15c
PE
73702005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7371
7372 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7373 already. Let config.h define any nonstandard values.
7374
ecadd90f
PE
73752005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7376
7377 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7378 for the benefit of slower hosts. Problem reported by
7379 Nelson H. F. Beebe.
7380
213744b5
PE
73812005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7382
7383 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7384 being defined and not used.
7385 * data/lalr1.cc (yyparse): Likewise.
7386 Use "if (false)" rather than "if (0)".
7387
249d3236
PE
73882005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7389
7390 * TODO: Mention that we should allow NUL bytes in tokens.
7391
987cc1fb
PE
73922005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7393
7394 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7395 Problem reported by Hans Aberg.
7396
08fe02d9
PE
73972005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7398
7399 * src/getargs.c (version): Happy new year; update overall
7400 program copyright date from 2004 to 2005.
7401
7402 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7403 Problem reported by Hans Aberg.
7404 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7405 (Output file names.): Add a test for the case when standard output
7406 is closed.
7407
010c0266
PE
74082004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7409
7410 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7411 to fix an oversight in the Bison 2.0 manual.
7412
da12206a
PE
74132004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7414
7415 * NEWS: Version 2.0. Reformat the existing news items since
7416 1.875, so that related items are grouped together.
3a4734aa 7417 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
7418 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7419
c935d934
PE
7420 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7421 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7422 otherwise, we're not testing alloca. Unfortunately there's no
7423 simple way to consult HAVE_ALLOCA here.
7424
da12206a
PE
7425 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7426 for yymsg, too.
7427
7428 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7429 hand. This avoids a warning about comparing int to size_t when
7430 GCC warnings are enabled.
7431
0a2c5137
PE
74322004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7433
d7e14fc0
PE
7434 * NEWS: Bison-generated parsers no longer default to using the
7435 alloca function (when available) to extend the parser stack, due
7436 to widespread problems in unchecked stack-overflow detection.
7437 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7438 responsibility to set it to a positive value. This lets the user
7439 specify a value that is not a preprocessor constant.
7440 * data/yacc.c (YYMAXDEPTH): Likewise.
7441 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7442 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7443 to be a compile-time constant. However, explain the constraints on it.
7444 Also, explain the constraints on YYINITDEPTH.
7445 (Table of Symbols): Explain that alloca is no longer the default.
7446 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7447 to 1.
7448
0a2c5137
PE
7449 * doc/bison.texinfo (Location Default Action): Mention that n must
7450 be zero when k is zero. Suggested by Frank Heckenbach.
7451
e019c247
AD
74522004-12-22 Akim Demaille <akim@epita.fr>
7453
7454 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7455 (parser::state_type, parser::semantic_type, parser::location_type):
7456 Private, not public.
7457 (parser::parse): Return ints, not bool.
7458 Returning a bool introduces a problem: 0 corresponds to false, and
7459 it seems weird to return false on success. Returning true changes
7460 the conventions for yyparse.
7461 Alternatively we could return void and send an exception.
7462 There is no clear consensus (yet?).
7463 (state_stack, semantic_stack, location_stack): Rename as...
7464 (state_stack_type, semantic_stack_type, location_stack_type): these.
7465 Private, not public.
7466 * tests/c++.at: New.
7467 * tests/testsuite.at, tests/Makefile.am: Adjust.
7468
72731bb7
AD
74692004-12-21 Akim Demaille <akim@epita.fr>
7470
7471 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7472
9a0d8bec
AD
74732004-12-21 Akim Demaille <akim@epita.fr>
7474
7475 Don't impose std::string for filenames.
7476
7477 * data/lalr1.cc (b4_filename_type): New.
7478 (position::filename): Use it.
7479 (parser.hh): Move the inclusion of stack.hh and location.hh below
7480 the user code, so that needed headers for the filename type can be
7481 included first.
72731bb7
AD
7482 Forward declare them before the user code.
7483 * tests/Makefile.am (check-local, installcheck-local): Pass
7484 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 7485
99880de5
AD
74862004-12-20 Akim Demaille <akim@epita.fr>
7487
7488 Use more STL like names: my_class instead of MyClass.
7489
7490 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7491 (SemanticStack, SemanticType, StateStack, StateType)
7492 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7493 (Parser::value): Rename as...
7494 (location_stack, location_type, rhs_number_type, semantic_stack)
7495 (semantic_type, state_stack, state_type, token_number_type, stack)
7496 (slice, traits, parser::yylloc, parser::yylval): these.
7497
7498 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7499
9bec482e
PE
75002004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7501
7502 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7503 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7504
f6fbd3da
PE
75052004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7506
7507 Remove uses of 'short int' and 'unsigned short int'. This raises
7508 some arbitrary limits. It uses more memory but nowadays that's
7509 not much of an issue.
7510
7511 This change does not affect the generated parsers; that's a different
7512 task, as some users will want to conserve memory there.
7513
7514 Ideally we should use size_t to represent all object counts, and
7515 something like ptrdiff_t to represent signed differences of object
7516 counts; but that will require more code-cleanup than I have the
7517 time to do right now.
7518
7519 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7520 Use size_t, not int or short int, to count objects.
7521 * src/closure.c (nritemset, closure): Likewise.
7522 * src/closure.h (nritemset, closure): Likewise.
7523 * src/nullable.c (nullable_compute): Likewise.
7524 * src/print.c (print_core): Likewise.
7525 * src/print_graph.c (print_core): Likewise.
7526 * src/state.c (state_compare, state_hash): Likewise.
7527 * src/state.h (struct state): Likewise.
7528 * src/tables.c (default_goto, goto_actions): Likewise.
7529
7530 * src/gram.h (rule_number, rule): Use int, not short int.
7531 * src/output.c (prepare_rules): Likewise.
7532 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7533 errs, reductions): Likewise.
7534 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7535 Likewise.
7536 * src/tables.c (vector_number, tally, action_number,
7537 ACTION_NUMBER_MINIMUM): Likewise.
7538 * src/output.c (muscle_insert_short_int_table): Remove.
7539
efeed023
AD
75402004-12-17 Akim Demaille <akim@epita.fr>
7541
7542 * data/lalr1.cc: Extensive Doxygenation.
7543 (error_): Rename as...
7544 (error): this, since it is visible to the user.
7545 Adjust callers.
7546 (Parser::message): Now an automatic variable from...
7547 (Parser::yyreport_syntax_error_): here.
7548 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7549 Parser::error.
7550 * tests/input.at: Escape $.
7551
bc82c5a5
PE
75522004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7553
7554 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7555 Parenthesize rhs to avoid obscure problems with mistakes like
7556 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7557 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7558 b4_rhs_location): Likewise.
7559 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7560 b4_rhs_location): Likewise.
7561
fd19f271
AD
75622004-12-16 Akim Demaille <akim@epita.fr>
7563
7564 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7565 yacc.c: be sure to stay within yycheck_.
7566 * tests/actions.at: Re-enable C++ tests.
7567
10454ea4
AD
75682004-12-16 Akim Demaille <akim@epita.fr>
7569
7570 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7571 real.
7572
c5b95ccf
AD
75732004-12-16 Akim Demaille <akim@epita.fr>
7574
7575 Use #define to handle the %name-prefix.
7576
7577 * data/glr.c, data/yacc.c: Comment changes.
7578 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7579 so that one can refer to yylex in the parser file, and have it
7580 renamed, as is the case with other skeletons.
7581
617a8f12
AD
75822004-12-16 Akim Demaille <akim@epita.fr>
7583
7584 Move lalr1.cc internals into yy*.
7585
7586 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7587 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7588 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7589 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7590 (empty_, final_, terror_, errcode_, ntokens_)
7591 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7592 (looka_, ilooka_, error_range_, nerrs_):
7593 Rename as...
7594 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7595 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7596 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7597 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7598 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7599 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7600 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7601 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7602 these.
7603
1e547e6e
PE
76042004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7605
7606 Fix some problems reported by twlevo at xs4all.
7607 * src/symtab.c (symbol_new): Report an error if the input grammar
7608 contains too many symbols. This is better than calling abort() later.
7609 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7610 (struct node, struct graph):
7611 Rename member expand to stretch. All uses changed.
7612 (struct graph): Remove member layoutalgorithm. All uses removed.
7613 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7614 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7615 All uses changed.
7616 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7617
735d6bd4
AD
76182004-12-15 Akim Demaille <akim@epita.fr>
7619
7620 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7621 Add more Doxygen comments.
7622 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7623 (report_syntax_error_, translate_): Rename as...
7624 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7625 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7626
2e1f5829
AD
76272004-12-15 Akim Demaille <akim@epita.fr>
7628
7629 * data/lalr1.cc (lex_): Rename as...
7630 (yylex_): this.
7631 Move the trace here.
7632 Take the %name-prefix into account.
7633 Reported by Alexandre Duret-Lutz.
7634
a3cb6248
AD
76352004-12-15 Akim Demaille <akim@epita.fr>
7636
7637 Simplify the C++ parser constructor.
7638
7639 * data/lalr1.cc (debug_): Rename as...
7640 (yydebug_): so that the parser's internals are always in the yy*
7641 pseudo namespace.
7642 Adjust uses.
7643 (b4_parse_param_decl): Remove the leading comma as it is now only
7644 called as unique argument list.
7645 (Parser::Parser): Remove the constructor accepting a location and
7646 an initial debugging level.
7647 Remove from the other ctor the argument for the debugging level.
7648 (debug_level_type, debug_level, set_debug_level): New.
7649
7650 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7651 constructor calls.
7652
07fed891
AD
76532004-12-15 Akim Demaille <akim@epita.fr>
7654
7655 Remove b4_root related material: failure experiment
a3cb6248 7656 (which goal was to allow to derive from a class).
07fed891
AD
7657
7658 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7659 definitions and uses.
7660
e603eaa5
PE
76612004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7662
7663 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7664 not 2, since it's not portable to subtract 1 from the start of an
7665 array. The new item 0 is never set or used. All uses changed.
7666
7667 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7668 the default definition of YYLLOC_DEFAULT. Problem reported
7669 by Frank Heckenbach.
7670
fafb007d
PE
76712004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7672
7673 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7674 the normal case and one for the error case. Just use the
7675 first one uniformly. Problem reported by Frank Heckenbach.
7676 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7677 use exactly the same macro in both places.
7678 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7679 so that the normal-case YYRHSLOC works for the error case too.
7680 All uses changed.
7681 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7682 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7683 * doc/bison.texinfo (Location Default Action): Don't claim that
7684 we have an array of locations. Use the same macro for both glr
7685 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7686 the index is 0.
7687
48814dcd
PE
76882004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7689
a4e1a53b
PE
7690 * HACKING: Update email addresses to send announcements to.
7691
48814dcd
PE
7692 * configure.ac (AC_INIT): Bump version to 1.875f.
7693
337116ba
PE
76942004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7695
7696 * NEWS: Version 1.875e.
7697 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7698
7699 * src/scan-skel.l: Include "complain.h", for "fatal".
7700
7701 * src/relation.h (relation_print, relation_digraph):
7702 Relation sizes are of type relation_node, not size_t (this is
7703 merely a doc fix, since the two types are equivalent).
7704 (relation_transpose): Relation sizes are of type relation_node,
7705 not int.
7706 * src/relation.c: Likewise.
7707 (top, infinity): Now of type relation_node, not int.
7708 (traverse, relation_transpose): Use relation_node, not int.
7709
7710 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7711 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7712 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7713
7714 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 7715 specifying whether the test should be skipped. Use it tp
337116ba 7716 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 7717 fail on some hosts, and should be skipped.
337116ba 7718
da2a7671
PE
77192004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7720
7721 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7722 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7723 unless otherwise specified below.
7724
7725 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7726 to allocate kernel_base, kernel_items, kernel_size, since
7727 they needn't be initialized to 0.
7728 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7729 * src/closure.c (new_closure): Likewise, for itemset.
7730 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7731 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7732 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7733 (build_relations): Likewise for edge, states1, includes.
7734 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7735 * src/reader.c (packgram): Likewise, for ritem, rules.
7736 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7737 * src/relation.c (relation_digraph): Likewise for VERTICES.
7738 (relation_transpose): Likewise for new_R, end_R.
7739 * src/symtab.c (symbols_token_translations_init): Likewise for
7740 token_translations.
7741 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7742 (token_actions): Likewise for yydefact, actrow, conflrow,
7743 conflict_list.
7744 (save_column): Likewise for froms[symno], tos[symno].
7745 (goto_actions): Likewise for state_count.
7746 (pack_table): Likewise for base, pos, check.
7747 (tables_generate): Likewise for width.
7748
7749 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7750 for initial core. Just have a separate core, so we needn't worry
7751 about whether kernel_size and kernel_base are initialized.
7752
7753 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7754 kernel_size, kernel_items): Remove unnecessary initialization.
7755 * src/conflicts.c (conflicts): Likewise.
7756 * src/derives.c (derives): Likewise.
7757 * src/muscle_tablc (muscle_insert): Likewise.
7758 * src/relation.c (relation_digraph): Likewise.
7759 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7760 conflrow, conflict_table, conflict_list, table, check):
7761 Likewise.
7762
7763 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7764 This is because all callers pass unsigned int.
7765 * src/closure.h (new_closure): Likewise.
7766
7767 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7768 (build_relations): Initialize includes[i] in all cases.
7769 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7770 and rules[ruleno].precsym. Initialize members in order.
7771 * src/relation.c (relation_transpose): Always initialize new_R[i]
7772 and end_R[i].
7773 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7774
7775 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7776 conflict_list[0] was always 0, but now it isn't initialized.
7777
7778 * src/table.c (table_grow): When conflict_table grew, the grown
7779 area wasn't cleared. Fix this.
7780
7781 * lib/.cvsignore: Add strdup.c, strdup.h.
7782 * m4/.cvsignore: Add strdup.m4.
7783
00baeeac
PE
77842004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7785
7786 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7787 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7788 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7789 ngotos + 1 without checking for overflow.
7790 (build_relations): Use END_NODE, not -1, to denote end of edges.
7791 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7792 build_relations): Use goto_number, not int, for goto numbers.
7793 * src/tables.c (save_column, default_goto): Likewise.
7794
be3d9d42
AD
77952004-11-23 Akim Demaille <akim@epita.fr>
7796
7797 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7798 of #defining from yystype.
7799 Don't typedef yystype, C++ does not need it.
7800 This lets it possible to forward declare it as union.
7801
78e526d5
PE
78022004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7803
7804 * bootstrap (gnulib_modules): Add extensions.
7805 Problem reported by Jim Meyering.
7806
afbb696d
PE
78072004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7808
7809 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7810 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7811 src/system.h, src/tables.c: XFREE -> free, to accommodate
7812 recent change to gnulib xalloc.h.
78e526d5 7813 Problem reported by Jim Meyering.
afbb696d 7814
c1f8f16a
AD
78152004-11-17 Akim Demaille <akim@epita.fr>
7816
7817 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7818
db7e5eb5 78192004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
7820 Alexandre Duret-Lutz <adl@gnu.org>
7821
7822 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7823 changes.
7824 (YYCDEBUG): Adjust.
7825 Use it instead of cdebug_.
7826 (Parser::debug_stream, Parser::set_debug_stream): New.
7827 (Parser::symprint_): Define cdebug_ for temporary backward
7828 compatibility.
7829 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7830 debug_stream ().
7831
68e11668
AD
78322004-11-17 Akim Demaille <akim@epita.fr>
7833
7834 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7835 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7836 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7837 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7838
97cbc73e
PE
78392004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7840
7841 * data/glr.c (yyloc_default): Remove; not used.
7842 Problem reported by Frank Heckenbach.
7843
e342c3be
AD
78442004-10-25 Akim Demaille <akim@epita.fr>
7845
7846 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7847 Introduce another definition to address simple location arrays.
7848 (yyGLRStack): New member: yyerror_range.
7849 (yyrecoverSyntaxError, yyparse): Update it.
7850 (yyrecoverSyntaxError): Use it when shifting the error token to
7851 have an accurate range, equivalent to the one computed by both
7852 yacc.c and lalr1.cc.
7853 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7854 that column numbers start at column 0, as per GNU Coding
7855 Standards, the others tests, and the doc.
7856 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7857 Adjust to the above change (first column is 0).
7858 And adjust the location of the "<error>", now covering the whole
7859 line.
7860
93602feb 78612004-10-22 Akim Demaille <akim@epita.fr>
04098407 7862 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
7863
7864 Remove some arbitrary limits on goto numbers and relations.
7865 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7866 initial values, since they're never used.
7867 (set_goto_map): ngotos is now unsigned, so test for overflow
7868 by seeing whether it wraps around to zero.
7869 * src/lalr.h (goto_number): Now size_t, not short int.
7870 (GOTO_NUMBER_MAXIMUM): Remove.
7871 * src/relation.c (relation_print, traverse, relation_transpose):
7872 Check for END_NODE rather than looking at sign.
7873 * src/relation.h (END_NODE): New macro.
7874 (relation_node): Now size_t, not short int.
7875
dba08b04
PE
78762004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7877
7878 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7879 keyword, not an identifier. Problem reported by Baron Schwartz in
7880 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7881
df09ef2e
AD
78822004-10-11 Akim Demaille <akim@epita.fr>
7883
7884 * src/symtab.c (symbol_check_alias_consistency): Also check
7885 type names, destructors, and printers.
7886 Reported by Alexandre Duret-Lutz.
7887 Recode the handling of associativity and precedence in terms
7888 of symbol_precedence_set.
7889 Accept no redeclaration at all, not even equal to the previous
7890 value.
7891 (redeclaration): New.
7892 Use it to factor redeclaration complaints.
7893 (symbol_make_alias): Don't set the type of the alias, let
7894 symbol_check_alias_consistency do it as for other features.
7895 * src/symtab.h (symbol): Add new member prec_location, and
7896 type_location.
7897 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7898 * tests/input.at (Incompatible Aliases): New.
7899
146bc99d
PE
79002004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7901
7902 .cvsignore fixes to accommodate gnulib changes,
7903 and the practice of naming build directories "_build".
7904 * .cvsignore: Add "_*". Sort.
7905 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7906 * m4/.cvsignore: Add "*_gl.m4".
7907
e503aa60
AD
79082004-10-06 Akim Demaille <akim@epita.fr>
7909
7910 * src/parse-gram.y (add_param): Fix the truncation of trailing
7911 spaces.
7912
b4a20338
AD
79132004-10-05 Akim Demaille <akim@epita.fr>
7914
7915 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7916 whether the reducion was empty or not. This leaves room to
7917 improve the use of YYLLOC_DEFAULT in such a case.
7918 lalr1.cc is still experimental, so changing this is acceptable.
7919 And finally, there are probably not many users who changed the
7920 handling of locations in GLR, so changing is admissible too.
7921
7922 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7923 empty reduction, set @$ to an empty location ending the previously
7924 stacked symbol.
7925 Adjust uses to make sure the code is triggered on empty
7926 reductions.
7927 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7928 expected output: empty reductions have empty locations.
7929
f85a5e6f
AD
79302004-09-29 Akim Demaille <akim@epita.fr>
7931
7932 * data/lalr1.cc: Move towards a more standard C++ coding style
7933 for templates: Class < T > -> Class<T>.
7934
b203fc2c
AD
79352004-09-29 Akim Demaille <akim@epita.fr>
7936
7937 * data/lalr1.cc: Reinstall the former ctor, for sake of
7938 compatibility, but warn it will be removed.
7939 Move towards a more standard C++ coding style (i.e., type *var ->
7940 type* var).
7941
5b7e1e73
PE
79422004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7943
3fee967f
PE
7944 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7945 since it's less likely to work if NULs are involved in the future.
5b7e1e73 7946
0dcca5c2
AD
79472004-09-27 Akim Demaille <akim@epita.fr>
7948
7949 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7950
6dde1c82
AD
79512004-09-27 Akim Demaille <akim@epita.fr>
7952
7953 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 7954 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
7955 and argument names.
7956 (b4_cc_constructor_call): Likewise.
7957
b233d555
AD
79582004-09-24 Akim Demaille <akim@epita.fr>
7959
7960 * src/parse-gram.y (add_param): Strip the leading and trailing
7961 blanks from a formal argument declaration.
7962 (YY_LOCATION_PRINT): New.
7963
619404e3
AD
79642004-09-24 Akim Demaille <akim@epita.fr>
7965
7966 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7967 after the location.
7968
dd8d9022
AD
79692004-09-24 Akim Demaille <akim@epita.fr>
7970
7971 * doc/bison.texinfo (Table of Symbols): Sort.
7972
0092f063
AD
79732004-09-21 Akim Demaille <akim@epita.fr>
7974
7975 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7976 the useless parentheses.
7977 Suggested by Paul Eggert.
7978
451364ed
AD
79792004-09-20 Akim Demaille <akim@epita.fr>
7980
7981 Let the initial-action act on the look-ahead, and use it for the
7982 "initial push" (corresponding to an hypothetical beginning-of-file).
7983 And let lalr1.cc honor %initial-action.
7984
7985 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7986 example.
7987 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7988 (Parser::Parser): Remove the ctor that used to initialize it.
7989 (Parser::parse): Like in the other skeletons, issue the "starting
7990 parse" message before any action.
7991 Honor %initial-action.
7992 Initialize the stacks with the lookahead.
7993 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7994 look-ahead.
7995 Push them in the stacks.
7996 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
7997
18d192f0
AD
79982004-09-20 Akim Demaille <akim@epita.fr>
7999
8000 * doc/bison.texinfo (Initial Action Decl): New.
8001
b8458aa5
AD
80022004-09-20 Akim Demaille <akim@epita.fr>
8003
8004 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8005 clearer criterion to define it.
8006 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8007 When reducing on an empty RHS, use the latest stacked location as
8008 location.
8009 yylloc is not always available.
8010 * data/glr.c: Likewise.
8011 Also, honor initial-actions.
8012
3fc16193
AD
80132004-09-20 Akim Demaille <akim@epita.fr>
8014
8015 * data/yacc.c (YY_LOCATION_PRINT): New.
8016 Define when we know YYLTYPE's structure, i.e., when the default
8017 YYLLOC_DEFAULT is used.
8018 * data/c.m4 (b4_yysymprint_generate): Use it.
8019 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8020 value of the result.
8021 (error_start_): Replace with...
8022 (error_range_): this location array.
8023 This allows to replace code relying on the implementation of
8024 locations by portable code.
8025 * data/yacc.c (yylerrsp): Replace with...
8026 (yyerror_range): this.
8027 Every time a token is popped, update yyerror_range[0], to have an
8028 accurate location for the error token.
8029 * data/glr.c (YY_LOCATION_PRINT): New.
8030 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8031 deference a pointer.
8032 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8033 report the location in %printers.
8034
8035 * src/scan-skel.l: Instead of abort, report error messages to ease
8036 understanding skeleton scanning failures.
8037
ecfe33e7
AD
80382004-09-16 Akim Demaille <akim@epita.fr>
8039
8040 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8041 (iterator, const_iterator): these, to be more in the C++ spirit.
8042 Also, return reverse iterators so that when displaying the stack
8043 we display its bottom first.
8044 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8045 from yacc.c.
8046 We should probably use vector here though.
8047
1576d44d
AD
80482004-09-16 Akim Demaille <akim@epita.fr>
8049
8050 Have more complete shift traces.
8051
8052 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8053 to report Shifts instead of ad hoc YYDPRINTF invocations,
8054 including for the error token.
8055 * data/lalr1.cc (symprint_): Output the location.
8056 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8057 output the location within the %printer.
8058 Activate GLR tests, at least to make sure they compile properly.
8059 They still don't pass though.
8060 * tests/calc.at: Adjust expect verbose output, since now "Entering
8061 state..." is on a different line than the "Shifting" message.
8062
9c66f418
AD
80632004-09-08 Akim Demaille <akim@epita.fr>
8064
8065 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8066 Bison directive from the Bison file to the invocation of this
8067 macro, so that these directives are passed to
8068 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8069 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8070 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8071 the extra Bison directives instead of the whole series.
8072 Change the grammar so that there are recoverable errors, and
8073 unrecoverable errors. Now we can have the parser give up before
8074 consuming the whole input. As a result we now can observe that
8075 the lookahead is freed when needed.
8076 Change the parser source to parse argv[1] instead of a hard coded
8077 string.
8078 Simplify yylex, and give a value and location to EOF.
8079 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8080 passed directives already coded in the file.
8081 Add some tests to check the location of "error".
8082 For some tests, the C++ parser is correct, and not yacc.c.
8083 For other tests, they provide different, but unsatisfying, values,
8084 so keep the C++ value so that at least one parser is "correct"
8085 according to the test suite.
8086 (Actions after errors): Remove, this is subsumed by the
8087 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8088
52d5733f
AD
80892004-09-06 Akim Demaille <akim@epita.fr>
8090
8091 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 8092 (Parser::pop): New.
52d5733f
AD
8093 Use it.
8094
a0e68930
AD
80952004-09-06 Akim Demaille <akim@epita.fr>
8096
8097 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8098 argument, an informative message.
8099 Call YY_SYMBOL_PRINT.
8100 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8101 * data/lalr1.cc (destruct_): Likewise.
8102 In addition, no longer depend on b4_yysymprint_generate and
8103 b4_yydestruct_generate to generate these functions, do it "by
8104 hand".
8105
e757bb10
AD
81062004-09-03 Akim Demaille <akim@epita.fr>
8107
8108 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8109 invoked, yydestruct the lookahead.
8110 * tests/calc.at (Calculator $1): Update the expected lengths of
8111 traces: there is an added line for the discarded lookahead.
8112 * doc/bison.texinfo (Destructor Decl): Some rewording.
8113 Define "discarded" symbols.
8114
0fe1f06d
AD
81152004-09-02 Akim Demaille <akim@epita.fr>
8116
8117 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8118
284acc8b
AD
81192004-09-02 Akim Demaille <akim@epita.fr>
8120
8121 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8122 (YYDSYMPRINTF): Rename as...
8123 (YY_SYMBOL_PRINT): this.
8124 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8125 two.
8126 Use it instead of direct symprint_ calls.
8127 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8128 one.
8129
a5eb1ed2
AD
81302004-09-02 Akim Demaille <akim@epita.fr>
8131
b7c72fe1
AD
8132 * data/lalr1.cc (b4_yysymprint_generate): New.
8133 (symprint_): New member function, defined when YYDEBUG.
8134 Use it consistently instead of token/nterm debugging output by
8135 hand.
a5eb1ed2
AD
8136 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8137 %printer calls to use cdebug_ when using lalr1.cc.
8138
417141dd
AD
81392004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8140
8141 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8142 with #ifdef YYDEBUG.
8143
2fa09258
AD
81442004-08-26 Akim Demaille <akim@epita.fr>
8145
8146 * doc/bison.texinfo (Implementing Loops): Rename as...
8147 (Implementing Gotos/Loops): this.
8148
9378b508
PE
81492004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8150
8151 Adjust to latest gnulib.
8152 * bootstrap (gnulib_modules): Add xalloc-die.
8153 Set LC_ALL=C so that file names sort consistently.
8154 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8155 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8156 uintmax_t.m4, ulonglong.m4.
8157 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8158 po.m4 since we are now using _gl.m4 instead.
8159
87a8ad5c
PE
81602004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8161
8162 * src/scan-action.l: Remove. Scanning of semantic actions is
8163 handled in scan-gram.l.
8164
dca81a78
PE
81652004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8166
8167 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8168
8169 * src/location.h (struct): The file member is a uniqstr.
8170 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8171
c9cbf7c5
PE
81722004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8173
8174 Fix bug with non-%union parsers that have printers or destructors,
8175 which led to a Bison core dump. Reported by Peter Fales in
8176 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 8177
c9cbf7c5
PE
8178 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8179 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8180 not to our own type.
8181 * src/output.c (symbol_destructors_output, symbol_printers_output):
8182 Don't assume %union.
8183 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8184 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8185 UNION-FLAG. All callers changed.
8186 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8187 Use type char, not unsigned int, when declaring an array of char;
8188 this lets us remove a cast.
8189 (Printers and Destructors): Add non-%union test cases.
8190
fa7e68c3
PE
81912004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8192
8193 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8194 GLR writeups. E.g., avoid frenchspacing and the future tense,
8195 change "lookahead" to "look-ahead", and change "wrt" to "with
8196 respect to".
2fa09258 8197
fa7e68c3
PE
81982004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8199
8200 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8201 New sections, split off from the GLR Parsers section. Put the new
8202 Simple GLR Parser near the start of the GLR section, for clarity.
8203 Rewrite connective text.
8204
99a9344e
PE
82052004-06-21 Frank Heckenbach <frank@g-n-u.de>
8206
8207 * doc/bison.texinfo (Simple GLR Parsers): New section.
8208
8dd162d3
PE
82092004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8210
8211 * NEWS, TODO, doc/bison.texinfo:
8212 Use "look-ahead" instead of "lookahead", to be consistent.
8213 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8214 while we're fixing "look-ahead".
8215 * src/conflicts.c (shift_set): Renamed from shiftset.
8216 (look_ahead_set): Renamed from lookaheadset.
8217 * src/print.c: Likewise.
8218 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8219 name for "lookahead".
8220 (report_types, usage): Likewise.
8221 * src/getargs.h (report_look_ahead_tokens): Renamed from
8222 report_lookaheads.
8223 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8224 compute_lookaheads.
8225 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8226 (look_ahead_tokens_print): Renamed from lookaheads_print.
8227 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8228 state_rule_lookaheads_print.
8229 * src/state.h: Likewise.
8230 (reductions.look_ahead_tokens): Renamed from lookaheads.
8231 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8232 AT_DATA_LOOKAHEADS_GRAMMAR.
8233
57a90331
PE
82342004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8235
8236 * README: Update location of patched M4 distribution.
8237
8ed3234a
PE
82382004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8239
8240 Don't assume the C++ compiler takes the same arguments as the C compiler
8241 (trivial change).
8242 * configure.ac (O0CXXFLAGS): New var.
8243 * tests/atlocal.in (CXXFLAGS): Use it.
8244
07971983
PE
82452004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8246
8247 Fix some "make check" problems with C++ reported by
8248 Albert Chin-A-Young for Tru64 C++ in this thread:
8249 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8250
8251 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8252 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8253 Output to a .cc file for C++, not to a .c file.
8254 * tests/calc.at (AT_CHECK_CALC): Likewise.
8255 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8256 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8257
29058652
PE
82582004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8259
8260 * tests/calc.at, tests/actions.at: Workaround for SGI
8261 C++ compiler. (trivial change)
8262
62cb8a99
PE
82632004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8264
fd418816
PE
8265 Spent a few hours checking out which prerequisite versions the
8266 current sources actually require. I went all the way back to
8267 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8268 a seemingly endless set of combinations of versions more recent
8269 than that. The bottom line is that the current sources require
8270 fairly recent versions of the build tools, and it'll be some work
8271 to change this.
8272 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8273 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8274 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8275 Add comments explaining why those particular versions are
8276 currently needed.
2fa09258 8277
62cb8a99
PE
8278 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8279 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 8280 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
8281
8282 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8283 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8284
caa52c10
PE
82852004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8286
8287 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8288 0.11.5. Suggested by Bruno Haible.
8289 * bootstrap: Remove gettext version checking.
8290
8291 * doc/bison.texinfo (Decl Summary): Also mention that %union
8292 can depend on prerequisite types. Problem reported by Tim
8293 Van Holder.
8294
4bfd5e4e
PE
82952004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8296
2cef3017
PE
8297 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8298 * README-alpha: Don't tell people not to package this.
8299
b9c85d5c
PE
8300 * bootstrap: Don't assume $(...) works; use `...` instead.
8301 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8302 gettext better.
8303
4bfd5e4e
PE
8304 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8305 put into the -d output file, and mention what to do if YYSTYPE is
8306 defined as a macro.
8307
6a36ff94
PE
83082004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8309
6712933e
PE
8310 Undo change made earlier today: it caused autopoint to not bring
8311 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8312 autopoint's.
8313
8314 * bootstrap: Check that gettext version matches what's in
8315 configure.ac. Warn users to ignore robots.txt ERROR 404.
8316 * bootstrap: Undo today's earlier change (logged below).
8317 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 8318
6a36ff94
PE
8319 The gettext version checking is causing more trouble than it's
8320 curing; remove it. Problem reported by Paul Hilfinger.
8321
8322 * bootstrap: Issue a warning that one can expect a message
8323 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8324 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8325
209ea708
PE
83262004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8327
8328 Ensure that the C++ compiler used for testing actually works on a
8329 simple test program; if not, skip the C++-related tests. Problem
8330 reported by Vin Shelton in:
161a71f3 8331 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
8332
8333 * m4/cxx.m4: New file.
8334 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8335 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8336 * tests/local.at (AT_COMPILE_CXX): Use it.
8337
41ca2549
PE
83382004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8339
383e69dc
PE
8340 * data/glr.c (yylloc): Output this macro even if locations are not
8341 being generated, as the GLR parser needs it even in that case.
8342 Problem reported by Troy A. Johnson
8343 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8344
41ca2549
PE
8345 * configure.ac (AC_INIT): Update to 1.875e.
8346
e476c87d
PE
83472004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8348
8349 * NEWS: Version 1.875d.
8350 * configure.ac (AC_INIT): Likewise.
8351 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8352
8353 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8354 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8355 lalr1.cc runs afoul of the first, and the last two are no longer
8356 supported by GCC 3.4.0.
8357 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8358 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8359
233a88ad
PE
83602004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8361
8362 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8363 unsigned int, for compatibility with latest gnulib hash module.
8364 * src/state.c (state_hash, state_hasher): Likewise.
8365 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8366 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 8367
12ffdd28
PE
83682004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8369
8370 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8371
8372 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8373 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8374 character and string literals.
8375 (unexpected_end): New function.
8376 (unexpected_eof): Use it.
8377 (unexpected_newline): New function.
8378 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8379 actions.
e476c87d 8380
12ffdd28
PE
8381 * NEWS: Document %expect-rr.
8382
8383 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8384 Fix typo by replacing $1 with $option.
8385 Remove more 'intl'-related files.
9668e2be 8386 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
8387
8388 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8389 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8390 strtoul.c.
8391 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8392 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8393 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8394 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8395 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8396 * src/.cvsignore: Add *.output.
8397
8398 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8399 gets copied to the output file.
e476c87d 8400
1f65350a
PE
84012004-04-28 Paul Eggert <eggert@twinsun.com>
8402
8403 Get files from the gnulib and po repositories, instead of relying
8404 on them being in our CVS. Upgrade to latest versions of gnulib
8405 and Automake.
8406
8407 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8408 * bootstrap: Bootstrap from gnulib and po repositories.
8409 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8410 * README-cvs: Document these changes. Remove version numbers from
8411 mentions of build tools, since they change so often. Mention Flex.
8412
8413 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8414 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
8415 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8416 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 8417 does this for us.
12ffdd28
PE
8418 (AC_ISC_POSIX): Remove; we no longer support this
8419 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
8420 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8421 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8422 Do not check for C89 headers, except for locale.h which is used
8423 by the Yacc library and must port to K&R hosts.
8424 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8425 Do not check for C89 functions, except for setlocale which is
8426 used by the Yacc library.
8427 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8428 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8429 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8430 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8431 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8432 AM_GNU_GETTEXT): Remove; now done by:
8433 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8434 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8435 for us.
8436
8437 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8438 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8439 Define to empty, as gnulib.mk will do the rest for us.
8440 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8441 for us.
8442 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8443 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8444
8445 * src/files.c: Include gnulib's xstrndup.h.
8446
8447 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8448 (REALLOC): Use xnrealloc, for likewise.
8449 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8450 (strnlen, memrchr): Remove decls; functions no longer used.
8451 Include <stpcpy.h>.
8452
8453 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8454 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8455 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8456 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8457 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8458 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8459 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8460 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8461 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8462 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8463 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8464 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8465 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8466 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8467 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8468 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8469 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8470 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8471 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8472 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8473 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8474 Remove, as these files are now generated automatically
8475 by bootstrap or automake.
8476
8477 * po/ChangeLog: Remove: all but one entry was a duplicate
8478 of this file, and I moved that 2000-11-02 entry here.
8479
8480 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8481 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8482 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8483 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8484 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8485 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8486 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8487 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8488 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8489 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8490 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8491 xstrndup.h.
8492 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8493 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8494 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8495 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8496 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8497 * src/.cvsignore: Remove *_.c.
8498
8499
8500 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8501 support it. (The latest stable gzip doesn't.)
8502
85032004-04-27 Paul Eggert <eggert@twinsun.com>
8504
8505 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8506 case, as stos_ is now used by destructors due to the 2004-02-09
8507 change.
8508
8509 Remove more K&R C support.
8510 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8511 * lib/subpipe.c (errno): Remove decl.
8512 Include <stdlib.h> unconditionally.
8513 (EXIT_FAILURE): Remove macro.
8514 * src/complain.c (vfprintf, strerror): Remove.
8515 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8516 unconditionally.
8517 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8518 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8519 (strchr, strspn, memchr): Remove decls.
8520 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8521 unconditionally. Do not declare perror.
8522 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8523 unconditionally.
8524
8525 * src/complain.c (_): Remove useless defn, as system.h defines this.
8526
8527 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8528 with latest obstack.h.
8529 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8530 to procedure types, as obstack.h now does that for us.
8531 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8532
8533 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8534 so that this include file can stand alone.
8535 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8536 does this now. Include subpipe.h first after config.h, to
8537 test whether it can stand alone.
8538
8539 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8540 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8541 unused declaration.
8542
8543 * tests/synclines.at (%union synch line): Put a dummy member in
8544 the union, because empty unions aren't allowed in C. Caught
8545 by GCC 3.4.0.
8546
4f16766c
PE
85472004-04-13 Jim Meyering <jim@meyering.net>
8548
8549 * src/conflicts.c (conflicts_print): Correct format string typo:
8550 use `%%' to produce literal `%'. (trivial change)
8551
779e7ceb
PE
85522004-03-30 Paul Eggert <eggert@twinsun.com>
8553
8554 * src/getargs.c (version): Update copyright year to 2004.
8555
8556 * data/c.m4 (b4_int_type): Use 'short int' rather than
8557 'short', and similarly for 'long', 'unsigned', etc.
8558 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8559 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8560 yy_yypstack, yydumpstack): Likewise.
8561 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8562 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8563 Likewise.
8564 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8565 yy_stack_print, yyparse): Likewise.
8566 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8567 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8568 * lib/bitset.c (bitset_print): Likewise.
8569 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8570 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8571 * lib/bitsetv.c (bitsetv_dump): Likewise.
8572 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8573 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8574 Likewise.
8575 * src/LR0.c (allocate_itemsets): Likewise.
8576 * src/gram.h (rule_number, rule): Likewise.
8577 * src/lalr.h (goto_number): Likewise.
8578 * src/nullable.c (nullable_compute): Likewise.
8579 * src/output.c (prepare_rules): Likewise.
8580 * src/relation.c (relation_print, relation_digraph): Likewise.
8581 * src/relation.h (relation_node): Likewise.
8582 * src/state.h (state_number, transitions, errs, reductions,
8583 struct state): Likewise.
8584 * src/symtab.h (symbol_number, struct symbol): Likewise.
8585 * src/tables.c (vector_number, tally, action_number,
8586 default_goto, goto_actions): Likewise.
8587 * tests/existing.at (GNU Cim Grammar): Likewise.
8588 * tests/regression.at (Web2c Actions): Likewise.
8589
8590 * src/output.c (muscle_insert_short_int_table): Renamed from
8591 muscle_insert_short_table. All uses changed.
8592
d6328241
PH
85932004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8594
8595 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8596 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8597 Add %expect-rr rule.
4f16766c 8598
d6328241
PH
8599 * src/scan-gram.l: Recognize %expect-rr.
8600
4f16766c 8601 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 8602 expected_conflicts.
4f16766c 8603 (expected_rr_conflicts): Declare.
d6328241
PH
8604
8605 * src/conflicts.c (expected_sr_conflicts): Rename from
8606 expected_conflicts.
8607 (expected_rr_conflicts): Define.
8608 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8609 for GLR parsers.
8610 Use expected_sr_conflicts in place of expected_conflicts.
8611 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 8612
d6328241 8613 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 8614
1452af69
PE
86152004-03-08 Paul Eggert <eggert@gnu.org>
8616
8617 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 8618 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
8619
8620 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8621 in lalr1.cc.
8622 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8623 * src/scan-gram.l (scan_integer): New function.
8624 ({int}): Use it.
8625 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8626 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8627 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8628 Say "long int", not "long", for uniformity with GNU style.
8629
006d217d
PE
86302004-02-25 Paul Eggert <eggert@twinsun.com>
8631
8632 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8633 compilers. This fixes a problem with Intel's C++ compiler being
8634 chatty, reported by Guido Trentalancia in
161a71f3 8635 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 8636
c2729758
ADL
86372004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8638
8639 Support %destructor and merge error locations in lalr1.cc.
8640
8641 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8642 (Parser::stos_): Define unconditionally.
8643 (Parser::destruct_): New method. Generate its body with
8644 b4_yydestruct_generate.
8645 (Parser::error_start_): New attribute.
8646 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8647 token which are discarded.
8648 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8649 error_start_ when erroneous token are discarded.
8650 (Parser::parse) <yyerrlab1>: Compute the location of the error
8651 token so that it covers all the discarded tokens.
8652 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8653 it can be called with `%skeleton "lalr1.cc"', and do that.
8654
dd0e0635
PE
86552004-02-02 Paul Eggert <eggert@twinsun.com>
8656
8657 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8658 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8659 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8660 There's no need to mention top_builddir since Automake does that
8661 for us.
8662 (INCLUDES): Remove, as Automake says it's obsolescent.
8663 Contents migrated into AM_CPPFLAGS as described above.
8664 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8665
86662004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8667
8668 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8669 (yyreportSyntaxError): Handle case where lookahead token is
8670 YYEMPTY.
8671
be16239b
PH
86722004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8673
8674 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8675 resulting parsers are compilable with C++.
8676
5fa90832
PE
86772003-12-23 Paul Eggert <eggert@twinsun.com>
8678
8679 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8680 * src/output.c (output_skeleton): Rename local var.
8681 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8682 Bison tokens, as this runs afoul of the 2003-10-07 change that
8683 disallowed NUL bytes in character constants or string literals.
8684
8685 * tests/local.at: Require Autoconf 2.59's Autotest.
8686 * tests/testsuite.at: Don't include local.at, since we now assume
8687 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8688 including it.
8689 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8690 multiple inclusion warnings.
dd0e0635 8691
b165c324
AD
86922003-12-02 Akim Demaille <akim@epita.fr>
8693
8694 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8695 conditions.
8696 From Bruno Haible.
8697
26e06a21
ADL
86982003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8699
8700 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8701
92ac3705
PE
87022003-10-07 Paul Eggert <eggert@twinsun.com>
8703
6a5ecb38
PE
8704 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8705 if testsuite doesn't exist.
8706
92ac3705
PE
8707 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8708 literals, unfortunately.
8709 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8710 Complain about NUL bytes in character constants or string literals.
8711
91d2c560
PE
87122003-10-05 Paul Eggert <eggert@twinsun.com>
8713
8714 * NEWS: Don't document %no-default-prec, as it's still
8715 too experimental.
8716 * doc/bison.texinfo: Document %no-default-prec only if
8717 the defaultprec flag is set. Normally it's not.
8718
0cc3da3a
PE
87192003-10-04 Paul Eggert <eggert@twinsun.com>
8720
8721 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8722 non-modifiable lvalue, instead of a modifiable one.
8723 * doc/bison.texinfo (Actions): Document that $$ can
8724 be assigned to. Do not claim that $$ and $N are
8725 array element references: user code should not rely on this.
8726
22fccf95
PE
87272003-10-01 Paul Eggert <eggert@twinsun.com>
8728
8729 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8730 (grammar_declaration): Use it.
8731 * src/scan-gram.l: New token %no-default-prec.
8732 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8733 * NEWS, doc/bison.texinfo: Document the above.
8734
fc8f2965
AD
87352003-10-01 Akim Demaille <akim@epita.fr>
8736
8737 VCG no longer supports long_straight_phase.
8738
8739 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8740 * src/print_graph.c (print_graph): Adjust.
8741
39a06c25
PE
87422003-09-30 Frank Heckenbach <frank@g-n-u.de>
8743 and Paul Eggert <eggert@twinsun.com>
8744
8745 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8746 Table of Symbols): Document %default-prec.
8747 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8748 (grammar_declaration): Set default_prec on %default-prec.
8749 * src/scan-gram.l (%default-prec): New token.
8750 * src/reader.h (default_prec): New flag.
8751 * src/reader.c: Likewise.
8752 (packgram): Handle it.
8753 * tests/conflicts.at (%default-prec without %prec,
8754 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 8755
39a06c25
PE
87562003-09-30 Paul Eggert <eggert@twinsun.com>
8757
8758 * tests/testsuite.at: Include local.at, not input.at, fixing
8759 a typo in the 2003-08-25 patch.
8760
62b6aef9
AD
87612003-08-27 Akim Demaille <akim@epita.fr>
8762
8763 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8764 GCC warnings.
8765
89e1cc61
AD
87662003-08-26 Akim Demaille <akim@epita.fr>
8767
8768 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8769 "<\#" to avoid magic from Gnus when posting parts of this script.
8770
a08460b0
AD
87712003-08-26 Akim Demaille <akim@epita.fr>
8772
8773 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8774 (Parser::parse): here.
8775 Adjust: nerrs and errstatus is now replaced by...
8776 (Parser::nerrs_, Parser::errstatus_): New.
8777
603f1cfd
AD
87782003-08-25 Akim Demaille <akim@epita.fr>
8779
8780 * config/announce-gen, Makefile.cfg: New.
8781 * Makefile.am: Adjust.
8782 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8783 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8784
cd3684cf
AD
87852003-08-25 Akim Demaille <akim@epita.fr>
8786
8787 When reducing initial empty rules, Bison parser read an initial
8788 location that is not defined. This results in garbage, and that
8789 affects Bison's own parser. Therefore we need (i) to extend Bison
8790 to support a means to initialize this location, and (ii) to use
8791 this CVS Bison to fix CVS Bison's parser.
8792
8793 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8794 with...
8795 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8796 * src/parse-gram.y: Adjust.
8797 (%initial-action): New.
8798 (%error-verbose): Since we require CVS Bison, there is no reason
8799 not to use it.
8800 * src/scan-gram.l: Adjust.
8801 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8802 * data/yacc.c (yyparse): Use b4_initial_action.
8803
4e03e201
AD
88042003-08-25 Akim Demaille <akim@epita.fr>
8805
8806 * doc/bison.texinfo: Don't promote stdout for error messages.
8807
8c182d05
AD
88082003-08-25 Akim Demaille <akim@epita.fr>
8809
8810 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8811 From Alexandre Duret-Lutz.
8812
6a60c4cf
PE
88132003-08-25 Akim Demaille <akim@epita.fr>
8814
8815 Version 1.875c.
8816
25f66e1a
AD
88172003-08-25 Akim Demaille <akim@epita.fr>
8818
8819 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8820 Use them.
8821
5348bfbe
AD
88222003-08-25 Akim Demaille <akim@epita.fr>
8823
8824 * data/lalr1.cc (Parser::reduce_print_): New.
8825 Use it.
8826
47301314
AD
88272003-08-25 Akim Demaille <akim@epita.fr>
8828
8829 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8830 error recovery loops. This patch is based on
161a71f3 8831 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
8832 Also, augment the similarity between lalr1.cc and yacc.c.
8833 Note: the locations of error recovery rules are not correct yet.
8834
8835 * data/lalr1.cc: Comment changes to augment the similarity between
8836 lalr1.cc and yacc.c.
8837 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8838 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8839 yyerrlab), when hitting EOF, pop the whole stack here instead of
8840 merely falling thru the default error handling mechanism.
8841 (yyerrorlab): New label, with the old contents of YYERROR,
8842 plus the following change: pop the stack of rhs corresponding
8843 to the production that invoked YYERROR. That is how Yacc
8844 behaves (required by POSIX).
8845 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8846 fail.
8847
1f7a61ff
AD
88482003-08-25 Akim Demaille <akim@epita.fr>
8849
8850 Tune local.at so that people can "autom4te -l autotest calc.at -o
8851 calc" for instance, to extract a sub test suite.
8852
8853 * tests/testsuite.at: Move the initialization, Autotest version
8854 requirement, and AT_TESTED invocation into...
8855 * tests/local.at: here.
8856 * tests/testsuite.at: Include it for compatibility with Autoconf
8857 2.57.
8858 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8859 be ignore.
8860
327b5b56
PE
88612003-08-04 Paul Eggert <eggert@twinsun.com>
8862
8863 Rework code slightly to avoid gcc -Wtraditional warnings.
8864 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8865 The returned value is now stored in *YY0. All callers changed.
8866 * src/output.c (merge_output): Adjust to the above change.
8867
0051e3ed
PE
88682003-07-26 Paul Eggert <eggert@twinsun.com>
8869
8870 * data/glr.c (YYASSERT): New macro.
8871 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8872 yyresolveStates, yyprocessOneStack):
8873 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8874 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 8875
137437c6
PE
88762003-07-25 Paul Eggert <eggert@twinsun.com>
8877
5b620e06
PE
8878 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8879 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 8880 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
8881 by Frank Heckenbach, though I have omitted the structure-initialization
8882 part of his glr-knr.diff patch since I recall that the Portable
8883 C Compiler didn't require that change.
8884
137437c6
PE
8885 Let the user specify how to allocate and free memory.
8886 Derived from a suggestion by Frank Heckenbach in
161a71f3 8887 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
8888 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8889 All uses of free, malloc, realloc changed to use these macros,
8890 and unnecessary casts removed.
8891 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8892
ddb85ca5
PE
88932003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8894
8895 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8896 use s.empty() rather than s == "" to test for empty string; see
161a71f3 8897 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
8898 (trivial change)
8899
39910e09
AD
89002003-06-25 Akim Demaille <akim@epita.fr>
8901
8902 * config/depcomp, config/install-sh: Update from masters.
8903
0ae99356
PE
89042003-06-20 Paul Eggert <eggert@twinsun.com>
8905
8906 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8907 and return properly parenthesized result.
8908 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8909 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8910 Remove unnecessary parentheses from uses.
8911 * doc/bison.texinfo (Location Default Action): Describe the
8912 conventions for parentheses.
8913
cd05d13c
PE
89142003-06-19 Paul Eggert <eggert@twinsun.com>
8915
81fd08ca
PE
8916 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8917 yyreportTree): Do not assume that size_t is the same width as int,
8918 when printing sizes. Print sizes using an unsigned format.
8919 Problem reported by Frank Heckenbach in
161a71f3 8920 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 8921
cd05d13c
PE
8922 Port to Forte Developer 7 C compiler.
8923 * data/glr.c (struct YYLTYPE): If locations are not being used,
8924 declare a single dummy member, as empty structs do not conform
8925 to the C standard.
8926 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8927 the Forte Developer 7 C compiler complains that end-of-loop
8928 code is not reached.
8929
4dcf140b
PE
89302003-06-17 Paul Eggert <eggert@twinsun.com>
8931
8932 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8933 avoid warnings from picky compilers about redefinition of PARAMS.
8934
8dd76bee
PE
89352003-06-17 Paul Eggert <eggert@twinsun.com>
8936
8937 Version 1.875b.
8938
8939 * NEWS: Document 1.875b.
8940
8941 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8942 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8943 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8944 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8945 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8946 per recent gettext manual's suggestion.
8947 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8948 Use prototypes, not old-style definitions.
8949 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8950 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8951 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8952 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8953 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8954 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8955 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8956 vbitset_or_and_cmp, vbitset_copy): Likewise.
8957
8958 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8959 Do not include <stdlib.h>.
8960 (PARAMS): Define unconditionally for C89.
8961 (ATTRIBUTE_NORETURN): Remove.
8962 (ATTRIBUTE_UNUSED): Define unconditionally.
8963
8964 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 8965 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
8966 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8967 * lib/vbitset.c, lib/vbitset.h: New files.
8968 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8969 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8970 from libbitset.
8971
8972 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8973 `How Can I Reset @code{yyparse}', since texinfo does not allow
8974 arbitrary @ in node names.
8975
8976 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8977 shouldn't be needed according to the gettext 0.12.1 documentation
8978 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 8979 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 8980 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 8981 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 8982
8dd76bee
PE
8983 * lib/.cvsignore: Add stdbool.h.
8984 * m4/.cvsignore: Add nls.m4, po.m4.
8985
8986 Upgrade to CVS gnulib.
8987 * stdbool_.h: File renamed from stdbool.h.in.
8988 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8989 AC_HEADER_STDBOOL.
8990 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8991 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8992 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8993 (MOSTLYCLEANFILES): New var.
8994 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
8995 (stdbool.h): New rule.
8996 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
8997 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
8998 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
8999 m4/quote.m4: Upgrade to today's gnulib.
9000
9001 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9002 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9003 the tests right now.
9004 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9005 yyerror are declared before use; C99 requires this.
9006
25005f6a
PH
90072003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9008
9009 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9010 first.
9011 (yyrecoverSyntaxError): Correct the logic for setting and testing
9012 yyerrState.
9013 Correct comment on handling EOF.
9014 Allow states with only a default reduction, rather than failing
8dd76bee 9015 (I can't quite reconstruct why these were not allowed before).
25005f6a 9016
137437c6 9017 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 9018 buffer overruns, corrupting state.
8dd76bee
PE
9019
9020 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
9021 definition.
9022 * src/reader.h (max_left_semantic_context): New variable declaration.
9023 * src/scan-gram.l (max_left_semantic_context): Define.
9024 (handle_action_dollar): Update max_left_semantic_context.
9025 * data/glr.c (YYMAXLEFT): New definition.
9026 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9027 (yyresolveAction): Ditto.
9028
9029 Fixes to problems with location handling in GLR parsers reported by
9030 Frank Heckenbach (2003/06/05).
9031
9032 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9033 (YYRHSLOC): Add parentheses, and define only if locations used.
9034 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9035 locations not used.
9036 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9037 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 9038
25005f6a
PH
9039 * tests/cxx-type.at: Exercise location information; update tests
9040 to differentiate output with and without locations.
8dd76bee 9041 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
9042 because default YYLTYPE not yet defined.
9043 Change semantic actions to compute strings, rather than printing
9044 them directly (to test proper passing of semantics values). Change
9045 output to prefix notation and update test data and expected results.
9046 (yylex): Track locations.
9047 (stmtMerge): Return value rather than printing, and include arguments
9048 in value.
8dd76bee 9049
711f40b7
PE
90502003-06-03 Paul Eggert <eggert@twinsun.com>
9051
9052 Avoid warnings generated by GCC 2.95.4 when Bison is
9053 configured with --enable-gcc-warnings.
9054 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9055 yy::]b4_parser_class_name[::translate_,
9056 yy::Stack::operator[] (unsigned),
9057 yy::Stack::operator[] (unsigned) const,
9058 yy::Slice::operator[] (unsigned),
9059 yy::Slice::operator[] (unsigned) const):
9060 Rename local vars to avoid warnings.
9061 * tests/glr-regression.at (Improper handling of embedded actions
9062 and $-N in GLR parsers): Remove unused local variable from yylex.
9063 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9064 (void) as arg when not pure, since we now assume C89 when building
9065 Bison. Pacify GCC by using parameter.
9066
ac695f7d
PE
90672003-06-02 Paul Eggert <eggert@twinsun.com>
9068
9069 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9070 yy::Location::lines, yy::Location::columns): Rename arguments
9071 to avoid shadowing; this removes a warning generated by GCC 3.3.
9072
26ec81e0
PE
90732003-06-01 Paul Eggert <eggert@twinsun.com>
9074
9075 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9076 to g++, as GCC 3.3 complains if you do it.
9077 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9078 everything that WARNING_CFLAGS has, except omit warnings
9079 not suitable for C++.
9080 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9081 * tests/atlocal.in (CXXFLAGS): New var.
9082 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9083
9084 Fix a GLR parser bug I reported in February; see
161a71f3 9085 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
9086 The problem was that GLR parsers did not conform to the C standard,
9087 because actions like { $1 = $2 + $3; } expanded to expressions
9088 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9089 to a local variable. The C standard says that expressions
9090 like (var = f ()) + (var = f ()) have undefined behavior.
9091 Another problem was that GCC sometimes issues warnings that
9092 yyfill and its parameters are unused.
9093
9094 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9095 as possibly unused.
9096 (yyfill): New function.
9097 (YYFILL): Use it.
9098 (yyuserAction): Change type of yynormal to bool, so that it matches
9099 the new yyfill signature. Mark it as possibly unused.
9100
9101
9102 Follow up on a bug I reported in February, where a Bison-generated
9103 parser can loop. Provide a test case and a fix for yacc.c. I
9104 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9105 The original bug report is in:
161a71f3 9106 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
9107
9108 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9109 macro's size was becoming unwieldy.
9110 (yyerrlab): Do not discard an empty lookahead symbol, as this
9111 might destroy garbage.
9112 (yyerrorlab): New label, with the old contents of YYERROR,
9113 plus the following change: pop the stack of rhs corresponding
9114 to the production that invoked YYERROR. That is how Yacc
9115 behaves, and POSIX requires this behavior.
9116 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9117 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9118 Define 'alarm' to do nothing if unistd.h is not available.
9119 Add a new rule "exp: '-' error;" to test the above change to
9120 data/yacc.c. Use 'alarm' to abort any test taking longer than
9121 10 seconds, as it's probably looping.
9122 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9123 Also, the new yacc.c generates two fewer diagnostics for an
9124 existing test.
9125
d0829076
PE
91262003-05-24 Paul Eggert <eggert@twinsun.com>
9127
c6ae27df
PE
9128 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9129 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9130 This fixes a problem reported by John Bowman when the Compaq/HP
9131 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9132 -ansi -Wall -gall).
9133 * data/yacc.c (union yyalloc): Likewise.
9134 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 9135
d0829076
PE
9136 Switch from 'int' to 'bool' where that makes sense.
9137
9138 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9139 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9140 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9141 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9142 Return or accept bool, not int. All callers changed.
9143 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9144 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9145 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9146 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9147 bitset_or_and_cmp_): Likewise.
9148 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9149 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9150 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9151 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9152 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9153 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9154 bitset_stats_or_and_cmp): Likewise.
9155 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9156 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9157 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9158 ebitset_xor_cmp): Likewise.
9159 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9160 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9161 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9162 lbitset_xor_cmp): Likewise.
9163 * lib/bbitset.h: Include <stdbool.h>.
9164 (struct bitset_vtable): The following members now return bool, not
9165 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9166 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9167 or_and_cmp).
9168 * src/conflicts.c (count_rr_conflicts): Likewise.
9169 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9170 All uses changed.
9171 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9172 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9173 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9174 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9175 graph_flag): Likewise.
9176 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9177 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9178 graph_flag): Likewise.
9179 * src/output.c (error_verbose): Likewise.
9180 * src/output.h (error_verbose): Likewise.
9181 * src/reader.c (start_flag, typed): Likewise.
9182 * src/reader.h (typed): Likewise.
9183 * src/getargs.c (LOCATIONS_OPTION): New constant.
9184 (long_options, getargs): Use it.
9185 * src/lalr.c (build_relations): Use bool, not int.
9186 * src/nullable.c (nullable_compute): Likewise.
9187 * src/print.c (print_reductions): Likewise.
9188 * src/tables.c (action_row, pack_vector): Likewise.
9189 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9190 * src/output.c (prepare): Use it.
9191 * src/output.c (token_definitions_output,
9192 symbol_destructors_output, symbol_destructors_output): Use string,
9193 not boolean integer, to keep track of whether to output separator.
9194 * src/print_graph.c (print_core): Likewise.
9195 * src/state.c (state_rule_lookaheads_print): Likewise.
9196
9197 * config/install-sh: Sync from automake 1.7.5.
9198
6b2584b7
PE
91992003-05-14 Paul Eggert <eggert@twinsun.com>
9200
9201 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9202 semicolon after a grammar declaration, in the interest of possible
9203 future changes to the Bison input language.
9204 Do not allow a stray semicolon at the start of the grammar.
9205 (rhses.1): Allow one or more semicolons after any rule, including
9206 just before "|" as required by POSIX.
9207 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9208 grammar.
9209
caf37a36
ADL
92102003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9211
9212 %parse-param support for lalr1.cc.
9213
9214 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9215 b4_cc_constructor_calls, b4_cc_constructor_call,
9216 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9217 definitions.
9218 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9219 parse-param arguments.
9220 (yy::b4_parser_class_name): Declare instance variables to
9221 hold parse-param arguments.
9222 * tests/calc.at: s/value/semantic_value/ because value clashes
9223 with a member of yy::b4_parser_class_name. Adjust C++ code
9224 to handle %parse-param. Enable %parse-param test in C++.
9225
3ab37077
PE
92262003-05-12 Paul Eggert <eggert@twinsun.com>
9227
9228 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9229 English a bit. Fix fclose typo. Change "const char" to "char
9230 const", and use ANSI C rather than K&R for "main". Suggest
9231 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9232 and suggest yy_switch_to_buffer.
9233
92342003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
9235
9236 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9237 C89. This avoids a diagnostic on compilers that define __STDC__
9238 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 9239 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 9240
e743727f
PE
92412003-05-03 Paul Eggert <eggert@twinsun.com>
9242
9243 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9244 Do not overrun array bounds.
9245 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 9246 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 9247
916708d5
AD
92482003-04-29 Akim Demaille <akim@epita.fr>
9249
9250 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9251 * src/getargs.c, src/getargs.h: here, as bool, not int.
9252 (nondeterministic_parser): New.
9253 * src/parse-gram.y, src/scan-gram.l: Support
9254 %nondeterministic-parser.
9255 * src/output.c (prepare): Use nondeterministic_parser instead
9256 of glr_parser where appropriate.
9257 * src/tables.c (conflict_row, action_row, save_row)
9258 (token_actions, token_actions, pack_vector): Ditto.
9259
a06ea4aa
AD
92602003-04-29 Akim Demaille <akim@epita.fr>
9261
9262 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9263
211074ca
AD
92642003-04-29 Akim Demaille <akim@epita.fr>
9265
9266 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9267 with %pure-parser and %locations to exercise the patch from Yakov
9268 Markovitch below.
9269
6175ffe3
PE
92702003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9271
9272 * data/yacc.c: (b4_lex_param): Corrected for the case where
9273 %lex-param is provided and %pure-parser isn't.
9274
b1e95857
PE
92752003-04-27 Paul Eggert <eggert@twinsun.com>
9276
9277 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 9278 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
9279 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9280 if it is not defined.
9281 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9282
acda9df6
PE
92832003-04-26 Paul Eggert <eggert@twinsun.com>
9284
3470c57b
PE
9285 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9286 Declare to be of type suitable for the ninf value itself, not of
9287 type suitable for the corresponding table, since the latter might
9288 be unsigned but the ninf value might be negative. This fixes a
9289 bug reported by Alexandre Duret-Lutz in
161a71f3 9290 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 9291
acda9df6
PE
9292 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9293 invokes it. We shouldn't invoke it twice because it will attempt
9294 to put error.o in the archive twice. This fixes a glitch reported
9295 by Martin Mokrejs in
161a71f3 9296 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 9297
b5250f26
PE
92982003-04-21 Paul Eggert <eggert@twinsun.com>
9299
9300 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9301 to gnulib.
9302
089ac0f1
PE
93032003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9304
9305 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9306 Fix obvious typo that results in uncompilable GLR parsers
9307 when both %pure-parser and %locations are used. (trivial change)
9308
5ededac6
PE
93092003-04-17 Paul Eggert <eggert@twinsun.com>
9310
1b8f2fff
PE
9311 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9312 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9313 Do not insert the expected token via unput, as this runs afoul
9314 of a POSIX-compatibility bug in flex 2.5.31.
9315 All uses changed to BEGIN the parent state,
9316 since we no longer insert the expected token via unput.
9317 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9318 that is no longer emitted after the above change.
9319
5ededac6
PE
9320 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9321 the first one. This change is from Paul Hilfinger, and it fixes
9322 regression reported by Werner Lemberg in
161a71f3 9323 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
9324
9325 (resolve_sr_conflict): Don't invoke state_errs_set
9326 unless one or more tokens have been explicitly made errors.
9327 Otherwise, the above change causes Bison to abort.
9328
9329 * tests/existing.at (GNU pic Grammar): New test case, taken from
9330 Lemberg's email.
9331
b8be9132
AD
93322003-03-31 Akim Demaille <akim@epita.fr>
9333
9334 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9335
d423d460
AD
93362003-03-31 Akim Demaille <akim@epita.fr>
9337
9338 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9339 output.
9340
c7e441b4
AD
93412003-03-31 Akim Demaille <akim@epita.fr>
9342
9343 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9344 From Paul Hilfinger.
9345
231897ad
AD
93462003-03-29 Akim Demaille <akim@epita.fr>
9347
9348 * m4/error.m4: Do not put under dynamic conditions some code which
9349 expansion is under static control.
9350
5b066063
AD
93512003-03-29 Akim Demaille <akim@epita.fr>
9352
9353 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9354
22a74fec
AD
93552003-03-29 Akim Demaille <akim@epita.fr>
9356
9357 * doc/bison.texinfo (Strings are Destroyed): New.
9358
0eee27e7
PE
93592003-03-13 Paul Eggert <eggert@twinsun.com>
9360
9361 * .cvsignore: Add configure.lineno.
9362 * src/.cvsignore: Add yacc.
9363 * tests/.cvsignore: Add testsuite.log.
9364 * doc/fdl.texi: Sync with latest FSF version.
9365
f61aad93
PE
93662003-03-12 Paul Eggert <eggert@twinsun.com>
9367
537636c7
PE
9368 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9369 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9370 cursor, instead of leaving it undefined. This fixes a bug
9371 reported by Tim Van Holder in
161a71f3 9372 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
9373 * tests/input.at (Torturing the Scanner): Test the scanner on
9374 an empty input file, which was Tim Van Holder's test case.
9375
9376 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9377 <sys/resource.h> can be included, include sys/time.h and
9378 sys/times.h first, if available. This works around the SunOS
9379 4.1.4 porting bug reported by Bruce Becker in
161a71f3 9380 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
9381
9382 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9383 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9384 AC_HEADER_SYS_WAIT.
9385
f61aad93
PE
9386 Merge changes from gnulib. This was prompted because the CVS
9387 snapshot didn't build on Solaris 7 due to strnlen problems.
9388
9389 These changes need to be merged back into gnulib:
9390 * lib/hash.c: Include <stdbool.h> unconditionally.
9391 * m4/onceonly.m4 (m4_quote): New macro.
9392 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9393 Quote AC_FOREACH variable-expansions properly.
9394 The 2003-01-03 obstack.h change also needs merging.
9395 {end of changes requiring merging}
5b066063 9396
f61aad93
PE
9397 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9398 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9399 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9400 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9401 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9402 New files, imported from gnulib.
9403 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9404 above.
9405
9406 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9407 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9408 gnulib sources.
9409
9410 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9411 Add.
9412 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9413 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9414 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9415 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9416 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9417 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9418 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9419 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9420 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9421 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9422 (jm_PREREQ_ARGMATCH): Remove.
9423 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9424 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9425
9426 * src/system.h: Include <stdbool.h> unconditionally.
9427
9428 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9429 assuming at least C89 in the bitset code for some time now.
9430
d2ffe116
AD
94312003-03-03 Akim Demaille <akim@epita.fr>
9432
9433 * ro.po: New.
9434
052826fd
AD
94352003-03-02 Akim Demaille <akim@epita.fr>
9436
9437 * doc/bison.texinfo (Table of Symbols): Reactivate the
9438 documentation for %lex-param, and %parse-param.
9439
c4749565
AD
94402003-03-02 Akim Demaille <akim@epita.fr>
9441
9442 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9443 generate verbose error messages.
9444 Use the number of tokens as an upper bound in yytname, as it
9445 cannot be a non terminal.
9446
d5286af1
AD
94472003-03-02 Akim Demaille <akim@epita.fr>
9448
9449 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9450 message.
9451
22e304a6
AD
94522003-03-02 Akim Demaille <akim@epita.fr>
9453
22e304a6
AD
9454 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9455 Use them to exercise yycheck overrun.
9456 Based on Andrew Suffield's grammar.
9457
67a25fed
AD
94582003-03-02 Akim Demaille <akim@epita.fr>
9459
9460 Create tests/local.at for Bison generic testing macros.
9461
9462 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9463 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9464 This new file.
9465 * tests/calc.at (AT_CHECK_CALC): Adjust.
9466 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9467 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9468 * tests/local.at: here.
9469 (AT_COMPILE_CXX): Tags the tests using it as c++.
9470 Ignore the test if CXX is not functional.
9471
9c2b381f
PE
94722003-03-01 Paul Eggert <eggert@twinsun.com>
9473
9474 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9475 not loc->end, since loc->end might contain garbage and this leads
9476 to undefined behavior on some platforms.
9477 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9478 depend on *loc, so that the reader doesn't give the the false
9479 impression that *loc is initialized.
9480 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9481 does not survive the return.
9482
0433ba88
AD
94832003-03-01 Akim Demaille <akim@epita.fr>
9484
9485 * src/scan-gram.l (code_start): Always initialize it when entering
9486 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9487 yylex invocation. An alternative would be making it static, but
9488 then it starts with the second %%'s beginning, instead of its end.
9489
b305ea69
PE
94902003-02-28 Paul Eggert <eggert@twinsun.com>
9491
9492 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9493 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 9494 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 9495
c3d25e01
PE
94962003-02-26 Paul Eggert <eggert@twinsun.com>
9497
9498 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9499 Remove Sequent/Pyramid discussion (nobody uses them any more).
9500 Merge VMS and MS-DOS discussion; these ports may well be dead
9501 but let's keep mentioning them for now. Put <> around email
9502 addresses. Add copyright notice.
9503
c267ffbc
PE
95042003-02-24 Paul Eggert <eggert@twinsun.com>
9505
9506 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9507 to avoid collision with flex use of yylineno.
9508 Problem reported by Bruce Lilly in
161a71f3 9509 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
9510 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9511 * data/yacc.c (yy_reduce_print): Likewise.
9512
9513 * config/depcomp: Sync with Automake 1.7.3.
9514
f939fc12
AD
95152003-02-21 Akim Demaille <akim@epita.fr>
9516
9517 * data/lalr1.cc: Use temporary variables instead of casts to
9518 change integer types.
9519 Suggested by Paul Eggert.
9520
95923bd6
AD
95212003-02-21 Akim Demaille <akim@epita.fr>
9522
9523 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9524 to avoid confusions with lalr1.cc's notion of Position.
9525 Suggested by Paul Eggert.
9526
2cdc240e
AD
95272003-02-20 Akim Demaille <akim@epita.fr>
9528
9529 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9530 before initial_columns.
9531 (location.hh): Use consistent variable names when defining the
9532 operator<<.
9533 Use "last" so that we subtract from Positions, not from unsigned.
9534
5d003116
AD
95352003-02-20 Akim Demaille <akim@epita.fr>
9536
9537 * data/lalr1.cc (position.hh): New subfile, including the extended
9538 and Doxygen'ed documentation of class Position.
9539 (location.hh): Use it.
9540 Document a` la Doxygen.
ba1ecc07 9541 With the help of Benoit Perrot.
5d003116 9542
d02b25f9
AD
95432003-02-20 Akim Demaille <akim@epita.fr>
9544
9545 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9546 AT_YACC_IF.
9547 Redefine AT_YYERROR_SEES_LOC_IF using it.
9548 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9549 not defined.
9550 Don't use the location in yy::Parser::error_ and
9551 yy::Parser::print_ when not %locations.
9552 Activate more lalr1.cc tests.
9553
0d1c3a04
AD
95542003-02-19 Akim Demaille <akim@epita.fr>
9555
9556 * data/lalr1.cc: When displaying a line number, be sure to make it
9557 an int.
9558
60a777aa
AD
95592003-02-19 Akim Demaille <akim@epita.fr>
9560
9561 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9562 Remove, useless.
9563 (YYABORT, YYACCEPT, YYERROR): New.
9564 * tests/calc.at: Renable the lalr1.cc test.
9565
0b86fc41
AD
95662003-02-19 Akim Demaille <akim@epita.fr>
9567
9568 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9569 error recovery, mixing with/without pops and discarding of the
9570 lookahead.
9571 Exercise YYERROR.
9572 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9573
da99a5dc
PE
95742003-02-17 Paul Eggert <eggert@twinsun.com>
9575
9576 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9577 * tests/testsuite.at (AT_COMPILE): Use them.
9578 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 9579 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 9580
93b8c255
PE
95812003-02-12 Paul Eggert <eggert@twinsun.com>
9582
9583 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9584 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 9585 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
9586 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9587 Check for malloc failure, for consistency with yacc.c.
9588 (yytname_size): Remove, for consistency with yacc.c.
9589
9590 The bug still remains in data/lalr1.cc, as I didn't have time
9591 to fix it there.
9592
7548fed2
AD
95932003-02-06 Akim Demaille <akim@epita.fr>
9594
9595 * configure.ac (GXX): Rename as...
9596 (CXX): this, to keep the original Autoconf semantics.
9597 Require 2.57.
9598 * data/lalr1.cc: Fix b4_copyright invocations.
9599 If YYDEBUG is not defined, don't depend upon name_ being defined.
9600 (location.hh): Include string and iostream.
9601 (Position::filename): New member.
9602 (Position::Position ()): New.
9603 (operator<< (Position)): New.
9604 (operator- (Position, int)): New.
9605 (Location::first, Location::last): Rename as...
9606 (Location::begin, Location::end): these, to mock the conventional
9607 iterator names.
9608 (operator<< (Location)): New.
9609 * tests/atlocal.in (CXX): New.
9610 * tests/testsuite.at (AT_COMPILE_CXX): New.
9611 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9612 locations in a more synthetic way.
9613 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9614 lalr1.cc is used.
9615 Adjust the C locations to match those from Emacs: first column is
9616 column 0.
9617 Change all the expected results.
9618 Conform to the GCS: simplify the locations when applicable.
9619 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9620 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9621 these CPP macros with the m4 macros new defined by...
9622 (AT_CHECK_PUSHDEFS): this, i.e.:
9623 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 9624 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
9625 New macros.
9626 (AT_CHECK_POPDEFS): Undefine them.
9627 (AT_CHECK_CALC_LALR1_CC): New.
9628 Use it for the first lalr1.cc test.
9629
43a176ef
AD
96302003-02-04 Akim Demaille <akim@epita.fr>
9631
9632 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9633 Location as is defined.
9634
fc049e9c
AD
96352003-02-04 Akim Demaille <akim@epita.fr>
9636
9637 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9638 name_ being defined.
9639
a737b216
PE
96402003-02-03 Paul Eggert <eggert@twinsun.com>
9641
9642 * src/gram.h (start_symbol): Remove unused decl.
9643
9644 Use more-consistent naming conventions for local vars.
9645
9646 * src/derives.c (derives_compute): Change type of local var from
9647 int to rule_number.
9648 * src/gram.c (grammar_rules_partial_print): Likewise.
9649 * src/print.c (print_core): Likewise.
9650 * src/reduce.c (reduce_grammar_tables): Likewise.
9651
9652 * src/gram.c (grammar_dump): Change name of item_number *
9653 local var from r to rp.
9654 * src/nullable.c (nullable_compute): Likewise.
9655
9656 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9657
9658 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9659 for symbol or symbol_number var.
9660 * src/reader.c (grammar_start_symbol_set): Likewise.
9661 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9662 Likewise.
9663 * src/state.c (transitions_to): Likewise.
9664 * src/state.h: Likewise.
9665 * src/tables.c (symbol_number_to_vector_number): Likewise.
9666
9667 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9668 char * var.
9669
9670 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9671 var.
9672
9673 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9674 var.
9675
9676 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9677 Use str, not s, for char * var. Use ch, not c, for character var.
9678 Use size for size var.
9679
9680 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9681 char * var.
9682 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9683 uniqstr var.
9684 * src/uniqstr.h: Likewise.
9685
9686 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9687 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9688 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9689 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9690 param to have same name as that of enum, so that we don't use
9691 "s" to stand for a non-state.
9692
68e93ad5
AD
96932003-02-02 Akim Demaille <akim@epita.fr>
9694
9695 * src/scan-skel.l: Scan more than one inert character per yylex
9696 invocation.
9697
92898986
PE
96982003-02-01 Paul Eggert <eggert@twinsun.com>
9699
9700 Version 1.875a.
9701
1d9d5d71
PE
9702 * po/LINGUAS: Add ms.
9703
0435d061
AD
97042003-01-30 Akim Demaille <akim@epita.fr>
9705
9706 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9707
6029a57f
PH
97082003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9709
9710 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9711 of $1.
0435d061
AD
9712
9713 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 9714 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 9715 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 9716
6029a57f
PH
9717 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9718 (b4_rhs_location): Ditto.
0435d061 9719 (yyfill): New function to copy from stack tree into array
6029a57f 9720 incrementally.
0435d061
AD
9721 (yyuserAction): Modify to allow incremental move of semantic values
9722 to rhs array when in GLR mode.
9723 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
9724 as needed.
9725 Remove dummy use of yystack, as there is now a guaranteed use.
9726 (yydoAction): Modify to allow incremental move of semantic values
9727 to rhs array when in GLR mode.
9728 (yyresolveAction): Ditto.
9729 (yyglrShiftDefer): Update comment.
0435d061 9730 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
9731 (yyglrReduce): Ditto.
9732 (yydoAction): Ditto
0435d061 9733
6029a57f
PH
9734 * tests/glr-regr1.at: Rename to ...
9735 * tests/glr-regression.at: Add new regression test for the problems
9736 described above (adapted from S. Eken).
9737 Update copyright notice.
9738 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9739 * tests/Makefile.am: Ditto.
9740
6cee6297
PE
97412003-01-28 Paul Eggert <eggert@twinsun.com>
9742
9743 * data/lalr1.cc: Do not use @output_header_name@ unless
9744 b4_defines_flag is set. This fixes two bugs reported by
9745 Tim Van Holder in
161a71f3
PE
9746 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9747 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 9748
b2a836b5
PE
97492003-01-21 Paul Eggert <eggert@twinsun.com>
9750
9751 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9752 we don't need to worry about yyerrlab1 being reported as an
9753 "unused label" by non-GCC C compilers. The downside is that if
9754 locations are used then a couple of statements are duplicated each
9755 time YYERROR is invoked, but the upside is that the warnings
9756 should vanish.
9757 (yyerrlab1): Move code to YERROR.
9758 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9759 This reverts some of the 2002-12-27 change.
9760
4196b931
PE
97612003-01-17 Paul Eggert <eggert@twinsun.com>
9762
9763 * src/output.c (symbol_printers_output): Fix typo that led
9764 to core dump. Problem reported by Antonio Rus in
161a71f3 9765 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 9766
3ae831b4
AD
97672003-01-13 Akim Demaille <akim@epita.fr>,
9768 Quoc Peyrot <chojin@lrde.epita.fr>,
9769 Robert Anisko <anisko_r@lrde.epita.fr>
9770
9771 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9772 when the stacks contain one element, as the loop would otherwise
9773 free the last state, and then use the top state (the one we just
9774 popped). This means that the initial elements will not be freed
9775 explicitly, as is the case in yacc.c; it is not a problem, as
9776 these elements have fake values.
9777
e3aa65c5
PE
97782003-01-11 Paul Eggert <eggert@twinsun.com>
9779
9780 * NEWS: %expect-violations are now just warnings, reverting
9781 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9782 bootstrapping problem reported by Matthias Klose; see
161a71f3 9783 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
9784 * src/conflicts.c (conflicts_print): Likewise.
9785 * tests/conflicts.at (%expect not enough, %expect too much,
9786 %expect with reduce conflicts): Likewise.
9787 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9788 that the warning is enabled if the number of conflicts changes
9789 (not necessarily increases).
9790
9791 * src/getargs.c (version): Update copyright year.
9792
f0057011
AD
97932003-01-09 Akim Demaille <akim@epita.fr>
9794
9795 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9796
1ee6d2a0
PE
97972003-01-08 Paul Eggert <eggert@twinsun.com>
9798
9799 * Makefile.maint (WGETFLAGS):
9800 New macro, containing "-C off" to disable proxy caches.
9801 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9802 (rel-check): Use $(WGET) instead of wget.
9803
d4fd77c4
PE
98042003-01-06 Paul Eggert <eggert@twinsun.com>
9805
9806 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9807 the GLR paper of Scott, Johnstone and Hussain.
9808
464c6927
PE
98092003-01-04 Paul Eggert <eggert@twinsun.com>
9810
d600ee67
PE
9811 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9812 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9813 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9814 (EXTRA_LIBRARIES): New var, for liby.a.
9815 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9816 (EXTRA_SCRIPTS): New var, for yacc.
9817
464c6927
PE
9818 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9819 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9820 Problem reported by Nelson H. F. Beebe.
9821
98222003-01-03 Paul Eggert <eggert@twinsun.com>
9823
9824 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9825 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9826 when compiling Bison 1.875's `bitset bset = obstack_alloc
9827 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9828
9829 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9830 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9831 grow to a huge size with typical invocation.
d600ee67 9832
464c6927
PE
9833 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9834 Use the pattern recommended by Autoconf 2.57, except also protect
9835 against double-definition.
9836 * src/system.h: Likewise.
9837 Portability issues reported by Nelson H. F. Beebe.
d600ee67 9838
464c6927
PE
9839 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9840 All uses changed. Provide a definition in both C and C++.
9841 (yytrue, yyfalse): Define even if defined (__cplusplus).
9842
9843 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9844 Reported by Nelson H. F. Beebe.
d600ee67 9845
464c6927
PE
9846 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9847
0f42c7d5
PE
98482003-01-02 Paul Eggert <eggert@twinsun.com>
9849
9850 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9851 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9852 Bug reported by Nelson H. F. Beebe.
9853
dc546b0f
PE
98542003-01-01 Paul Eggert <eggert@twinsun.com>
9855
9856 * Version 1.875.
9857
2c09b6a7
PE
98582002-12-30 Paul Eggert <eggert@twinsun.com>
9859
9860 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9861 Moved here from...
9862 (<INITIAL>","): Here. This causes stray "," to be treated
9863 more uniformly.
9864
dc546b0f 9865 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
9866 last brace in braced code when not in Yacc mode, for compatibility
9867 with Bison 1.35. This resurrects the 2001-12-15 patch to
9868 src/reader.c.
9869
9870 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9871 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9872
535c0f63
PE
98732002-12-28 Paul Eggert <eggert@twinsun.com>
9874
9875 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9876 that of SYM's type. This fixes Debian bug 168069, reported by
9877 Thomas Olsson.
d600ee67 9878
963fcc17
PE
98792002-12-28 Paul Eggert <eggert@twinsun.com>
9880
9881 Version 1.75f.
9882
9883 Switch back to the Yacc style of conflict reports, undoing some
9884 of the 2002-07-30 change.
9885 * doc/bison.texinfo (Understanding): Use Yacc style for
9886 conflict reports. Also, use new way of locating rules.
9887 * src/conflicts.c (conflict_report):
9888 Renamed from conflict_report_yacc, removing the old
9889 'conflict_report'. Translate the entire conflict report at once,
9890 so that we don't assume that "," has the same interpretation in
9891 all languages.
9892 (conflicts_output): Use Yacc-style conflict report for each state,
9893 instead of our more-complicated style.
9894 (conflicts_print): Use Yacc-style conflict report, except print
9895 the input file name when not emulating Yacc.
9896 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9897 Conflicted Reduction, %expect not enough, %expect too much,
9898 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9899 * tests/existing.at (GNU Cim Grammar): Likewise.
9900 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9901
9902 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9903 fatal): Don't invoke fflush; it's not needed and it might even be
9904 harmful for stdout, as stdout might not be open.
9905 * src/reduce.c (reduce_print): Likewise.
9906
b1efe548
PE
99072002-12-27 Paul Eggert <eggert@twinsun.com>
9908
9909 Fix a bug where error locations were not being recorded correctly.
9910 This problem was originally reported by Paul Hilfinger in
161a71f3 9911 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
9912
9913 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9914 top of the location stack's error locations.
9915 (yyerrlab): Set it. When discarding a token, push its location
9916 onto yylerrsp so that we don't lose track of the error's end.
9917 (yyerrlab1): Now is only the target of YYERROR, so that we can
9918 properly record the location of the action that failed. For GCC
9919 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9920 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9921 (yyerrlab2): New label, which yyerrlab now falls through to.
9922 Compute the error's location by applying YYLLOC_DEFAULT to
9923 the locations of all the symbols that went into the error.
9924 * doc/bison.texinfo (Location Default Action): Mention that
9925 YYLLOC_DEFAULT is also invoked for syntax errors.
9926 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9927 Error locations include the locations of all the tokens that were
9928 discarded, not just the last token.
d600ee67 9929
983c5c2c
PE
99302002-12-26 Paul Eggert <eggert@twinsun.com>
9931
b1efe548
PE
9932 * src/files.c: Include quote.h.
9933 (compute_output_file_names): Warn if we detect conflicting
9934 outputs to the same file. This should catch the misunderstanding
9935 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9936
9937 * src/conflicts.c (conflicts_print): If the user specifies
9938 "%expect N", report an error if there are any reduce/reduce
9939 conflicts. This is what the manual says should happen.
9940 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9941 * tests/conflicts.at (%expect with reduce conflicts): New test.
9942
983c5c2c
PE
9943 Don't use m4_include on relative file names, as it doesn't work as
9944 desired if there happens to be a file with that name under ".".
d600ee67 9945
983c5c2c
PE
9946 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9947 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9948 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9949 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9950 * src/output.c (output_skeleton): Use full path names when
9951 specifying a file to include; don't rely on include path, as
9952 it's unreliable when the working file contains a file with
9953 that name.
d600ee67 9954
983c5c2c
PE
99552002-12-25 Paul Eggert <eggert@twinsun.com>
9956
9957 Remove obsolete references to bison.simple and bison.hairy.
9958 Problem mentioned by Aubin Mahe in
161a71f3 9959 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
9960 * data/glr.c: Comment fix.
9961 * doc/bison.1: Remove references. Also, mention "yacc".
9962
9963 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9964 with -g option.
9965
9966 * src/parse-gram.y (declaration): Use enum "report_states" rather
9967 than its numeric value 1.
9968
9969 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9970 opening a new one. This fixes Debian bug 165349, reported by
9971 Bruce Stephens.
9972
23f2d9dc
PE
99732002-12-24 Paul Eggert <eggert@twinsun.com>
9974
9975 Version 1.75e.
9976
9977 * Makefile.maint (cvs-update): Don't assume that the shell
9978 supports $(...), as Solaris sh doesn't.
9979
9980 * src/parse-gram.y (lloc_default): Remove test for empty
9981 nonterminals at the end, since it didn't change the result.
9982
99832002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
9984
9985 If the user does not define YYSTYPE as a macro, Bison now declares it
9986 using typedef instead of defining it as a macro. POSIX requires this.
9987 For consistency, YYLTYPE is also declared instead of defined.
9988
9989 %union directives can now have a tag before the `{', e.g., the
9990 directive `%union foo {...}' now generates the C code
9991 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9992 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9993 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9994 instead of `yyltype'.
9995
9996 `yystype' and `yyltype' are now obsolescent macros instead of being
9997 typedefs or tags; they are no longer documented and will be
9998 withdrawn in a future release.
9999
10000 * data/glr.c (b4_location_type): Remove.
10001 (YYSTYPE): Renamed from yystype.
10002 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10003 (struct YYLTYPE): Renamed from struct yyltype.
10004 (YYLTYPE): Renamed from yyltype.
10005 (yyltype, yystype): New (and obsolescent) macros,
10006 for backward compatibility.
10007 * data/yacc.c: Likewise.
10008
10009 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10010 does not specify a union tag. This is for compatibility with
10011 Solaris 9 yacc.
10012
10013 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10014 const *, since it is now modified by stripping surrounding { }.
10015 (current_braced_code): Remove.
10016 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10017 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10018 trailing " {...}". Now of type <chars>.
10019 (grammar_declaration): Adjust to bundled tokens.
10020 (code_content): Remove; stripping is now done by add_param.
10021 (print_token_value): Print contents of bundled tokens.
10022 (token_name): New function.
10023
10024 * src/reader.h (braced_code, current_braced_code): Remove.
10025 (token_name): New decl.
10026
10027 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10028 token_type, not braced_code code_kind. All uses changed.
10029 (SC_PRE_CODE): New state, for scanning after a keyword that
10030 has (or usually has) an immediately-following braced code.
10031 (token_type): New local var, to keep track of which token type
10032 to return when scanning braced code.
10033 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 10034 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
10035 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10036 instead of returning a token type immediately.
10037 (<INITIAL>"{"): Set token type.
10038 (<SC_BRACED_CODE>"}"): Use it.
10039 (handle_action_dollar, handle_action_at): Now returns bool
10040 indicating success. Fail if ! current_rule; this prevents a core dump.
10041 (handle_symbol_code_dollar, handle_symbol_code_at):
10042 Remove; merge body into caller.
10043 (handle_dollar, handle_at): Complain in invalid contexts.
10044
10045 * NEWS, doc/bison.texinfo: Document the above.
10046 * NEWS: Fix years and program names in copyright notice.
10047
879ca4f8
PE
100482002-12-17 Paul Eggert <eggert@twinsun.com>
10049
10050 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10051 Reporting, Table of Symbols): Omit mentions of %lex-param and
10052 %parse-param from the documentation for now.
10053
1c5fe69d
PE
100542002-12-15 Paul Eggert <eggert@twinsun.com>
10055
10056 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10057 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10058 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
10059 disagreed with the Bison documentation. Bug
10060 reported by Andrew Walrond.
d600ee67 10061
1c5fe69d
PE
10062 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10063 as the caller now does that.
10064 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10065 (YYEMPTY): Parenthesize right hand side, since others use it.
10066 (yyparse): Don't assume that our generated code is the only code
10067 that sets yychar.
10068
d1de5372
PE
100692002-12-13 Paul Eggert <eggert@twinsun.com>
10070
10071 Version 1.75d.
10072
10073 POSIX requires a "yacc" command.
10074 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10075 (MOSTLYCLEANFILES): Add yacc.
10076 (yacc): New rule.
1c5fe69d 10077 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
10078 as an alias for bison y.
10079
10080 * po/LINGUAS: Add da.
d600ee67 10081
d1de5372
PE
10082 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10083 problem with latest <getopt.h>.
10084 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10085
10086 * doc/fdl.texi: Upgrade to 1.2.
10087 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10088 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10089 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10090 gnulib.
10091 * config/install-sh: Sync with autotools.
10092
10093 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 10094 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
10095 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10096 locations are requested.
10097 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10098 locations are requested.
10099
d0f3fe23
PE
101002002-12-12 Paul Eggert <eggert@twinsun.com>
10101
10102 Remove unportable casts and storage allocation tricks.
10103 While we're at it, remove almost all casts, since they
10104 usually aren't needed and are a sign of trouble.
10105
10106 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10107
10108 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10109 the pointer DSET returned by malloc; this isn't portable.
10110 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10111 Similarly for DERIVES.
10112 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10113 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10114 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10115
10116 * src/derives.c (derives_compute): Do not bother invoking
10117 int_of_rule_number, since rule numbers are integers.
10118
10119 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10120 rather than XMALLOC (char, N).
10121
10122 * src/files.c (filename_split): Rewrite to avoid cast.
10123
10124 * src/gram.h (symbol_number_as_item_number,
10125 item_number_as_symbol_number, rule_number_as_item_number,
10126 item_number_as_rule_number):
10127 Now inline functions rather than macros, to avoid casts.
10128 * src/state.h (state_number_as_int): Likewise.
10129 * src/tables.c (state_number_to_vector_number,
10130 symbol_number_to_vector_number): Likewise.
10131
10132 * src/gram.h (int_of_rule_number): Remove; no longer used.
10133
10134 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10135 since the resulting storage is always stored into.
10136
10137 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10138 where it's needed.
10139
10140 * src/muscle_tab.c (muscle_m4_output):
10141 Now inline. Return bool, not int.
10142 * src/state.c (state_compare): Likewise.
10143 * src/symtab.c (symbol_check_defined,
10144 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10145 hash_compare_symbol, hash_symbol):
10146 Likewise.
10147 * src/uniqstr.c (uniqstr_print): Likewise.
10148 * src/muscle_tab.c (muscle_m4_output_processor):
10149 New function, to avoid casts.
10150 * src/state.c (state_comparator, stage_hasher): Likewise.
10151 * src/symtab.c (symbol_check_defined_processor,
10152 symbol_check_alias_consistency_processor, symbol_pack_processor,
10153 symbol_translation_processor, hash_symbol_comparator,
10154 hash_symbol_hasher): Likewise.
10155 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10156 * src/muscle_tab.c (muscles_m4_output):
10157 Use new functions instead of casting old functions unportably.
10158 * src/state.c (state_hash_new): Likewise.
10159 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10160 symbols_token_translations_init):
10161 Likewise.
10162 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10163
10164 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10165 var instead of casting to long, to avoid casts.
10166 (prepare_states): Use MALLOC rather than alloca, so that we don't
10167 have to worry about alloca.
10168 * src/state.c (state_hash_lookup): Likewise.
10169
10170 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10171 local var instead of casting to unsigned char, to avoid casts.
10172
10173 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10174 STATE_ALLOC): Remove.
10175 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10176 rather than calloc, and use offsetof to avoid allocating slightly
10177 too much storage.
10178 (state_new): Initialize all members.
10179
10180 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10181
10182 * src/symtab.c (symbol_free): Remove; unused.
10183 (symbol_get): Remove cast in lhs of assignment.
10184 (symbols_do): Now static. Accept generic arguments, not
10185 hashing-related ones.
10186
10187 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10188 (symbol_processor): Remove.
10189 (symbols_do): Remove decl; now static.
10190
10191 * src/system.h (alloca): Remove; decl no longer needed.
10192 (<stddef.h>): Include, for offsetof.
10193 (<inttypes.>, <stdint.h>): Include if available.
10194 (uintptr_t): New type, if system lacks it.
10195 (CALLOC, MALLOC, REALLOC): New macros.
10196 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10197 new macros.
10198
10199 * src/tables.c (table_size): Now int, to pacify GCC.
10200 (table_grow, table_ninf_remap): Use signed table size.
10201 (save_row): Don't bother initializing locals when not needed.
10202 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10203 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10204
10205 * src/vcg.h: Correct misspellings.
10206
10207 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10208
10209
10210 * src/getargs.c (getargs): Don't assume EOF == -1.
10211
26b4a969
PE
102122002-12-09 Paul Eggert <eggert@twinsun.com>
10213
10214 Change identifier spellings to avoid collisions with names
10215 that are reserved by POSIX.
10216
10217 Don't use names ending in _t, since POSIX reserves them.
10218 For consistency, remove _e and _s endings -- they're weren't
10219 needed to remove ambiguity. All uses changed.
10220 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10221 turn was just renamed from struniq_t.
10222 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10223 which in turn was just renamed from struniq_processor_t.
10224 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10225 in turn was renamed from hash_compare_struniq_t.
10226 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10227 (state_list): Renamed from state_list_t.
10228 * src/assoc.h (assoc): Renamed from assoc_t.
10229 * src/conflicts.c (enum conflict_resolution): Renamed from
10230 enum conflict_resolution_e.
10231 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10232 (rule_list): Renamed from rule_list_t.
10233 * src/getargs.h (enum trace): Renamed from enum trace_e.
10234 (enum report): Renamed from enum report_e.
10235 * src/gram.h (item_number): Renamed from item_number_t.
10236 (rule_number): Renamed from rule_number_t.
10237 (struct rule_s): Remove the "rule_s" part; not used.
10238 (rule): Renamed from rule_t.
10239 (rule_filter): Renamed from rule_filter_t.
10240 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10241 (goto_list): Renamed from goto_list_t.
10242 * src/lalr.h (goto_number): Renamed from goto_number_t.
10243 * src/location.h (location): Renamed from location_t.
10244 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10245 and moved here from:
10246 * src/muscle_tab.h (muscle_entry_t): here.
10247 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10248 (rule_list): Renamed from rule_list_t.
10249 * src/print_graph.c (static_graph): Renamed from graph.
10250 * src/reader.h (braced_code): Renamed from braced_code_t.
10251 Remove brace_code_e tag.
10252 * src/relation.h (relation_node): Renamed from relation_node_t.
10253 (relation_nodes): Renamed from relation_nodes_t.
10254 (relation): Renamed from relation_t.
10255 * src/state.h (state_number): Renamed from state_number_t.
10256 (struct state): Renamed from struct state_s.
10257 (state): Renamed from state_t.
10258 (transitions): Renamed from transitions_t. Unused (and
10259 misspelled) transtion_s tag removed.
10260 (errs): Renamed from errs_t. Unused errs_s tag removed.
10261 (reductions): Renamed from reductions_t. Unused tag
10262 reductions_s removed.
10263 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10264 (struct symbol_list): Renamed from struct symbol_list_s.
10265 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10266 (struct symbol): Renamed from struct symbol_s.
10267 (symbol): Renamed from symbol_t.
10268 * src/tables.c (vector_number): Renamed from vector_number_t.
10269 (action_number): Renamed from action_t.
10270 * src/tables.h (base_number): Renamed from base_t.
10271 * src/vcg.h (enum color): Renamed from enum color_e.
10272 (enum textmode): Renamed from enum textmode_e.
10273 (enum shape): Renamed from enum shape_e.
10274 (struct colorentry): Renamed from struct colorentry_s.
10275 (struct classname): Renamed from struct classname_s.
10276 (struct infoname): Renamed from struct infoname_s.
10277 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10278 (enum decision): Renamed from enum decision_e.
10279 (enum orientation): Renamed from enum orientation_e.
10280 (enum alignment): Renamed from enum alignment_e.
10281 (enum arrow_mode): Renamed from enum arrow_mode_e.
10282 (enum crossing_type): Renamed from enum crossing_type_e.
10283 (enum view): Renamed from enum view_e.
10284 (struct node): Renamed from struct node_s.
10285 (node): Renamed from node_t.
10286 (enum linestyle): Renamed from enum linestyle_e.
10287 (enum arrowstyle): Renamed from enum arrowstyle_e.
10288 (struct edge): Renamed from struct edge.
10289 (edge): Renamed from edge_t.
10290 (struct graph): Renamed from struct graph_s.
10291 (graph): Renamed from graph_t.
10292 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10293 Rename value_t -> value.
10294 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10295 value_t_as_yystype -> value_as_yystype.
10296
10297 Don't include <errno.h> in the mainstream code, since it
10298 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10299 * lib/get-errno.c, lib/get-errno.h: New files.
10300 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10301 get-errno.c.
10302 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10303 * src/output.c (output_skeleton): Likewise.
10304 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10305 instead of errno.
10306 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10307 Likewise.
10308 (handle_action_dollar, handle_action_at): Likewise.
10309 * src/system.h: Do not include <errno.h>.
10310 (TAB_EXT): Renamed from EXT_TAB.
10311 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10312
10313 Avoid str[a-z]*, since <string.h> reserves that name space.
10314 Change all instances of "struniq" in names to "uniqstr", and
10315 likewise for "STRUNIQ" and "UNIQSTR".
10316 * src/uniqstr.c: Renamed from src/struniq.c.
10317 * src/uniqstr.h: Renamed from src/struniq.h.
10318 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10319 * src/files.c (strsuffix): Remove; unused.
10320 (concat2): Renamed from stringappend. Now static.
10321 * src/files.h (strsuffix, stringappend): Remove; unused.
10322 * src/parse-gram.y (<chars>): Renamed from <string>.
10323 (<uniqstr>): Renamed from <struniq>.
10324 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10325 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10326 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10327 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10328 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10329 (N_EXPAND): Renamed from N_STRETCH.
10330
10331 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10332 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10333 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10334 Remove; unused.
10335 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10336 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10337 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10338 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10339 (BASE_MAXIMUM): Renamed from BASE_MAX.
10340 (BASE_MINIMUM): Renamed from BASE_MIN.
10341 (ACTION_MAX): Remove; unused.
10342 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10343 Unnecessary casts removed from above defines.
10344
10345
10346 Fix misspelling in names.
10347 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10348 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10349 G_NODE_ALIGNEMENT.
10350
10351
10352 * lib/timevar.c (timevar_report): Renamed from time_report,
10353 for consistency with other names.
10354 * lib/timevar.h (timevar_report): New decl.
10355 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10356
10357
10358 Sort include-file uses.
10359
10360 Reorder all include files under src to be in the order "system.h".
10361 then the ../lib include files in angle brackets (alphabetized),
10362 then the . include files in double-quotes (alphabetized). Fix
10363 dependency breakages encountered in this process, as follows:
10364 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10365 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10366 * src/state.h: Include "symtab.h".
10367
996b1c7e
PE
103682002-12-08 Paul Eggert <eggert@twinsun.com>
10369
10370 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10371 since this causes problems when __file__ contains character
10372 sequences like "@" that are treated specially by src/scan-skel.l.
10373 Instead, just use the file's basename. This fixes the bug
10374 reported by Martin Mokrejs in
161a71f3 10375 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 10376
e19c4e5d
PE
103772002-12-06 Paul Eggert <eggert@twinsun.com>
10378
10379 Add support for rules that do not have trailing semicolons, as
10380 POSIX requires. Improve the quality of locations in Bison
10381 diagnostics.
26b4a969 10382
e19c4e5d
PE
10383 * src/location.c: Include <quotearg.h>.
10384 (empty_location): Now const.
10385 (location_print): New function. Follow the recommendation of the
10386 GNU Coding Standards for locations that span file boundaries.
10387 * src/location.h: Do not include <quotearg.h>; no longer needed.
10388 (boundary): New type.
10389 (location_t): Use it. This allows locations to span file boundaries.
10390 All member uses changed: file -> start.file or end.file (as needed),
10391 first_line -> start.line, first_column -> start.column,
10392 last_line -> end.line, last_column -> end.column.
10393 (equal_boundaries): New function.
10394 (LOCATION_RESET, LOCATION_STEP): Remove.
10395 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10396 (empty_location): Now const.
10397 (location_print): New decl.
10398 * src/parse-gram.y (lloc_default): New function, which handles
10399 empty locations more accurately.
10400 (YYLLOC_DEFAULT): Use it.
10401 (%token COLON): Remove.
10402 (%token ID_COLON): New token.
26b4a969 10403 (rules): Use it.
e19c4e5d
PE
10404 (declarations, rules): Remove trailing semicolon.
10405 (declaration, rules_or_grammar_declaration):
10406 Allow empty (";") declaration.
10407 (symbol_def): Remove empty actions; no longer needed.
10408 (rules_or_grammar_declaration): Remove trailing semicolon.
10409 (semi_colon.opt): Remove.
10410 * src/reader.h: Include location.h.
10411 (scanner_cursor): New decl.
10412 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10413 rolling our own.
10414 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10415 of *loc.
10416 (STEP): Remove. No longer needed, now that adjust_location does
10417 the work. All uses removed.
10418 (scanner_cursor): New var.
10419 (adjust_location): Renamed from extend_location. It now sets
10420 *loc and adjusts the scanner cursor. All uses changed.
10421 Don't bother testing for CR.
10422 (handle_syncline): Remove location arg; now updates scanner cursor.
10423 All callers changed.
10424 (unexpected_end_of_file): Now accepts start boundary of token or
10425 comment, not location. All callers changed. Update scanner cursor,
10426 not the location.
10427 (SC_AFTER_IDENTIFIER): New state.
10428 (context_state): Renamed from c_context. All uses changed.
10429 (id_loc, code_start, token_start): New local vars.
10430 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10431 processing of Yacc white space and equivalents here.
10432 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10433 instead of returning ID immediately, since we need to search for
10434 a subsequent colon.
10435 (<INITIAL>"'", "\""): Save token_start.
10436 (<INITIAL>"%{", "{", "%%"): Save code_start.
10437 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10438 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10439 BEGIN context_state at end, not INITIAL.
10440 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10441 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10442 Return correct token start.
10443 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10444 the start of a character, string or multiline comment is found.
10445 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10446 Reduction): Adjust reported locations to match the more-precise
10447 results now expected.
10448 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10449 * tests/reduce.at (Useless Rules, Reduced Automaton,
10450 Underivable Rules): Likewise.
10451 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10452 or "|"' now that so many other tokens are allowed by the new grammar.
10453
10454 * src/complain.h (current_file): Remove duplicate decl;
10455 current_file is now owned by files.h.
10456 * src/complain.c, src/scan-gram.l: Include files.h.
10457
104582002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 10459
e19c4e5d
PE
10460 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10461 promotes to int; it might be unsigned int.
10462 * data/yacc.c (yy_reduce_print): Likewise.
10463
10464 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10465 be #defined in the prologue, not in the Bison declarations.
10466 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 10467
b64755e3
PE
104682002-12-02 Paul Eggert <eggert@twinsun.com>
10469
10470 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10471 * lib/strtoul.c: New file, from gnulib.
10472 This fixes a porting bug reported by Peter Klein in
161a71f3 10473 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 10474
6e746484
PE
104752002-11-30 Paul Eggert <eggert@twinsun.com>
10476
b64755e3
PE
10477 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10478 and put only a forward declaration in the prologue. This is for
10479 consistency with the other scanner helper functions.
10480
6ba55592
PE
10481 Type clashes now generate warnings, not errors, since it
10482 appears that POSIX may allow some grammars with type clashes.
10483 * src/reader.c (grammar_current_rule_check): Warn about
10484 type clashes instead of complaining.
10485 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10486
6e746484
PE
10487 Add Yacc library, since POSIX requires it.
10488 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10489 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10490 * lib/main.c, lib/yyerror.c: New files.
10491
10492 gram_error can be static; it need not be extern.
10493 * src/reader.h (gram_error): Remove decl.
10494 * src/parse-gram.y (gram_error): Now static. Add static decl.
10495 (print_token_value): Omit parameter names from forward decl,
10496 for consistency.
10497
88510f9c
PE
104982002-11-29 Paul Eggert <eggert@twinsun.com>
10499
6e746484
PE
10500 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10501 be declared before being used. E.g., one should typically
10502 declare them in the prologue. Use GNU coding style in examples.
10503 Put "const" consistently after the type it modifies. Mention
10504 that C99 supports "inline". Mention that yyerror traditionally
10505 returns "int".
10506
88510f9c
PE
10507 %parse-param and %lex-param now take just one argument, the
10508 declaration; the argument name is deduced from the declaration.
10509
10510 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10511 Reporting, Table of Symbols): Document this.
10512 * src/parse-gram.y (add_param): New function.
10513 (COMMA): Remove.
10514 (declaration): Implement new rule for %parse-param and %lex-param.
10515 * src/scan-gram.l: "," now elicits a warning, rather than being
10516 a token; this is more compatible with byacc.
10517 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10518
bb92250c
PE
105192002-11-27 Paul Eggert <eggert@twinsun.com>
10520
10521 Rename identifiers to avoid real and potential collisions.
10522
10523 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10524 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 10525 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
10526 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10527 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10528 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10529 All uses changed.
10530 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10531 The name "yycontrol" violates the name space rules, and this stuff
10532 wasn't being used anyway.
10533 (input): Remove action; this stuff wasn't being used.
10534 (gram_error): Rename local variable yylloc -> loc.
10535 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10536 (YY_DECL): Don't use "yy" at start of local variables.
10537 All uses changed, e.g., yylloc -> loc.
10538 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10539 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10540 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10541 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10542
10543 * src/parse-gram.y (gram_error): loc is now const *.
10544 * src/reader.h (gram_error): Likewise.
10545
3af4feb2
PE
105462002-11-24 Paul Eggert <eggert@twinsun.com>
10547
10548 Version 1.75c.
10549
10550 * tests/actions.at (Actions after errors): Use an output format
10551 more similar to that of the Printers and Destructors test.
10552 Test the position of the ';' token too.
10553 (Printers and Destructors): Likewise.
10554 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10555 unnecessarily alarming people when the test fails.
10556
10557 * data/yacc.c (yyerrlab1): Move this label down, so that the
10558 parser does not discard the lookahead token if the user code
10559 invokes YYERROR. This change is required for POSIX conformance.
10560
10561 * lib/error.c: Sync with gnulib.
10562
105632002-11-22 Paul Eggert <eggert@twinsun.com>
10564
10565 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10566 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10567 * lib/xmalloc.c: Likewise.
26b4a969 10568
58004308
PE
105692002-11-20 Paul Eggert <eggert@twinsun.com>
10570
10571 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10572
105732002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 10574
58004308
PE
10575 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10576 should use `if (! x) abort ();' rather than `assert (x);', and
10577 anyway it's one less thing to worry about configuring.
10578
10579 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10580 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10581 and replace all instances of assert with abort.
10582 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10583 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10584
10585 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10586 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10587 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10588 hash_find_entry, hash_rehash, hash_insert): Likewise.
10589 * src/conflicts.c (resolve_sr_conflict): Likewise.
10590 * src/lalr.c (set_goto_map, map_goto): Likewise.
10591 * src/nullable.c (nullable_compute): Likewise.
10592 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10593 * src/reader.c (packgram, reader): Likewise.
10594 * src/state.c (state_new, state_free, state_transitions_set,
10595 state_reduction_find): Likewise.
10596 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10597 symbol_pack): Likewise.
10598 * src/tables.c (conflict_row, pack_vector): Likewise.
10599 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10600 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10601 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10602 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10603
10604 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10605 (ARGMATCH_CONSTRAINT): New macro.
10606 (ARGMATCH_ASSERT): Use it.
10607
10608 * src/system.h (verify): New macro.
10609 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10610 rather than assert.
10611 * src/tables.c (tables_generate): Likewise.
10612
10613 * src/struniq.c (struniq_assert): Now returns void, and aborts
10614 if the assertion is false.
10615 (struniq_assert_p): Remove.
10616 * src/struniq.h: Likewise.
10617
76ae8198
PE
106182002-11-18 Paul Eggert <eggert@twinsun.com>
10619
10620 * data/glr.c (yygetLRActions): Replace `yyindex' with
10621 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10622 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 10623 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 10624
d3c4e709
AD
106252002-11-18 Akim Demaille <akim@epita.fr>
10626
10627 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10628 space.
10629 From Tim Van Holder.
10630
8d8a7238
PE
106312002-11-17 Paul Eggert <eggert@twinsun.com>
10632
10633 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10634 to "SyntaxError" for consistency with my 2002-11-15 change.
10635
10636 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10637 not define to {}, since this breaks the common use of `YYDPRINTF
10638 ((...));' if a single statement is desired (e.g. before `else').
10639 Work around GCC warnings by surrounding corresponding calls with
10640 {} if needed.
10641 (yyhasResolvedValue): Remove unused function.
10642 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10643 loop body.
10644 (yyreportSyntaxError): Renamed from yyreportParseError.
10645 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10646 All uses changed.
10647 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10648 extern when possible. Remove unused initializations.
10649
b0937b22
AD
106502002-11-16 Akim Demaille <akim@epita.fr>
10651
10652 Augment the similarity between GLR and LALR traces.
10653
10654 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10655 (YY_REDUCE_PRINT): New.
10656 (yyparse): Use them.
10657 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10658 YYDPRINT here.
10659 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10660 state reached after the reduction/recovery, since...
10661 (yyparse, yyprocessOneStack): Report the state we are entering in.
10662
c5e3e510
AD
106632002-11-16 Akim Demaille <akim@epita.fr>
10664
10665 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10666 Add support for --trace=skeleton.
10667 * src/scan-skel.l: %option debug.
10668 Scan strings of non-@ or \n instead of character by character.
10669 (scan_skel): Handle trace_skeleton.
10670 (QPUTS): New.
10671 (@output_parser_name@, @output_header_name@): ``Restore'' their
10672 support (used to be M4 macros).
10673 * data/yacc.c: Quote larger chunks, a la glr.c.
10674 * data/lalr1.cc: Likewise.
10675 The header guards are no longer available, so use some other
10676 string than `YYLSP_NEEDED'.
10677
4c6cc1db
AD
106782002-11-16 Akim Demaille <akim@epita.fr>
10679
10680 Make the ``Printers and Destructors'' test more verbose, taking
10681 `yacc.c''s behavior as (possibly wrong) reference.
10682
10683 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10684 instead of fprint on stdout.
10685 Set and report the last_line of the symbols.
10686 Consistently display values and locations.
10687
6d9e8019
PE
106882002-11-16 Paul Eggert <eggert@twinsun.com>
10689
10690 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10691
6e649e65
PE
106922002-11-15 Paul Eggert <eggert@twinsun.com>
10693
b25d88f6
PE
10694 * tests/actions.at (Actions after errors): New test case.
10695
6e649e65
PE
10696 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10697 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10698 tests/action.at, tests/calc.at, tests/conflicts.at,
10699 tests/cxx-type.at, tests/regression.at:
10700 "parse error" -> "syntax error" for POSIX compatibility.
10701 "parsing stack overflow..." -> "parser stack overflow" so
10702 that code matches Bison documentation.
10703
0f39aab9
AD
107042002-11-15 Akim Demaille <akim@epita.fr>
10705
10706 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10707 take two BRACED_CODE, not two string_content.
10708 Free the scanner's obstack when we are done.
10709 (code_content): New.
10710 * tests/calc.at: Adjust.
10711 * doc/bison.texinfo: Adjust.
10712 Also, make sure to include the `,' for these declarations.
10713
761c1926
AD
107142002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10715
10716 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10717 definition; avoids potential autoreconf problems.
10718
b0f98b10
AD
107192002-11-15 Akim Demaille <akim@epita.fr>
10720
10721 Always check the value returned by yyparse.
10722
10723 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10724 returned by yyparse.
10725 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10726 Adjust calls.
10727 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10728 returned by yyparse.
10729
970785f1
PH
107302002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10731
10732 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10733 on input.at test.
10734
8fcc7db1
PE
107352002-11-14 Paul Eggert <eggert@twinsun.com>
10736
7ec1b48e
PE
10737 * src/output.c (output_skeleton): Call xfopen instead of
10738 duplicating xfopen's body.
10739
cfff7583 10740 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 10741 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 10742
8fcc7db1
PE
10743 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10744 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10745 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10746 file twice in the grammar, as an extra check.
10747
10748 * tests/input.at (Torturing the Scanner): Surround the
10749 backslash-newline tests with "#if 0", to make it less likely that
10750 we'll run into compiler bugs. Bring back solitary \ inside
10751 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 10752 test backslash-newline in C character constant.
8fcc7db1 10753
4e8d992c
AD
107542002-11-14 Akim Demaille <akim@epita.fr>
10755
10756 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10757 status of the compiler.
f32b346d 10758 Calling `exit 1' is no longer needed.
4e8d992c
AD
10759 Reported by Nelson H. F. Beebe.
10760
9501dc6e
AD
107612002-11-14 Akim Demaille <akim@epita.fr>
10762
10763 * tests/atlocal.in (CPPFLAGS): We have config.h.
10764 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10765 New.
10766 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10767 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10768 * tests/regression.at, tests/torture.at: Use them for all the
10769 grammars that are to be compiled.
10770 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10771 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10772 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10773
18b519c0
AD
107742002-11-14 Akim Demaille <akim@epita.fr>
10775
10776 * doc/bison.texinfo: Various formatting changes (alignments in
10777 samples, additional @group/@end group, GCS in samples.
10778 Use @deffn instead of simple @table to define the directives,
10779 macros, variables etc.
10780
9a86cdb9
PE
107812002-11-13 Paul Eggert <eggert@twinsun.com>
10782
daa33def 10783 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 10784 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 10785
daa33def 10786 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 10787 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
10788 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10789 * tests/headers.at (export YYLTYPE): Likewise.
10790
10791 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 10792 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 10793
9a86cdb9
PE
10794 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10795 comments, since they're not portable. Use GNU coding style.
10796
9c1e26bd
AD
107972002-11-13 Akim Demaille <akim@epita.fr>
10798
10799 * data/yacc.c: Leave bigger chunks of quoted text.
10800 (YYDSYMPRINTF): New.
10801 Use it to report symbol activities.
10802 * data/glr.c (YYDSYMPRINTF): New.
10803 Use it.
10804
87f721cc
PE
108052002-11-12 Paul Eggert <eggert@twinsun.com>
10806
10807 Version 1.75b.
10808
10809 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10810 (yyglrReduce): Return yyok, not 0.
10811 This should avoid the enumerated-type warnings reported
464c6927 10812 by Nelson H. F. Beebe in
161a71f3 10813 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
10814
10815 * lib/bbitset.h (BITSET_INLINE): Remove.
10816 * lib/bitset.h [! BITSET_INLINE]: Remove.
10817 (bitset_set, bitset_reset, bitset_test): Rename local vars
10818 to avoid shadowing warnings by GCC.
10819
10820 * data/glr.c (inline): Remove #define. It's the user's
10821 responsibility to #define it away, just like 'const'.
464c6927 10822 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 10823 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 10824
87f721cc
PE
10825 * Makefile.maint (po-check): Scan .l and .y files instead of the
10826 .c and the .h files that they generate. This fixes the bug
10827 reported by Tim Van Holder in:
161a71f3 10828 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
10829 Look for N_ as well as for _. Try to avoid matching #define for
10830 N_ and _.
10831 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10832 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10833 * src/scan-gram.l: Revamp regular expressions so that " and '
10834 do not confuse xgettext.
10835
10836 * src/struniq.h (struniq_new): Do not declare the return type
10837 to be 'const'; this violates the C standard.
10838 * src/struniq.c (struniq_new): Likewise.
10839
be14ade5
AD
108402002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10841
10842 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10843 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10844 linker.
10845
05291fbc
AD
108462002-11-12 Akim Demaille <akim@epita.fr>
10847
10848 * Makefile.maint: Sync with Autoconf:
10849 (local_updates): New.
10850
1f5fd52e
AD
108512002-11-12 Akim Demaille <akim@epita.fr>
10852
10853 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10854
283f1e64
AD
108552002-11-12 Akim Demaille <akim@epita.fr>
10856
10857 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10858 locations.
10859
886b69d1
AD
108602002-11-12 Akim Demaille <akim@epita.fr>
10861
10862 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10863 not yyvalue.
10864
3df37415
AD
108652002-11-12 Akim Demaille <akim@epita.fr>
10866
10867 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10868 Use it to test the GLR parser.
10869
7bd6c77e
AD
108702002-11-12 Akim Demaille <akim@epita.fr>
10871
10872 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10873 defines it.
10874 * data/glr.c (yystos): New.
10875 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10876 (YYDSYMPRINT): New.
10877 (yyval): Don't define it, it is handled via M4.
10878 (yyrecoverParseError): Free verbosely the discarded symbols.
10879 * data/yacc.c (yysymprint): Remove, rather...
10880 (b4_yysymprint_generate): invoke.
10881 * data/c.m4 (b4_yysymprint_generate): New.
10882 Accept pointers as arguments, as opposed to the version from
10883 yacc.c.
10884 (b4_yydestruct_generate): Likewise.
10885 * tests/cations.at (Printers and Destructors): Use Bison directives
10886 instead of CPP macros.
10887 Don't rely on internal details.
10888
b0400cc6
AD
108892002-11-12 Akim Demaille <akim@epita.fr>
10890
10891 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10892 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10893 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10894 it against YYEMPTY and so forth), work on yytoken (i.e., set
10895 it to YYEMPTY etc.).
10896 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10897 (b4_symbol_actions): Remove.
10898 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10899 for 0, end-of-input.
10900
72f889cc
AD
109012002-11-12 Akim Demaille <akim@epita.fr>
10902
10903 * doc/bison.texinfo (Destructor Decl): New.
10904
b1ae9233
AD
109052002-11-12 Akim Demaille <akim@epita.fr>
10906
10907 * src/tables.c (tables_generate): Use free for pointers that
10908 cannot be NULL, not XFREE.
10909 (pack_vector): Use assert, not fatal, for bound violations.
10910 * src/state.c (state_new): Likewise.
10911 * src/reader.c (reader): Likewise.
10912 * src/lalr.c (set_goto_map): Likewise.
72f889cc 10913 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
10914 the file name.
10915
7ec2d4cd
AD
109162002-11-12 Akim Demaille <akim@epita.fr>
10917
10918 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10919 Restore.
10920 * src/scan-gram.l (last_string): Is global to the file, not to
10921 yylex.
10922 * src/parse-gram.y (input): Don't append the epilogue here,
10923 (epilogue.opt): do it here, and free the scanner's obstack.
10924 * src/reader.c (epilogue_set): Rename as...
10925 (epilogue_augment): this.
10926 * data/c.m4 (b4_epilogue): Defaults to empty.
10927
573a6cd3
AD
109282002-11-12 Akim Demaille <akim@epita.fr>
10929
10930 * src/getargs.c (long_options): Remove duplicates.
10931 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10932 Remove.
10933 * doc/bison.rnh: Remove.
10934 * doc/bison.texinfo (VMS Invocation): Remove.
10935
95612cfa
AD
109362002-11-12 Akim Demaille <akim@epita.fr>
10937
10938 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10939 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10940
10941 Use struniq for symbols.
10942
10943 * src/symtab.h (symbol_t): The tag member is a struniq.
10944 (symbol_type_set): Adjust.
10945 * src/symtab.c (symbol_new): Takes a struniq.
10946 (symbol_free): Don't free the tag member.
10947 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10948 (hash_compare_symbol, hash_symbol): these.
10949 Use the fact that tags as struniqs.
10950 (symbol_get): Use struniq_new.
10951 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10952 Returns a strniq.
10953 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10954 and type members are struniqs.
10955 * src/reader.c (get_merge_function)
10956 (grammar_current_rule_merge_set): Adjust.
10957 (TYPE, current_type): Are struniq.
10958
10959 Use struniq for file names.
10960
10961 * src/files.h, src/files.c (infile): Split into...
10962 (grammar_file, current_file): these.
10963 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10964 * src/reduce.c (reduce_print): Likewise.
10965 * src/getargs.c (getargs): Likewise.
10966 * src/complain.h, src/complain.c: Likewise.
10967 * src/main.c (main): Call struniqs_new early enough to use it for
10968 file names.
10969 Don't free the input file name.
10970
3e6656f9
AD
109712002-11-12 Akim Demaille <akim@epita.fr>
10972
10973 * src/symtab.c (symbol_free): Remove dead deactivated code:
10974 type_name are properly removed.
10975 Don't use XFREE to free items that cannot be NULL.
10976 * src/struniq.h, src/struniq.c: New.
10977 * src/main.c (main): Initialize/free struniqs.
10978 * src/parse-gram.y (%union): Add astruniq member.
10979 (yyprint): Adjust.
10980 * src/scan-gram.l (<{tag}>): Return a struniq.
10981 Free the obstack bit that used to store it.
10982 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10983
7672019c
PE
109842002-11-11 Paul Eggert <eggert@twinsun.com>
10985
10986 Revamp to fix many (but not all) of the C- and M4-related quoting
10987 problems. Among other things, this fixes the Bison bug reported
10988 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 10989 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
10990
10991 Use new @ escapes consistently. Represent brackets with @{ and @}
10992 rather than @<:@ and @:>@, since this works a bit better with dumb
10993 editors like vi. Represent @ with @@, since @ is now consistently
10994 an escape. Use @oline@ and @ofile@ rather than __oline__ and
10995 __ofile__, to avoid unexpected expansions. Similarly, use @output
10996 rather than #output.
10997
10998 * data/c.m4 (b4_copyright): Omit file name from comment, since
10999 the file name could contain "*/".
11000 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11001 be quoted. All uses changed.
11002
11003 * data/glr.c: Use new @ escapes consistently.
11004 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11005 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11006 Remove, since they couldn't handle arbitrary characters in file
11007 names.
11008 * data/lalr1.cc: Likewise.
11009 * data/yacc.c: Likewise.
11010
11011 * src/files.c (output_infix): Remove; all uses removed.
11012 * src/files.h: Likewise.
11013
11014 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11015 mishandled funny characters in file names, and anyway it isn't
11016 needed any more.
11017 * data/yacc.c: Likewise.
11018 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11019
11020 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11021 * data/yacc.c: Likewise.
11022
11023 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11024 strings now.
11025 (muscle_init): Quote filename as a C string.
11026 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11027 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11028 * src/output.c (escaped_file_name_output): New function.
11029 (prepare_symbols): Quote tokens for M4.
11030 (prepare): Don't insert output_infix, output_prefix,
11031 output_parser_name, output_header_name; this is now down by scan-skel.
11032 Insert skeleton as a C string.
11033
11034 * src/output.c (user_actions_output, symbol_destructors_output,
11035 symbol_printers_output): Quote filenames for C and M4.
11036 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11037
11038 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11039 escapes other than \\ and \'; this simplifies the code.
11040 (<SC_STRING>): Likewise, for \\ and \".
11041 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11042 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11043 Use new escapes @{ and @} for [ and ].
11044
11045 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11046 them with auto vars.
11047 Switch to new escape scheme, where @ is the escape character uniformly.
11048 Abort if a stray escape character is found. Avoid unbounded input
11049 buffer when parsing non-escaped text.
11050
11051 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11052 __oline__, #output, $@, and @{ do not have unintended meanings.
11053
acea4f3b
PE
110542002-11-09 Paul Eggert <eggert@twinsun.com>
11055
11056 Fix the test failure due to GCC warnings described in
161a71f3 11057 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
11058 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11059 evaluate to 0 if it's impossible for NINF to be in the respective
11060 table.
11061 (yygetLRActions, yyrecoverParseError): Use them.
11062
11063 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11064 counted in the token inserted at end of file. Now takes
11065 location_t *, not location_t, so that the location can be
11066 adjusted. All uses changed.
11067
11068 * tests/regression.at (Invalid inputs): Adjust wording in
11069 diagnostic to match the new behavior.
11070
11071 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11072 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11073 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11074 abort ();'. This reduces the runtime of the "Many lookaheads"
11075 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11076 GCC 3.2.
11077
20ef1ad5
PE
110782002-11-07 Paul Eggert <eggert@twinsun.com>
11079
11080 * src/parse-gram.y (CHARACTER): Remove unused token.
11081 All uses removed.
11082
11083 * src/scan-gram.l: Remove stack option. We no longer use the
11084 stack, since the stack was never deeper than 1; instead, use the
11085 new auto var c_context to record the stacked value.
11086
11087 Remove nounput option. At an unexpected end of file, we now unput
11088 the minimal input necessary to end cleanly; this simplifies the
11089 code.
11090
11091 Avoid unbounded token sizes where this is easy.
11092
11093 (unexpected_end_of_file): New function.
11094 Use it to systematize the error message on unexpected EOF.
11095 (last-string): Now auto, not static.
11096 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11097 (scanner_last_string_free): Remove; not used.
11098 (percent_percent_count): Move decl to just before use.
11099 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11100 not the (never otherwised-used) CHARACTER.
11101
93724f13
AD
111022002-11-07 Akim Demaille <akim@epita.fr>
11103
11104 Let yyerror always receive the msg as last argument, so that
11105 yyerror can be variadic.
11106
11107 * data/yacc.c (b4_yyerror_args): New.
11108 Use it when calling yyerror.
11109 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11110 Use it when calling yyerror.
11111 * doc/bison.texinfo (Error Reporting): Adjust.
11112 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11113 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11114
6e40b4eb
AD
111152002-11-06 Akim Demaille <akim@epita.fr>
11116
11117 #line should have quoted strings.
11118 Ideally, this should be done by m4_quotearg.
11119
11120 * src/scan-skel.l: Include quotearg.h.
11121 Quote __ofile__.
11122 * src/output.c (symbol_printers_output)
11123 (symbol_destructors_output): Quote the file name.
11124
2dfbfc12
AD
111252002-11-06 Akim Demaille <akim@epita.fr>
11126
11127 * tests/regression.at (Invalid inputs): Adjust to the recent
11128 messages.
11129
437c2d80
AD
111302002-11-06 Akim Demaille <akim@epita.fr>
11131
11132 Restore --no-lines.
11133 Reported by Jim Kent.
11134
11135 * data/c.m4 (b4_syncline): New.
11136 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11137 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11138 * src/output.c (user_actions_output): Likewise.
11139 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 11140 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 11141
900c5db5
AD
111422002-11-06 Akim Demaille <akim@epita.fr>
11143
11144 * src/main.c (main): Free `infile'.
11145 * src/scan-gram.l (handle_syncline): New.
11146 Recognize `#line'.
11147 * src/output.c (user_actions_output, symbol_destructors_output)
11148 (symbol_printers_output): Use the location's file name, not
11149 infile.
11150 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11151
e183b123 111522002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 11153
e183b123 11154 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 11155 either has GLR conflict entries.
e183b123 11156
193eb6b7
PE
111572002-11-05 Paul Eggert <eggert@twinsun.com>
11158
e183b123
PE
11159 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11160 "integer out of range" rather than "invalid value".
11161 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11162 accordingly.
11163
193eb6b7
PE
11164 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11165 Also, remove one static variable in the scanner.
11166
11167 * src/scan-gram.l (braces_level): Now auto, not static.
11168 Initialize to zero if the compiler is being picky.
11169 (INITIAL): Clear braces_level instead of incrementing it.
11170 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11171 as POSIX 1003.1-2001 requires.
11172 * src/system.h (IF_LINT): New macro, taken from coreutils.
11173 * configure.ac: Define "lint" if --enable-gcc-warnings.
11174
29c01725
AD
111752002-11-05 Akim Demaille <akim@epita.fr>
11176
11177 * src/scan-gram.l: When it starts with `%', complain about the
11178 whole directive, not just that `invalid character: %'.
11179
8aeac3ca
AD
111802002-11-04 Akim Demaille <akim@epita.fr>
11181
11182 * Makefile.maint: Update from Autoconf.
11183 (update, cvs-update, po-update, do-po-update): New.
11184
793a58bb
AD
111852002-11-04 Akim Demaille <akim@epita.fr>
11186
11187 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11188 and yyerror.
11189 Have yyerror `use' its arguments.
11190 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11191 returns true when location & yacc & pure & parse-param.
11192 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11193
c4d720cd
AD
111942002-11-04 Akim Demaille <akim@epita.fr>
11195
11196 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11197 clashes.
11198 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11199 font-lock-mode.
11200 Use complain_at.
11201 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11202 slot 0.
11203
613a0dc5
PE
112042002-11-03 Paul Eggert <eggert@twinsun.com>
11205
11206 * src/reader.c (get_merge_function, grammar_current_rule_check):
11207 Use consistent diagnostics for reporting type name clashes.
11208 Quote the types with <>, for consistency with Yacc.
11209 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11210
2a8d363a
AD
112112002-11-03 Akim Demaille <akim@epita.fr>
11212
11213 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11214 New.
11215 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11216 (b4_parse_param): Remove.
11217 Use b4_identification.
11218 Propagate b4_pure_args where needed to pass them to yyerror.
11219 * data/glr.m4 (b4_parse_param): Remove.
11220 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11221 (b4_lpure_formals): New.
11222 Use b4_identification.
11223 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11224 b4_user_formals and b4_user_args.
11225 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11226 (yyreportAmbiguity): When using a pure parser, also need
11227 the location, and the parse-params.
11228 Adjust callers.
11229 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11230 When using a pure parser, also need the parse-params.
11231 Adjust callers.
11232 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11233 (%pure-parser + %parse-param) LALR and GLR parsers.
11234 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11235 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11236 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11237 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11238 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11239 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11240 * doc/bison.texinfo: Untabify the whole file.
11241 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11242 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11243 (Error Reporting): Adjust to these new directives.
11244 Document %error-verbose, deprecate YYERROR_VERBOSE.
11245
9e32add8
AD
112462002-11-03 Akim Demaille <akim@epita.fr>
11247
11248 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11249 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11250 command line options.
11251 * tests/cxx-type.at: Formatting changes.
11252
b02d90a5
PE
112532002-11-03 Paul Eggert <eggert@twinsun.com>
11254
11255 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11256 to count columns correctly, and to check for invalid inputs.
9e32add8 11257
b02d90a5
PE
11258 Use mbsnwidth to count columns correctly. Account for tabs, too.
11259 Include mbswidth.h.
11260 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11261 (extend_location): New function.
11262 (YY_LINES): Remove.
11263
11264 Handle CRLF in C code rather than in Lex code.
11265 (YY_INPUT): New macro.
11266 (no_cr_read): New function.
11267
11268 Scan UCNs, even though we don't fully handle them yet.
11269 (convert_ucn_to_byte): New function.
11270
11271 Handle backslash-newline correctly in C code.
11272 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11273 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11274 all uses changed.
11275 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11276 Use {splice} wherever C allows backslash-newline.
11277 YY_STEP after space, newline, vertical-tab.
11278 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 11279
b02d90a5
PE
11280 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11281
11282 ({int}, handle_action_dollar, handle_action_at): Check for integer
11283 overflow.
9e32add8 11284
b02d90a5
PE
11285 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11286
11287 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11288 as well as \000. Check for UCHAR_MAX, not 255.
11289 Allow \x with an arbitrary positive number of digits, as in C.
11290 Check for overflow here.
11291 Allow \? and UCNs, for compatibility with C.
11292
11293 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11294 with quote slot used by complain_at.
11295
11296 * tests/input.at: Add tests for backslash-newline, m4 quotes
11297 in symbols, long literals, and funny escapes in strings.
11298
11299 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11300 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11301 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11302 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11303 * m4/mbswidth.m4: New file, from GNU coreutils.
11304
11305 * doc/bison.texinfo (Grammar Outline): Document // comments.
11306 (Symbols): Document that trigraphs have no special meaning in Bison,
11307 nor is backslash-newline allowed.
11308 (Actions): Document that trigraphs have no special meaning.
11309
11310 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11311 no longer used.
11312
113132002-11-02 Paul Eggert <eggert@twinsun.com>
11314
11315 * src/reader.c: Don't include quote.h; not needed.
11316 (get_merge_function): Reword warning to be consistent with
11317 type clash diagnostic in grammar_current_rule_check.
11318
11319 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11320 bug in trigraph handling.
11321
11322 * src/output.c (prepare_symbols): When printing token names,
11323 escape "[" as "@<:@" and likewise for "]".
11324
11325 * src/system.h (errno): Remove declaration, as we are now
11326 assuming C89 or better, and C89 guarantees errno.
11327
762b212b
PE
113282002-10-30 Paul Eggert <eggert@twinsun.com>
11329
11330 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11331 Check for close failures.
11332 * src/files.h (xfclose): Return void, not int, since it always
11333 returned zero.
11334 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11335 indicates one.
11336 * src/output.c (output_skeleton): Use xfclose rather than fclose
11337 and ferror. xfclose now checks ferror.
11338
11339 * data/glr.c (YYLEFTMOST_STATE): Remove.
11340 (yyreportTree): Use a stack-based leftmost state. This avoids
11341 our continuing battles with bogus warnings about initializers.
11342
56100c60
AD
113432002-10-30 Akim Demaille <akim@epita.fr>
11344
11345 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11346 #if.
11347
51b4a04c
PH
113482002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11349
11350 * tests/glr-regr1.at: New test for reported regressions.
11351 * tests/testsuite.at: Add glr-regr1.at test.
11352 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 11353
bf1ebda2
PE
113542002-10-24 Paul Eggert <eggert@twinsun.com>
11355
5c16c6b1
PE
11356 Version 1.75a.
11357
bf1ebda2
PE
11358 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11359 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11360 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11361 Don't assume strdup exists; POSIX says its an XSI extension.
11362 Check for buffer overflow on input.
11363
b526ee61
AD
113642002-10-24 Akim Demaille <akim@epita.fr>
11365
11366 * src/output.c (output_skeleton): Don't disable M4sugar comments
11367 too soon: it results in comments being expanded.
11368 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11369 first output.
11370
f1886bb2
AD
113712002-10-24 Akim Demaille <akim@epita.fr>
11372
11373 * data/yacc.c (m4_int_type): New.
11374 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11375 char' as only yacc.c wants K&R portability.
11376 * data/glr.c (yysigned_char): Remove.
11377 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11378 Reported by Quoc Peyrot.
11379
c5576256
PE
113802002-10-23 Paul Eggert <eggert@twinsun.com>
11381
11382 * src/main.c (main): With --trace=time, report times even if a
11383 non-fatal error occurs. Formerly, the times were reported in some
11384 such cases but not in others.
11385 * src/reader.c (reader): Just return if a complaint has been issued,
11386 instead of exiting, so that 'main' can report times.
11387
27b0ffea
AD
113882002-10-22 Akim Demaille <akim@epita.fr>
11389
11390 * src/system.h: Include sys/types.
11391 Reported by Bert Deknuydt.
11392
223a7883
PE
113932002-10-23 Paul Eggert <eggert@twinsun.com>
11394
11395 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11396 Suggested by Art Haas.
11397
113982002-10-22 Paul Eggert <eggert@twinsun.com>
11399
11400 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11401 decl; not needed any more.
11402 * src/main.c (main): Use return to exit, undoing yesterday's change.
11403 The last OS that we could find where this wouldn't work is
11404 SunOS 3.5, and that's too old to worry about now.
11405
11406 * data/glr.c (struct yyltype): Define members even when not
11407 doing locations. This is more consistent with yacc.c, and it
11408 works around the following bug reports:
161a71f3
PE
11409 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11410 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 11411
223a7883
PE
11412 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11413 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11414 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11415
8b76775a
AD
114162002-10-22 Akim Demaille <akim@epita.fr>
11417
11418 * data/README: New.
11419
6db10d14
PE
114202002-10-21 Paul Eggert <eggert@twinsun.com>
11421
11422 Be consistent about 'bool'; the old code used an enum in one
11423 module and an int in another, and this violates the C standard.
11424 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11425 * configure.ac (AC_HEADER_STDBOOL): Add.
11426 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11427 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11428 * src/symtab.c (hash_compare_symbol_t): Likewise.
11429 * src/system.h (bool, false, true): Use a definition consistent
11430 with ../lib/hash.c. All uses changed.
11431
11432 * src/complain.c (warning_issued): Renamed from warn_message_count,
11433 so that we needn't worry about integer overflow (!).
11434 Now of type bool. All uses changed.
11435 (complaint_issued): Renamed from complain_message_count; likewise.
11436
11437 * src/main.c (main): Use exit to exit with failure.
27b0ffea 11438
6db10d14
PE
11439 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11440 rather than 1 and 0.
11441 * src/main.c (main): Likewise.
11442 * src/getargs.c (getargs): Likewise.
11443 * src/reader.c (reader): Likewise.
11444
11445 * src/getarg.c (getargs): Remove duplicate code for
11446 "Try `bison --help'".
11447
11448 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11449 What was that "2" for?
11450
11451 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11452 * src/getargs.c (usage): Likewise.
11453
11454 * src/getargs.c (getargs): When there are too few operands, report
11455 the last one. When there are too many, report the first extra
11456 one. This is how diffutils does it.
11457
92a060fd
PE
114582002-10-20 Paul Eggert <eggert@twinsun.com>
11459
11460 Remove K&R vestiges.
11461 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11462 * src/complain.c (VA_START): Remove. Assume prototypes.
11463 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11464 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11465 fatal): Assume prototypes.
11466 * src/complain.h: Assume prototypes.
11467 * src/system.h (PARAMS): Remove.
11468 Include <limits.h> unconditionally, since it's guaranteeed even
11469 for a freestanding C89 compiler.
11470 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11471 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 11472
e7cb57c0
AD
114732002-10-20 Akim Demaille <akim@epita.fr>
11474
11475 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11476 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11477 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11478 (yyresolveStates, yyresolveAction, yyresolveStack)
11479 (yyprocessOneStack): Use them.
11480 (yy_reduce_print): New.
11481 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11482
0245f82d
AD
114832002-10-20 Akim Demaille <akim@epita.fr>
11484
11485 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11486 arguments and output `void'.
11487 (b4_c_function): Rename as...
11488 (b4_c_function_def): this.
11489 (b4_c_function_decl, b4_c_ansi_function_def)
11490 (b4_c_ansi_function_decl): New.
11491 Change the interpretation of the arguments: before `int, foo', now
11492 `int foo, foo'.
11493 * data/yacc.c (yyparse): Prototype and define thanks to these.
11494 Adjust b4_c_function_def uses.
11495 * data/glr.c (yyparse): Likewise, but ANSI only.
11496
39912f52
AD
114972002-10-20 Akim Demaille <akim@epita.fr>
11498
11499 * src/output.c (prepare): Move the definition of `tokens_number',
11500 `nterms_number', `undef_token_number', `user_token_number_max'
11501 to...
11502 (prepare_tokens): Here.
11503 (prepare_tokens): Rename as...
11504 (prepare_symbols): this.
11505 (prepare): Move the definition of `rules_number' to...
11506 (prepare_rules): here.
11507 (prepare): Move the definition of `last', `final_state_number',
11508 `states_number' to...
11509 (prepare_states): here.
11510 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11511
20c1e2ad
AD
115122002-10-20 Akim Demaille <akim@epita.fr>
11513
11514 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11515
21964f43
AD
115162002-10-20 Akim Demaille <akim@epita.fr>
11517
11518 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11519 * data/c.m4: here.
11520
66d30cd4
AD
115212002-10-20 Akim Demaille <akim@epita.fr>
11522
11523 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11524 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11525 `pair'.
11526 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11527 `name' to...
11528 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11529 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11530 These.
11531
95f2c9fe
PE
115322002-10-19 Paul Eggert <eggert@twinsun.com>
11533
11534 Do not create a temporary file, as that involves security and
11535 cleanup headaches. Instead, use a pair of pipes.
11536 Derived from a suggestion by Florian Krohm.
11537 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11538 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11539 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11540 (BISON_PREREQ_SUBPIPE): Add.
11541 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11542 Add subpipe.h, subpipe.c.
11543 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11544 * po/POTFILES.in: Add lib/subpipe.c.
11545 * src/output.c: Include "subpipe.h".
11546 (m4_invoke): Remove decl.
11547 (scan_skel): New decl.
11548 (output_skeleton): Use pipe rather than temporary file for m4 input.
11549 Check that m4sugar.m4 is readable, to avoid deadlock.
11550 Check for pipe I/O error.
11551 * src/scan-skel.l (readpipe): Remove decl.
11552 (scan_skel): New function, to be used in place of m4_invoke.
11553 Read from stream rather than file.
66d30cd4 11554
95f2c9fe
PE
11555 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11556 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11557 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11558 this generates a more-accurate value anyway.
11559
11560 * lib/timevar.c (timervar_accumulate): Rename locals to
11561 avoid confusion with similarly-named more-global.
11562 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11563
11564 * src/output.c (prepare): Use xstrdup to convert char const *
11565 to char *, to avoid GCC warning.
11566
c19988b7
AD
115672002-10-19 Akim Demaille <akim@epita.fr>
11568
11569 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11570 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11571 Use them to have `calc.y' ready for %pure-parser.
11572 * data/yacc.c (YYLEX): Pass a yylex return type to
11573 b4_c_function_call.
11574
ae7453f2
AD
115752002-10-19 Akim Demaille <akim@epita.fr>
11576
11577 Prototype support of %lex-param and %parse-param.
11578
11579 * src/parse-gram.y: Add the definition of the %lex-param and
11580 %parse-param tokens, plus their rules.
11581 Drop the `_' version of %glr-parser.
11582 Add the "," token.
11583 * src/scan-gram.l (INITIAL): Scan them.
11584 * src/muscle_tab.c: Comment changes.
11585 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11586 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11587 (muscle_entry_s): The `value' member is no longer const.
11588 Adjust all dependencies.
11589 * src/muscle_tab.c (muscle_init): Adjust: use
11590 MUSCLE_INSERT_STRING.
11591 Initialize the obstack earlier.
11592 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11593 (muscle_pair_list_grow): New.
11594 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11595 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11596 * tests/calc.at: Use %locations, not --locations.
11597 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11598
0e575721
AD
115992002-10-19 Akim Demaille <akim@epita.fr>
11600
11601 * src/getargs.c (usage): Take status as argument and exit
11602 accordingly.
11603 Report the traditional `Try ... --help' message when status != 0.
11604 (usage, version): Don't take a FILE * as arg, it is pointless.
11605 (getargs): When there is an incorrect number of arguments, make it
11606 an error, and report it GNUlically thanks to `usage ()'.
11607
724ce7f5
PE
116082002-10-18 Paul Eggert <eggert@twinsun.com>
11609
3a781eb2
PE
11610 * data/glr.c (yyreportParseError): Don't assume that sprintf
11611 yields the length of the printed string, as this is not true
11612 on SunOS 4.1.4. Reported by Peter Klein.
11613
724ce7f5
PE
11614 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11615 * tests/conflicts.at (%nonassoc and eof): Likewise.
11616 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11617
473d0a75
AD
116182002-10-17 Akim Demaille <akim@epita.fr>
11619
11620 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11621 * src/getargs.c (trace_types, trace_args): Adjust.
11622 * src/reader.c (grammar_current_rule_prec_set)
11623 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11624 Standardize error messages.
11625 And s/@prec/%prec/!
11626 (reader): Use trace_flag to enable scanner/parser debugging,
11627 instead of an adhoc scheme.
11628 * src/scan-gram.l: Remove trailing debugging code.
11629
e76d2469
PE
116302002-10-16 Paul Eggert <eggert@twinsun.com>
11631
93e2236a
PE
11632 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11633 MUSCLE_TAB_H.
11634
e76d2469
PE
11635 * NEWS: Officially drop support for building Bison with K&R C,
11636 since it didn't work anyway and it's not worth worrying about.
11637 * Makefile.maint (wget_files): Remove ansi2knr.c.
11638 (ansi2knr.c-url_prefix): Remove.
11639 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11640 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11641 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11642
5bd1c419
PE
116432002-10-15 Paul Eggert <eggert@twinsun.com>
11644
11645 Stop using the "enum_" trick for K&R-style function definitions;
11646 it confused me, and I was the author! Instead, assume that people
11647 who want to use K&R C compilers (when using these modules in GCC,
11648 perhaps?) will run ansi2knr.
11649
11650 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11651 All uses of "enum_" changed to "enum ".
11652 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11653 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 11654
5bd1c419
PE
11655 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11656 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11657 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11658 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11659 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11660 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11661 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11662 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11663 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11664 Use function prototypes; this removes the need for declaring
11665 static functions simply to provide their prototypes.
11666 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11667 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11668 bitset_count_, bitset_create, bitset_dump, bitset_first,
11669 bitset_free, bitset_init, bitset_last, bitset_next,
11670 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11671 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11672 bitset_print, bitset_release_memory, bitset_toggle_,
11673 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11674 debug_bitset): Likewise.
11675 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11676 * lib/bitset_stats.c (bitset_log_histogram_print,
11677 bitset_percent_histogram_print, bitset_stats_and,
11678 bitset_stats_and_cmp, bitset_stats_and_or,
11679 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11680 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11681 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11682 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11683 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11684 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11685 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11686 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11687 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11688 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11689 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11690 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11691 bitset_stats_zero): Likewise.
11692 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11693 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11694 bitsetv_dump, debug_bitsetv): Likewise.
11695 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11696 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11697 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11698 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11699 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11700 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11701 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11702 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11703 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11704 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11705 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11706 Likewise.
11707 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11708 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11709 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11710 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11711 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11712 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11713 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11714 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11715 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11716 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11717 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 11718
ae26e1f0
AD
117192002-10-14 Akim Demaille <akim@epita.fr>
11720
11721 Version 1.75.
11722
d43baf71
AD
117232002-10-14 Akim Demaille <akim@epita.fr>
11724
11725 * tests/Makefile.am (maintainer-check-posix): New.
11726
7ebc83e3
AD
117272002-10-14 Akim Demaille <akim@epita.fr>
11728
11729 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11730 member.
11731
05846dae
AD
117322002-10-14 Akim Demaille <akim@epita.fr>
11733
11734 * src/tables.c (table_ninf_remap): base -> tab.
11735 Reported by Matt Rosing.
11736
1318e37d
PE
117372002-10-14 Paul Eggert <eggert@twinsun.com>
11738
447fbb17
PE
11739 * tests/action.at, tests/calc.at, tests/conflicts.at,
11740 tests/cxx-type.at, tests/headers.at, tests/input.at,
11741 tests/regression.at, tests/synclines.at, tests/torture.at:
11742 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11743 so that the tests still work even if POSIXLY_CORRECT is set.
11744 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 11745
1318e37d
PE
11746 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11747 for portability to K&R hosts. Fix typo: signed char is guaranteed
11748 only to 127, not to 128.
11749 * data/glr.c (yysigned_char): New type.
11750 * data/yacc.c (yysigned_char): Likewise.
11751 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11752
cc0f0794
PE
117532002-10-13 Paul Eggert <eggert@twinsun.com>
11754
5038f418
PE
11755 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11756 true due to limited range of data type" warning from GCC.
11757
cc0f0794
PE
11758 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11759 by wrapping enum yytokentype's definition inside #ifndef
11760 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11761
6fed0802
AD
117622002-10-13 Akim Demaille <akim@epita.fr>
11763
11764 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11765 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11766
32f0598d
AD
117672002-10-13 Akim Demaille <akim@epita.fr>
11768
11769 * Makefile.maint: Update from Autoconf 2.54.
11770 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11771
7ea9a33f
AD
117722002-10-13 Akim Demaille <akim@epita.fr>
11773
11774 * src/print.c (print_state): Separate the list of solved conflicts
11775 from the other items.
11776 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11777
ea99527d
AD
117782002-10-13 Akim Demaille <akim@epita.fr>
11779
11780 Let nondeterministic skeletons be usable with deterministic
11781 tables.
11782
11783 With the patch, GAWK compiled by GCC without -O2 passes its test
11784 suite using a GLR parser driven by LALR tables. It fails with -O2
11785 because `struct stat' gives two different answers on my machine:
11786 88 (definition of an auto var) and later 96 (memset on this var).
11787 Hence the stack is badly corrumpted. The headers inclusion is to
11788 blame: if I move the awk.h inclusion before GLR's system header
11789 inclusion, the two struct stat have the same size.
11790
11791 * src/tables.c (pack_table): Always create conflict_table.
11792 (token_actions): Always create conflict_list.
11793 * data/glr.c (YYFLAG): Remove, unused.
11794
f377f69f
AD
117952002-10-13 Akim Demaille <akim@epita.fr>
11796
11797 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11798 (O0FLAGS): New.
11799 (VALGRIND, GXX): New.
11800 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11801 * tests/bison.in: Run $PREBISON a pre-command.
11802 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11803 (maintainer-check-g++): New.
11804 * Makefile.am (maintainer-check): New.
11805
2a1fe6ed
AD
118062002-10-13 Akim Demaille <akim@epita.fr>
11807
11808 * data/glr.c: Formatting changes.
11809 Tweak some trace messages to match yacc.c's.
11810
f50adbbd
AD
118112002-10-13 Akim Demaille <akim@epita.fr>
11812
11813 GLR parsers sometimes raise parse errors instead of performing the
11814 default reduction.
11815 Reported by Charles-Henry de Boysson.
11816
11817 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 11818 check the length of the traces when %glr.
f50adbbd
AD
11819 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11820 GLR's traces.
11821 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11822 Test GLR parsers.
11823 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11824 (yyltype): Remove the yy prefix from the member names.
11825 (yytable): Complete its comment.
11826 (yygetLRActions): Map error action number from YYTABLE from
11827 YYTABLE_NINF to 0.
11828 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11829 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11830 not satisfying as we could compare an YYACTION computed from
11831 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11832 only value for error actions.
11833 (yyreportParseError): In verbose parse error messages, don't issue
11834 `error' in the list of expected tokens.
11835 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11836 next action to perform to match glr.c's decoding.
11837 (yytable): Complete its comment.
11838
bcbad5b9
PE
118392002-10-13 Paul Eggert <eggert@twinsun.com>
11840
11841 Fix problem reported by Henrik Grubbstroem in
161a71f3 11842 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
11843 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11844 because the Bison parser reads the second action before reducing
11845 the first one.
11846 * src/scan-gram.l (rule_length): New static var.
11847 Use it to keep track of the rule length in the scanner, since
11848 we can't expect the parser to be in lock-step sync with the scanner.
11849 (handle_action_dollar, handle_action_at): Use this var.
11850 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 11851
14904b89
PE
118522002-10-12 Paul Eggert <eggert@twinsun.com>
11853
1fe611e5
PE
11854 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11855 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11856 Include <sys/time.h> when checking for clock_t and struct tms.
11857 Use same include order as source.
11858 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 11859 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 11860
1fe611e5
PE
11861 * lib/timevar.c: Update copyright date and clarify comments.
11862 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 11863
1fe611e5
PE
11864 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11865 GCC version as of today, then merge Bison's changes.
11866 Change "GCC" to "Bison" in copyright notice. timevar.def's
11867 author is Akim, so change that too.
11868
98194095
PE
11869 * src/reader.c (grammar_current_rule_check):
11870 Don't worry about the default action if $$ is untyped.
11871 Prevents bogus warnings reported by Jim Gifford in
161a71f3 11872 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 11873
14904b89
PE
11874 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11875 * data/glr.c, data/lalr1.cc, data/yacc.c:
11876 Output token definitions before the first part of user declarations.
11877 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 11878 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 11879
ff6dca18
PE
118802002-10-11 Paul Eggert <eggert@twinsun.com>
11881
11882 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11883 (yyparse): here. This undoes some of the 2002-07-25 change.
11884 Compatibility problem reported by Ralf S. Engelschall with
11885 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11886
eb714592
AD
118872002-10-11 Akim Demaille <akim@epita.fr>
11888
11889 * tests/regression.at Characters Escapes): New.
11890 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11891 characters.
11892 Reported by Jan Nieuwenhuizen.
11893
b7195100
AD
118942002-10-11 Akim Demaille <akim@epita.fr>
11895
11896 * po/id.po: New.
11897
f28a0f2d
PE
118982002-10-10 Paul Eggert <eggert@twinsun.com>
11899
11900 Portability fixes for bitsets; this also avoids several GCC
11901 warnings.
11902
11903 * lib/abitset.c: Include <stddef.h>, for offsetof.
11904 * lib/lbitset.c: Likewise.
11905
11906 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11907 properly for vectors of objects. Do not assume that adding a
11908 header size to a multiple of a word size yields a value that is
11909 properly aligned for the whole union.
11910 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11911
11912 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11913 unique names for structures.
11914 * lib/ebitset.c (ebitset_bytes): Likewise.
11915 * lib/lbitset.c (lbitset_bytes): Likewise.
11916
11917 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11918 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11919 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11920 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11921 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11922 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11923 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11924 to improve the type-checking that GCC can do.
11925 * lib/bitset.c (bitset_op4_cmp): Likewise.
11926 * lib/bitset_stats.c (bitset_stats_count,
11927 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11928 bitset_stats_copy, bitset_stats_disjoint_p,
11929 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11930 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11931 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11932 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11933 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11934 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11935 bitset_stats_or_and_cmp): Likewise.
11936 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11937 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11938 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11939 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11940
11941 * lib/abitset.h: Include bitset.h, not bbitset.h.
11942 * lib/ebitset.h: Likewise.
11943 * lib/lbitset.h: Likewise.
11944
11945 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11946 All instances of parameters of type enum bitset_opts are now of
11947 type enum_bitset_opts, to conform to the C Standard, and similarly
11948 for enum_bitset_type.
11949 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11950 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11951
11952 Do not use "struct bitset_struct" to mean different things in
11953 different modules. Not only is this confusing, it violates
11954 the C Standard, which requires that structure types in different
11955 modules must be compatible if one is to be passed to the other.
11956 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11957 All instances of "struct bitset_struct *" replaced with "bitset".
11958 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11959 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11960 struct lbitset_struct, struct bitset_stats_struct): New types.
11961 All uses of struct bitset_struct changed to union bitset_union,
11962 etc.
ba0fe3c7 11963 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
11964 struct bitset_struct): Remove.
11965 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11966 struct bitset_struct): Remove.
11967 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11968 bitset_struct): Remove.
11969 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11970 Likewise.
11971
11972 Do not call a function of type T using a call that assumes the
11973 function is of a different type U. Standard C requires that a
11974 function must be called with a type that is compatible with its
11975 definition.
11976 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11977 New decls.
11978 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11979 New functions.
11980 * lib/ebitset.c (PFV): Remove.
11981 * lib/lbitset.c (PFV): Likewise.
11982 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11983 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11984 decls.
11985 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11986 (ebitset_vtable): Use them.
11987 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11988 lbitset_xor): New functions.
11989 (lbitset_vtable): Use them.
11990
11991 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11992 Declare.
11993
11994 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
11995 GCC warning.
11996 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
11997 Use offsetof, for simplicity.
11998
6fbe4984
PE
119992002-10-06 Paul Eggert <eggert@twinsun.com>
12000
12001 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12002 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 12003 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
12004 which was inadvertently undone by the 2002-09-30 patch.
12005 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12006 the same width as int.
12007
420f93c8
PE
120082002-10-04 Paul Eggert <eggert@twinsun.com>
12009
12010 Version 1.50.
12011
12012 * configure.ac (AC_INIT), NEWS: Increment version number.
12013
12014 * doc/bison.texinfo: Minor spelling, grammar, and white space
12015 fixes.
12016 (Symbols): Mention that any negative value returned from yylex
12017 signifies end-of-input. Warn about negative chars. Mention
12018 the portable Standard C character set.
12019
12020 The GNU coding standard says CFLAGS and YFLAGS are reserved
12021 for the installer to set.
12022 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12023 * src/Makefile.am (AM_CFLAGS): Likewise.
12024 (AM_YFLAGS): Renamed from YFLAGS.
12025
12026 Fix some MAX and MIN problems.
12027 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12028 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12029 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12030 * src/reader.c (reader): Use it.
12031
12032 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12033 POSIX 1003.1-2001 has removed fgrep.
12034
120352002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12036
12037 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12038 interpreted as signed.
12039 * lib/ebitset.c (ebitset_list): Fix bug.
12040
ff68026d
PE
120412002-10-01 Paul Eggert <eggert@twinsun.com>
12042
12043 More fixes for 64-bit hosts and large bitsets.
12044
12045 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12046 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12047 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12048 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12049 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12050 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12051 bitset_count_): Likewise.
12052 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12053 bitset_first, bitset_last): Likewise.
12054 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12055 bitset_stats_list_reverse, bitset_stats_size,
12056 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12057 Likewise.
12058 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12059 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12060 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12061 bitsetv_reflexive_transitive_closure): Likewise.
12062 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12063 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12064 Likewise.
12065 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12066 Likewise.
420f93c8 12067
ff68026d
PE
12068 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12069 Use size_t, not unsigned int, to count bytes.
12070 * lib/abitset.h (abitset_bytes): Likewise.
12071 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12072 Likewise.
12073 * lib/bitset.h (bitset_bytes): Likewise.
12074 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12075 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12076 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12077 * lib/ebitset.c (ebitset_bytes): Likewise.
12078 * lib/ebitset.h (ebitset_bytes): Likewise.
12079 * lib/lbitset.c (lbitset_bytes): Likewise.
12080 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 12081
ff68026d
PE
12082 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12083 abitset_subset_p, abitset_disjoint_p, abitset_and,
12084 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12085 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12086 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12087 abitset_or_and, abitset_or_and_cmp):
12088 Use bitset_windex instead of unsigned int.
12089 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12090 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12091 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12092 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12093 Likewise.
12094 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 12095
ff68026d
PE
12096 * lib/bitset.c (bitset_print):
12097 Use proper printf formats for widths of integer types.
12098 * lib/bitset_stats.c (bitset_percent_histogram_print,
12099 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12100 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12101 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12102 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 12103
ff68026d
PE
12104 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12105 BITSET_SIZE_MAX): New macros.
12106 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12107 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12108 to BITSET_WINDEX_MAX.
12109
12110 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12111 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12112 since we now return the bitset_bindex type (not int).
12113
12114 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12115 when computing sizes.
12116 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12117
12118 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12119 and avoid cast to unsigned.
12120
6aa452a6
AD
121212002-09-30 Akim Demaille <akim@epita.fr>
12122
12123 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12124 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12125 Updates from Michael Hayes.
12126
927f7817
AD
121272002-09-30 Art Haas <ahaas@neosoft.com>
12128
12129 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12130 invocations.
12131 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12132 defined.
12133
9738f41e
AD
121342002-09-27 Akim Demaille <akim@epita.fr>
12135
12136 Version 1.49c.
12137
a5c75d7f
AD
121382002-09-27 Akim Demaille <akim@epita.fr>
12139
12140 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12141 (Because of AC_LIBSOURCE).
12142
8280e179
AD
121432002-09-27 Akim Demaille <akim@epita.fr>
12144
12145 Playing with Autoscan.
12146
12147 * configure.ac: Remove the old LIBOBJ tweaks.
12148 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12149 * lib/strrchr.c: New.
12150 * lib/strtol.c: New, from the Coreutils 4.5.1.
12151
ae64af35
AD
121522002-09-27 Akim Demaille <akim@epita.fr>
12153
12154 Playing with Autoscan.
12155
12156 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12157 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12158 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12159 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12160 Coreutils 4.5.1.
12161
d1a1114f
AD
121622002-09-24 Akim Demaille <akim@epita.fr>
12163
12164 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12165 (Frequently Asked Questions, Parser Stack Overflow): New.
12166
b906441c
AD
121672002-09-13 Akim Demaille <akim@epita.fr>
12168
12169 Playing with autoscan.
12170
12171 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12172 * src/files.c (skeleton_find): Remove, unused.
12173 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12174 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12175
bd701811
AD
121762002-09-13 Akim Demaille <akim@epita.fr>
12177
12178 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12179 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12180
e0a13e7b
AD
121812002-09-13 Akim Demaille <akim@epita.fr>
12182
12183 * configure.ac: Require 2.54.
12184 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12185 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12186 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12187 Remove, provided by Autoconf macros.
12188
c97011bf
AD
121892002-09-12 Akim Demaille <akim@epita.fr>
12190
12191 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12192
d862b1be
AD
121932002-09-12 Akim Demaille <akim@epita.fr>
12194
12195 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12196 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12197 Reported by Martin Mokrejs.
12198
3d38c03a
AD
121992002-09-10 Akim Demaille <akim@epita.fr>
12200
12201 * src/parse-gram.y: Associate a human readable string to each
12202 token type.
12203 * tests/regression.at (Invalid inputs): Adjust.
12204
b6347355
AD
122052002-09-10 Gary V. Vaughan <gary@gnu.org>
12206
12207 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12208 with an Autoconf-2.5x style configure.ac.
12209
09ba4ab2
PE
122102002-09-06 Paul Eggert <eggert@twinsun.com>
12211
12212 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12213 exception applies only to yacc.c. This is a modification of a
12214 patch originally suggested by Akim Demaille.
12215
21846f69
AD
122162002-09-06 Akim Demaille <akim@epita.fr>
12217
09ba4ab2
PE
12218 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12219 here to...
12220 * data/yacc.c: here.
12221
21846f69
AD
12222 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12223 LocationType.
12224 (b4_ltype): Default to yy::Location from location.hh.
12225
c0ad8bf3
AD
122262002-09-04 Jim Meyering <jim@meyering.net>
12227
12228 * data/yacc.c: Guard the declaration of yytoknum also with
12229 `#ifdef YYPRINT', so it is declared only when used.
12230
3a93251e
AD
122312002-09-04 Akim Demaille <akim@epita.fr>
12232
12233 * configure.in: Rename as...
12234 * configure.ac: this.
12235 Bump to 1.49c.
12236
427c0dda
AD
122372002-09-04 Akim Demaille <akim@epita.fr>
12238
12239 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12240 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12241 translate maintainer only messages.
12242
6a254321
PE
122432002-08-12 Paul Eggert <eggert@twinsun.com>
12244
645e30d1
PE
12245 Version 1.49b.
12246
6a254321
PE
12247 * Makefile.am (SUBDIRS): Remove intl.
12248 (DISTCLEANFILES): Remove.
12249 * NEWS: Mention that GNU M4 is now required. Clarify what is
12250 meant by "larger grammars". Mention the pt_BR translation.
12251 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12252 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12253 Bump version from 0.11.2 to 0.11.5.
12254 (BISON_PREREQ_STAGE): Remove.
12255 (AM_GNU_GETTEXT): Use external gettext.
12256 (AC_OUTPUT): Remove intl/Makefile.
12257
12258 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12259
12260 * data/glr.c: Include string.h, for strlen.
12261 (yyreportParseError): Use size_t for yysize.
12262 (yy_yypstack): No longer nested inside yypstates, as nested
12263 functions are not portable. Do not assume size_t is the
12264 same width as int.
12265 (yypstates): Do not assume that ptrdiff_t is the same width
12266 as int, and similarly for yyposn and YYINDEX.
12267
12268 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12269
12270 * lib/Makefile.am (INCLUDES): Do not include from the intl
12271 directory, which has been removed.
12272 * src/Makefile.am (INCLUDES): Likewise.
12273
12274 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12275 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12276 New vars.
12277
12278 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12279 * tests/Makefile.am (EXTRA_DIST): Likewise.
12280
12281 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12282 Do not assume that bitset_windex is the same width as unsigned.
12283
12284 * lib/abitset.c (abitset_unused_clear): Do not assume that
12285 bitset_word is the same width as int.
12286 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12287 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12288 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12289 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12290 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12291
12292 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12293 portability to one's complement hosts!).
12294 * lib/ebitset.c (ebitset_op1): Likewise.
12295 * lib/lbitset.c (lbitset_op1): Likewise.
12296
12297 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12298 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12299 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12300 Sync with fileutils.
12301 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12302 lib/gettext.h: Sync with diffutils.
12303
12304 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12305 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12306
12307 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12308 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12309 check for void *.
12310
12311 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12312 size_t; the old version tried to do this but casted improperly.
12313 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12314 (bitset_test): Now returns int, not unsigned long.
12315
12316 * lib/bitset_stats.c: Include "gettext.h".
12317 (_): New macro.
12318 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12319 name locals "index", as it generates unnecessary warnings on some
12320 hosts that have an "index" function.
12321
12322 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12323 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12324 they need translation.
12325 * src/LR0.c (state_list_append, new_itemsets, get_state,
12326 append_states, generate_states): Likewise.
12327 * src/assoc.c (assoc_to_string): Likewise.
12328 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12329 * src/gram.c (grammar_dump): Likewise.
12330 * src/injections.c (injections_compute): Likewise.
12331 * src/lalr.c (lookaheads_print): Likewise.
12332 * src/relation.c (relation_transpose): Likewise.
12333 * src/scan-gram.l: Likewise.
12334 * src/tables.c (table_grow, pack_vector): Likewise.
12335
12336 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12337 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12338 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12339 * m4/mbstate_t.m4: Sync with fileutils.
12340 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12341
12342 * po/LINGUAS: Add pt_BR.
12343 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12344 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12345 lib/timevar.c.
12346 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12347 manual recommends.
12348 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12349
12350 * src/complain.c (strerror_r): Remove decl; not needed.
12351 (strerror): Use same pattern as ../lib/error.c.
12352
12353 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12354
12355 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12356
12357 * src/main.c (main): Cast result of bindtextdomain and textdomain
12358 to void, to avoid a GCC warning when --disable-nls is in effect.
12359
12360 * src/scan-gram.l: Use strings rather than escapes when possible,
12361 to minimize the number of warnings from xgettext.
12362 (handle_action_dollar, handle_action_at): Don't use isdigit,
12363 as it mishandles negative chars and it may not work as expected
12364 outside the C locale.
12365
12366 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12367 this is a GCC extension and is not portable to other compilers.
12368
12369 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12370 Do not include <ctype.h>; no longer needed.
12371 Do not include <malloc.h>; no longer needed (and generates
12372 warnings on OpenBSD 3.0).
12373
12374 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12375 it's not portable.
12376
12377 * tests/regression.at: Do not use 'cc -c input.c -o input';
12378 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12379
12380 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12381 exit status as failure, not just exit status 1. Sun C exits
12382 with status 2 sometimes.
12383
12384 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12385 Use it for the two large tests.
12386
c8f002c7
AD
123872002-08-02 Akim Demaille <akim@epita.fr>
12388
12389 * src/conflicts.c (conflicts_output): Don't output rules never
12390 reduced here, since anyway that computation doesn't work.
12391 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12392 (rule_useless_p, rule_never_reduced_p): New.
12393 (grammar_rules_partial_print): Use a filter instead of a range.
12394 Display the title only if needed.
12395 (grammar_rules_print): Adjust.
12396 (grammar_rules_never_reduced_report): New.
12397 * src/tables.c (action_row): Move the computation of rules never
12398 reduced to...
12399 (token_actions): here.
12400 * src/main.c (main): Make the parser before making the report, so
12401 that rules never reduced are computed.
12402 Call grammar_rules_never_reduced_report.
12403 * src/print.c (print_results): Report rules never reduced.
12404 * tests/conflicts.at, tests/reduce.at: Adjust.
12405
cd08e51e
AD
124062002-08-01 Akim Demaille <akim@epita.fr>
12407
12408 Instead of attaching lookaheads and duplicating the rules being
12409 reduced by a state, attach the lookaheads to the reductions.
12410
12411 * src/state.h (state_t): Remove the `lookaheads',
12412 `lookaheads_rule' member.
12413 (reductions_t): Add a `lookaheads' member.
12414 Use a regular array for the `rules'.
12415 * src/state.c (reductions_new): Initialize the lookaheads member
12416 to 0.
12417 (state_rule_lookaheads_print): Adjust.
12418 * src/state.h, src/state.c (state_reductions_find): New.
12419 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12420 (count_rr_conflicts): Adjust.
12421 * src/lalr.c (LArule): Remove.
12422 (add_lookback_edge): Adjust.
12423 (state_lookaheads_count): New.
12424 (states_lookaheads_initialize): Merge into...
12425 (initialize_LA): this.
12426 (lalr_free): Adjust.
12427 * src/main.c (main): Don't free nullable and derives too early: it
12428 is used by --verbose.
12429 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12430
bb0027a9
AD
124312002-08-01 Akim Demaille <akim@epita.fr>
12432
12433 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12434 `rule_number_t**'.
12435 (set_derives, free_derives): Rename as...
12436 (derives_compute, derives_free): this.
12437 Adjust all dependencies.
12438 * src/nullable.c (set_nullable, free_nullable): Rename as...
12439 (nullable_compute, nullable_free): these.
12440 (rule_list_t): Store rule_t *, not rule_number_t.
12441 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12442 pointers, instead of their numbers.
12443 * src/main.c (main): Call nullable_free, and derives_free earlier,
12444 as they were lo longer used.
12445
3325ddc4
AD
124462002-08-01 Akim Demaille <akim@epita.fr>
12447
12448 * lib/timevar.c (get_time): Include children time.
12449 * src/lalr.h (LA, LArule): Don't export them: used with the
12450 state_t.
12451 * src/lalr.c (LA, LArule): Static.
12452 * src/lalr.h, src/lalr.c (lalr_free): New.
12453 * src/main.c (main): Call it.
12454 * src/tables.c (pack_vector): Check whether loc is >= to the
12455 table_size, not >.
12456 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12457 (tables_generate): do it, since that's also it which allocates
12458 them.
12459 Don't free LA and LArule, main does.
12460
c6f1a33c
AD
124612002-07-31 Akim Demaille <akim@epita.fr>
12462
12463 Separate parser tables computation and output.
12464
12465 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12466 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12467 (yydefgoto, yydefact, high): Move to...
12468 * src/tables.h, src/tables.c: here.
12469 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12470 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12471 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12472 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12473 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12474 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12475 (action_row, save_row, token_actions, save_column, default_goto)
12476 (goto_actions, sort_actions, matching_state, pack_vector)
12477 (table_ninf_remap, pack_table, prepare_actions): Move to...
12478 * src/tables.c: here.
12479 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12480 * src/output.c (token_actions, output_base, output_conflicts)
12481 (output_check): Merge into...
12482 (prepare_actions): this.
12483 (actions_output): Rename as...
12484 (user_actions_output): this.
12485 * src/main.c (main): Call tables_generate and tables_free.
12486
1509d42f
AD
124872002-07-31 Akim Demaille <akim@epita.fr>
12488
12489 Steal GCC's --time-report support.
12490
12491 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12492 stolen/adjusted from GCC.
12493 * m4/stage.m4: Remove time related checks.
12494 * m4/timevar.m4: New.
12495 * configure.in: Adjust.
12496 * src/system.h: Adjust to using timevar.h.
12497 * src/getargs.h, src/getargs.c: Support trace_time for
12498 --trace=time.
12499 * src/main.c (stage): Remove.
12500 (main): Replace `stage' invocations with timevar calls.
12501 * src/output.c: Insert pertinent timevar calls.
12502
273a74fa
AD
125032002-07-31 Akim Demaille <akim@epita.fr>
12504
12505 Let --trace have arguments.
12506
12507 * src/getargs.h (enum trace_e): New.
12508 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12509 (long_options, short_options): --trace/-T takes an optional
12510 argument.
12511 Change all the uses of trace_flag to reflect the new flags.
12512 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12513
12514 Strengthen `stage' portability.
12515
12516 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12517 * configure.in: Use it.
12518 Don't check for malloc.h and sys/times.h.
12519 * src/system.h: Include them when appropriate.
12520 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12521 times and struct tms are available.
12522
217598da
AD
125232002-07-30 Akim Demaille <akim@epita.fr>
12524
12525 In verbose parse error message, don't report `error' as an
12526 expected token.
12527 * tests/actions.at (Printers and Destructors): Adjust.
12528 * tests/calc.at (Calculator $1): Adjust.
12529 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12530 error message, do not report the parser accepts the error token in
12531 that state.
12532
52489d44
AD
125332002-07-30 Akim Demaille <akim@epita.fr>
12534
12535 Normalize conflict related messages.
12536
12537 * src/complain.h, src/complain.c (warn, complain): New.
12538 * src/conflicts.c (conflicts_print): Use them.
12539 (conflict_report_yacc): New, extracted from...
12540 (conflicts_print): here.
12541 * tests/conflicts.at, tests/existing.at: Adjust.
12542
e8832397
AD
125432002-07-30 Akim Demaille <akim@epita.fr>
12544
12545 Report rules which are never reduced by the parser: those hidden
12546 by conflicts.
12547
12548 * src/LR0.c (save_reductions): Don't make the final state too
12549 different: save its reduction (accept) instead of having a state
12550 without any action (no shift or goto, no reduce).
12551 Note: the final state is now a ``regular'' state, i.e., the
12552 parsers now contain `reduce 0' as default reduction.
12553 Nevertheless, since they decide to `accept' when yystate =
12554 final_state, they still will not reduce rule 0.
12555 * src/print.c (print_actions, print_reduction): Adjust.
12556 * src/output.c (action_row): Track reduced rules.
12557 (token_actions): Report rules never reduced.
12558 * tests/conflicts.at, tests/regression.at: Adjust.
12559
caf23d24
AD
125602002-07-30 Akim Demaille <akim@epita.fr>
12561
12562 `stage' was accidently included in a previous patch.
12563 Initiate its autoconfiscation.
12564
12565 * configure.in: Look for malloc.h and sys/times.h.
12566 * src/main.c (stage): Adjust.
12567 Report only when trace_flag.
12568
640748ee
AD
125692002-07-29 Akim Demaille <akim@epita.fr>
12570
12571 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12572 state_number_t.
12573 (errs_t): symbol_t*, not symbol_number_t.
12574 (reductions_t): rule_t*, not rule_number_t.
12575 (FOR_EACH_SHIFT): New.
12576 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12577 * src/print.c, src/print_graph.c: Adjust.
12578
88bce5a2
AD
125792002-07-29 Akim Demaille <akim@epita.fr>
12580
12581 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12582
12583 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12584 (endtoken, accept): these.
12585 * src/reader.c (reader): Set endtoken's default tag to "$end".
12586 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12587 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12588 Adjust.
12589
1bfb97db
AD
125902002-07-29 Akim Demaille <akim@epita.fr>
12591
12592 * src/reduce.c (reduce_grammar): When the language is empty,
12593 complain about the start symbol, not the axiom.
12594 Use its location.
12595 * tests/reduce.at (Empty Language): New.
12596
fc5734fe
AD
125972002-07-26 Akim Demaille <akim@epita.fr>
12598
12599 * src/reader.h, src/reader.c (gram_error): ... can't get
12600 yycontrol without making too strong assumptions on the parser
12601 itself.
12602 * src/output.c (prepare_tokens): Use the real 0th value of
12603 token_translations instead of `0'.
12604 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12605 visible here.
12606 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12607 for the time being: %locations ought to provide it to yyerror.
12608
3650b4b8
AD
126092002-07-25 Akim Demaille <akim@epita.fr>
12610
12611 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12612 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12613 * tests/regression.at (Web2c Actions): Adjust.
12614
4b3d3a8e
AD
126152002-07-25 Akim Demaille <akim@epita.fr>
12616
12617 Stop storing rules from 1 to nrules + 1.
12618
12619 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12620 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12621 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12622 Iterate from 0 to nrules.
12623 Use rule_number_as_item_number and item_number_as_rule_number.
12624 Adjust to `derive' now containing possibly 0.
12625 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12626 Handle the `- 1' part in rule numbers from/to item numbers.
12627 * src/conflicts.c (log_resolution): Fix the message which reversed
12628 shift and reduce.
12629 * src/output.c (action_row): Initialize default_rule to -1.
12630 (token_actions): Adjust.
12631 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12632 expected output.
12633 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12634
4a2a22f4
AD
126352002-07-25 Akim Demaille <akim@epita.fr>
12636
12637 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12638 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12639 (b4_c_knr_arg_decl): New.
12640 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12641 yyreport_parse_error.
12642
b8df3223
AD
126432002-07-25 Akim Demaille <akim@epita.fr>
12644
12645 * data/yacc.c (yyreport_parse_error): New, extracted from...
12646 (yyparse): here.
12647 (yydestruct, yysymprint): Move above yyparse.
12648 Be K&R compliant.
12649
a762e609
AD
126502002-07-25 Akim Demaille <akim@epita.fr>
12651
12652 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12653 replace...
12654 (b4_sint_type, b4_uint_type): these.
12655 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12656 * tests/regression.at (Web2c Actions): Adjust.
12657
12b0043a
AD
126582002-07-25 Akim Demaille <akim@epita.fr>
12659
12660 * src/gram.h (TIEM_NUMBER_MAX): New.
12661 (item_number_of_rule_number, rule_number_of_item_number): Rename
12662 as...
12663 (rule_number_as_item_number, item_number_as_rule_number): these.
12664 Adjust dependencies.
12665 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12666 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12667 (symbol_number_to_vector_number): New.
12668 (order): Of vector_number_t* type.
12669 (base_t, BASE_MAX, BASE_MIN): New.
12670 (froms, tos, width, pos, check): Of base_t type.
12671 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12672 (actrow): Of action_number_t type.
12673 (conflrow): Of unsigned int type.
12674 (table_ninf, base_ninf): New.
12675 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12676 (muscle_insert_int_table, muscle_insert_base_table)
12677 (muscle_insert_rule_number_table): New.
12678 (prepare_tokens): Output `toknum' as int_table.
12679 (action_row): Returns a rule_number_t.
12680 Use ACTION_MIN, not SHRT_MIN.
12681 (token_actions): yydefact is rule_number_t*.
12682 (table_ninf_remap): New.
12683 (pack_table): Use it for `base' and `table'.
12684 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12685 replaced with...
12686 (YYPACT_NINF, YYTABLE_NINF): these.
12687 (yypact, yytable): Compute their types instead of hard-coded
12688 `short'.
12689 * tests/regression.at (Web2c Actions): Adjust.
12690
5dde258a
AD
126912002-07-19 Akim Demaille <akim@epita.fr>
12692
12693 * src/scan-gram.l (id): Can start with an underscore.
12694
a945ec39
AD
126952002-07-16 Akim Demaille <akim@epita.fr>
12696
12697 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12698 Adjust all former `associativity' dependencies.
12699 * src/symtab.c (symbol_new): Default associativity is `undef', not
12700 `right'.
12701 (symbol_check_alias_consistence): Adjust.
12702
fae437e8
AD
127032002-07-09 Akim Demaille <akim@epita.fr>
12704
12705 * doc/bison.texinfo: Properly set the ``header'' part.
12706 Use @dircategory ``GNU programming tools'' as per Texinfo's
12707 documentation.
12708 Use @copying.
12709
1a715ef2
AD
127102002-07-09 Akim Demaille <akim@epita.fr>
12711
12712 * lib/quotearg.h: Protect against multiple inclusions.
12713 * src/location.h (location_t): Add a `file' member.
12714 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12715 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12716 `error_one_per_line' support.
12717
a5d50994
AD
127182002-07-09 Akim Demaille <akim@epita.fr>
12719
12720 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12721 * src/reader.c (lineno): Remove.
12722 Adjust all dependencies.
12723 (get_merge_function): Take a location and use complain_at.
12724 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12725 * tests/regression.at (Invalid inputs, Mixing %token styles):
12726 Adjust.
12727
b275314e
AD
127282002-07-09 Akim Demaille <akim@epita.fr>
12729
12730 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12731 recovery rule, and forbid extensions when --yacc.
12732 (gram_error): Use complain_at.
12733 * src/reader.c (reader): Exit if there were parse errors.
12734
865b9df1
AD
127352002-07-09 Akim Demaille <akim@epita.fr>
12736
12737 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12738 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12739 Reported by R Blake <blakers@mac.com>.
12740
c76e14da
AD
127412002-07-09 Akim Demaille <akim@epita.fr>
12742
12743 * data/yacc.c: Output the copyright notive in the header.
12744
7db2ed2d
AD
127452002-07-03 Akim Demaille <akim@epita.fr>
12746
12747 * src/output.c (froms, tos): Are state_number_t.
12748 (save_column): sp, sp1, and sp2 are state_number_t.
12749 (prepare): Rename `final' as `final_state_number', `nnts' as
12750 `nterms_number', `nrules' as `rules_number', `nstates' as
12751 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12752 unused.
12753 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12754 * data/lalr1.cc (nsym_): Remove, unused.
12755
e68e0410
AD
127562002-07-03 Akim Demaille <akim@epita.fr>
12757
12758 * src/lalr.h, src/lalr.c (goto_number_t): New.
12759 * src/lalr.c (goto_list_t): New.
12760 Propagate them.
12761 * src/nullable.c (rule_list_t): New.
12762 Propagate.
12763 * src/types.h: Remove.
12764
e1a4f3a4
AD
127652002-07-03 Akim Demaille <akim@epita.fr>
12766
12767 * src/closure.c (print_fderives): Use rule_rhs_print.
12768 * src/derives.c (print_derives): Use rule_rhs_print.
12769 (rule_list_t): New, replaces `shorts'.
12770 (set_derives): Add comments.
12771 * tests/sets.at (Nullable, Firsts): Adjust.
12772
536545f3
AD
127732002-07-03 Akim Demaille <akim@epita.fr>
12774
12775 * src/output.c (prepare_actions): Free `tally' and `width'.
12776 (prepare_actions): Allocate and free `order'.
12777 * src/symtab.c (symbols_free): Free `symbols'.
12778 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12779 * src/output.c (m4_invoke): Move to...
12780 * src/scan-skel.l: here.
12781 (<<EOF>>): Close yyout, and free its name.
12782
8b752b00
AD
127832002-07-03 Akim Demaille <akim@epita.fr>
12784
12785 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12786
12787 * src/LR0.c (new_state): Merge into...
12788 (state_list_append): this.
12789 (new_states): Merge into...
12790 (generate_states): here.
12791 (set_states): Don't ensure a proper `errs' state member here, do it...
12792 * src/conflicts.c (conflicts_solve): here.
12793 * src/state.h, src/state.c: Comment changes.
12794 (state_t): Rename member `shifts' as `transitions'.
12795 Adjust all dependencies.
12796 (errs_new): For consistency, also take the values as argument.
12797 (errs_dup): Remove.
12798 (state_errs_set): New.
12799 (state_reductions_set, state_transitions_set): Assert that no
12800 previous value was assigned.
12801 (state_free): New.
12802 (states_free): Use it.
12803 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12804 temporary storage: use `errs' and `nerrs' as elsewhere.
12805 (set_conflicts): Allocate and free this `errs'.
12806
613f5e1a
AD
128072002-07-02 Akim Demaille <akim@epita.fr>
12808
12809 * lib/libiberty.h: New.
12810 * lib: Update the bitset implementation from upstream.
12811 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12812 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12813 * src/main.c: Adjust bitset stats calls.
12814
26e0cadc
PE
128152002-07-01 Paul Eggert <eggert@twinsun.com>
12816
12817 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12818 char, so that negative chars don't collide with $.
12819
1154cced
AD
128202002-06-30 Akim Demaille <akim@epita.fr>
12821
12822 Have the GLR tests be `warning' checked, and fix the warnings.
12823
12824 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12825 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12826 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12827 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12828 (yyaddDeferredAction): static.
12829 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12830 (yyreportParseError): yyprefix is const.
12831 yytokenp is used only when verbose.
12832 (yy__GNUC__): Replace with __GNUC__.
12833 (yypdumpstack): yyi is size_t.
12834 (yypreference): Un-yy local variables and arguments, to avoid
12835 clashes with `yyr1'. Anyway, we are not in the user name space.
12836 (yytname_size): be an int, as is compared with ints.
12837 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12838 Use them.
12839 * tests/cxx-gram.at: Use quotation to protect $1.
12840 Use AT_COMPILE to enable warnings hunts.
12841 Prototype yylex and yyerror.
12842 `Use' argc.
12843 Include `string.h', not `strings.h'.
12844 Produce and prototype stmtMerge only when used.
12845 yylex takes a location.
12846
97650f4e
AD
128472002-06-30 Akim Demaille <akim@epita.fr>
12848
12849 We spend a lot of time in quotearg, in particular when --verbose.
12850
12851 * src/symtab.c (symbol_get): Store a quoted version of the key.
12852 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12853 Adjust all callers.
12854
d2576365
AD
128552002-06-30 Akim Demaille <akim@epita.fr>
12856
12857 * src/state.h (reductions_t): Rename member `nreds' as num.
12858 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12859 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12860
ccaf65bc
AD
128612002-06-30 Akim Demaille <akim@epita.fr>
12862
12863 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12864 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12865 (shifts_to): Rename as...
12866 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12867 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12868 (TRANSITION_IS_DISABLED, transitions_to): these.
12869
87675353
AD
128702002-06-30 Akim Demaille <akim@epita.fr>
12871
12872 * src/print.c (print_shifts, print_gotos): Merge into...
12873 (print_transitions): this.
12874 (print_transitions, print_errs, print_reductions): Align the
12875 lookaheads columns.
12876 (print_core, print_transitions, print_errs, print_state,
12877 print_grammar): Output empty lines separator before, not after.
12878 (state_default_rule_compute): Rename as...
12879 (state_default_rule): this.
12880 * tests/conflicts.at (Defaulted Conflicted Reduction),
12881 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12882 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12883
ce4ccb4b
AD
128842002-06-30 Akim Demaille <akim@epita.fr>
12885
12886 Display items as we display rules.
12887
12888 * src/gram.h, src/gram.c (rule_lhs_print): New.
12889 * src/gram.c (grammar_rules_partial_print): Use it.
12890 * src/print.c (print_core): Likewise.
12891 * tests/conflicts.at (Defaulted Conflicted Reduction),
12892 (Unresolved SR Conflicts): Adjust.
12893 (Unresolved SR Conflicts): Adjust and rename as...
12894 (Resolved SR Conflicts): this, as was meant.
12895 * tests/regression.at (Web2c Report): Adjust.
12896
bc933ef1
AD
128972002-06-30 Akim Demaille <akim@epita.fr>
12898
12899 * src/print.c (state_default_rule_compute): New, extracted from...
12900 (print_reductions): here.
12901 Pessimize, but clarify the code.
12902 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12903
53d4308d
AD
129042002-06-30 Akim Demaille <akim@epita.fr>
12905
12906 * src/output.c (action_row): Let default_rule be always a rule
12907 number.
12908
574fb2d5
AD
129092002-06-30 Akim Demaille <akim@epita.fr>
12910
12911 * src/closure.c (print_firsts, print_fderives, closure):
12912 Use BITSET_EXECUTE.
12913 * src/lalr.c (lookaheads_print): Likewise.
12914 * src/state.c (state_rule_lookaheads_print): Likewise.
12915 * src/print_graph.c (print_core): Likewise.
12916 * src/print.c (print_reductions): Likewise.
12917 * src/output.c (action_row): Likewise.
12918 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12919
05811fd7
AD
129202002-06-30 Akim Demaille <akim@epita.fr>
12921
12922 * src/print_graph.c: Use report_flag.
12923
0e4d5753
AD
129242002-06-30 Akim Demaille <akim@epita.fr>
12925
12926 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12927 to...
12928 * src/relation.h, src/relation.c (traverse, relation_digraph)
12929 (relation_print, relation_transpose): New.
12930
24c7d800
AD
129312002-06-30 Akim Demaille <akim@epita.fr>
12932
12933 * src/state.h, src/state.c (shifts_to): New.
12934 * src/lalr.c (build_relations): Use it.
12935
9222837b
AD
129362002-06-30 Akim Demaille <akim@epita.fr>
12937
12938 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12939 (item_number_of_rule_number, rule_number_of_item_number): New.
12940 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12941 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12942 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12943 Propagate their use.
12944 Much remains to be done, in particular wrt `shorts' from types.h.
12945
260008e5
AD
129462002-06-30 Akim Demaille <akim@epita.fr>
12947
12948 * src/symtab.c (symbol_new): Initialize the `printer' member.
12949
8a731ca8
AD
129502002-06-30 Akim Demaille <akim@epita.fr>
12951
12952 * src/LR0.c (save_reductions): Remove, replaced by...
12953 * src/state.h, src/state.c (state_reductions_set): New.
12954 (reductions, errs): Rename as...
12955 (reductions_t, errs_t): these.
12956 Adjust all dependencies.
12957
32e1e0a4
AD
129582002-06-30 Akim Demaille <akim@epita.fr>
12959
12960 * src/LR0.c (state_list_t, state_list_append): New.
12961 (first_state, last_state): Now symbol_list_t.
12962 (this_state): Remove.
12963 (new_itemsets, append_states, save_reductions): Take a state_t as
12964 argument.
12965 (set_states, generate_states): Adjust.
12966 (save_shifts): Remove, replaced by...
12967 * src/state.h, src/state.c (state_shifts_set): New.
12968 (shifts): Rename as...
12969 (shifts_t): this.
12970 Adjust all dependencies.
12971 * src/state.h (state_t): Remove the `next' member.
12972
e5fb6710
AD
129732002-06-30 Akim Demaille <akim@epita.fr>
12974
12975 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12976 escaped in slot 0.
12977
c7ca99d4
AD
129782002-06-30 Akim Demaille <akim@epita.fr>
12979
12980 Use hash.h for the state hash table.
12981
12982 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12983 (allocate_storage): Use state_hash_new.
12984 (free_storage): Use state_hash_free.
12985 (new_state, get_state): Adjust.
12986 * src/lalr.h, src/lalr.c (states): Move to...
12987 * src/states.h (state_t): Remove the `link' member, no longer
12988 used.
12989 * src/states.h, src/states.c: here.
12990 (state_hash_new, state_hash_free, state_hash_lookup)
12991 (state_hash_insert, states_free): New.
12992 * src/states.c (state_table, state_compare, state_hash): New.
12993 * src/output.c (output_actions): Do not free states now, since we
12994 still need to know the final_state number in `prepare', called
12995 afterwards. Do it...
12996 * src/main.c (main): here: call states_free after `output'.
12997
df0e7316
AD
129982002-06-30 Akim Demaille <akim@epita.fr>
12999
13000 * src/state.h, src/state.c (state_new): New, extracted from...
13001 * src/LR0.c (new_state): here.
13002 * src/state.h (STATE_ALLOC): Move to...
13003 * src/state.c: here.
13004 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13005 * src/state.h, src/state.c: here.
13006
39f41916
AD
130072002-06-30 Akim Demaille <akim@epita.fr>
13008
13009 * src/reader.c (gensym): Rename as...
13010 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13011 (getsym): Rename as...
13012 (symbol_get): this.
13013
d57650a5
AD
130142002-06-30 Akim Demaille <akim@epita.fr>
13015
13016 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13017 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13018 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13019 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13020
5a08f1ce
AD
130212002-06-30 Akim Demaille <akim@epita.fr>
13022
13023 Make the test suite pass with warnings checked.
13024
13025 * tests/actions.at (Printers and Destructors): Improve.
13026 Avoid unsigned vs. signed issues.
13027 * tests/calc.at: Don't exercise the scanner here, do it...
13028 * tests/input.at (Torturing the Scanner): here.
13029
720623af
PH
130302002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13031
88e7e941 13032 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
13033 reorganize first lines parallel to yacc.c.
13034
fb8135fa
AD
130352002-06-28 Akim Demaille <akim@epita.fr>
13036
13037 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13038 (b4_token_enum, b4_token_defines): New, factored from...
13039 * data/lalr1.cc, data/yacc.c, glr.c: here.
13040
41442480
AD
130412002-06-28 Akim Demaille <akim@epita.fr>
13042
13043 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13044 unused variables.
13045 * src/output.c (merger_output): static.
13046
e0e5bf84
AD
130472002-06-28 Akim Demaille <akim@epita.fr>
13048
ba0fe3c7 13049 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
13050 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13051 pacify GCC.
13052 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 13053
676385e2
PH
130542002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13055
13056 Accumulated changelog for new GLR parsing features.
13057
6a254321 13058 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
13059 conflicts_total_count.
13060 * src/conflicts.h: Ditto.
13061 * src/output.c (token_actions): Use the new name.
13062 (output_conflicts): Change conflp => conflict_list_heads, and
13063 confl => conflict_list for better readability.
13064 * data/glr.c: Use the new names.
13065 * NEWS: Add self to GLR announcement.
e0e5bf84 13066
676385e2
PH
13067 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13068
13069 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13070 Akim Demaille.
13071
13072 * data/bison.glr: Change name to glr.c
13073 * data/glr.c: Renamed from bison.glr.
13074 * data/Makefile.am: Add glr.c
e0e5bf84
AD
13075
13076 * src/getargs.c:
13077
676385e2 13078 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 13079 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 13080
676385e2
PH
13081 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13082
13083 * data/bison.glr: Be sure to restore the
13084 current #line when returning to the skeleton contents after having
13085 exposed the input file's #line.
13086
13087 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13088
13089 * data/bison.glr: Bring up to date with changes to bison.simple.
13090
13091 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13092
13093 * data/bison.glr: Correct definitions that use b4_prefix.
13094 Various reformatting.
13095 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13096 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13097 yytokenp argument; now part of stack.
13098 (yychar): Define to behave as documented.
13099 (yyclearin): Ditto.
e0e5bf84 13100
676385e2
PH
13101 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13102
13103 * src/reader.h: Add declaration for free_merger_functions.
13104
13105 * src/reader.c (merge_functions): New variable.
13106 (get_merge_function): New function.
13107 (free_merger_functions): New function.
13108 (readgram): Check for %prec that is not followed by a symbol.
13109 Handle %dprec and %merge declarations.
13110 (packgram): Initialize dprec and merger fields in rules array.
13111
13112 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13113 conflict_list_cnt, conflict_list_free): New variables.
13114 (table_grow): Also grow conflict_table.
e0e5bf84 13115 (prepare_rules): Output dprec and merger tables.
676385e2 13116 (conflict_row): New function.
e0e5bf84 13117 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
13118 default reduction in conflicted states for GLR parser so that there
13119 are spaces for the conflict lists.
13120 (save_row): Also save conflict information.
13121 (token_actions): Allocate conflict list.
13122 (merger_output): New function.
13123 (pack_vector): Pack conflict table, too.
13124 (output_conflicts): New function to output yyconflp and yyconfl.
13125 (output_check): Allocate conflict_tos.
13126 (output_actions): Output conflict tables, also.
13127 (output_skeleton): Output b4_mergers definition.
13128 (prepare): Output b4_max_rhs_length definition.
13129 Use 'bison.glr' as default skeleton for GLR parsers.
13130
13131 * src/gram.c (glr_parser): New flag.
13132 (grammar_free): Call free_merger_functions.
13133
13134 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13135 all pairs of conflicting reductions, rather than just all tokens
13136 causing conflicts. Needed to size conflict tables.
e0e5bf84 13137 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
13138 interface.
13139 (conflicts_print): Ditto.
13140 (count_total_conflicts): New function.
13141
13142 * src/reader.h (merger_list): New type.
13143 (merge_functions): New variable.
13144
13145 * src/lex.h (tok_dprec, tok_merge): New token types.
13146
13147 * src/gram.h (rule_s): Add dprec and merger fields.
13148 (glr_parser): New flag.
13149
13150 * src/conflicts.h (count_total_conflicts): New function.
13151
13152 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13153
13154 * doc/bison.texinfo (Generalized LR Parsing): New section.
13155 (GLR Parsers): New section.
13156 (Language and Grammar): Mention GLR parsing.
13157 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13158 Correct typo ("tge" -> "the").
13159
13160 * data/bison.glr: New skeleton for GLR parsing.
13161
13162 * tests/cxx-gram.at: New tests for GLR parsing.
13163
13164 * tests/testsuite.at: Include cxx-gram.at.
13165
13166 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 13167
676385e2
PH
13168 * src/parse-gram.y:
13169
13170 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13171
13172 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 13173
b5480d74 131742002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
13175
13176 * src/options.h, src/options.c: Remove.
13177 * src/getargs.c (short_options, long_options): New.
13178
60491a94
AD
131792002-06-27 Akim Demaille <akim@epita.fr>
13180
13181 * data/bison.simple, data/bison.c++: Rename as...
13182 * data/yacc.c, data/lalr1.cc: these.
13183 * doc/bison.texinfo (Environment Variables): Remove.
13184
9be0c25b
AD
131852002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13186
13187 * src/getargs.c (report_argmatch): Initialize strtok().
13188
1ae72863
AD
131892002-06-20 Akim Demaille <akim@epita.fr>
13190
13191 * data/bison.simple (b4_symbol_actions): New, replaces...
13192 (b4_symbol_destructor, b4_symbol_printer): these.
13193 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13194 user token numbers.
13195
87542d29
AD
131962002-06-20 Akim Demaille <akim@epita.fr>
13197
13198 * data/bison.simple (yydestructor): Rename as...
13199 (yydestruct): this.
13200
1a31ed21
AD
132012002-06-20 Akim Demaille <akim@epita.fr>
13202
13203 * src/symtab.h, src/symtab.c (symbol_type_set)
13204 (symbol_destructor_set, symbol_precedence_set): The location is
13205 the last argument.
13206 Adjust all callers.
13207
e776192e
AD
132082002-06-20 Akim Demaille <akim@epita.fr>
13209
13210 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13211 internals.
13212 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13213 Takes a location.
13214 * src/symtab.h, src/symtab.c (symbol_class_set)
13215 (symbol_user_token_number_set): Likewise.
13216 Adjust all callers.
13217 Promote complain_at.
13218 * tests/input.at (Type Clashes): Adjust.
13219
5c1180b3
AD
132202002-06-20 Akim Demaille <akim@epita.fr>
13221
13222 * data/bison.simple (YYLEX): Fix the declaration when
13223 %pure-parser.
13224
e3170060
AD
132252002-06-20 Akim Demaille <akim@epita.fr>
13226
13227 * data/bison.simple (yysymprint): Don't print the token number,
13228 just its name.
13229 * tests/actions.at (Destructors): Rename as...
13230 (Printers and Destructors): this.
13231 Also exercise %printer.
13232
253862fd
AD
132332002-06-20 Akim Demaille <akim@epita.fr>
13234
13235 * data/bison.simple (YYDSYMPRINT): New.
13236 Use it to remove many of the #if YYDEBUG/if (yydebug).
13237
366eea36
AD
132382002-06-20 Akim Demaille <akim@epita.fr>
13239
13240 * src/symtab.h, src/symtab.c (symbol_t): printer and
13241 printer_location are new members.
13242 (symbol_printer_set): New.
13243 * src/parse-gram.y (PERCENT_PRINTER): New token.
13244 Handle its associated rule.
13245 * src/scan-gram.l: Adjust.
13246 (handle_destructor_at, handle_destructor_dollar): Rename as...
13247 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13248 * src/output.c (symbol_printers_output): New.
13249 (output_skeleton): Call it.
13250 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13251 since there are already many grammar files with a user `yyprint'.
13252 Replace the calls to YYPRINT to calls to yysymprint.
13253 * tests/calc.at: Adjust.
13254 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13255 taking advantage of parser very internal details (stack size!).
13256
4f25ebb0
AD
132572002-06-20 Akim Demaille <akim@epita.fr>
13258
13259 * src/scan-gram.l: Complete the scanner with the missing patterns
13260 to pacify Flex.
13261 Use `quote' and `symbol_tag_get' where appropriate.
13262
93b68a0e
AD
132632002-06-19 Akim Demaille <akim@epita.fr>
13264
13265 * tests/actions.at (Destructors): Augment to test locations.
13266 * data/bison.simple (yydestructor): Pass it the current location
13267 if locations are enabled.
13268 Prototype only when __STDC__ or C++.
13269 Change the argument names to move into the yy name space: there is
13270 user code here.
13271
58612f1d
AD
132722002-06-19 Akim Demaille <akim@epita.fr>
13273
74310291
AD
13274 * data/bison.simple (b4_pure_if): New.
13275 Use it instead of #ifdef YYPURE.
13276
132772002-06-19 Akim Demaille <akim@epita.fr>
13278
13279 * data/bison.simple (b4_location_if): New.
58612f1d
AD
13280 Use it instead of #ifdef YYLSP_NEEDED.
13281
f25bfb75
AD
132822002-06-19 Akim Demaille <akim@epita.fr>
13283
13284 Prepare @$ in %destructor, but currently don't bind it in the
13285 skeleton, as %location use is not cleaned up yet.
13286
13287 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13288 (handle_action_at): New.
13289 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13290 a braced_code_t and a location as additional arguments.
13291 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13292 unquote one when outputting `b4_dollar_dollar'.
13293 Adjust callers.
13294 * data/bison.simple (b4_eval): Remove.
13295 (b4_symbol_destructor): Adjust.
13296 * tests/input.at (Invalid @n): Adjust.
13297
c732d2c6
AD
132982002-06-19 Zack Weinberg <zack@codesourcery.com>
13299
13300 * doc/bison.texinfo: Document ability to have multiple
13301 prologue sections.
13302
8c165d89
AD
133032002-06-18 Akim Demaille <akim@epita.fr>
13304
13305 * src/files.c (compute_base_names): When computing the output file
13306 names from the input file name, strip the directory part.
13307
ca98bf57
AD
133082002-06-18 Akim Demaille <akim@epita.fr>
13309
13310 * data/bison.simple.new: Comment changes.
13311 Reported by Andreas Schwab.
13312
0bfb02ff
AD
133132002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13314
13315 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13316 there are no `label `yyoverflowlab' defined but not used' warnings
13317 when yyoverflow is defined.
13318
24c0aad7
AD
133192002-06-18 Akim Demaille <akim@epita.fr>
13320
13321 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13322 new member.
13323 (symbol_destructor_set): Adjust.
13324 * src/output.c (symbol_destructors_output): Output the destructor
13325 locations.
13326 Output the symbol name.
13327 * data/bison.simple (b4_symbol_destructor): Adjust.
13328
5719c109
AD
133292002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13330 and Akim Demaille <akim@epita.fr>
13331
13332 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13333 what's left on the stack when the error recovery hits EOF.
13334 * tests/actions.at (Destructors): Complete to exercise this case.
13335
9280d3ef
AD
133362002-06-17 Akim Demaille <akim@epita.fr>
13337
13338 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13339 arguments is really empty, not only equal to `[]'.
13340 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13341 member.
13342 (symbol_destructor_set): New.
13343 * src/output.c (symbol_destructors_output): New.
13344 * src/reader.h (brace_code_t, current_braced_code): New.
13345 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13346 (handle_dollar): Rename as...
13347 (handle_action_dollar): this.
13348 (handle_destructor_dollar): New.
13349 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13350 (grammar_declaration): Use it.
13351 * data/bison.simple (yystos): Is always defined.
13352 (yydestructor): New.
13353 * tests/actions.at (Destructors): New.
13354 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13355
dafdc66f
AD
133562002-06-17 Akim Demaille <akim@epita.fr>
13357
13358 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13359 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13360 rule_length only when needed.
13361 * src/output.c (actions_output, token_definitions_output): Output
13362 the full M4 block.
13363 * src/symtab.c: Don't access directly to the symbol tag, use
13364 symbol_tag_get.
13365 * src/parse-gram.y: Use symbol_list_free.
13366
56c47203
AD
133672002-06-17 Akim Demaille <akim@epita.fr>
13368
13369 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13370 (symbol_list_prepend, get_type_name): Move to...
13371 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13372 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13373 Adjust all callers.
13374 (symbol_list_free): New.
13375 * src/scan-gram.l (handle_dollar): Takes a location.
13376 * tests/input.at (Invalid $n): Adjust.
13377
1e0bab92
AD
133782002-06-17 Akim Demaille <akim@epita.fr>
13379
13380 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13381 (symbol_list_prepend): New.
13382 * src/parse-gram.y (%union): `list' is a new member.
13383 (symbols.1): New, replaces...
13384 (terms_to_prec.1, nterms_to_type.1): these.
13385 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13386 Take a location as additional argument.
13387 Adjust all callers.
13388
04e60654
AD
133892002-06-15 Akim Demaille <akim@epita.fr>
13390
13391 * src/parse-gram.y: Move %token in the declaration section so that
13392 we don't depend upon CVS Bison.
13393
10e5b8bd
AD
133942002-06-15 Akim Demaille <akim@epita.fr>
13395
13396 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13397 * src/print.c (print_core): Use it.
13398
9801d40c
AD
133992002-06-15 Akim Demaille <akim@epita.fr>
13400
13401 * src/conflicts.c (log_resolution): Accept the rule involved in
13402 the sr conflicts instead of the lookahead number that points to
13403 that rule.
13404 (flush_reduce): Accept the current lookahead vector as argument,
13405 instead of the index in LA.
13406 (resolve_sr_conflict): Accept the current number of lookahead
13407 bitset to consider for the STATE, instead of the index in LA.
13408 (set_conflicts): Adjust.
13409 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13410
c0263492
AD
134112002-06-15 Akim Demaille <akim@epita.fr>
13412
13413 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13414 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13415 Adjust all dependencies.
13416 * src/lalr.c (initialize_lookaheads): Split into...
13417 (states_lookaheads_count, states_lookaheads_initialize): these.
13418 (lalr): Adjust.
13419
9757c359
AD
134202002-06-15 Akim Demaille <akim@epita.fr>
13421
13422 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13423 out of...
13424 (grammar_rules_print): here.
13425 * src/reduce.c (reduce_output): Use it.
13426 * tests/reduce.at (Useless Rules, Reduced Automaton)
13427 (Underivable Rules): Adjust.
13428
6b98e4b5
AD
134292002-06-15 Akim Demaille <akim@epita.fr>
13430
13431 Copy BYacc's nice way to report the grammar.
13432
13433 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13434 New.
13435 Don't print the rules' location, it is confusing and useless.
13436 (rule_print): Use grammar_rhs_print.
13437 * src/print.c (print_grammar): Use grammar_rules_print.
13438
6b98e4b5
AD
134392002-06-15 Akim Demaille <akim@epita.fr>
13440
13441 Complete and rationalize `useless thing' warnings.
13442
13443 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13444 (symbol_tag_print): New.
13445 Use them everywhere in place of accessing directly the tag member.
13446 * src/gram.h, src/gram.c (rule_print): New.
13447 Use it where a rule used to be printed `by hand'.
13448 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13449 (reduce_grammar_tables): Report the useless rules.
13450 (reduce_print): Useless things are a warning, not an error.
13451 Report it as such.
13452 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13453 (Reduced Automaton, Underivable Rules): Adjust.
13454 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13455 * tests/conflicts.at (Unresolved SR Conflicts)
13456 (Solved SR Conflicts): Adjust.
13457
ee000ba4
AD
134582002-06-15 Akim Demaille <akim@epita.fr>
13459
13460 Let symbols have a location.
13461
13462 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13463 (getsym): Adjust.
13464 Adjust all callers.
13465 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13466 Use location_t, not int.
13467 * src/symtab.c (symbol_check_defined): Take advantage of the
13468 location.
13469 * tests/regression.at (Invalid inputs): Adjust.
13470
8efe435c
AD
134712002-06-15 Akim Demaille <akim@epita.fr>
13472
13473 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13474 (input): Don't try to initialize yylloc here, do it in the
13475 scanner.
13476 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13477 * src/gram.h (rule_t): Change line and action_line into location
13478 and action_location, of location_t type.
13479 Adjust all dependencies.
13480 * src/location.h, src/location.c (empty_location): New.
13481 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13482 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13483 (grammar_current_rule_symbol_append)
13484 (grammar_current_rule_action_append): Expect a location as argument.
13485 * src/reader.c (grammar_midrule_action): Adjust to attach an
13486 action's location as dummy symbol location.
13487 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13488 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13489 the line numbers.
13490
1921f1d7
AD
134912002-06-14 Akim Demaille <akim@epita.fr>
13492
13493 Grammar declarations may be found in the grammar section.
13494
13495 * src/parse-gram.y (rules_or_grammar_declaration): New.
13496 (declarations): Each declaration may end with a semicolon, not
13497 just...
13498 (grammar_declaration): `"%union"'.
13499 (grammar): Branch to rules_or_grammar_declaration.
13500
4515534c
AD
135012002-06-14 Akim Demaille <akim@epita.fr>
13502
13503 * src/main.c (main): Invoke scanner_free.
13504
f958596b
AD
135052002-06-14 Akim Demaille <akim@epita.fr>
13506
13507 * src/output.c (m4_invoke): Extracted from...
13508 (output_skeleton): here.
13509 Free tempfile.
13510
2c569025
AD
135112002-06-14 Akim Demaille <akim@epita.fr>
13512
13513 * src/parse-gram.y (directives, directive, gram)
13514 (grammar_directives, precedence_directives, precedence_directive):
13515 Rename as...
13516 (declarations, declaration, grammar, grammar_declaration)
13517 (precedence_declaration, precedence_declarator): these.
13518 (symbol_declaration): New.
13519
592e8d4d
AD
135202002-06-14 Akim Demaille <akim@epita.fr>
13521
13522 * src/files.c (action_obstack): Remove, unused.
13523 (output_obstack): Remove it, and all its dependencies, as it is no
13524 longer needed.
13525 * src/reader.c (epilogue_set): Build the epilogue in the
13526 muscle_obstack.
13527 * src/output.h, src/output.c (muscle_obstack): Move to...
13528 * src/muscle_tab.h, src/muscle_tab.h: here.
13529 (muscle_init): Initialize muscle_obstack.
13530 (muscle_free): New.
13531 * src/main.c (main): Call it.
13532
0c15323d
AD
135332002-06-14 Akim Demaille <akim@epita.fr>
13534
13535 * src/location.h: New, extracted from...
13536 * src/reader.h: here.
13537 * src/Makefile.am (noinst_HEADERS): Merge into
13538 (bison_SOURCES): this.
13539 Add location.h.
13540 * src/parse-gram.y: Use location_t instead of Bison's.
13541 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13542 Use location_t instead of ints.
13543
e96c9728
AD
135442002-06-14 Akim Demaille <akim@epita.fr>
13545
13546 * data/bison.simple, data/bison.c++: Be sure to restore the
13547 current #line when returning to the skeleton contents after having
13548 exposed the input file's #line.
13549
75d1fe16
AD
135502002-06-12 Akim Demaille <akim@epita.fr>
13551
13552 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13553 eager.
13554 * tests/actions.at (Exotic Dollars): New.
13555
6c35d22c
AD
135562002-06-12 Akim Demaille <akim@epita.fr>
13557
13558 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13559 ['"/] too eagerly.
13560 * tests/input.at (Torturing the Scanner): New.
13561
1d6412ad
AD
135622002-06-11 Akim Demaille <akim@epita.fr>
13563
13564 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13565 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13566 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13567 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13568 * src/reader.c (reader): Use it.
13569
4cdb01db
AD
135702002-06-11 Akim Demaille <akim@epita.fr>
13571
13572 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13573 Adjust all callers.
13574 (scanner_last_string_free): New.
13575
44995b2e
AD
135762002-06-11 Akim Demaille <akim@epita.fr>
13577
13578 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13579 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13580 (last_string, YY_OBS_FREE): New.
13581 Use them when returning an ID.
13582
e9955c83
AD
135832002-06-11 Akim Demaille <akim@epita.fr>
13584
13585 Have Bison grammars parsed by a Bison grammar.
13586
13587 * src/reader.c, src/reader.h (prologue_augment): New.
13588 * src/reader.c (copy_definition): Remove.
13589
13590 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13591 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13592 (grammar_current_rule_prec_set, grammar_current_rule_check)
13593 (grammar_current_rule_symbol_append)
13594 (grammar_current_rule_action_append): Export.
13595 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13596 (symbol_list_action_append): Remove.
13597 Hook the routines from reader.
13598 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13599 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13600
13601 * src/reader.c (read_declarations): Remove, unused.
13602
13603 * src/parse-gram.y: Handle the epilogue.
13604 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13605 (grammar_start_symbol_set): this.
13606 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13607 * src/reader.c (readgram): Remove, unused.
13608 (reader): Adjust to insert eoftoken and axiom where appropriate.
13609
13610 * src/reader.c (copy_dollar): Replace with...
13611 * src/scan-gram.h (handle_dollar): this.
13612 * src/parse-gram.y: Remove `%thong'.
13613
13614 * src/reader.c (copy_at): Replace with...
13615 * src/scan-gram.h (handle_at): this.
13616
13617 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13618 New.
13619
13620 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13621 time being.
13622
13623 * src/reader.h, src/reader.c (grammar_rule_end): New.
13624
13625 * src/parse.y (current_type, current_class): New.
13626 Implement `%nterm', `%token' support.
13627 Merge `%term' into `%token'.
13628 (string_as_id): New.
13629 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13630 type name.
13631
13632 * src/parse-gram.y: Be sure to handle properly the beginning of
13633 rules.
13634
13635 * src/parse-gram.y: Handle %type.
13636 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13637
13638 * src/parse-gram.y: More directives support.
13639 * src/options.c: No longer handle source directives.
13640
13641 * src/parse-gram.y: Fix %output.
13642
13643 * src/parse-gram.y: Handle %union.
13644 Use the prologue locations.
13645 * src/reader.c (parse_union_decl): Remove.
13646
13647 * src/reader.h, src/reader.c (epilogue_set): New.
13648 * src/parse-gram.y: Use it.
13649
13650 * data/bison.simple, data/bison.c++: b4_stype is now either not
13651 defined, then default to int, or to the contents of %union,
13652 without `union' itself.
13653 Adjust.
13654 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13655
13656 * src/output.c (actions_output): Don't output braces, as they are
13657 already handled by the scanner.
13658
13659 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13660 characters to themselves.
13661
13662 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13663 that the epilogue has a proper #line.
13664
13665 * src/parse-gram.y: Handle precedence/associativity.
13666
13667 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13668 a terminal.
13669 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13670 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13671 at all to define terminals that cannot be emitted.
13672
13673 * src/scan-gram.l: Escape M4 characters.
13674
13675 * src/scan-gram.l: Working properly with escapes in user
13676 strings/characters.
13677
13678 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13679 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13680 grammar.
13681 Use more modest sizes, as for the time being the parser does not
13682 release memory, and therefore the process swallows a huge amount
13683 of memory.
13684
13685 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13686 stricter %token grammar.
13687
13688 * src/symtab.h (associativity): Add `undef_assoc'.
13689 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13690 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13691
13692 * tests/regression.at (Invalid %directive): Remove, as it is now
13693 meaningless.
13694 (Invalid inputs): Adjust to the new error messages.
13695 (Token definitions): The new grammar doesn't allow too many
13696 eccentricities.
13697
13698 * src/lex.h, src/lex.c: Remove.
13699 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13700 (copy_character, copy_string2, copy_string, copy_identifier)
13701 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13702 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13703 (parse_action): Remove.
13704 * po/POTFILES.in: Adjust.
13705
2e047461
AD
137062002-06-11 Akim Demaille <akim@epita.fr>
13707
cd05d13c 13708 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
13709 rule's action member: return the action as a string.
13710 Don't require `rule_length' as an argument: compute it.
13711 (grammar_current_rule_symbol_append)
13712 (grammar_current_rule_action_append): New, eved out from
13713 (readgram): here.
13714 Remove `action_flag', `rulelength', unused now.
13715
9af3fbce
AD
137162002-06-11 Akim Demaille <akim@epita.fr>
13717
13718 * src/reader.c (grammar_current_rule_prec_set).
13719 (grammar_current_rule_check): New, eved out from...
13720 (readgram): here.
13721 Remove `xaction', `first_rhs': useless.
13722 * tests/input.at (Type clashes): New.
13723 * tests/existing.at (GNU Cim Grammar): Adjust.
13724
1485e106
AD
137252002-06-11 Akim Demaille <akim@epita.fr>
13726
13727 * src/reader.c (grammar_midrule_action): New, Eved out from
13728 (readgram): here.
13729
da4160c3
AD
137302002-06-11 Akim Demaille <akim@epita.fr>
13731
13732 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13733 New.
13734 (readgram): Use them as replacement of inlined code, crule and
13735 crule1.
13736
f6d0f937
AD
137372002-06-11 Akim Demaille <akim@epita.fr>
13738
13739 * src/reader.c (grammar_end, grammar_symbol_append): New.
13740 (readgram): Use them.
13741 Make the use of `p' as local as possible.
13742
69078d4b
AD
137432002-06-10 Akim Demaille <akim@epita.fr>
13744
13745 GCJ's parser requires the tokens to be defined before the prologue.
13746
13747 * data/bison.simple: Output the token definition before the user's
13748 prologue.
13749 * tests/regression.at (Braces parsing, Duplicate string)
13750 (Mixing %token styles): Check the output from bison.
13751 (Early token definitions): New.
13752
5e424082
AD
137532002-06-10 Akim Demaille <akim@epita.fr>
13754
13755 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13756 assigning twice the same user number to a token, so that we can
13757 use it in...
13758 * src/lex.c (lex): here.
13759 Also use `symbol_class_set' instead of hand written code.
13760 * src/reader.c (parse_assoc_decl): Likewise.
13761
44536b35
AD
137622002-06-10 Akim Demaille <akim@epita.fr>
13763
13764 * src/symtab.c, src/symtab.c (symbol_class_set)
13765 (symbol_user_token_number_set): New.
13766 * src/reader.c (parse_token_decl): Use them.
13767 Use a switch instead of ifs.
13768 Use a single argument.
13769
8b9f2372
AD
137702002-06-10 Akim Demaille <akim@epita.fr>
13771
13772 Remove `%thong' support as it is undocumented, unused, duplicates
13773 `%token's job, and creates useless e-mail traffic with people who
13774 want to know what it is, why it is undocumented, unused, and
13775 duplicates `%token's job.
13776
13777 * src/reader.c (parse_thong_decl): Remove.
13778 * src/options.c (option_table): Remove "thong".
13779 * src/lex.h (tok_thong): Remove.
13780
3ae2b51f
AD
137812002-06-10 Akim Demaille <akim@epita.fr>
13782
13783 * src/symtab.c, src/symtab.c (symbol_type_set)
13784 (symbol_precedence_set): New.
13785 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13786 (value_components_used): Remove, unused.
13787
2f1afb73
AD
137882002-06-09 Akim Demaille <akim@epita.fr>
13789
13790 Move symbols handling code out of the reader.
13791
13792 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13793 (axiom): Move to...
13794 * src/symtab.h, src/symtab.c: here.
13795
13796 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13797 * src/reader.c (startval): Rename as...
13798 * src/symtab.h, src/symtab.c (startsymbol): this.
13799 * src/reader.c: Adjust.
13800
13801 * src/reader.c (symbol_check_defined, symbol_make_alias)
13802 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13803 (token_translations_init)
13804 Move to...
13805 * src/symtab.c: here.
13806 * src/reader.c (packsymbols): Move to...
13807 * src/symtab.h, src/symtab.c (symbols_pack): here.
13808 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13809 argument.
13810
e9bca3ad
AD
138112002-06-03 Akim Demaille <akim@epita.fr>
13812
13813 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13814 then statements.
13815
86eff183
AD
138162002-06-03 Akim Demaille <akim@epita.fr>
13817
13818 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13819 structs with non literals.
13820 * src/scan-skel.l: never-interactive.
13821 * src/conflicts.c (enum conflict_resolution_e): No trailing
13822 comma.
13823 * src/getargs.c (usage): Split long literal strings.
13824 Reported by Hans Aberg.
13825
717be197
AD
138262002-05-28 Akim Demaille <akim@epita.fr>
13827
13828 * data/bison.c++: Use C++ ostreams.
13829 (cdebug_): New member.
13830
670ddffd
AD
138312002-05-28 Akim Demaille <akim@epita.fr>
13832
13833 * src/output.c (output_skeleton): Be sure to allocate enough room
13834 for `/' _and_ for `\0' in full_skeleton.
13835
769b430f
AD
138362002-05-28 Akim Demaille <akim@epita.fr>
13837
13838 * data/bison.c++: Catch up with bison.simple:
13839 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13840 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13841 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13842 and popping traces.
13843
7067cb36
PH
138442002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13845
13846 * src/output.c (output_skeleton): Put an explicit path in front of
13847 the skeleton file name, rather than relying on the -I directory,
13848 to partially alleviate effects of having a skeleton file lying around
13849 in the current directory.
769b430f 13850
4a713ec2
PH
138512002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13852
769b430f 13853 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
13854 obstack_printf should be obstack_fgrow1.
13855
b408954b
AD
138562002-05-26 Akim Demaille <akim@epita.fr>
13857
13858 * src/state.h (state_t): `solved_conflicts' is a new member.
13859 * src/LR0.c (new_state): Set it to 0.
13860 * src/conflicts.h, src/conflicts.c (print_conflicts)
13861 (free_conflicts, solve_conflicts): Rename as...
13862 (conflicts_print, conflicts_free, conflicts_solve): these.
13863 Adjust callers.
13864 * src/conflicts.c (enum conflict_resolution_e)
13865 (solved_conflicts_obstack): New, used by...
13866 (log_resolution): this.
13867 Adjust to attach the conflict resolution to each state.
13868 Complete the description with the precedence/associativity
13869 information.
13870 (resolve_sr_conflict): Adjust.
13871 * src/print.c (print_state): Output its solved_conflicts.
13872 * tests/conflicts.at (Unresolved SR Conflicts)
13873 (Solved SR Conflicts): Exercise --report=all.
13874
a49aecd5
AD
138752002-05-26 Akim Demaille <akim@epita.fr>
13876
13877 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13878 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13879 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13880 (token_number_t, item_number_as_token_number)
13881 (token_number_as_item_number, muscle_insert_token_number_table):
13882 Rename as...
13883 (symbol_number_t, item_number_as_symbol_number)
13884 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13885 these, since it is more appropriate.
13886
5504898e
AD
138872002-05-26 Akim Demaille <akim@epita.fr>
13888
13889 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13890 `Error:' lines.
13891 * data/bison.simple (yystos) [YYDEBUG]: New.
13892 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13893 error recovery.
13894 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13895
ec3bc396
AD
138962002-05-25 Akim Demaille <akim@epita.fr>
13897
13898 * doc/bison.texinfo (Debugging): Split into...
13899 (Tracing): this new section, its former contents, and...
13900 (Understanding): this new section.
13901 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13902 by...
13903 (report_flag): this.
13904 Adjust all dependencies.
13905 (report_args, report_types, report_argmatch): New.
13906 (usage, getargs): Report/support -r, --report.
13907 * src/options.h
13908 (struct option_table_struct): Rename as..,
13909 (struct option_table_s): this.
13910 Rename the `set_flag' member to `flag' to match with getopt_long's
13911 struct.
13912 * src/options.c (option_table): Split verbose into an entry for
13913 %verbose, and another for --verbose.
13914 Support --report/-r, so remove -r from the obsolete --raw.
13915 * src/print.c: Attach full item sets and lookaheads reports to
13916 report_flag instead of trace_flag.
13917 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13918
78df8250
PE
139192002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13920 and Paul Eggert <eggert@twinsun.com>
769b430f 13921
78df8250
PE
13922 * data/bison.simple (yyparse): Correct error handling to conform to
13923 POSIX and yacc. Specifically, after syntax error is discovered,
13924 do not reduce further before shifting the error token.
13925 Clean up the code a bit by removing the labels yyerrdefault,
13926 yyerrhandle, yyerrpop.
13927 * NEWS: Document the above.
13928
c0c9ea05
PH
139292002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13930
13931 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13932 type; it isn't always big enough, since it doesn't necessarily
13933 include non-terminals.
769b430f 13934 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
13935 the latter can be removed.
13936 (yy_token_number_type): Remove, only one use.
13937 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13938 don't use TokenNumberType as element type.
769b430f 13939
c0c9ea05
PH
13940 * tests/regression.at: Modify expected output to agree with change
13941 to yyr1 and yytranslate.
769b430f 13942
6390a83f
FK
139432002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13944
13945 * src/reader.c (parse_action): Use copy_character instead of
13946 obstack_1grow.
13947
db7c8e9a
AD
139482002-05-13 Akim Demaille <akim@epita.fr>
13949
13950 * tests/regression.at (Token definitions): Prototype yylex and
13951 yyerror.
13952
fcc61800
PH
139532002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13954
158c687b 13955 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
13956 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13957 32-bit arithmetic.
13958 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13959
5683e9b2
AD
139602002-05-07 Akim Demaille <akim@epita.fr>
13961
13962 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13963 avoid GCC warnings.
13964
0c2d3f4c
AD
139652002-05-07 Akim Demaille <akim@epita.fr>
13966
13967 Kill GCC warnings.
13968
13969 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13970 over the RHS of each rule.
13971 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13972 * src/state.h (state_t): Member `nitems' is unsigned short.
13973 * src/LR0.c (get_state): Adjust.
13974 * src/reader.c (packgram): Likewise.
13975 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13976 `Type'.
13977 (muscle_insert_int_table): Remove, unused.
13978 (prepare_rules): Remove `max'.
13979
1565b720
AD
139802002-05-06 Akim Demaille <akim@epita.fr>
13981
13982 * src/closure.c (print_firsts): Display of the symbol tags.
13983 (bitmatrix_print): Move to...
13984 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13985 here.
13986 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13987
cfaee611
AD
139882002-05-06 Akim Demaille <akim@epita.fr>
13989
13990 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13991 hash_do_for_each.
13992
458be8e0
AD
139932002-05-06 Akim Demaille <akim@epita.fr>
13994
13995 * src/LR0.c (new_state, get_state): Instead of using the global
13996 `kernel_size' and `kernel_base', have two new arguments:
13997 `core_size' and `core'.
13998 Adjust callers.
13999
a900a624
AD
140002002-05-06 Akim Demaille <akim@epita.fr>
14001
14002 * src/reader.c (packgram): No longer end `ritem' with a 0
14003 sentinel: it is not used.
14004
d4e7d3a1
AD
140052002-05-05 Akim Demaille <akim@epita.fr>
14006
14007 New experimental feature: display the lookaheads in the report and
14008 graph.
14009
14010 * src/print (print_core): When --trace-flag, display the rules
14011 lookaheads.
14012 * src/print_graph.c (print_core): Likewise.
14013 Swap the arguments.
14014 Adjust caller.
14015
39ceb25b
AD
140162002-05-05 Akim Demaille <akim@epita.fr>
14017
14018 * tests/torture.at (Many lookaheads): New test.
14019
5372019f
AD
140202002-05-05 Akim Demaille <akim@epita.fr>
14021
14022 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14023 (GENERATE_MUSCLE_INSERT_TABLE): this.
14024 (output_int_table, output_unsigned_int_table, output_short_table)
14025 (output_token_number_table, output_item_number_table): Replace with...
14026 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14027 (muscle_insert_short_table, muscle_insert_token_number_table)
14028 (muscle_insert_item_number_table): these.
14029 Adjust all callers.
14030 (prepare_tokens): Don't free `translations', since...
14031 * src/reader.h, src/reader.c (grammar_free): do it.
14032 Move to...
14033 * src/gram.h, src/gram.c (grammar_free): here.
14034 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14035 b4_translate_max.
14036
5df5f6d5
AD
140372002-05-05 Akim Demaille <akim@epita.fr>
14038
14039 * src/output.c (output_unsigned_int_table): New.
14040 (prepare_rules): `i' is unsigned.
14041 `prhs', `rline', `r2' are unsigned int.
14042 Rename muscle `rhs_number_max' as `rhs_max'.
14043 Output muscles `prhs_max', `rline_max', and `r2_max'.
14044 Free rline and r1.
14045 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14046 to compute types instead of constant types.
14047 * tests/regression.at (Web2c Actions): Adjust.
14048
b87f8b21
AD
140492002-05-04 Akim Demaille <akim@epita.fr>
14050
14051 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14052 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14053 Adjust dependencies.
14054 * src/output.c (token_definitions_output): Be sure not to output a
14055 `#define 'a'' when fed with `%token 'a' "a"'.
14056 * tests/regression.at (Token definitions): New.
14057
8bb936e4
PE
140582002-05-03 Paul Eggert <eggert@twinsun.com>
14059
14060 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14061 for K&R C.
14062
140632002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14064
14065 * Makefile.am (SUBDIRS): Remove intl.
14066 (EXTRA_DIST): Add config/config.rpath.
14067
53c71a12
AD
140682002-05-03 Akim Demaille <akim@epita.fr>
14069
14070 * data/bison.simple (m4_if): Don't output empty enums.
14071 And actually, output valid enum definitions :(.
14072
289dd0cf
AD
140732002-05-03 Akim Demaille <akim@epita.fr>
14074
14075 * configure.bat: Remove, completely obsolete.
14076 * Makefile.am (EXTRA_DIST): Adjust.
14077 Don't distribute config.rpath...
14078 * config/Makefile.am (EXTRA_DIST): Do it.
14079
db85e524
AD
140802002-05-03 Akim Demaille <akim@epita.fr>
14081
14082 * configure.in (GETTEXT_VERSION): New.
14083 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14084
83ccf991
AD
140852002-05-03 Akim Demaille <akim@epita.fr>
14086
14087 * data/bison.simple (b4_token_enum): New.
14088 (b4_token_defines): Use it to output tokens both as #define and
14089 enums.
14090 Suggested by Paul Eggert.
14091 * src/output.c (token_definitions_output): Don't output spurious
14092 white spaces.
14093
1f418995
AD
140942002-05-03 Akim Demaille <akim@epita.fr>
14095
14096 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14097
45119f04
RA
140982002-05-02 Robert Anisko <robert@lrde.epita.fr>
14099
14100 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14101 Update the stack class, give a try to deque as the default container.
14102
b2d52318
AD
141032002-05-02 Akim Demaille <akim@epita.fr>
14104
14105 * data/bison.simple (yyparse): Do not implement @$ = @1.
14106 (YYLLOC_DEFAULT): Adjust to do it.
14107 * doc/bison.texinfo (Location Default Action): Fix.
14108
3a8b4109
AD
141092002-05-02 Akim Demaille <akim@epita.fr>
14110
14111 * src/reader.c (parse_braces): Merge into...
14112 (parse_action): this.
14113
84614e13
AD
141142002-05-02 Akim Demaille <akim@epita.fr>
14115
14116 * configure.in (ALL_LINGUAS): Remove.
14117 * po/LINGUAS, hr.po: New.
14118
fdbcd8e2
AD
141192002-05-02 Akim Demaille <akim@epita.fr>
14120
14121 Remove the so called hairy (semantic) parsers.
14122
14123 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14124 * src/gram.h, src/gram.c (semantic_parser): Remove.
14125 (rule_t): Remove the guard and guard_line members.
14126 * src/lex.h (token_t): remove tok_guard.
14127 * src/options.c (option_table): Remove %guard and %semantic_parser
14128 support.
14129 * src/output.c, src/output.h (guards_output): Remove.
14130 (prepare): Adjust.
14131 (token_definitions_output): Don't output the `T'
14132 tokens (???).
14133 (output_skeleton): Don't output the guards.
14134 * src/files.c, src/files.c (attrsfile): Remove.
14135 * src/reader.c (symbol_list): Remove the guard and guard_line
14136 members.
14137 Adjust dependencies.
14138 (parse_guard): Remove.
14139 * data/bison.hairy: Remove.
14140 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14141 BISON_HAIRY.
14142
82b6cb3f
AD
141432002-05-02 Akim Demaille <akim@epita.fr>
14144
14145 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14146 (parse_guard): Rename the formal argument `stack_offset' as
14147 `rule_length', which is more readable.
14148 Adjust callers.
14149 (copy_at, copy_dollar): Instead of outputting the hard coded
14150 values of $$, $n and so forth, output invocation to b4_lhs_value,
14151 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
14152 Note: this patch partially drops `semantic-parser' support: it
14153 always does `rule_length - n', where semantic parsers ought to
14154 always use `-n'.
82b6cb3f
AD
14155 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14156 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14157
6cbfbcc5
AD
141582002-05-02 Akim Demaille <akim@epita.fr>
14159
14160 * configure.in (AC_INIT): Bump to 1.49b.
14161 (AM_INIT_AUTOMAKE): Short invocation.
14162
b8548114
AD
141632002-05-02 Akim Demaille <akim@epita.fr>
14164
14165 Version 1.49a.
14166
c20cd1fa
AD
141672002-05-01 Akim Demaille <akim@epita.fr>
14168
14169 * src/skeleton.h: Remove.
14170
8a9566d4
AD
141712002-05-01 Akim Demaille <akim@epita.fr>
14172
14173 * src/skeleton.h: Fix the #endif.
14174 Reported by Magnus Fromreide.
14175
8c6d399a
PE
141762002-04-26 Paul Eggert <eggert@twinsun.com>
14177
14178 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14179 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 14180 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 14181
2b7ed18a
RA
141822002-04-25 Robert Anisko <robert@lrde.epita.fr>
14183
14184 * src/scan-skel.l: Postprocess quadrigraphs.
14185
14186 * src/reader.c (copy_character): New function, used to output
14187 single characters while replacing `[' and `]' with quadrigraphs, to
14188 avoid troubles with M4 quotes.
14189 (copy_comment): Output characters with copy_character.
14190 (read_additionnal_code): Likewise.
14191 (copy_string2): Likewise.
14192 (copy_definition): Likewise.
14193
14194 * tests/calc.at: Exercise M4 quoting.
14195
34a89c50
AD
141962002-04-25 Akim Demaille <akim@epita.fr>
14197
14198 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14199 between `!' and the command.
14200 Reported by Paul Eggert.
14201
0dd1580a
RA
142022002-04-24 Robert Anisko <robert@lrde.epita.fr>
14203
14204 * tests/calc.at: Exercise prologue splitting.
14205
14206 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14207 `b4_post_prologue' instead of `b4_prologue'.
14208
14209 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14210 muscles.
14211 (output): Free pre_prologue_obstack and post_prologue_obstack.
14212 * src/files.h, src/files.c (attrs_obstack): Remove.
14213 (pre_prologue_obstack, post_prologue_obstack): New.
14214 * src/reader.c (copy_definition): Add a parameter to specify the
14215 obstack to fill, instead of using attrs_obstack unconditionally.
14216 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14217 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14218
83c1796f
PE
142192002-04-23 Paul Eggert <eggert@twinsun.com>
14220
14221 * data/bison.simple: Remove unnecessary commentary and white
14222 space differences from 1_29-branch.
14223 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14224
14225 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14226 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14227 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14228 constructors or destructors.
14229
14230 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14231
1207eeac
AD
142322002-04-23 Akim Demaille <akim@epita.fr>
14233
14234 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14235 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14236 location with columns.
14237 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14238 All reported by Paul Eggert.
14239
78ab8f67
AD
142402002-04-22 Akim Demaille <akim@epita.fr>
14241
14242 * src/reduce.c (dump_grammar): Move to...
14243 * src/gram.h, src/gram.c (grammar_dump): here.
14244 Be sure to separate long item numbers.
14245 Don't read the members of a rule's prec if its nil.
14246
133c20e2
AD
142472002-04-22 Akim Demaille <akim@epita.fr>
14248
14249 * src/output.c (table_size, table_grow): New.
14250 (MAXTABLE): Remove, replace uses with table_size.
14251 (pack_vector): Instead of dying when the table is too big, grow it.
14252
9515e8a7
AD
142532002-04-22 Akim Demaille <akim@epita.fr>
14254
14255 * data/bison.simple (yyr1): Its type is that of a token number.
14256 * data/bison.c++ (r1_): Likewise.
14257 * tests/regression.at (Web2c Actions): Adjust.
14258
23c5a174
AD
142592002-04-22 Akim Demaille <akim@epita.fr>
14260
14261 * src/reader.c (token_translations_init): 256 is now the default
14262 value for the error token, i.e., it will be assigned another
14263 number if the user assigned 256 to one of her tokens.
14264 (reader): Don't force 256 to error.
14265 * doc/bison.texinfo (Symbols): Adjust.
14266 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14267 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14268 etc. instead of 10, 20, 30 (which was used to `jump' over error
14269 (256) and undefined (2)).
14270
5fbb0954
AD
142712002-04-22 Akim Demaille <akim@epita.fr>
14272
14273 Propagate more token_number_t.
14274
14275 * src/gram.h (token_number_as_item_number)
14276 (item_number_as_token_number): New.
14277 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14278 Use it to create output_item_number_table and
14279 output_token_number_table.
14280 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14281 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14282 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14283 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14284
4f940944
AD
142852002-04-22 Akim Demaille <akim@epita.fr>
14286
14287 * src/output.h, src/output.c (get_lines_number): Remove.
14288
3ded9a63
AD
142892002-04-19 Akim Demaille <akim@epita.fr>
14290
14291 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14292 as Lex/Flex'.
14293 (Debugging): More details about enabling the debugging features.
14294 (Table of Symbols): Describe $$, $n, @$, and @n.
14295 Suggested by Tim Josling.
14296
e0c471a9
AD
142972002-04-19 Akim Demaille <akim@epita.fr>
14298
14299 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14300
fecc10cd
AD
143012002-04-10 Akim Demaille <akim@epita.fr>
14302
14303 * src/system.h: Rely on HAVE_LIMITS_H.
14304 Suggested by Paul Eggert.
14305
51dec47b
AD
143062002-04-09 Akim Demaille <akim@epita.fr>
14307
14308 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14309 full stderr, and strip it according to the bison options, instead
14310 of composing the error message from different bits.
14311 This makes it easier to check for several error messages.
14312 Adjust all the invocations.
14313 Add an invocation exercising the error token.
14314 Add an invocation demonstrating a stupid error message.
14315 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14316 Adjust the tests.
14317 Error message are for stderr, not stdout.
14318
007a50a4
AD
143192002-04-09 Akim Demaille <akim@epita.fr>
14320
14321 * src/gram.h, src/gram.c (error_token_number): Remove, use
14322 errtoken->number.
14323 * src/reader.c (reader): Don't specify the user token number (2)
14324 for $undefined, as it uselessly prevents using it.
14325 * src/gram.h (token_number_t): Move to...
14326 * src/symtab.h: here.
14327 (state_t.number): Is a token_number_t.
14328 * src/print.c, src/reader.c: Use undeftoken->number instead of
14329 hard coded 2.
14330 (Even though this 2 is not the same as above: the number of the
14331 undeftoken remains being 2, it is its user token number which
14332 might not be 2).
14333 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14334 `user_token_number_max'.
14335 Output `undef_token_number'.
14336 * data/bison.simple, data/bison.c++: Use them.
14337 Be sure to map invalid yylex return values to
14338 `undef_token_number'. This saves us from gratuitous SEGV.
14339
14340 * tests/conflicts.at (Solved SR Conflicts)
14341 (Unresolved SR Conflicts): Adjust.
14342 * tests/regression.at (Web2c Actions): Adjust.
14343
06446ccf
AD
143442002-04-08 Akim Demaille <akim@epita.fr>
14345
14346 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14347 Adding #line.
14348 Remove the duplicate `typedefs'.
14349 (RhsNumberType): Fix the declaration and various other typos.
14350 Use __ofile__.
14351 * data/bison.simple: Use __ofile__.
14352 * src/scan-skel.l: Handle __ofile__.
14353
62a3e4f0
AD
143542002-04-08 Akim Demaille <akim@epita.fr>
14355
14356 * src/gram.h (item_number_t): New, the type of item numbers in
14357 RITEM. Note that it must be able to code symbol numbers as
14358 positive number, and the negation of rule numbers as negative
14359 numbers.
14360 Adjust all dependencies (pretty many).
14361 * src/reduce.c (rule): Remove this `short *' pointer: use
14362 item_number_t.
14363 * src/system.h (MINSHORT, MAXSHORT): Remove.
14364 Include `limits.h'.
14365 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14366 (shortcpy): Remove.
14367 (MAXTABLE): Move to...
14368 * src/output.c (MAXTABLE): here.
14369 (prepare_rules): Use output_int_table to output rhs.
14370 * data/bison.simple, data/bison.c++: Adjust.
14371 * tests/torture.at (Big triangle): Move the limit from 254 to
14372 500.
14373 * tests/regression.at (Web2c Actions): Ajust.
14374
14375 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14376 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14377 passes, but produces negative #line number, once fixed, GCC is
14378 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14379 C), it passes.
14380 * src/state.h (state_h): Code input lines on ints, not shorts.
14381
bb88b0fc
AD
143822002-04-08 Akim Demaille <akim@epita.fr>
14383
14384 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14385 and then the grammar.
14386
9a636f47
AD
143872002-04-08 Akim Demaille <akim@epita.fr>
14388
14389 * src/system.h: No longer using strndup.
14390
680e8701
AD
143912002-04-07 Akim Demaille <akim@epita.fr>
14392
14393 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14394 * src/output.c (output_table_data): Return the longest number.
14395 (prepare_tokens): Output `token_number_max').
14396 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14397 New.
14398 Use them to define yy_token_number_type/TokenNumberType.
14399 Use this type for yytranslate.
14400 * tests/torture.at (Big triangle): Push the limit from 124 to
14401 253.
14402 * tests/regression.at (Web2c Actions): Adjust.
14403
817e9f41
AD
144042002-04-07 Akim Demaille <akim@epita.fr>
14405
14406 * tests/torture.at (Big triangle): New.
14407 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14408 * tests/existing.at: here.
14409
5123689b
AD
144102002-04-07 Akim Demaille <akim@epita.fr>
14411
14412 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14413 nritems.
14414 Adjust dependencies.
14415
f3849179
AD
144162002-04-07 Akim Demaille <akim@epita.fr>
14417
14418 * src/reader.c: Normalize increments to prefix form.
14419
bd02036a
AD
144202002-04-07 Akim Demaille <akim@epita.fr>
14421
14422 * src/reader.c, symtab.c: Remove debugging code.
14423
db8837cb
AD
144242002-04-07 Akim Demaille <akim@epita.fr>
14425
14426 Rename all the `bucket's as `symbol_t'.
14427
14428 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14429 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14430 * src/symtab.c, src/symtab.h (bucket): Rename as...
14431 (symbol_t): this.
14432 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14433 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14434 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14435 (buckets_new, buckets_free, buckets_do): Rename as...
14436 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14437 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14438 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14439 (symbols_new, symbols_free, symbols_do): these.
14440
72a23c97
AD
144412002-04-07 Akim Demaille <akim@epita.fr>
14442
14443 Use lib/hash for the symbol table.
14444
14445 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14446 EOF.
14447 * src/lex.c (lex): Set the `number' member of new terminals.
14448 * src/reader.c (bucket_check_defined, bucket_make_alias)
14449 (bucket_check_alias_consistence, bucket_translation): New.
14450 (reader, grammar_free, readgram, token_translations_init)
14451 (packsymbols): Adjust.
14452 (reader): Number the predefined tokens.
14453 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14454 for predefined tokens.
14455 * src/symtab.h (bucket): Remove all the hash table related
14456 members.
14457 * src/symtab.c (symtab): Replace by...
14458 (bucket_table): this.
14459 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14460 (buckets_new, buckets_do): New.
14461
280a38c3
AD
144622002-04-07 Akim Demaille <akim@epita.fr>
14463
14464 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14465 (start_symbol, max_user_token_number, semantic_parser)
14466 (error_token_number): Initialize.
14467 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14468 Initialize.
14469 (reader): Don't.
14470 (errtoken, eoftoken, undeftoken, axiom): Extern.
14471
03b31c0c
AD
144722002-04-07 Akim Demaille <akim@epita.fr>
14473
14474 * src/gram.h (rule_s): prec and precsym are now pointers
14475 to the bucket giving the priority/associativity.
14476 Member `associativity' removed: useless.
14477 * src/reduce.c, src/conflicts.c: Adjust.
14478
8b3df748
AD
144792002-04-07 Akim Demaille <akim@epita.fr>
14480
14481 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14482 Properly escape the symbols' TAG when outputting them.
14483
e601aa1d
AD
144842002-04-07 Akim Demaille <akim@epita.fr>
14485
14486 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14487
b0299a2e
AD
144882002-04-07 Akim Demaille <akim@epita.fr>
14489
14490 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14491 (LArule): this, which is an array to rule_t*.
14492 * src/print.c, src/conflicts.c: Adjust.
14493
d7e1f00c
AD
144942002-04-07 Akim Demaille <akim@epita.fr>
14495
14496 * src/gram.h (rule_t): Rename `number' as `user_number'.
14497 `number' is a new member.
14498 Adjust dependencies.
14499 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14500
cc9305dd
AD
145012002-04-07 Akim Demaille <akim@epita.fr>
14502
14503 As a result of the previous patch, it is no longer needed
14504 to reorder ritem itself.
14505
14506 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14507
b0940840
AD
145082002-04-07 Akim Demaille <akim@epita.fr>
14509
14510 Be sure never to walk through RITEMS, but use only data related to
14511 the rules themselves. RITEMS should be banished.
14512
14513 * src/output.c (output_token_translations): Rename as...
14514 (prepare_tokens): this.
14515 In addition to `translate', prepare the muscles `tname' and
14516 `toknum', which were handled by...
14517 (output_rule_data): this.
14518 Remove, and move the remainder of its outputs into...
14519 (prepare_rules): this new routines, which also merges content from
14520 (output_gram): this.
14521 (prepare_rules): Be sure never to walk through RITEMS.
14522 (output_stos): Rename as...
14523 (prepare_stos): this.
14524 (output): Always invoke prepare_states, after all, just don't use it
14525 in the output if you don't need it.
14526
643a5994
AD
145272002-04-07 Akim Demaille <akim@epita.fr>
14528
14529 * src/LR0.c (new_state): Display `nstates' as the name of the
14530 newly created state.
14531 Adjust to initialize first_state and last_state if needed.
14532 Be sure to distinguish the initial from the final state.
14533 (new_states): Create the itemset of the initial state, and use
14534 new_state.
14535 * src/closure.c (closure): Now that the initial state has its
14536 items properly set, there is no need for a special case when
14537 creating `ruleset'.
14538
14539 As a result, now the rule 0, reducing to $axiom, is visible in the
14540 outputs. Adjust the test suite.
14541
14542 * tests/conflicts.at (Solved SR Conflicts)
14543 (Unresolved SR Conflicts): Adjust.
14544 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14545 * tests/conflicts.at (S/R in initial): New.
14546
b4c4ccc2
AD
145472002-04-07 Akim Demaille <akim@epita.fr>
14548
14549 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14550 the RHS of the rules.
14551 * src/output.c (output_gram): Likewise.
14552
bba97eb2
AD
145532002-04-07 Akim Demaille <akim@epita.fr>
14554
14555 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14556 bucket.
14557 Adjust all dependencies.
14558 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14559 `number' of the buckets too.
14560 * src/gram.h: Include `symtab.h'.
14561 (associativity): Move to...
14562 * src/symtab.h: here.
14563 No longer include `gram.h'.
14564
c3b407f4
AD
145652002-04-07 Akim Demaille <akim@epita.fr>
14566
14567 * src/gram.h, src/gram.c (rules_rhs_length): New.
14568 (ritem_longest_rhs): Use it.
14569 * src/gram.h (rule_t): `number' is a new member.
14570 * src/reader.c (packgram): Set it.
14571 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14572 the end of `rules', and count them out of `nrules'.
14573 (reduce_output, dump_grammar): Adjust.
14574 * src/print.c (print_grammar): It is no longer needed to check for
14575 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14576 * tests/reduce.at (Reduced Automaton): New test.
14577
11652ab3
AD
145782002-04-07 Akim Demaille <akim@epita.fr>
14579
14580 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14581 lacking `+ 1' to nrules, Bison reported as useless a token if it
14582 was used solely to set the precedence of the last rule...
14583
26b23c1a
AD
145842002-04-07 Akim Demaille <akim@epita.fr>
14585
14586 * data/bison.c++, data/bison.simple: Don't output the current file
14587 name in #line, to avoid useless diffs between two identical
14588 outputs under different names.
14589
18bcecb0
AD
145902002-04-07 Akim Demaille <akim@epita.fr>
14591
14592 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14593 Normalize loops to using `< nrules + 1', not `<= nrules'.
14594
fa770c86
AD
145952002-04-07 Akim Demaille <akim@epita.fr>
14596
14597 * TODO: Update.
14598
d9b739c3
AD
145992002-04-07 Akim Demaille <akim@epita.fr>
14600
14601 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14602 bucket.value as bucket.number.
14603
99013900
AD
146042002-04-07 Akim Demaille <akim@epita.fr>
14605
14606 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14607 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14608 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14609 RHS, instead of being an index in RITEMS.
14610
e966383b
PE
146112002-04-04 Paul Eggert <eggert@twinsun.com>
14612
14613 * doc/bison.texinfo: Update copyright date.
14614 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14615 (Symbols): Warn about running Bison in one character set,
14616 but compiling and/or running in an incompatible one.
14617 Warn about character code 256, too.
14618
146192002-04-03 Paul Eggert <eggert@twinsun.com>
14620
14621 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14622 YYERROR_VERBOSE is nonzero, not whether it is defined.
14623
14624 Merge changes from bison-1_29-branch.
c307773e 14625
8d6c48b9
PE
146262002-03-20 Paul Eggert <eggert@twinsun.com>
14627
14628 Merge fixes from Debian bison_1.34-1.diff.
14629
14630 * configure.in (AC_PREREQ): 2.53.
14631
e53c6322
AD
146322002-03-20 Akim Demaille <akim@epita.fr>
14633
14634 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14635
9ffbeca7
PE
146362002-03-19 Paul Eggert <eggert@twinsun.com>
14637
21db0b2a
PE
14638 * src/bison.simple (YYCOPY): New macro.
14639 (YYSTACK_RELOCATE): Use it.
14640 Remove Type arg; no longer needed. All callers changed.
14641 (yymemcpy): Remove; no longer needed.
14642
9ffbeca7
PE
14643 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14644 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14645
642cb8f8
AD
146462002-03-19 Akim Demaille <akim@epita.fr>
14647
14648 Test and fix the #line outputs.
14649
14650 * tests/atlocal.at (GCC): New.
14651 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 14652 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
14653 (Action synch line, Epilogue synch line): New tests.
14654 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14655 * data/bison.simple, data/bison.c++: Use it.
14656
3c31a486
AD
146572002-03-19 Akim Demaille <akim@epita.fr>
14658
14659 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14660 (Solved SR Conflicts, %expect not enough, %expect right)
14661 (%expect too much): Move to...
14662 * tests/conflicts.at: this new file.
14663
0d8bed56
AD
146642002-03-19 Akim Demaille <akim@epita.fr>
14665
14666 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14667 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14668 that we can move to enums for instance.
14669 * src/output.c (token_definitions_output): Output a list of
14670 `token-name, token-number' instead of the #define.
14671 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14672
9208d17f
AD
146732002-03-14 Akim Demaille <akim@epita.fr>
14674
14675 Use Gettext 0.11.1.
14676
af27eacb
RA
146772002-03-09 Robert Anisko <robert@lrde.epita.fr>
14678
14679 * data/bison.c++: Make the user able to add members to the generated
14680 parser by subclassing.
14681
9101a310
RA
146822002-03-05 Robert Anisko <robert@lrde.epita.fr>
14683
14684 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14685 a character.
14686 Reported by Nicolas Tisserand and Nicolas Burrus.
14687
fff9bf0b
RA
146882002-03-04 Robert Anisko <robert@lrde.epita.fr>
14689
14690 * src/reader.c: Warn about lacking semi-colons, do not complain.
14691
64dba31e
RA
146922002-03-04 Robert Anisko <robert@lrde.epita.fr>
14693
14694 * data/bison.c++: Remove a debug line.
14695
374f5a14
RA
146962002-03-04 Robert Anisko <robert@lrde.epita.fr>
14697
14698 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14699 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14700 provide a default implementation.
14701
bfcf1f3a
AD
147022002-03-04 Akim Demaille <akim@epita.fr>
14703
14704 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14705 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14706 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14707 * tests/semantic.at (Parsing Guards): Similarly.
14708 * src/reader.at (readgram): Complain if the last rule is not ended
14709 with a semi-colon.
14710
65ccf9fc
AD
147112002-03-04 Akim Demaille <akim@epita.fr>
14712
14713 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14714 * src/closure.c: here.
14715 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14716 RTC.
14717 * src/warshall.h, src/warshall.c: Remove.
14718 * tests/sets.at (Broken Closure): Adjust.
14719
d0039cbc
AD
147202002-03-04 Akim Demaille <akim@epita.fr>
14721
14722 * src/output.c (output_skeleton): tempdir is const.
14723 bytes_read is unused.
14724
345cea78
AD
147252002-03-04 Akim Demaille <akim@epita.fr>
14726
14727 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14728 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14729 Update.
14730 From Michael Hayes.
14731
564801f7
AD
147322002-03-04 Akim Demaille <akim@epita.fr>
14733
14734 * src/closure.c (closure): `r' is unused.
14735
e5352bc7
AD
147362002-03-04 Akim Demaille <akim@epita.fr>
14737
14738 * tests/sets.at (Broken Closure): Add the ending `;'.
14739 * src/reader.at (readgram): Complain if a rule is not ended with a
14740 semi-colon.
14741
914feea9
AD
147422002-03-04 Akim Demaille <akim@epita.fr>
14743
14744 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14745 (count_sr_conflicts): Use bitset_count.
14746 * src/reduce.c (inaccessable_symbols): Ditto.
14747 (bits_size): Remove.
14748 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14749
f0250de6
AD
147502002-03-04 Akim Demaille <akim@epita.fr>
14751
14752 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14753 * src/reduce.c: Remove the `bitset_zero's following the
14754 `bitset_create's, as now it is performed by the latter.
14755
ef017502
AD
147562002-03-04 Akim Demaille <akim@epita.fr>
14757
14758 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14759 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14760 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14761 latest sources from Michael.
14762
76514394
AD
147632002-03-04 Akim Demaille <akim@epita.fr>
14764
14765 * src/output.c (output): Don't free the grammar.
14766 * src/reader.c (grammar_free): New.
14767 * src/main.c (main): Call it and don't free symtab here.
14768
55024580
AD
147692002-03-04 Akim Demaille <akim@epita.fr>
14770
14771 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14772 before returning.
14773 Reported by Benoit Perrot.
14774
f9abaa2c
AD
147752002-03-04 Akim Demaille <akim@epita.fr>
14776
14777 Use bitset operations when possible, not loops over bits.
14778
14779 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14780 bitset_or.
14781 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14782 * src/reduce.c (useless_nonterminals): Formatting changes.
14783 * src/warshall.c (TC): Use bitset_or.
14784
0e721e75
AD
147852002-03-04 Akim Demaille <akim@epita.fr>
14786
14787 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14788 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14789 Ditto.
14790
0fb1ffb1
AD
147912002-03-04 Akim Demaille <akim@epita.fr>
14792
14793 * src/lalr.c (F): Now a bitset*.
14794 Adjust all dependencies.
14795
b86796bf
AD
147962002-03-04 Akim Demaille <akim@epita.fr>
14797
14798 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14799 Adjust all dependencies.
14800
602bbf31
AD
148012002-03-04 Akim Demaille <akim@epita.fr>
14802
14803 * src/L0.c, src/LR0.h (nstates): Be size_t.
14804 Adjust comparisons (signed vs unsigned).
14805 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14806 bitset*.
14807 Adjust all dependencies.
14808
d8a0245c
AD
148092002-03-04 Akim Demaille <akim@epita.fr>
14810
14811 * src/closure.c (firsts): Now, also a bitset.
14812 Adjust all dependencies.
14813 (varsetsize): Remove, now unused.
14814 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14815
34ba9743
AD
148162002-03-04 Akim Demaille <akim@epita.fr>
14817
14818 * src/print.c: Convert to use bitset.h, not hand coded iterations
14819 over ints.
14820
ed86e78c
AD
148212002-03-04 Akim Demaille <akim@epita.fr>
14822
14823 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14824
dfdb1797
AD
148252002-03-04 Akim Demaille <akim@epita.fr>
14826
14827 * src/closure.c (ruleset): Be a bitset.
14828 (rulesetsize): Remove.
14829
7086e707
AD
148302002-03-04 Akim Demaille <akim@epita.fr>
14831
14832 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14833 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14834 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14835 * src/closure.c (fderives): Be an array of bitsets.
14836
98254360
RA
148372002-02-28 Robert Anisko <robert@lrde.epita.fr>
14838
14839 * data/bison.c++: Merge the two generated headers. Insert a copyright
14840 notice in each output file.
14841
a75c057f
AD
148422002-02-28 Akim Demaille <akim@epita.fr>
14843
14844 * data/bison.c++: Copy the prologue of bison.simple to fetch
14845 useful M4 definitions, such as b4_header_guard.
14846
06b00abc
AD
148472002-02-25 Akim Demaille <akim@epita.fr>
14848
14849 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
14850 translator friendly scheme for the bgr
14851 copyright notice.
06b00abc 14852
70e7d534
AD
148532002-02-25 Akim Demaille <akim@epita.fr>
14854
14855 * src/output.c (header_output): Remove, now handled completely via
14856 M4.
14857
abe017f6
AD
148582002-02-25 Akim Demaille <akim@epita.fr>
14859
14860 * m4/m4.m4: New, from CVS Autoconf.
14861 * configure.in: Invoke it.
14862 * src/output.c (output_skeleton): Use its result instead of the
14863 hard coded name.
14864
381fb12e
AD
148652002-02-25 Akim Demaille <akim@epita.fr>
14866
14867 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14868 Fileutils 4.1.5.
14869 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14870 * src/output.c (output_skeleton): Use mkstemp to create a real
14871 temporary file.
14872 Move the filling of `skeleton' and its muscle to...
14873 (prepare): here.
14874 (output): Move the definition of the prologue muscle to...
14875 (prepare): here.
14876 * src/system.h (DEFAULT_TMPDIR): New.
14877
6f38107f
PE
148782002-02-14 Paul Eggert <eggert@twinsun.com>
14879
14880 Remove the support for C++ namespace cleanliness; it was
14881 causing more problems than it was curing, since it didn't work
14882 properly on some nonstandard C++ compilers. This can wait
14883 for a proper C++ parser.
14884
14885 * NEWS: Document this.
14886 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14887 of C++, as it's treated like C now.
14888 * src/bison.simple (YYSTD): Remove.
14889 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14890 Treat C++ just like Standard C instead of trying to support
14891 namespace cleanliness.
14892
80cce3da
AD
148932002-02-14 Akim Demaille <akim@epita.fr>
14894
14895 * tests/regression.at (else): Adjust to Andreas' change.
14896
842e8679
AD
148972002-02-14 Akim Demaille <akim@epita.fr>
14898
14899 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14900
4bda3f10
AD
149012002-02-13 Andreas Schwab <schwab@suse.de>
14902
14903 * src/output.c (output_rule_data): Don't output NULL, it might
14904 not be defined yet.
14905
4162fa07 149062002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 14907
4162fa07
RA
14908 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14909 (Copyright notice): Update.
b418ecd8 14910
bd16a5dc
AD
149112002-02-11 Akim Demaille <akim@epita.fr>
14912
14913 * tests/regression.at (%nonassoc and eof): Don't include
14914 nonportable headers.
14915
8d69a1a3
RA
149162002-02-08 Robert Anisko <robert@lrde.epita.fr>
14917
14918 * data/bison.c++: Correct error recovery. Make the user able to
14919 initialize the starting location.
14920
9b2d0677
AD
149212002-02-07 Akim Demaille <akim@epita.fr>
14922
14923 * tests/input.at: New.
14924
69e2658b
RA
149252002-02-07 Robert Anisko <robert@lrde.epita.fr>
14926
14927 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 14928 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
14929 directives around tables only needed for debugging.
14930
4aacc3a7
RA
149312002-02-07 Robert Anisko <robert@lrde.epita.fr>
14932
14933 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14934 C++ parsers.
14935 (yy::b4_name::parse): Use print_.
14936
762a801e
RA
149372002-02-07 Robert Anisko <robert@lrde.epita.fr>
14938
14939 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14940
4bb2bc3f
RA
149412002-02-07 Robert Anisko <robert@lrde.epita.fr>
14942
14943 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14944 C++ parsers.
14945 (yy::b4_name::parse): Build verbose error messages, and use error_.
14946
6b45a3ca
RA
149472002-02-06 Robert Anisko <robert@lrde.epita.fr>
14948
14949 * data/bison.c++: Fix m4 quoting in comments.
14950
50997c6e
RA
149512002-02-06 Robert Anisko <robert@lrde.epita.fr>
14952
14953 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14954 not expanded by m4.
14955
3f3eed27
AD
149562002-02-05 Akim Demaille <akim@epita.fr>
14957
14958 * data/bison.c++: Adjust to the M4 back end.
14959 More is certainly needed.
14960
be2a1a68
AD
149612002-02-05 Akim Demaille <akim@epita.fr>
14962
14963 Give a try to M4 as a back end.
14964
14965 * lib/readpipe.c: New, from wdiff.
14966 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14967 BISON_HAIRY.
14968 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14969 specific values. Now it is m4 that performs the lookup.
14970 * src/parse-skel.y: Remove.
14971 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14972 * src/output.c (actions_output, guards_output)
14973 (token_definitions_output): No longer keeps track of the output
14974 line number, hence remove the second argument.
14975 (guards_output): Check against the guard member of a rule, not the
14976 action member.
14977 Adjust callers.
14978 (output_skeleton): Don't look for the skeleton location, let m4 do
14979 that.
14980 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14981 file will be used.
14982 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14983 (prepare): Given that for the time being changesyntax is not
14984 usable in M4, rename the muscles using `-' to `_'.
14985 Define `defines_flag', `output_parser_name' and `output_header_name'.
14986 * src/output.h (actions_output, guards_output)
14987 (token_definitions_output): Adjust prototypes.
14988 * src/scan-skel.l: Instead of scanning the skeletons, it now
14989 processes the output of m4: `__oline__' and `#output'.
14990 * data/bison.simple: Adjust to be used by M4(sugar).
14991 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14992 to date.
14993 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14994 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
14995 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
14996 shamelessly stolen from CVS Autoconf.
14997
beda758b
AD
149982002-02-05 Akim Demaille <akim@epita.fr>
14999
15000 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15001 * configure.in: Check for the declarations of free and malloc.
15002 * src/muscle_tab.c: Adjust.
15003
5ece6d43
AD
150042002-02-05 Akim Demaille <akim@epita.fr>
15005
15006 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15007 which have no values.
15008
5bb18f9a
AD
150092002-02-05 Akim Demaille <akim@epita.fr>
15010
15011 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15012 * data/: here.
15013
894dd62e
PE
150142002-01-29 Paul Eggert <eggert@twinsun.com>
15015
15016 * src/bison.simple (YYSIZE_T): Do not define merely because
15017 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15018 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15019
82841af7
AD
150202002-01-27 Akim Demaille <akim@epita.fr>
15021
15022 Fix `%nonassoc and eof'.
15023
15024 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15025 which were not properly copied! Replace
15026 memcpy (res->errs, src->errs, src->nerrs);
15027 with
15028 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15029 !!!
15030 * tests/regression.at (%nonassoc and eof): Adjust to newest
15031 Autotest: `.' is not in the PATH.
15032
318b76e9
AD
150332002-01-27 Akim Demaille <akim@epita.fr>
15034
15035 * tests/sets.at (AT_EXTRACT_SETS): New.
15036 (Nullable): Use it.
15037 (Firsts): New.
15038
30d2f3d5
AD
150392002-01-26 Akim Demaille <akim@epita.fr>
15040
15041 * tests/actions.at, tests/calc.at, tests/headers.at,
15042 * tests/torture.at: Adjust to the newest Autotest which no longer
15043 forces `.' in the PATH.
15044
30f8c395
AD
150452002-01-25 Akim Demaille <akim@epita.fr>
15046
15047 * tests/regression.at (%nonassoc and eof): New.
15048 Suggested by Robert Anisko.
15049
29ae55f1
AD
150502002-01-24 Akim Demaille <akim@epita.fr>
15051
15052 Bison dumps core when trying to complain about broken input files.
15053 Reported by Cris van Pelt.
15054
15055 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15056 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15057 into...
15058 (Invalid inputs): Strengthen: exercise parse_percent_token.
15059
2b548aa6
RA
150602002-01-24 Robert Anisko <robert.anisko@epita.fr>
15061
15062 * src/Makefile.am: Add bison.c++.
15063 * src/bison.c++: New skeleton.
15064
bb0146c2
AD
150652002-01-21 Paolo Bonzini <bonzini@gnu.org>
15066
15067 * po/it.po: New.
15068
bec30531
AD
150692002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15070
15071 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15072
fc6edc45
MA
150732002-01-20 Marc Autret <marc@gnu.org>
15074
15075 * src/files.c (compute_output_file_names): Fix
15076
5e5d5415
MA
150772002-01-20 Marc Autret <marc@gnu.org>
15078
15079 * tests/output.at: New test.
15080 * src/files.c (compute_base_names): Don't map extensions when
15081 the YACC flag is set, use defaults.
15082 Reported by Evgeny Stambulchik.
15083
44ea3fbd
MA
150842002-01-20 Marc Autret <marc@gnu.org>
15085
ba0fe3c7
PE
15086 * src/system.h: Need to define __attribute__ away for non-GCC
15087 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
15088 Suggested by Albert Chin-A-Young.
15089
338963d1
TVH
150902002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15091
15092 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15093 canonical definition.
15094 * src/system.h: Use the canonical definition for PARAMS (avoids
15095 a conflict with the macro from lib/hash.h).
15096
c57b2479
AD
150972002-01-11 Akim Demaille <akim@epita.fr>
15098
15099 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 15100 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 15101
b85810ae
AD
151022002-01-09 Akim Demaille <akim@epita.fr>
15103
15104 * src/files.c, src/files.h (output_infix): New.
15105 (tab_extension): Remove.
15106 (compute_base_names): Compute the former, drop the latter.
15107 * src/output.c (prepare): Insert the muscles `output-infix', and
15108 `output-suffix'.
15109 * src/parse-skel.y (string, string.1): New.
15110 (section.header): Use it.
15111 (section.yacc): Remove.
15112 (prefix): Remove too.
15113 * src/scan-skel.l: Adjust.
15114 * src/bison.simple, src/bison.hairy: Adjust.
15115
cae60122
AD
151162002-01-09 Akim Demaille <akim@epita.fr>
15117
15118 * configure.in (WERROR_CFLAGS): Compute it.
15119 * src/Makefile.am (CFLAGS): Pass it.
15120 * tests/atlocal.in (CFLAGS): Idem.
15121 * src/files.c: Fix a few warnings.
15122 (get_extension_index): Remove, unused.
15123
ae404801
AD
151242002-01-08 Akim Demaille <akim@epita.fr>
15125
15126 * src/getargs.c (AS_FILE_NAME): New.
15127 (getargs): Use it to convert DOSish file names.
15128 * src/files.c (base_name): Rename as full_base_name to avoid
15129 clashes with `base_name ()'.
15130 (filename_split): New.
15131 (compute_base_names): N-th rewrite, using filename_split.
15132
22312b71
AD
151332002-01-08 Akim Demaille <akim@epita.fr>
15134
15135 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15136 New, stolen from the Fileutils 4.1.
15137 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15138 * configure.in: Check for the presence of memrchr, and of its
15139 prototype.
15140
a67cef01
TVH
151412002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15142
15143 * lib/hash.h (__P): Added definition for this macro.
15144 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15145 BUILT_SOURCES, to ensure they are generated first.
15146 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15147 %error-verbose to allow bootstrapping with bison 1.30x.
15148
2b25d624
AD
151492002-01-06 Akim Demaille <akim@epita.fr>
15150
15151 * src/reader.c (parse_braces): Don't fetch the next char, the
15152 convention is to fetch on entry.
15153 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15154 'switch' without a following semicolon.
15155 * tests/regression.at (braces parsing): New.
15156
3460813b
AD
151572002-01-06 Akim Demaille <akim@epita.fr>
15158
15159 Bison is dead wrong in its RR conflict reports.
15160
15161 * tests/torture.at (GNU Cim Grammar): New.
15162 * src/conflicts.c (count_rr_conflicts): Fix.
15163
73784c64
AD
151642002-01-06 Akim Demaille <akim@epita.fr>
15165
15166 Creating package.m4 from configure.ac causes too many problems.
15167
15168 * tests/Makefile.am (package.m4): Create it by hand,
15169 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15170
25d81090
AD
151712002-01-06 Akim Demaille <akim@epita.fr>
15172
15173 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15174 skeleton.h.
15175
a9b8959e
PE
151762002-01-04 Paul Eggert <eggert@twinsun.com>
15177
15178 * doc/bison.texinfo (Debugging):
15179 Remove YYSTDERR; it's no longer defined or used.
15180 Also, s/cstdio.h/cstdio/.
15181
25d81090
AD
151822002-01-03 Akim Demaille <akim@epita.fr>
15183
15184 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15185
1109455c
AD
151862002-01-03 Akim Demaille <akim@epita.fr>
15187
15188 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15189 tracing code to --trace, wait for a better --trace option, with
15190 args.
15191
7ea5e977
AD
151922002-01-03 Akim Demaille <akim@epita.fr>
15193
15194 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15195 The ISO C++ standard is extremely clear about it: stderr is
15196 considered a macro, not a regular symbol (see table 94 `Header
15197 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15198 Therefore std:: does not apply to it. It still does with fprintf.
15199 Also, s/cstdio.h/cstdio/.
15200
fab5b110
AD
152012002-01-03 Akim Demaille <akim@epita.fr>
15202
15203 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15204 for non system headers.
15205
aed7fd9b
AD
152062002-01-02 Akim Demaille <akim@epita.fr>
15207
15208 Equip the skeleton chain with location tracking, runtime trace,
15209 pure parser and scanner.
15210
15211 * src/parse-skel.y: Request a pure parser, locations, and prefix
15212 renaming.
15213 (%union): Having several members with the same type does not help
15214 type mismatches, simplify.
15215 (YYPRINT, yyprint): New.
15216 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15217 (skel_error): this.
15218 Handle locations.
15219 * src/scan-skel.l: Adjust to these changes.
15220 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15221 (LOCATION_PRINT, skel_control_t): New.
15222
24fad99e
AD
152232001-12-30 Akim Demaille <akim@epita.fr>
15224
15225 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15226 replace `gb' with BLANKS.
15227 * src/scan-skel.l: Adjust.
15228
a4b36db4
AD
152292001-12-30 Akim Demaille <akim@epita.fr>
15230
15231 * src/system.h: We don't need nor want bcopy.
15232 Throw away MS-DOS crap: we don't need getpid.
15233 * configure.in: We don't need strndup. It was even causing
15234 problems: because Flex includes the headers *before* us,
15235 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15236 not visible.
15237 * lib/xstrndup.c: New.
15238 * src/scan-skel.l: Use it.
15239 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15240 * src/parse-skel.y: Use %directives instead of #defines.
15241
1239777d
AD
152422001-12-30 Akim Demaille <akim@epita.fr>
15243
15244 * src/skeleton.h: New.
15245 * src/output.c (output_parser, output_master_parser): Remove, dead
15246 code.
15247 * src/output.h (get_lines_number, actions_output, guards_output)
15248 (token_definitions_output): Prototype them.
15249 * src/parse-skel.y: Add the license notice.
15250 Include output.h and skeleton.h.
15251 (process_skeleton): Returns void, and takes a single parameter.
15252 * src/scan-skel.l: Add the license notice.
15253 Include skeleton.h.
15254 Don't use %option yylineno: it seems that then Flex imagines
15255 REJECT has been used, and therefore it won't reallocate its
15256 buffers (which makes no other sense to me than a bug). It results
15257 in warnings for `unused: yy_flex_realloc'.
15258
9b3add5b
RA
152592001-12-30 Robert Anisko <robert.anisko@epita.fr>
15260
15261 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15262 (MUSCLE_INSERT_PREFIX): ...to there.
15263 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15264 (MUSCLE_INSERT_PREFIX): Move from here...
15265
15266 * src/bison.hairy: Add a section directive. Put braces around muscle
15267 names. This parser skeleton is still broken, but Bison should not
15268 choke on a bad muscle 'syntax'.
15269 * src/bison.simple: Add a section directive. Put braces around muscle
15270 names.
15271
15272 * src/files.h (strsuffix, stringappend): Add declarations.
15273 (tab_extension): Add declaration.
15274 (short_base_name): Add declaration.
15275
15276 * src/files.c (strsuffix, stringappend): No longer static. These
15277 functions are used in the skeleton parser.
15278 (tab_extension): New.
15279 (compute_base_names): Use the computations done in this function
fab5b110 15280 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
15281 names.
15282 (short_base_name): No longer static.
15283
15284 * src/output.c (output_skeleton): New.
15285 (output): Disable call to output_master_parser, and give a try to
15286 a new skeleton handling system.
15287 (guards_output, actions_output): No longer static.
15288 (token_definitions_output, get_lines_number): No longer static.
15289
15290 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15291
fab5b110 15292 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
15293 parse-skel.y.
15294
15295 * src/parse-skel.y: New file.
15296 * src/scan-skel.l: New file.
15297
b5b61c61
AD
152982001-12-29 Akim Demaille <akim@epita.fr>
15299
15300 %name-prefix is broken.
15301
15302 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15303 Adjust all dependencies.
15304 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15305 %name-prefix.
15306
15307 Renaming yylval but not yylloc is not consistent. Now we do.
15308
15309 * src/bison.simple: Prefix yylloc if used.
15310 * doc/bison.texinfo (Decl Summary): Document that.
15311
8c9a50be
AD
153122001-12-29 Akim Demaille <akim@epita.fr>
15313
15314 * doc/bison.texinfo: Promote `%long-directive' over
15315 `%long_directive'.
15316 Remove all references to fixed-output-files, yacc is enough.
15317
d99361e6
AD
153182001-12-29 Akim Demaille <akim@epita.fr>
15319
15320 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15321 user prologue. These are defaults.
15322 * tests/actions.at (Mid-rule actions): Make sure the user can
15323 define YYDEBUG and YYERROR_VERBOSE.
15324
b9cecb91
AD
153252001-12-29 Akim Demaille <akim@epita.fr>
15326
15327 * src/output.c (header_output): Don't forget to export YYLTYPE and
15328 yylloc.
15329 * tests/headers.at (export YYLTYPE): New, make sure it does.
15330 * tests/regression.at (%union and --defines, Invalid CPP headers):
15331 Move to...
15332 * tests/headers.at: here.
15333
aea13e97
AD
153342001-12-29 Akim Demaille <akim@epita.fr>
15335
15336 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15337
931394cb
AD
153382001-12-29 Akim Demaille <akim@epita.fr>
15339
15340 * tests/actions.at (Mid-rule actions): Output on a single line
15341 instead of several.
15342
704a47c4
AD
153432001-12-29 Akim Demaille <akim@epita.fr>
15344
15345 * doc/bison.texinfo: Formatting changes.
15346
091e20bb
AD
153472001-12-29 Akim Demaille <akim@epita.fr>
15348
15349 Don't store the token defs in a muscle, just be ready to output it
15350 on command. Now possible via `symbols'. Fixes a memory leak.
15351
15352 * src/output.c (token_definitions_output): New.
15353 (output_parser, header_output): Use it.
15354 * src/reader.c (symbols_save): Remove.
15355
cce71710
AD
153562001-12-29 Akim Demaille <akim@epita.fr>
15357
15358 * src/bison.simple: Do not provide a default for YYSTYPE and
15359 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15360 default.
15361
82c035a8
AD
153622001-12-29 Akim Demaille <akim@epita.fr>
15363
15364 Mid-rule actions are simply... ignored!
15365
15366 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15367 the empty-rule associated to the dummy symbol, not to the host
15368 rule.
15369 * tests/actions.at (Mid-rule actions): New.
15370
8419d367
AD
153712001-12-29 Akim Demaille <akim@epita.fr>
15372
15373 Memory leak.
15374
15375 * src/reader.c (reader): Free grammar.
15376
375d5806
AD
153772001-12-29 Akim Demaille <akim@epita.fr>
15378
15379 Memory leak.
15380
15381 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15382 since it allocates it for each state, although only one is needed.
15383 (allocate_storage): Do it here.
15384
f51cb8ff
AD
153852001-12-29 Akim Demaille <akim@epita.fr>
15386
15387 * src/options.h, src/options.c (create_long_option_table): Rename
15388 as...
15389 (long_option_table_new): this, with a clearer prototype.
15390 (percent_table): Remove, unused,
15391 * src/getargs.c (getargs): Adjust.
15392
29e88316
AD
153932001-12-29 Akim Demaille <akim@epita.fr>
15394
15395 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15396 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15397 as states.
15398
b9f71f19
AD
153992001-12-29 Akim Demaille <akim@epita.fr>
15400
15401 * src/lalr.c (build_relations): Rename `states' as `states1'.
15402 Sorry, I don't understand exactly what it is, no better name...
15403
1a2b5d37
AD
154042001-12-29 Akim Demaille <akim@epita.fr>
15405
15406 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15407 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15408 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15409 as rules.
15410
1cca533e
AD
154112001-12-29 Akim Demaille <akim@epita.fr>
15412
15413 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15414 ago.
15415
c03ae966
AD
154162001-12-29 Akim Demaille <akim@epita.fr>
15417
15418 * src/reader.c, src/reader.h (user_toknums): Remove.
15419 Adjust all users to use symbols[i]->user_token_number.
15420
5a670b1e
AD
154212001-12-29 Akim Demaille <akim@epita.fr>
15422
15423 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15424 Adjust all users to use symbols[i]->prec or ->assoc.
15425
ad949da9
AD
154262001-12-29 Akim Demaille <akim@epita.fr>
15427
15428 * src/reader.c, src/reader.h (tags): Remove.
15429 Adjust all users to use symbols[i]->tag.
15430
0e78e603
AD
154312001-12-29 Akim Demaille <akim@epita.fr>
15432
15433 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15434 and rule_table.
15435 * src/reader.c (packsymbols): Fill this table.
15436 Drop sprec.
15437 * src/conflicts.c (resolve_sr_conflict): Adjust.
15438 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15439 single table.
15440 Use symbols[i]->tag instead of tags[i].
15441
213e640e
AD
154422001-12-29 Akim Demaille <akim@epita.fr>
15443
15444 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15445 In addition, put a comment in there, to replace...
15446 * tests/regression.at (%union and C comments): Remove.
15447
e7b8bef1
AD
154482001-12-29 Akim Demaille <akim@epita.fr>
15449
15450 * tests/regression.at (Web2c Actions): Blindly move the actual
15451 output as expected output. The contents *seem* right to me, but I
15452 can't pretend reading perfectly parser tables... Nonetheless, all
15453 the other tests pass correctly, the table look OK, even though the
15454 presence of `$axiom' is to be noted: AFAICS it is useless (but
15455 harmless).
15456
b68e7744
AD
154572001-12-29 Akim Demaille <akim@epita.fr>
15458
15459 * src/reader.c (readgram): Don't add the rule 0 if there were no
15460 rules read. In other words, add it _after_ having performed
15461 grammar sanity checks.
15462 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15463
78d5bae9
AD
154642001-12-29 Akim Demaille <akim@epita.fr>
15465
15466 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15467 visible, and some states have now a different number.
15468
ff442794
AD
154692001-12-29 Akim Demaille <akim@epita.fr>
15470
15471 * src/reader.c (readgram): Bind the initial rule's lineno to that
15472 of the first rule.
15473 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15474 (Solved SR Conflicts): Adjust rule 0's line number.
15475
610ab194
AD
154762001-12-29 Akim Demaille <akim@epita.fr>
15477
15478 Fix the `GAWK Grammar' failure.
15479
15480 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15481 the reductions of the first state which was mistakenly confused
15482 with the final state because precisely final_state was initialized
15483 to 0.
15484 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15485 now noticed by Bison.
15486 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15487 have a reduction on $default.
15488
29d29c8f
AD
154892001-12-29 Akim Demaille <akim@epita.fr>
15490
15491 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15492 rule line numbers.
15493 * src/closure.c (print_closure): Likewise.
15494 * src/derives.c (print_derives): Likewise.
15495 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15496 now.
15497
7c6b64d0
AD
154982001-12-29 Akim Demaille <akim@epita.fr>
15499
15500 * src/lalr.c (lookaheads_print): New.
15501 (lalr): Call it when --trace-flag.
15502 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15503 are dumped.
15504
3d4daee3
AD
155052001-12-29 Akim Demaille <akim@epita.fr>
15506
15507 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15508 when walking through ritem, even via rule->rhs.
15509 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15510 (useful_production, useless_nonterminals): Likewise.
15511 (reduce_grammar_tables): Likewise, plus update nritems.
15512 * src/nullable.c (set_nullable): Likewise.
15513 * src/lalr.c (build_relations): Likewise.
15514 * tests/sets.at (Nullable): Adjust.
15515 Fortunately, now, the $axiom is no longer nullable.
15516
9e7f6bbd
AD
155172001-12-29 Akim Demaille <akim@epita.fr>
15518
15519 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15520 the 0-sentinel.
15521 * src/gram.c (ritem_longest_rhs): Likewise.
15522 * src/reduce.c (nonterminals_reduce): Likewise.
15523 * src/print_graph.c (print_graph): Likewise.
15524 * src/output.c (output_rule_data): Likewise.
15525 * src/nullable.c (set_nullable): Likewise.
15526
255ef638
AD
155272001-12-29 Akim Demaille <akim@epita.fr>
15528
15529 * src/output.c: Comment changes.
15530
0d8a7363
AD
155312001-12-27 Paul Eggert <eggert@twinsun.com>
15532
15533 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15534 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15535 Sparc, as they were causing more porting problems than the
15536 (minor) performance improvement was worth.
15537
15538 Also, catch up with 1.31's YYSTD.
15539
3db472b9
AD
155402001-12-27 Akim Demaille <akim@epita.fr>
15541
15542 * src/output.c (output_gram): Rely on nritems, not the
15543 0-sentinel. See below.
15544 Use -1 as separator, not 0.
15545 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15546 Rely on -1 as separator in yyrhs, instead of 0.
15547 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15548 twice `Now at end of input', therefore there are two lines less to
15549 expect.
15550
b365aa05
AD
155512001-12-27 Akim Demaille <akim@epita.fr>
15552
15553 * tests/regression.at (Unresolved SR Conflicts):
15554 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15555 below.
15556
30171f79
AD
155572001-12-27 Akim Demaille <akim@epita.fr>
15558
15559 * src/LR0.c (new_state): Recognize the final state by the fact it
15560 is reached by eoftoken.
15561 (insert_start_shifting_state, insert_eof_shifting_state)
15562 (insert_accepting_state, augment_automaton): Remove, since now
15563 these states are automatically computed from the initial state.
15564 (generate_states): Adjust.
15565 * src/print.c: When reporting a rule number to the user, substract
15566 1, so that the axiom rule is rule 0, and the first user rule is 1.
15567 * src/reduce.c: Likewise.
15568 * src/print_graph.c (print_core): For the time being, just as for
15569 the report, depend upon --trace-flags to dump the full set of
15570 items.
15571 * src/reader.c (readgram): Once the grammar read, insert the rule
15572 0: `$axiom: START-SYMBOL $'.
15573 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15574 number of the states has changed (the final state is no longer
15575 necessarily the last), catch up.
15576
75142d45
AD
155772001-12-27 Akim Demaille <akim@epita.fr>
15578
15579 Try to make the use of the eoftoken valid. Given that its value
15580 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15581 is used instead of > 0 where appropriate, (ii), depend upon nritems
15582 instead of the 0-sentinel.
15583
15584 * src/gram.h, src/gram.c (nritems): New.
15585 Expected to be duplication of nitems, but for the time being...
15586 * src/reader.c (packgram): Assert nritems and nitems are equal.
15587 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15588 * src/closure.c (print_closure, print_fderives): Likewise.
15589 * src/gram.c (ritem_print): Likewise.
15590 * src/print.c (print_core, print_grammar): Likewise.
15591 * src/print_graph.c: Likewise.
15592
b7c49edf
AD
155932001-12-27 Akim Demaille <akim@epita.fr>
15594
15595 * src/main.c (main): If there are complains after grammar
15596 reductions, then output the report anyway if requested, then die.
15597 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15598 * src/reader.c (eoftoken): New.
15599 (parse_token_decl): If the token being defined has value `0', it
15600 is the eoftoken.
15601 (packsymbols): No longer hack `tags' to insert `$' by hand.
15602 Be sure to preserve the value of the eoftoken.
15603 (reader): Make sure eoftoken is defined.
15604 Initialize nsyms to 0: now eoftoken is created just like the others.
15605 * src/print.c (print_grammar): Don't special case the eof token.
15606 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15607 lie anyway, albeit pleasant.
15608 * tests/calc.at: Exercise error messages with eoftoken.
15609 Change the grammar so that empty input is invalid.
15610 Adjust expectations.
15611 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15612
ec2da99f
AD
156132001-12-27 Akim Demaille <akim@epita.fr>
15614
15615 * configure.in: Check the protos of strchr ans strspn.
15616 Replace strchr if needed.
15617 * src/system.h: Provide the protos of strchr, strspn and memchr if
15618 missing.
15619 * lib/strchr.c: New.
15620 * src/reader.c (symbols_save): Use strchr.
15621
8adfa272
AD
156222001-12-27 Akim Demaille <akim@epita.fr>
15623
15624 * src/print.c, src/print_graph.c (escape): New.
15625 Use it to quote the TAGS outputs.
15626 * src/print_graph.c (print_state): Now errors are in red, and
15627 reductions in green.
15628 Prefer high to wide: output the state number on a line of its own.
15629
80dac38c
AD
156302001-12-27 Akim Demaille <akim@epita.fr>
15631
15632 * src/state.h, src/state.c (reductions_new): New.
15633 * src/LR0.c (set_state_table): Let all the states have a
15634 `reductions', even if reduced to 0.
15635 (save_reductions): Adjust.
15636 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15637 * src/print.c (print_reductions, print_actions): Adjust.
15638 * src/output.c (action_row): Adjust.
15639
2cec70b9
AD
156402001-12-27 Akim Demaille <akim@epita.fr>
15641
15642 * src/state.h, src/state.c (errs_new, errs_dup): New.
15643 * src/LR0.c (set_state_table): Let all the states have an errs,
15644 even if reduced to 0.
15645 * src/print.c (print_errs, print_reductions): Adjust.
15646 * src/output.c (output_actions, action_row): Adjust.
15647 * src/conflicts.c (resolve_sr_conflict): Adjust.
15648
13ca549a
AD
156492001-12-27 Akim Demaille <akim@epita.fr>
15650
15651 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15652
5092aba5
AD
156532001-12-27 Akim Demaille <akim@epita.fr>
15654
15655 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15656 * src/print.c: here.
15657 (lookaheadset, shiftset): New, used as additional storage by
15658 print_reductions.
15659 (print_results): Adjust.
15660 (print_shifts, print_gotos, print_errs): New, extracted from...
15661 (print_actions): here.
15662 * src/print_graph.c (print_actions): Remove dead code.
15663
11e2beca
AD
156642001-12-27 Akim Demaille <akim@epita.fr>
15665
15666 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15667 `$n' and `@n'.
15668
dac3c910
AD
156692001-12-27 Akim Demaille <akim@epita.fr>
15670
15671 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15672 (build_relations): Adjust.
15673
d0b0fefa
AD
156742001-12-27 Akim Demaille <akim@epita.fr>
15675
15676 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15677 duplication.
15678
adc8c848
AD
156792001-12-27 Akim Demaille <akim@epita.fr>
15680
15681 * src/reader.c (packgram): Catch nitems overflows.
15682
14d293ac
AD
156832001-12-27 Akim Demaille <akim@epita.fr>
15684
15685 * src/files.c, src/files.h (guard_obstack): Remove.
15686 * src/output.c (output): Adjust.
15687 * src/reader.c (parse_braces): New, factoring...
15688 (copy_action, copy_guard): these two which are renamed as...
15689 (parse_action, parse_guard): these.
15690 As a voluntary consequence, using braces around guards is now
15691 mandatory.
15692
f499b062
AD
156932001-12-27 Akim Demaille <akim@epita.fr>
15694
15695 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15696 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15697 members.
15698 (symbol_list_new): Adjust.
15699 (copy_action): action_line is the first line, not the last.
15700 (copy_guard): Just as for actions, store the `action' only, not
15701 the switch/case/break flesh.
15702 Don't parse the user action that might follow the guard, let...
15703 (readgram): do it, i.e., now, there can be an action after a
15704 guard.
15705 In other words the guard is just explicitly optional.
15706 (packgram): Adjust.
15707 * src/output.c (guards_output): New.
15708 (output_parser): Call it when needed.
15709 (output): Also free the guard and attrs obstacks.
15710 * src/files.c, src/files.h (obstack_save): Remove.
15711 (output_files): Remove.
15712 As a result, if one needs the former `.act' file, using an
15713 appropriate skeleton which requires actions and guards is now
15714 required.
15715 * src/main.c (main): Adjust.
15716 * tests/semantic.at: New.
15717 * tests/regression.at: Use `input.y' as input file name.
15718 Avoid 8+3 problems by requiring input.c when the test needs the
15719 parser.
15720
d945f5cd
AD
157212001-12-27 Akim Demaille <akim@epita.fr>
15722
15723 * src/reader.c (symbol_list_new): Be sure to initialize all the
15724 fields.
15725
d200e455
AD
157262001-12-27 Akim Demaille <akim@epita.fr>
15727
15728 All the hacks using a final pseudo state are now useless.
15729
15730 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15731 * src/lalr.c (nLA): New.
15732 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15733 instead of lookaheadsp from the pseudo state (nstate + 1).
15734
f9507c28
AD
157352001-12-27 Akim Demaille <akim@epita.fr>
15736
15737 * src/output.c (action_row, token_actions): Use a state_t instead
15738 of a integer, and nlookaheads instead of the following state's
15739 lookaheadsp.
15740
065fbd27
AD
157412001-12-27 Akim Demaille <akim@epita.fr>
15742
15743 * src/conflicts.c (log_resolution, flush_shift)
15744 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15745 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15746 (conflicts_print, print_reductions): Use a state_t instead of an
15747 integer when referring to a state.
15748 As much as possible, depend upon nlookaheads, instead of the
15749 `lookaheadsp' member of the following state (since lookaheads of
15750 successive states are successive, the difference between state n + 1
15751 and n served as the number of lookaheads for state n).
15752 * src/lalr.c (add_lookback_edge): Likewise.
15753 * src/print.c (print_core, print_actions, print_state)
15754 (print_results): Likewise.
15755 * src/print_graph.c (print_core, print_actions, print_state)
15756 (print_graph): Likewise.
15757 * src/conflicts.h: Adjust.
15758
1b177bd7
AD
157592001-12-27 Akim Demaille <akim@epita.fr>
15760
15761 * src/bison.hairy: Formatting/comment changes.
15762 ANSIfy.
15763 Remove `register' indications.
15764 Add plenty of `static'.
15765
7742ddeb
AD
157662001-12-27 Akim Demaille <akim@epita.fr>
15767
15768 * src/output.c (prepare): Drop the muscle `ntbase' which
15769 duplicates ntokens.
15770 * src/bison.simple: Formatting/comment changes.
15771 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15772 is an undocumented synonym.
15773
1fa14068
AD
157742001-12-22 Akim Demaille <akim@epita.fr>
15775
15776 * src/output.c (output_table_data): Change the prototype to use
15777 `int' for array ranges: some invocations do pass an int, not a
15778 short.
15779 Reported by Wayne Green.
15780
b9752825
AD
157812001-12-22 Akim Demaille <akim@epita.fr>
15782
15783 Some actions of web2c.y are improperly triggered.
15784 Reported by Mike Castle.
15785
15786 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15787 * tests/regression.at (Web2c): Rename as...
15788 (Web2c Report): this.
15789 (Web2c Actions): New.
15790
776209d6
AD
157912001-12-22 Akim Demaille <akim@epita.fr>
15792
15793 Reductions in web2c.y are improperly reported.
15794 Reported by Mike Castle.
15795
15796 * src/conflicts.c (print_reductions): Fix.
15797 * tests/regression.at (Web2c): New.
15798
275fc3ad
AD
157992001-12-18 Akim Demaille <akim@epita.fr>
15800
15801 Some host fail on `assert (!"foo")', which expands to
15802 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15803 Reported by Nelson Beebee.
15804
15805 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15806 `#define it_succeeded 0' and `assert (it_succeeded)'.
15807
897668ee
MA
158082001-12-17 Marc Autret <autret_m@epita.fr>
15809
15810 * src/bison.simple: Don't hard code the skeleton line and filename.
15811 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15812 New line counter 'skeleton_line' (skeleton-line muscle).
15813
ab3399e0
PE
158142001-12-17 Paul Eggert <eggert@twinsun.com>
15815
15816 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15817 YYDEBUG must be defined to a nonzero value.
15818
15819 * src/bison.simple (yytname): Do not assume that the user defines
15820 YYDEBUG to a properly parenthesized expression.
15821
3877f72b
AD
158222001-12-17 Akim Demaille <akim@epita.fr>
15823
15824 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15825 nlookaheads is a new member.
15826 Adjust all users.
15827 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15828 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15829 state.
776209d6 15830
331dbc1b
AD
158312001-12-17 Akim Demaille <akim@epita.fr>
15832
15833 * src/files.h, src/files.c (open_files, close_files): Remove.
15834 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15835 let...
15836 * src/reader.c (reader): Do it.
776209d6 15837
be750e4c
AD
158382001-12-17 Akim Demaille <akim@epita.fr>
15839
15840 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 15841
709ae8c6
AD
158422001-12-17 Akim Demaille <akim@epita.fr>
15843
15844 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15845 (flush_reduce): New.
15846 (resolve_sr_conflict): Adjust.
776209d6 15847
f87685c3
AD
158482001-12-17 Akim Demaille <akim@epita.fr>
15849
15850 * src/output.c (output_obstack): Be static and rename as...
15851 (format_obstack): this, to avoid any confusion with files.c's
15852 output_obstack.
15853 * src/reader.h (muscle_obstack): Move to...
15854 * src/output.h: here, since it's defined in output.c.
15855
837491d8
AD
158562001-12-17 Akim Demaille <akim@epita.fr>
15857
15858 * src/output.c (action_row, save_column, default_goto)
15859 (sort_actions, matching_state, pack_vector): Better variable
15860 locality.
15861
796d61fb
AD
158622001-12-17 Akim Demaille <akim@epita.fr>
15863
15864 * src/output.c: Various formatting changes.
776209d6 15865
64d15509
AD
158662001-12-17 Akim Demaille <akim@epita.fr>
15867
15868 * src/files.c (output_files): Free the output_obstack.
15869 * src/main.c (main): Call print and print_graph conditionally.
15870 * src/print.c (print): Work unconditionally.
15871 * src/print_graph.c (print_graph): Work unconditionally.
15872 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15873
fbc8ecb7
MA
158742001-12-16 Marc Autret <autret_m@epita.fr>
15875
15876 * src/output.c (actions_output): Fix. When we use %no-lines,
15877 there is one less line per action.
15878
f0440388
MA
158792001-12-16 Marc Autret <autret_m@epita.fr>
15880
15881 * src/bison.simple: Remove a useless #line directive.
15882 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15883 * src/output.c (get_lines_number): New.
776209d6 15884 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
15885 output muscles.
15886 Fix line numbering.
15887 (actions_output): Computes the number of lines taken by actions.
15888 (output_master_parser): Insert new skeleton which is the name of
15889 the output parser file name.
15890
a79986b8
MA
158912001-12-15 Marc Autret <autret_m@epita.fr>
15892
15893 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15894
4ec8e00f
MA
158952001-12-15 Marc Autret <autret_m@epita.fr>
15896
15897 * src/output.c (output_gram): Keep track of the hairy one.
15898
1a4648ff
AD
158992001-12-15 Akim Demaille <akim@epita.fr>
15900
15901 Make `make distcheck' work.
15902
15903 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15904 system.h which uses libgettext.h.
15905
9c2c67e6
AD
159062001-12-15 Akim Demaille <akim@epita.fr>
15907
15908 * src/nullable.c (set_nullable): Useless rules must be skipped,
15909 otherwise, since we range over their symbols, we might look at a
15910 nonterminal which no longer ``exists'', i.e., it is not counted in
15911 `nvars', hence we overflow our arrays.
15912
93ede233
AD
159132001-12-15 Akim Demaille <akim@epita.fr>
15914
15915 The header can also be produced directly, without any obstack!
15916 Yahoo!
15917
15918 * src/files.c, src/files.h (defines_obstack): Remove.
15919 (compute_header_macro): Global.
15920 (defines_obstack_save): Remove.
15921 * src/reader.c (parse_union_decl): No longer output to
15922 defines_obstack: its content can be found in the `stype' muscle
15923 anyway.
15924 (output_token_translations): Merge into...
15925 (symbols_output): this.
15926 Rename as...
15927 (symbols_save): this.
15928 (reader): Adjust.
15929 * src/output.c (header_output): New.
15930 (output): Call it.
15931
2666f928
AD
159322001-12-15 Akim Demaille <akim@epita.fr>
15933
15934 * src/reader.c (parse_union_decl): Instead of handling two obstack
15935 simultaneously, use one to define the `stype' muscle, and use the
15936 value of the latter to fill defines_obstack.
15937 (copy_comment): Remove.
15938 (copy_comment2): Work for a single obstack.
15939 Rename as...
15940 (copy_comment): this.
15941
428046f8
AD
159422001-12-15 Akim Demaille <akim@epita.fr>
15943
15944 * src/lex.c, src/lex.h (xgetc): No longer static.
15945 * src/reader.c (parse_union_decl): Revamp.
15946
ea52d706
AD
159472001-12-15 Akim Demaille <akim@epita.fr>
15948
15949 Still making progress in separating Bison into (i) input, (ii)
15950 process, (iii) output: now we can directly output the parser file
15951 without using table_obstack at all.
15952
15953 * src/files.c, src/files.h (table_obstack): Bye bye.
15954 (parser_file_name): New.
15955 * src/files.c (compute_output_file_names): Compute it.
15956 * src/output.c (actions_output, output_parser)
15957 (output_master_parser): To a file instead of an obstack.
15958
3f96f4dc
AD
159592001-12-15 Akim Demaille <akim@epita.fr>
15960
15961 Attach actions to rules, instead of pre-outputting them to
15962 actions_obstack.
15963
15964 * src/gram.h (rule_t): action and action_line are new members.
15965 * src/reader.c (symbol_list): Likewise.
15966 (copy_action): Save the actions within the rule.
15967 (packgram): Save them in rule_table.
15968 * src/output.c (actions_output): New.
15969 (output_parser): Use it on `%%actions'.
15970 (output_rule_data): Don't free rule_table.
15971 (output): Do it.
15972 (prepare): Don't save the `action' muscle.
15973 * src/bison.simple: s/%%action/%%actions/.
15974
51576fb3
AD
159752001-12-15 Akim Demaille <akim@epita.fr>
15976
15977 * src/reader.c (copy_action): When --yacc, don't append a `;'
15978 to the user action: let it fail if lacking.
dee049eb 15979 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 15980
2648a72d
AD
159812001-12-14 Akim Demaille <akim@epita.fr>
15982
15983 * src/lex.c (literalchar): Simply return the char you decoded, non
15984 longer mess around with obstacks and int pointers.
15985 Adjust all callers.
15986
92790e5b
AD
159872001-12-14 Akim Demaille <akim@epita.fr>
15988
15989 * src/lex.c (literalchar): Don't escape the special characters,
15990 just decode them, and keep them as char (before, eol was output as
15991 the 2 char string `\n' etc.).
15992 * src/output.c (output_rule_data): Use quotearg to output the
15993 token strings.
15994
927c1557
PE
159952001-12-13 Paul Eggert <eggert@twinsun.com>
15996
15997 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
15998 Do not infringe on the global user namespace when using C++.
15999 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16000 All uses of `fprintf' and `stderr' changed.
16001
16002 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16003
ed8e1f68
AD
160042001-12-13 Akim Demaille <akim@epita.fr>
16005
16006 The computation of nullable is broken: it doesn't handle empty
16007 RHS's properly.
16008
16009 * tests/torture.at (GNU AWK Grammar): New.
16010 * tests/sets.at (Nullable): New.
16011 * src/nullable.c (set_nullable): Instead of blindly looping over
16012 `ritems', loop over the rules, and then over their rhs's.
16013
16014 Work around Autotest bugs.
16015
16016 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16017 frame, because Autotest understand lines starting with a `+' as
16018 traces from the shell. Then, they are not processed properly.
16019 Admittedly an Autotest bug, but we don't have time to wait for
16020 Autotest to catch up.
16021 * tests/regression.at (Broken Closure): Adjust to the new table
16022 frames.
16023 Move to...
16024 * tests/sets.at: here.
16025
cb581495
AD
160262001-12-13 Akim Demaille <akim@epita.fr>
16027
16028 * src/closure.c (closure): Use nrules instead of playing tricks
16029 with BITS_PER_WORD.
16030
2e729273
AD
160312001-12-13 Akim Demaille <akim@epita.fr>
16032
16033 * src/print.c (print_actions): Output the handling of `$' as the
16034 traces do: shifting the token EOF. Before EOF was treated as a
16035 nonterminal.
16036 * tests/regression.at: Adjust some tests.
16037 * src/print_graph.c (print_core): Complete the set of items via
16038 closure. The next-to-final and final states are still unsatisfying,
16039 but that's to be addressed elsewhere.
16040 No longer output the rule numbers, but do output the state number.
16041 A single loop for the shifts + gotos is enough, but picked a
16042 distinct color for each.
16043 (print_graph): Initialize and finalize closure.
16044
107f7dfb
AD
160452001-12-13 Akim Demaille <akim@epita.fr>
16046
16047 * src/reader.c (readgram): Remove dead code, an strip useless
16048 braces.
16049 (get_type): Remove, unused.
16050
9b53a24f
AD
160512001-12-12 Akim Demaille <akim@epita.fr>
16052
16053 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16054 on that of lib/error.c.
16055
dbfb6dcd
AD
160562001-12-12 Akim Demaille <akim@epita.fr>
16057
16058 Some hosts don't like `/' in includes.
16059
16060 * src/system.h: Include libgettext.h without qualifying the path.
16061 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16062 $(top_srcdir).
16063
c25fb648
MA
160642001-12-11 Marc Autret <autret_m@epita.fr>
16065
16066 * src/output.c (output_parser): Remove useless muscle.
16067
710ddc4f
MA
160682001-12-11 Marc Autret <autret_m@epita.fr>
16069
16070 * src/bison.simple: Remove #line just before %%epilogue. It
16071 is now handled in ...
16072 * src/reader.c (read_additionnal_code): Add the output of a
16073 #line for the epilogue.
16074
e83d80b8
MA
160752001-12-10 Marc Autret <autret_m@epita.fr>
16076
927c1557 16077 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
16078 replace precedent remove.
16079 * src/bison.simple: Remove #line before %%prologue because
16080 %%input-line is wrong at this time.
16081
971d5158
MA
160822001-12-10 Marc Autret <autret_m@epita.fr>
16083
16084 * src/reader.c (symbols_output): Clean up.
927c1557 16085 * src/output.c (output_gram, output): Clean up.
971d5158 16086
5edafffd
AD
160872001-12-10 Akim Demaille <akim@epita.fr>
16088
16089 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16090 * src/LR0.c (set_state_table): here.
16091 * src/lalr.c (lalr): Call it.
16092
0279f8e9
AD
160932001-12-10 Akim Demaille <akim@epita.fr>
16094
16095 * src/state.h (shifts): Remove the `number' member: shifts are
16096 attached to state, hence no longer need to be labelled with a
16097 state number.
16098
190c4f5f
AD
160992001-12-10 Akim Demaille <akim@epita.fr>
16100
16101 Now that states have a complete set of members, the linked list of
16102 shifts is useless: just fill directly the state's shifts member.
16103
16104 * src/state.h (shifts): Remove the `next' member.
16105 * src/LR0.c (first_state, last_state): Remove.
16106 Adjust the callers.
16107 (augment_automaton): Don't look for the shifts that must be added
16108 a shift on EOF: it is those of the state we looked for! But now,
16109 since shifts are attached, it is no longer needed to looking
16110 merely by its id: its number.
16111
2a73b93d
AD
161122001-12-10 Akim Demaille <akim@epita.fr>
16113
16114 * src/LR0.c (augment_automaton): Better variable locality.
16115 Remove an impossible branch: if there is a state corresponding to
16116 the start symbol being shifted, then there is shift for the start
16117 symbol from the initial state.
16118
74392f6a
AD
161192001-12-10 Akim Demaille <akim@epita.fr>
16120
16121 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16122 only when appropriate: when insert_start_shifting_state' is not
16123 invoked.
16124 * tests/regression.at (Rule Line Numbers): Adjust.
16125
37c82725
AD
161262001-12-10 Akim Demaille <akim@epita.fr>
16127
16128 * src/LR0.c (augment_automaton): Now that all states have shifts,
16129 merge the two cases addition shifts to the initial state.
16130
6a164e0c
AD
161312001-12-10 Akim Demaille <akim@epita.fr>
16132
16133 * src/lalr.c (set_state_table): Move to...
16134 * src/LR0.c: here.
16135 * src/lalr.c (lalr): Don't call it...
16136 * src/LR0.c (generate_states): do it.
16137 * src/LR0.h (first_state): Remove, only the table is used.
16138
7215de24
AD
161392001-12-10 Akim Demaille <akim@epita.fr>
16140
16141 * src/LR0.h (first_shift, first_reduction): Remove.
16142 * src/lalr.c: Don't use first_shift: find shifts through the
16143 states.
16144
80e25d4d
AD
161452001-12-10 Akim Demaille <akim@epita.fr>
16146
16147 * src/LR0.c: Attach shifts to states as soon as they are
16148 computed.
16149 * src/lalr.c (set_state_table): Instead of assigning shifts to
16150 state, just assert that the mapping was properly done.
16151
0ab3728b
AD
161522001-12-10 Akim Demaille <akim@epita.fr>
16153
16154 * src/LR0.c (insert_start_shift): Rename as...
16155 (insert_start_shifting_state): this.
16156 (insert_eof_shifting_state, insert_accepting_state): New.
16157 (augment_automaton): Adjust.
16158 Better locality of the variables.
16159 When looking if the start_symbol is shifted from the initial
16160 state, using `while (... symbol != start_symbol ...)' sounds
16161 better than `while (... symbol < start_symbol ...)': If fail
16162 to see how the order between symbols could be relevant!
16163
78af9bbc
AD
161642001-12-10 Akim Demaille <akim@epita.fr>
16165
16166 * src/getargs.h: Don't declare `spec_name_prefix' and
16167 `spec_file_prefix', declared by src/files.h.
16168 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16169 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16170 * src/output.c (prepare): Adjust.
16171 * src/reader.c (symbols_output): Likewise.
16172 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16173
bdef2a41
AD
161742001-12-10 Akim Demaille <akim@epita.fr>
16175
16176 * src/muscle_tab.c (muscle_init): NULL is a better default than
16177 `"0"'.
16178
3735969c
AD
161792001-12-10 Akim Demaille <akim@epita.fr>
16180
16181 * src/reader.c (reader): Calling symbols_output once is enough.
16182
49701457
AD
161832001-12-10 Akim Demaille <akim@epita.fr>
16184
16185 Now that states have a complete set of members, the linked list of
16186 reductions is useless: just fill directly the state's reductions
16187 member.
16188
16189 * src/state.h (struct reductions): Remove member `number' and
16190 `next'.
16191 * src/LR0.c (first_reduction, last_reduction): Remove.
16192 (save_reductions): Don't link the new reductions, store them in
16193 this_state.
16194 * src/lalr.c (set_state_table): No need to attach reductions to
16195 states, it's already done.
16196 * src/output.c (output_actions): No longer free the shifts, then
16197 the reductions, then the states: free all the states and their
16198 members.
16199
0edad749
AD
162002001-12-10 Akim Demaille <akim@epita.fr>
16201
16202 * src/options.c (OPTN, DRTV, BOTH): New.
16203 (option_table): Use them.
16204
0edad749
AD
16205 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16206 the job of system.h.
16207 * src/options.c: Don't include stdio.h and xalloc.h for the same
16208 reasons.
16209
5449dd0f
AD
162102001-12-10 Akim Demaille <akim@epita.fr>
16211
16212 * src/output.c (output, prepare): Make sure the values of the
16213 muscles `action' and `prologue' are 0-terminated.
16214
a870c567
AD
162152001-12-10 Akim Demaille <akim@epita.fr>
16216
16217 Clean up GCC warnings.
16218
16219 * src/reader.c (copy_action): `buf' is not used.
16220 (parse_skel_decl): Be static.
16221 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16222 * src/options.h (create_long_option_table): Have a real prototype.
16223 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16224 (hash_delete_at): Return const void *.
16225 Adjust casts to preserve the const.
16226
80df8768
AD
162272001-12-10 Akim Demaille <akim@epita.fr>
16228
16229 * configure.in: Require 2.52g.
16230 M4 is not needed, but AUTOM4TE is.
16231 * m4/m4.m4: Remove.
16232 * tests/Makefile.am: Adjust.
16233
f693ad14
AD
162342001-12-10 Akim Demaille <akim@epita.fr>
16235
16236 One structure for states is enough, even though theoretically
16237 there are LR(0) states and LALR(1) states.
16238
16239 * src/lalr.h (state_t): Remove.
16240 (state_table): Be state_t **, not state_t *.
16241 * src/state.h (core, CORE_ALLOC): Rename as...
16242 (state_t, STATE_ALLOC): this.
16243 Add the LALR(1) members: shifts, reductions, errs.
16244 * src/LR0.c (state_table): Rename as...
16245 (state_hash): this, to avoid name clashes with the global
16246 `state_table'.
16247 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16248 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16249
74ffbcb6
AD
162502001-12-10 Akim Demaille <akim@epita.fr>
16251
16252 Bison dumps core on bash.y.
16253 Reported by Pascal Bart.
16254
16255 * src/warshall.c (bitmatrix_print): New.
16256 (TC): Use it.
ba0fe3c7 16257 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
16258 j must be the outer loop.
16259 * tests/regression.at (Broken Closure): New.
16260
07708e19
AD
162612001-12-05 Akim Demaille <akim@epita.fr>
16262
16263 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16264 its argument.
ba1ecc07 16265 Reported by Peter Hamorsky.
07708e19 16266
92b16366
AD
162672001-12-05 Akim Demaille <akim@epita.fr>
16268
16269 * src/conflicts.c (err_table): Remove.
16270 (resolve_sr_conflict): Adjust.
16271 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16272 Rename as...
16273 (state_t.reductions, state_t.shifts): this.
16274
076ab033
AD
162752001-12-05 Akim Demaille <akim@epita.fr>
16276
16277 * src/reduce.c (reduce_grammar_tables): No longer disable the
16278 removal of useless rules via CPP but via `if (0)', so that the
16279 compiler still check the code is valid.
16280 For instance, it should have noticed `rline' no longer exists: use
16281 the `line' member of rule_t.
16282 * src/gram.c (dummy, rline): Remove, unused.
16283
3843c413
AD
162842001-12-05 Akim Demaille <akim@epita.fr>
16285
16286 * src/output.c (pack_vector): Use assert, not berror.
16287 * src/main.c (berror): Remove, unused.
16288
43168960
AD
162892001-12-05 Akim Demaille <akim@epita.fr>
16290
16291 New experimental feature: if --verbose --trace output all the
16292 items of a state, not only its kernel.
16293
16294 * src/print.c (print_core): If `trace_flag', then invoke closure
16295 before outputting the items of the state (print_core is no longer
16296 a correct name them).
16297 (print_results): Invoke new_closure/free_closure if needed.
16298
b2872512
AD
162992001-12-05 Akim Demaille <akim@epita.fr>
16300
16301 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16302 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16303 (nitemset): for consistency with the rest of the project.
16304
23cbcc6c
AD
163052001-12-05 Akim Demaille <akim@epita.fr>
16306
16307 * src/closure.c (print_closure): Improve.
16308 (closure): Use it for printing input and output.
16309
03ec521c
AD
163102001-12-05 Akim Demaille <akim@epita.fr>
16311
16312 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16313 indexed by nonterminals.
16314
3a7456dd
AD
163152001-12-05 Akim Demaille <akim@epita.fr>
16316
16317 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16318 what it was!).
16319 * src/warshall.h: Remove accidental duplication of the content.
16320
1cbcf2e7
AD
163212001-12-05 Akim Demaille <akim@epita.fr>
16322
16323 * src/closure.c (set_fderives): De-obfuscate.
16324
84182270
AD
163252001-12-05 Akim Demaille <akim@epita.fr>
16326
16327 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16328
3f6f053c
AD
163292001-12-05 Akim Demaille <akim@epita.fr>
16330
16331 * src/closure.c (set_firsts): De-obfuscate.
16332
7a5350ba
AD
163332001-12-05 Akim Demaille <akim@epita.fr>
16334
16335 * src/output.c (action_row): De-obfuscate
16336 using the good o' techniques: arrays not pointers, variable
16337 locality, BITISSET, RESETBIT etc.
16338
d954473d
AD
163392001-12-05 Akim Demaille <akim@epita.fr>
16340
16341 Pessimize the code to simplify it: from now on, all the states
16342 have a valid SHIFTS, which NSHIFTS is possibly 0.
16343
16344 * src/LR0.c (shifts_new): Be global and move to..
16345 * src/state.c, src/state.h: here.
16346 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16347 * src/print_graph: Adjust.
16348
9839bbe5
AD
163492001-12-05 Akim Demaille <akim@epita.fr>
16350
16351 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16352 * src/conflicts.c: Use it.
16353 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16354 incorrectly ``simplified''.
16355
9f136c07
AD
163562001-12-05 Akim Demaille <akim@epita.fr>
16357
16358 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16359 using the good o' techniques: arrays not pointers, variable
16360 locality, BITISSET, RESETBIT etc.
16361
b608206e
AD
163622001-12-05 Akim Demaille <akim@epita.fr>
16363
16364 * src/state.h (SHIFT_SYMBOL): New.
16365 * src/conflicts.c: Use it to deobfuscate.
16366
52afa962
AD
163672001-12-05 Akim Demaille <akim@epita.fr>
16368
16369 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16370 (print_reductions): De-obfuscate using the good o' techniques:
16371 arrays not pointers, variable locality, BITISSET.
16372
e74dc321
AD
163732001-12-05 Akim Demaille <akim@epita.fr>
16374
16375 * src/conflicts.c (print_reductions): Arrays, not pointers.
16376 Use BITISSET.
16377
768fca83
AD
163782001-12-05 Akim Demaille <akim@epita.fr>
16379
16380 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16381
a17e599f
AD
163822001-12-05 Akim Demaille <akim@epita.fr>
16383
16384 * src/conflicts.c (print_reductions): Improve variable locality.
16385
a04bc341
AD
163862001-12-05 Akim Demaille <akim@epita.fr>
16387
16388 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16389
c8ea038e
AD
163902001-12-05 Akim Demaille <akim@epita.fr>
16391
16392 * src/conflicts.c (print_reductions): Improve variable locality.
16393
aa2aab3c
AD
163942001-12-05 Akim Demaille <akim@epita.fr>
16395
16396 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16397 * src/lalr.c: Use them.
16398
b178c8cc
AD
163992001-12-05 Akim Demaille <akim@epita.fr>
16400
16401 * src/LR0.c (augment_automaton): Formatting changes.
16402 Better variable locality.
16403
f67d13aa
AD
164042001-12-05 Akim Demaille <akim@epita.fr>
16405
16406 * src/lalr.c (matrix_print): New.
16407 (transpose): Use it.
16408 Use arrays instead of pointers.
16409
c2713865
AD
164102001-12-05 Akim Demaille <akim@epita.fr>
16411
16412 * src/lalr.c (maxrhs): Move to...
16413 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16414 * src/lalr.c (build_relations): Adjust.
16415
9887c18a
AD
164162001-12-05 Akim Demaille <akim@epita.fr>
16417
16418 * src/lalr.c (transpose): Free the memory allocated to the
16419 argument, as it is replaced by the results by the unique caller.
16420 (build_relations): Merely invoke transpose: it handles the memory
16421 deallocation.
16422 Improve variable locality.
16423 Avoid variables used as mere abbreviations.
16424 (compute_lookaheads): Use arrays instead of pointers.
16425
4d4f699c
AD
164262001-12-05 Akim Demaille <akim@epita.fr>
16427
16428 * src/lalr.c (initialize_F): Improve variable locality.
16429 Avoid variables used as mere abbreviations.
16430
80a69750
AD
164312001-12-05 Akim Demaille <akim@epita.fr>
16432
16433 * src/derives.c (print_derives): Display the ruleno.
16434 * src/lalr.c (initialize_F, transpose): Better variable locality
16435 to improve readability.
16436 Avoid variables used as mere abbreviations.
16437
fe961097
AD
164382001-12-05 Akim Demaille <akim@epita.fr>
16439
16440 * src/lalr.c (traverse): Use arrays instead of pointers.
16441
e3e4e814
AD
164422001-12-05 Akim Demaille <akim@epita.fr>
16443
16444 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16445 the handling of squeue.
16446 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16447
630e182b
AD
164482001-12-05 Akim Demaille <akim@epita.fr>
16449
16450 Because useless nonterminals are now kept alive (instead of being
16451 `destroyed'), we now sometimes examine them, and store information
16452 related to them. Hence we need to know their number, and adjust
16453 memory allocations.
16454
16455 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16456 static.
16457 * src/LR0.c (allocate_itemsets): The memory allocated to
16458 `symbol_count' was used for two different purpose: once to count
16459 the number of occurrences of each symbol, and later reassigned to
16460 `shift_symbol', containing the symbol that can be shifted from a
16461 given state.
16462 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16463 only, and...
16464 (new_itemsets): Allocate `shift_symbol' here.
16465 (allocate_itemsets): symbol_count includes useless nonterminals.
16466 Make room for them.
16467 (free_storage): Use `free', not `XFREE', for pointers that cannot
16468 be null.
16469
81b51460
AD
164702001-12-05 Akim Demaille <akim@epita.fr>
16471
16472 * src/nullable.c (set_nullable): Deobfuscate the handling of
16473 ritem.
16474 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16475
3067fbef
AD
164762001-12-05 Akim Demaille <akim@epita.fr>
16477
16478 * src/gram.c, src/gram.h (ritem_print): New.
16479 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16480 (This useless function was defined only to work around VMS linkers
16481 that can't handle compilation units with variables only).
16482 * src/reduce.c (dump_grammar): Use it to trace the construction of
16483 ritem.
16484
c2bea5f9
PE
164852001-12-04 Paul Eggert <eggert@twinsun.com>
16486
7d27c823
PE
16487 * src/bison.simple (union yyalloc): Change member names
16488 to be the same as the stack names.
16489 (yyparse): yyptr is now union yyalloc *, not char *.
16490 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16491 and may generate better code on some machines.
c2bea5f9
PE
16492 (yystpcpy): Use prototype if __STDC__ is defined, not just
16493 if __cplusplus is defined.
35687a9d 16494
2c8a9dfa
AD
164952001-11-30 Akim Demaille <akim@epita.fr>
16496
16497 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16498 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16499 Gettext doesn't compile cleanly, and dies with -Werror.
16500 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16501 Include WARNING_CFLAGS here.
16502 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16503 before being defined.
16504
f4e421e6
AD
165052001-11-27 Paul Eggert <eggert@twinsun.com>
16506
16507 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16508 First arg is int, not unsigned.
16509 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16510 (SIZE_MAX, UINT_MAX): New macros.
16511 (quotearg_n_options): Abort if N is negative.
16512 Avoid overflow check on hosts where size_t is 64 bits and int
16513 is 32 bits, as overflow is impossible there.
16514 Fix off-by-one typo that caused unnecessary reallocation.
16515
7093d0f5
AD
165162001-11-29 Paul Eggert <eggert@twinsun.com>
16517
16518 Name space cleanup in generated parser.
16519
16520 * doc/bison.texinfo (Bison Parser): Discuss system headers
16521 and their effect on the user name space.
16522
16523 * src/bison.simple:
16524 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16525 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16526 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16527
16528 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16529 on user names when possible.
16530
16531 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16532 Simplify test for whather <alloca.h> exists.
16533
16534 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16535
16536 (<stdio.h>): Include if YYDEBUG.
16537
16538 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16539 ! defined (yyoverflow) && ! defined (yymemcpy).
16540
16541 (yymemcpy, yyparse): Rename local variables as needed so that
16542 they all begin with 'yy'.
16543
16544 (yystrlen, yystpcpy): New functions.
16545
16546 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16547 All uses changed.
16548
16549 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16550 instead of relying on string.h functions. Use YYSTACK_ALLOC
16551 and YYSTACK_FREE instead of malloc and free.
16552
fd51e5ff
AD
165532001-11-30 Akim Demaille <akim@epita.fr>
16554
16555 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16556 before their first uses.
16557 (YYBISON, YYPURE): Move to the top of the output.
16558
7d13ff5f
AD
165592001-11-30 Akim Demaille <akim@epita.fr>
16560
16561 * tests/reduce.at (Useless Nonterminals): Fix.
16562
892a3995
AD
165632001-11-30 Akim Demaille <akim@epita.fr>
16564
16565 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16566 if body instead of `;' to pacify GCC's warnings.
16567
68f1e3ed
AD
165682001-11-30 Akim Demaille <akim@epita.fr>
16569
16570 Instead of mapping the LHS of unused rules to -1, keep the LHS
16571 valid, but flag the rules as invalid.
16572
16573 * src/gram.h (rule_t): `useful' is a new member.
16574 * src/print.c (print_grammar): Adjust.
16575 * src/derives.c (set_derives): Likewise.
16576 * src/reader.c (packgram, reduce_output): Likewise.
16577 * src/reduce.c (reduce_grammar_tables): Likewise.
16578 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16579
d2d1b42b
AD
165802001-11-30 Akim Demaille <akim@epita.fr>
16581
16582 * src/reduce.c (reduce_output): Formatting changes.
16583 * src/print.c (print_results, print_grammar): Likewise.
16584 * tests/regression.at (Rule Line Numbers)
16585 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16586
760b53a8
AD
165872001-11-30 Akim Demaille <akim@epita.fr>
16588
16589 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16590 useless nonterminals, move them at the end of the symbol arrays.
16591 (reduce_output): Adjust.
16592 * tests/reduce.at (Useless Nonterminals): Adjust.
16593
00238958
AD
165942001-11-30 Akim Demaille <akim@epita.fr>
16595
16596 * src/reduce.c: Various comment/formatting changes.
16597 (nonterminals_reduce): New, extracted from...
16598 (reduce_grammar_tables): here.
16599 (reduce_grammar): Call nonterminals_reduce.
16600
396452de
PE
166012001-11-29 Paul Eggert <eggert@twinsun.com>
16602
16603 * src/bison.simple (YYSTACK_REALLOC): Remove.
16604 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16605 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16606 New macros.
16607 (union yyalloc): New type.
16608 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16609 an arbitrary restriction on hosts where size_t is wider than int.
16610
16611 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16612 a parser stack overflow. Allocate just one block of memory for all
16613 three stacks, instead of allocating three blocks; this typically is
16614 faster and reduces fragmentation.
16615
16616 Do not limit the number of items in the stack to a value that fits
16617 in 'int', as this is an arbitrary limit on hosts with 64-bit
16618 size_t and 32-bit int.
16619
147e184c
MA
166202001-11-29 Marc Autret <autret_m@epita.fr>
16621
16622 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16623 of defining YYERROR_VERBOSE.
16624 [AT_DATA]: $4 is now out of C declarations in the prologue.
16625
426cf563
MA
166262001-11-28 Marc Autret <autret_m@epita.fr>
16627
16628 * src/reader.c (parse_dquoted_param): New.
16629 (parse_skel_decl): Use it.
16630 * src/lex.h: Add its prototype.
16631 * src/lex.c (literalchar): Become not static.
16632
c7925b99
MA
166332001-11-28 Marc Autret <autret_m@epita.fr>
16634
16635 * src/output.h: And put its extern declaration here.
16636 * src/output.c (error_verbose): Define here.
16637 (prepare): Echo name modification.
16638 * src/getargs.h: Clean its extern declaration.
16639 * src/getargs.c (error_verbose_flag): Remove.
16640 (getargs): Remove case 'e'.
16641 * src/options.c (option_table): 'error-verbose' is now seen as simple
16642 percent option.
16643 Include output.h.
16644
16645 * src/reader.c (read_declarations): Remove case tok_include.
16646 (parse_include_decl): Remove.
16647 * src/lex.h (token_t): Remove tok_include.
16648 * src/options.c (option_table): 'include' is now a simple command line
16649 option.
16650
5b5d1929
MA
166512001-11-28 Marc Autret <autret_m@epita.fr>
16652
16653 * src/bison.simple: Adjust muscle names.
16654 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16655 * src/output.c (prepare): s/_/-/ for the muscles names.
16656 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16657
8850be4b
MA
166582001-11-28 Marc Autret <autret_m@epita.fr>
16659
16660 * src/bison.simple: Fix debug.
16661 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16662
4a38e613
AD
166632001-11-28 Akim Demaille <akim@epita.fr>
16664
16665 * src/LR0.c (shifts_new): New.
16666 (save_shifts, insert_start_shift, augment_automaton): Use it.
16667
4b35e1c1
AD
166682001-11-28 Akim Demaille <akim@epita.fr>
16669
16670 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16671 keep ruleno only.
16672
d2b04478
AD
166732001-11-28 Akim Demaille <akim@epita.fr>
16674
16675 * src/closure.c (closure): Instead of looping over word in array
16676 then bits in words, loop over bits in array.
16677
2c4c30aa
AD
166782001-11-28 Akim Demaille <akim@epita.fr>
16679
16680 * src/closure.c (closure): No longer optimize the special case
16681 where all the bits of `ruleset[r]' are set to 0, to make the code
16682 clearer.
16683
576890b7
AD
166842001-11-28 Akim Demaille <akim@epita.fr>
16685
16686 * src/closure.c (closure): `r' and `c' are new variables, used to
16687 de-obfuscate accesses to RULESET and CORE.
16688
cb487d7d
AD
166892001-11-28 Akim Demaille <akim@epita.fr>
16690
16691 * src/reduce.c (reduce_print): Use ngettext.
16692 (dump_grammar): Improve the trace accuracy.
16693
6013d43f
AD
166942001-11-28 Akim Demaille <akim@epita.fr>
16695
16696 * src/reduce.c (dump_grammar): Don't translate trace messages.
16697
cb4956ee
AD
166982001-11-28 Akim Demaille <akim@epita.fr>
16699
16700 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16701 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16702 as all tags are free'ed afterwards.
16703 From Enrico Scholz.
16704
648185ab
PE
167052001-11-27 Paul Eggert <eggert@twinsun.com>
16706
16707 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16708 use alloca when we didn't want to, and vice versa.
16709
68254a03
MA
167102001-11-27 Marc Autret <autret_m@epita.fr>
16711
9113b58f
AD
16712 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16713 initialization.
68254a03
MA
16714 * src/output.c (prepare): Remove its update.
16715
04d843a2
MA
167162001-11-27 Marc Autret <autret_m@epita.fr>
16717
16718 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16719 Use %error-verbose.
16720
d2079671 167212001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
16722
16723 * src/bison.simple: Remove YYERROR_VERBOSE using.
16724 Use %%error_verbose.
16725 (yyparse): Likewise.
16726 * src/output.c (prepare): Give its final value.
16727 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16728 * src/getargs.h: Add its extern declaration.
16729 * src/getargs.c (error_verbose_flag): New int.
16730 (getargs): Update to catch new case.
16731 * src/options.c (option_table): 'error-verbose' is a new option.
16732 (shortopts): Update.
16733
e0327bc8
AD
167342001-11-27 Akim Demaille <akim@epita.fr>
16735
16736 * src/system.h: Use intl/libgettext.h.
16737 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16738
000f1a3c
AD
167392001-11-27 Akim Demaille <akim@epita.fr>
16740
16741 * tests/torture.at (Exploding the Stack Size with Malloc):
16742 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16743
26cfe0be
AD
167442001-11-27 Akim Demaille <akim@epita.fr>
16745
16746 * src/files.c: Include error.h.
16747 Reported by Hans Aberg.
16748
f6bd5427
MA
167492001-11-26 Marc Autret <autret_m@epita.fr>
16750
d2079671 16751 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
16752 (read_declarations): Add case tok_include.
16753 * src/getargs.h (include): Add its extern definition.
16754 * src/getargs.c (include): New const char *.
16755 (getargs): Add case '-I'.
16756 * src/options.c (option_table): Add include as command line and
16757 percent option.
16758 * src/lex.h (token_t): Add tok_include.
16759
2ca209c1
AD
167602001-11-26 Akim Demaille <akim@epita.fr>
16761
16762 * src/reader.c (readgram): Make sure rules for mid-rule actions
16763 have a lineno equal to that of their host rule.
16764 Reported by Hans Aberg.
16765 * tests/regression.at (Rule Line Numbers): New.
16766
0e41b407
AD
167672001-11-26 Akim Demaille <akim@epita.fr>
16768
16769 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16770 size_ts.
16771
167722001-11-26 Akim Demaille <akim@epita.fr>
16773
16774 * src/complain.c, src/complain.h (error): Remove, provided by
16775 lib/error.[ch].
16776
e0c40012
AD
167772001-11-26 Akim Demaille <akim@epita.fr>
16778
16779 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16780 issue an error message.
16781 * tests/regression.at (Invalid %directive): New.
16782 Reported by Hans Aberg.
16783
5e147124
AD
167842001-11-26 Akim Demaille <akim@epita.fr>
16785
16786 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16787 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16788
a034c8b8
AD
167892001-11-26 Akim Demaille <akim@epita.fr>
16790
16791 * src/conflicts.c (conflicts_print): Don't complain at all when
16792 there are no reduce/reduce conflicts, and as many shift/reduce
16793 conflicts as expected.
16794 * tests/regression.at (%expect right): Adjust.
16795
c64a20f3
AD
167962001-11-23 Akim Demaille <akim@epita.fr>
16797
16798 * lib/alloca.c: Update, from fileutils.
16799
5b0d29bb
AD
168002001-11-23 Akim Demaille <akim@epita.fr>
16801
16802 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16803
722c4bfe
AD
168042001-11-23 Akim Demaille <akim@epita.fr>
16805
16806 * src/system.h: Include alloca.h.
16807 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16808
6255b435
AD
168092001-11-23 Akim Demaille <akim@epita.fr>
16810
16811 * src/print_graph.c (print_actions): Remove `rule', unused.
16812 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16813 pacify GCC's signed < unsigned warnings.
16814 * src/closure.c (itemsetsize): Likewise.
16815 * src/reader.c (symbol_list_new): Static.
16816
b29b2ed5
AD
168172001-11-23 Akim Demaille <akim@epita.fr>
16818
16819 Attaching lineno to buckets is stupid, since only one copy of each
16820 symbol is kept, only the line of the first occurrence is kept too.
16821
16822 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16823 * src/reader.c (rline_allocated): Remove, unused.
16824 (symbol_list): Have a `line' member.
16825 (symbol_list_new): New.
16826 (readgram): Use it.
16827 * src/print.c (print_grammar): Output the rule line numbers.
16828 * tests/regression.at (Solved SR Conflicts)
16829 (Unresolved SR Conflicts): Adjust.
16830 Reported by Hans Aberg.
16831
a81b1d4a
MA
168322001-11-22 Marc Autret <autret_m@epita.fr>
16833
16834 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16835
c1ecb3c1
MA
168362001-11-22 Marc Autret <autret_m@epita.fr>
16837
16838 * src/muscle_tab.c (muscle_init): Remove initialization of
16839 skeleton muscle.
16840 * src/output.c (output_master_parser): Do it here.
16841
fbe01355
AD
168422001-11-20 Akim Demaille <akim@epita.fr>
16843
16844 * po/sv.po: New.
16845 * configure.in (ALL_LINGUAS): Adjust.
16846 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16847 longer contains strings to translate.
16848
81e895c0
AD
168492001-11-19 Akim Demaille <akim@epita.fr>
16850
16851 * src/conflicts.c (conflicts_print): Add a missing \n.
16852
6bb1878b
AD
168532001-11-19 Akim Demaille <akim@epita.fr>
16854
16855 * src/nullable.c (nullable_print): New.
16856 (set_nullable): Call it when tracing.
16857 Better locality of variables.
16858
d9ec2d07
AD
168592001-11-19 Akim Demaille <akim@epita.fr>
16860
16861 * src/print.c (print_actions): Better locality of variables.
16862
720e5c1b
AD
168632001-11-19 Akim Demaille <akim@epita.fr>
16864
16865 * src/derives.c (print_derives): Fix and enrich.
16866 * src/closure.c (print_fderives): Likewise.
16867
fb908786
AD
168682001-11-19 Akim Demaille <akim@epita.fr>
16869
16870 * src/closure.c (itemsetend): Remove, replaced with...
16871 (itemsetsize): new.
16872
125ecb56
AD
168732001-11-19 Akim Demaille <akim@epita.fr>
16874
16875 * src/LR0.c (kernel_end): Remove, replaced with...
16876 (kernel_size): new.
16877
d8cf039f
AD
168782001-11-19 Akim Demaille <akim@epita.fr>
16879
16880 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16881 to clarify.
16882
7bec0760
AD
168832001-11-19 Akim Demaille <akim@epita.fr>
16884
16885 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16886
c87d4863
AD
168872001-11-19 Akim Demaille <akim@epita.fr>
16888
16889 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16890 trace messages.
16891 * src/LR0.c: Likewise.
16892 (allocate_itemsets): Use arrays instead of pointers to clarify.
16893
9bfe901c
AD
168942001-11-19 Akim Demaille <akim@epita.fr>
16895
16896 * src/getargs.c (statistics_flag): Replace with...
16897 (trace_flag): New.
16898 (longopts): Accept --trace instead of --statistics.
16899 * src/getargs.h, src/options.c: Adjust.
16900 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16901 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16902
97db7bd4
AD
169032001-11-19 Akim Demaille <akim@epita.fr>
16904
cc72668c 16905 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
16906 pointers to clarify the code.
16907 (save_reductions, save_shifts): Factor common parts of alternatives.
16908
2c5f66ed
AD
169092001-11-19 Akim Demaille <akim@epita.fr>
16910
16911 * src/LR0.c (new_state, get_state): Complete TRACE code.
16912 * src/closure.c: Include `reader.h' to get `tags', needed by the
16913 trace code.
16914 Rename the conditional DEBUG as TRACE.
16915 Output consistently TRACEs to stderr, not stdout.
16916 * src/derives.c: Likewise.
16917 * src/reduce.c: (inaccessable_symbols): Using if is better style
16918 than goto.
16919 Use `#if TRACE' instead of `#if 0' for tracing code.
16920
300f275f
AD
169212001-11-19 Akim Demaille <akim@epita.fr>
16922
16923 * src/system.h (LIST_FREE, shortcpy): New.
16924 * src/LR0.c: Use them.
16925 * src/output.c (free_itemsets, free_reductions, free_shifts):
16926 Remove, replaced by LIST_FREE.
16927
f59c437a
AD
169282001-11-19 Akim Demaille <akim@epita.fr>
16929
16930 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16931 (REDUCTIONS_ALLOC): New.
16932 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16933 allocation.
16934
6986fd9e
AD
169352001-11-19 Akim Demaille <akim@epita.fr>
16936
16937 * src/LR0.c (new_state): Complete trace code.
16938 * src/nullable.c (set_nullable): Don't translate traces.
16939
4bc30f78
AD
169402001-11-19 Akim Demaille <akim@epita.fr>
16941
16942 * src/print_graph.c (print_core): Better locality of variables.
16943 * src/print.c (print_core): Likewise.
16944
08a946e0
AD
169452001-11-19 Akim Demaille <akim@epita.fr>
16946
16947 * src/vcg.c: You do the output, so you are responsible of the
16948 handling of VCG syntax, in particular: use quotearg.
16949 * src/print_graph.c: Don't.
16950 (print_actions): Don't output the actions as part of the nodes,
16951 since that's the job of the edges.
16952 (print_state): Don't output by hand: fill the node description,
9bfe901c 16953 and ask for its output.
08a946e0 16954
f0473484
AD
169552001-11-19 Akim Demaille <akim@epita.fr>
16956
cc72668c
AD
16957 * src/bison.simple (yyparse): When verbosely reporting an error,
16958 no longer put additional quotes around token names.
f0473484
AD
16959 * tests/calc.at: Adjust.
16960
e41dc700
AD
169612001-11-19 Akim Demaille <akim@epita.fr>
16962
16963 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16964 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16965 * src/output.c: Adjust.
16966
652a871c
AD
169672001-11-19 Akim Demaille <akim@epita.fr>
16968
16969 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16970 (rule_t): this.
16971 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16972
b2ed6e58
AD
169732001-11-19 Akim Demaille <akim@epita.fr>
16974
16975 * src/gram.h (rule_t): New.
16976 (rule_table): New.
16977 (rrhs, rlhs): Remove, part of state_t.
16978 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16979 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16980 * src/reader.c, src/reduce.c: Adjust.
16981
edad7067
AD
169822001-11-19 Akim Demaille <akim@epita.fr>
16983
16984 * src/reader.c (symbols_output): New, extracted from...
16985 (packsymbols): Here.
16986 (reader): Call it.
16987
3feec034
AD
169882001-11-19 Akim Demaille <akim@epita.fr>
16989
16990 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16991 (maxrhs): this new function.
16992
ddcd5fdf
AD
169932001-11-19 Akim Demaille <akim@epita.fr>
16994
cc72668c 16995 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
16996 Adjust.
16997
bb527fc2
AD
169982001-11-19 Akim Demaille <akim@epita.fr>
16999
cc72668c 17000 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
17001 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17002 * src/lalr.c: Adjust.
17003
a845a697
AD
170042001-11-19 Akim Demaille <akim@epita.fr>
17005
17006 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17007 (set_state_table): handle the `lookaheads' members.
17008
f004bf6a
AD
170092001-11-19 Akim Demaille <akim@epita.fr>
17010
cc72668c
AD
17011 * src/lalr.h (lookaheads): Removed array, whose contents is now
17012 a member of...
f004bf6a
AD
17013 (state_t): this structure.
17014 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17015 Adjust.
17016
de326cc0
AD
170172001-11-19 Akim Demaille <akim@epita.fr>
17018
cc72668c
AD
17019 * src/lalr.h (consistent): Removed array, whose contents is now
17020 a member of...
de326cc0
AD
17021 (state_t): this structure.
17022 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17023 Adjust.
17024
90b4416b
AD
170252001-11-19 Akim Demaille <akim@epita.fr>
17026
cc72668c
AD
17027 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17028 contents are now members of...
90b4416b
AD
17029 (state_t): this structure.
17030 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17031 Adjust.
17032
9703cc49
AD
170332001-11-19 Akim Demaille <akim@epita.fr>
17034
17035 * src/lalr.h (state_t): New.
17036 (state_table): Be a state_t * instead of a core **.
17037 (accessing_symbol): Remove, part of state_t.
17038 * src/lalr.c: Adjust.
17039 (set_accessing_symbol): Merge into...
17040 (set_state_table): this.
17041 * src/print_graph.c, src/conflicts.c: Adjust.
17042
d803322e
AD
170432001-11-14 Akim Demaille <akim@epita.fr>
17044
17045 * tests/calc.at, tests/output.at, tests/regression.at,
17046 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17047 now the tests are run in private dirs, therefore AC_CLEANUP and
17048 family can be simplified to 0-ary.
17049 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17050 use abs. path to find config.h.
17051 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17052 stderr, there can be way too much random noise.
17053 Instead pass -Werror to GCC and rely on the exit status.
17054 Reported by Wolfram Wagner.
17055
3d76b07d
AD
170562001-11-14 Akim Demaille <akim@epita.fr>
17057
17058 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17059 defined only if yyoverflow is defined, to avoid `warning: unused
17060 variable `yyvs1''.
17061 Reported by The Test Suite.
17062
09b503c8
AD
170632001-11-14 Akim Demaille <akim@epita.fr>
17064
17065 * src/print.c: Include reduce.h.
17066 Reported by Hans Aberg.
17067
170682001-11-14 Akim Demaille <akim@epita.fr>
17069
17070 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17071 Revert a previous patch: these are really const.
17072 * src/conflicts.c (conflict_report): Additional useless pair of
17073 braces to pacify GCC's warnings for `if () if () {} else {}'.
17074 * src/lex.c (parse_percent_token): Replace equal_offset with
17075 arg_offset.
17076 arg is const.
17077 Be sure to strdup `arg' when used, since there is no reason for
17078 token_buffer not to change.
17079
0f37a994
AD
170802001-11-14 Akim Demaille <akim@epita.fr>
17081
17082 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17083 definition.
17084 * src/main.c (main): Use them.
17085 Suggested by Hans Aberg.
17086
d39d93b8
AD
170872001-11-12 Akim Demaille <akim@epita.fr>
17088
17089 * src/system.h (ngettext): Now that we use ngettext, be sure to
17090 provide a default definition when NLS are not used.
17091
9edcd895
AD
170922001-11-12 Akim Demaille <akim@epita.fr>
17093
17094 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17095 Use @kbd to denote user input.
17096 (Language and Grammar): ANSIfy the example.
17097 Adjust its layout for info/notinfo.
17098 (Location Tracking Calc): Output error messages to stderr.
17099 Output locations in a more GNUtically correct way.
17100 Fix a couple of Englishos.
17101 Adjust @group/@end group pairs.
17102
7da99ede
AD
171032001-11-12 Akim Demaille <akim@epita.fr>
17104
e3aa65c5 17105 %expect was not functioning at all.
7da99ede
AD
17106
17107 * src/conflicts.c (expected_conflicts): Set to -1.
17108 (conflict_report): Use ngettext.
17109 (conflicts_print): Check %expect and make its violation an error.
17110 * doc/bison.texinfo (Expect Decl): Adjust.
17111 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17112 * tests/regression.at (%expect not enough, %expect right)
17113 (%expect too much): New.
17114
ba9dda1a
AD
171152001-11-12 Akim Demaille <akim@epita.fr>
17116
17117 * tests/regression.at (Conflicts): Rename as...
17118 (Unresolved SR Conflicts): this.
17119 (Solved SR Conflicts): New.
17120
337c5bd1
AD
171212001-11-12 Akim Demaille <akim@epita.fr>
17122
17123 * src/reduce.c (print_results): Rename as...
17124 (reduce_output): This.
17125 Output to OUT, passed as argument, instead of output_obstack.
17126 (dump_grammar): Likewise.
17127 (reduce_free): New.
17128 Also free V1.
17129 (reduce_grammar): No longer call reduce_output, since...
17130 * src/print.c (print_results): do it.
17131 * src/main.c (main): Call reduce_free;
17132
c73a41af
AD
171332001-11-12 Akim Demaille <akim@epita.fr>
17134
17135 * src/conflicts.c (print_reductions): Accept OUT as argument.
17136 Output to it, not to output_obstack.
17137 * src/print.c (print_actions): Adjust.
17138
0df87bb6
AD
171392001-11-12 Akim Demaille <akim@epita.fr>
17140
17141 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17142 the result instead of using...
17143 (src_total, rrc_total, src_count, rrc_count): Remove.
17144 (any_conflicts): Remove.
17145 (print_conflicts): Split into...
17146 (conflicts_print, conflicts_output): New.
17147 * src/conflicts.h: Adjust.
17148 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 17149 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
17150 * tests/regression.at (Conflicts): New.
17151 Reported by Tom Lane.
17152
e4d3d4de
AD
171532001-11-12 Akim Demaille <akim@epita.fr>
17154
17155 * tests/regression.at (Invalid input): Remove, duplicate with
17156 ``Invalid input: 1''.
17157
6d7d248e
AD
171582001-11-12 Akim Demaille <akim@epita.fr>
17159
17160 * tests/torture.at (AT_DATA_STACK_TORTURE)
17161 (Exploding the Stack Size with Alloca)
17162 (Exploding the Stack Size with Malloc): New.
17163
e9e4c321
AD
171642001-11-12 Akim Demaille <akim@epita.fr>
17165
17166 * src/bison.simple (YYSTACK_REALLOC): New.
17167 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 17168 Reported by Per Allansson.
e9e4c321 17169
5f7e0832
AD
171702001-11-12 Pascal Bart <pascal.bart@epita.fr>
17171
17172 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17173 define CPP macro, which substitute YYSTYPE by yystype.
17174 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17175 with yyltype/YYLTYPE. This allows inclusion of the generated
17176 header within the parser if the compiler, such as GGC, accepts
17177 multiple equivalent #defines.
17178 From Akim.
17179
e3f1699f
AD
171802001-11-05 Akim Demaille <akim@epita.fr>
17181
17182 * src/reader.c (symbols_output): New, extracted from...
17183 (packsymbols): here.
17184 (reader): Adjust.
17185
65be0866
AD
171862001-11-05 Akim Demaille <akim@epita.fr>
17187
17188 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17189
e4d910bf
AD
171902001-11-05 Akim Demaille <akim@epita.fr>
17191
17192 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17193 pattern.
17194
951366c1
AD
171952001-11-05 Akim Demaille <akim@epita.fr>
17196
17197 * src/options.h (struct option_table_struct): set_flags is void*.
17198 * src/options.c (longopts): Support `--output' and `%output'.
17199 (usage): Adjust.
17200 * src/lex.h (tok_setopt): Remove, replaced with...
17201 (tok_intopt, tok_stropt): these new guys.
17202 * src/lex.c (getopt.h): Not needed.
17203 (token_buffer, unlexed_token_buffer): Not const.
17204 (percent_table): Promote `-' over `_' in directive names.
17205 Active `%name-prefix', `file-prefix', and `output'.
17206 (parse_percent_token): Accept possible arguments to directives.
17207 Promote `-' over `_' in directive names.
17208
d8988b2f
AD
172092001-11-04 Akim Demaille <akim@epita.fr>
17210
17211 * doc/bison.texinfo (Decl Summary): Split the list into
17212 `directives for grammars' and `directives for bison'.
17213 Sort'em.
17214 Add description of `%name-prefix', `file-prefix', and `output'.
17215 Promote `-' over `_' in directive names.
17216 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17217 Simplify the description of `--name-prefix'.
17218 Promote `-' over `_' in directive names.
17219 Promote `--output' over `--output-file'.
17220 Fix the description of `--defines'.
17221 * tests/output.at: Exercise %file-prefix and %output.
17222
6468d18e
AD
172232001-11-02 Akim Demaille <akim@epita.fr>
17224
17225 * doc/refcard.tex: Update.
17226
6b7e85b9
AD
172272001-11-02 Akim Demaille <akim@epita.fr>
17228
17229 * src/symtab.h (SUNDEF): New.
17230 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17231 stand for `uninitialized', instead of 0.
17232 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17233 * src/lex.c (lex): Adjust.
17234
17235 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17236 Number it 0.
17237 Let yylex return it instead of a plain 0.
17238 Reported by Dick Streefland.
17239
cd5aafcf
AD
172402001-11-02 Akim Demaille <akim@epita.fr>
17241
17242 * tests/regression.at (Mixing %token styles): New test.
17243
037ca2f1
AD
172442001-11-02 Akim Demaille <akim@epita.fr>
17245
17246 * src/reader.c (parse_thong_decl): Formatting changes.
17247 (token_translations_init): New, extracted from...
17248 (packsymbols): Here.
17249 Adjust.
17250
270a173c
AD
172512001-11-01 Akim Demaille <akim@epita.fr>
17252
17253 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17254 Check that `9foo.y' produces correct cpp guards.
17255 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17256 guards.
17257 Reported by Wwp.
17258
561f9a30
AD
172592001-11-01 Akim Demaille <akim@epita.fr>
17260
17261 * tests/regression.at (Invalid input: 2): New.
17262 * src/lex.c (unlexed_token_buffer): New.
17263 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17264 too.
17265 Reported by Wwp.
17266
f987e9d2
AD
172672001-11-01 Akim Demaille <akim@epita.fr>
17268
17269 * tests/calc.at: Catch up with 1.30.
17270 * configure.in: Bump to 1.49a.
17271 Adjust to newer Autotest.
17272
0846f581
PB
172732001-10-19 Pascal Bart <pascal.bart@epita.fr>
17274
17275 * src/conflicts.c: Move global variables rrc_total and src_total ...
17276 (print_conflicts): here.
17277 * src/output.c (output): Free global variable user_toknums.
17278 * src/lex.c (token_obstack): Become static.
17279
3c1a79b3
AD
172802001-10-18 Akim Demaille <akim@epita.fr>
17281
17282 * tests/atlocal.in (GCC): Add.
17283 * tests/calc.at: s/m4_match/m4_bmatch/.
17284 s/m4_patsubst/m4_bpatsubst/.
17285 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17286 * configure.in: AC_SUBST(GCC).
17287
5d52e7d0
MA
172882001-10-14 Marc Autret <autret_m@epita.fr>
17289
17290 * src/options.c (create_long_option_table): Fix.
17291
631aa1d3
AD
172922001-10-10 Akim Demaille <akim@epita.fr>
17293
17294 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17295
f6ec6d13
AD
172962001-10-04 Akim Demaille <akim@epita.fr>
17297
17298 * src/reader.c (parse_union_decl): Push the caracters in
17299 union_obstack, not attrs_obstack.
17300
342b8b6e
AD
173012001-10-04 Akim Demaille <akim@epita.fr>
17302
17303 Merge in the branch 1.29.
17304
17305 * src/reader.c (packsymbols): Use a temporary obstack for
17306 `%%tokendef', since output_stack is already used elsewhere.
17307
17308 2001-10-02 Akim Demaille <akim@epita.fr>
17309
17310 Bump 1.29d.
17311
17312 2001-10-02 Akim Demaille <akim@epita.fr>
17313
17314 Version 1.29c.
17315
17316 2001-10-02 Akim Demaille <akim@epita.fr>
17317
17318 * tests/regression.at (Invalid CPP headers): New.
17319 From Alexander Belopolsky.
17320 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17321
17322 2001-10-02 Akim Demaille <akim@epita.fr>
17323
17324 * tests/regression.at (Invalid input): New.
17325 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17326 Reported by Shura.
17327
17328 2001-10-02 Akim Demaille <akim@epita.fr>
17329
17330 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17331
17332 2001-10-02 Akim Demaille <akim@epita.fr>
17333
17334 * src/output.c (output_parser): Assert `skeleton'.
17335 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17336 systems.
17337 From Shura.
17338
17339 2001-10-01 Marc Autret <autret_m@epita.fr>
17340
17341 * src/lex.h: Echo modifications.
17342 * src/lex.c (unlex): Parameter is now token_t.
17343 From Hans Aberg.
17344
17345 2001-10-01 Marc Autret <autret_m@epita.fr>
17346
17347 * src/main.c: Include lex.h.
17348 From Hans Aberg.
17349
17350 2001-09-29 Akim Demaille <akim@epita.fr>
17351
17352 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17353
17354 2001-09-28 Akim Demaille <akim@epita.fr>
17355
17356 * tests/testsuite.at: Update to newer Autotest.
17357 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17358
17359 2001-09-27 Akim Demaille <akim@epita.fr>
17360
17361 Position independent wrapper.
17362
17363 * tests/bison: Remove.
17364 * tests/bison.in: New.
17365 * configure.in: Adjust.
17366
17367 2001-09-27 Paul Eggert <eggert@twinsun.com>
17368
17369 Port quotearg fixes from tar 1.13.24.
17370
17371 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17372 tm to be declared.
17373 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17374 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17375
17376 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17377 * m4/mbrtowc.m4: New file.
17378 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17379 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17380
17381 2001-09-27 Akim Demaille <akim@epita.fr>
17382
17383 Bump to 1.29c.
17384
17385 2001-09-27 Akim Demaille <akim@epita.fr>
17386
17387 Version 1.29b.
17388
17389 2001-09-25 Akim Demaille <akim@epita.fr>
17390
17391 * src/system.h: Include `xalloc.h'.
17392 Remove it from the C files.
17393 * src/files.c (output_files): Free the obstacks.
17394 * src/lex.c (init_lex): Rename as...
17395 (lex_init): this.
17396 (lex_free): New.
17397 * src/main.c (main): Use it.
17398
17399 2001-09-24 Marc Autret <autret_m@epita.fr>
17400
17401 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17402 to output informations in fout (FILE*).
17403 (open_graph, close_graph): Likewise.
17404 (output_graph, output_edge, output_node): Likewise.
17405 * src/vcg.h: Update function prototypes.
17406 * src/print_graph.c (print_graph): Open output graph file.
17407 (print_actions): Adjust.
17408 * src/files.h: Remove extern declaration.
17409 * src/files.c: Remove graph_obstack declaration.
17410 (open_files): Remove graph_obstack initialization.
17411 (output_files): Remove graph_obstack saving.
17412
17413 2001-09-24 Marc Autret <autret_m@epita.fr>
17414
17415 * src/files.c (compute_output_file_names): Fix.
17416
17417 2001-09-24 Marc Autret <autret_m@epita.fr>,
17418 Akim Demaille <akim@epita.fr>
17419
17420 * src/reader.c (reader): Remove call to free_symtab ().
17421 * src/main.c (main): Call it here.
17422 Include symtab.h.
17423 * src/conflicts.c (initialize_conflicts): Rename as...
17424 (solve_conflicts): this.
17425 * src/print.c (print_core, print_actions, print_state)
17426 (print_grammar): Dump to a file instead a `output_obstack'.
17427 (print_results): Dump `output_obstack', and then proceed with the
17428 FILE *.
17429 * src/files.c (compute_output_file_names, close_files): New.
17430 (output_files): Adjust.
17431 * src/main.c (main): Adjust.
17432
17433 2001-09-23 Marc Autret <autret_m@epita.fr>
17434
17435 * src/files.c (compute_header_macro): Computes header macro name
17436 from spec_defines_file when given.
17437
17438 2001-09-23 Marc Autret <autret_m@epita.fr>
17439
17440 * src/files.c (output_files): Add default extensions.
17441
17442 2001-09-22 Akim Demaille <akim@epita.fr>
17443
17444 * src/conflicts.c (finalize_conflicts): Rename as...
17445 (free_conflicts): this.
17446
17447 2001-09-22 Akim Demaille <akim@epita.fr>
17448
17449 * src/gram.c (gram_free): Rename back as...
17450 (dummy): this.
17451 (output_token_translations): Free `token_translations'.
17452 * src/symtab.c (free_symtab): Free the tag field.
17453
17454 2001-09-22 Akim Demaille <akim@epita.fr>
17455
17456 Remove `translations' as it is always set to true.
17457
17458 * src/gram.h: Adjust.
17459 * src/reader.c (packsymbols, parse_token_decl): Adjust
17460 * src/print.c (print_grammar): Adjust.
17461 * src/output.c (output_token_translations): Adjust.
17462 * src/lex.c (lex): Adjust.
17463 * src/gram.c: Be sure the set pointers to NULL.
17464 (dummy): Rename as...
17465 (gram_free): this.
17466
17467 2001-09-22 Akim Demaille <akim@epita.fr>
17468
17469 * configure.in: Invoke AM_LIB_DMALLOC.
17470 * src/system.h: Use dmalloc.
17471 * src/LR0.c: Be sure to have pointers initialized to NULL.
17472 (allocate_itemsets): Allocate kernel_items only if needed.
17473
17474 2001-09-22 Akim Demaille <akim@epita.fr>
17475
17476 * configure.in: Bump to 1.29b.
17477 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17478 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17479 need xmalloc.c in calc.y.
17480 From Pascal Bart.
17481
17482 2001-09-21 Akim Demaille <akim@epita.fr>
17483
17484 Version 1.29a.
17485 * Makefile.maint, config/config.guess, config/config.sub,
17486 * config/missing: Update from masters.
17487 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17488 upon package.m4.
17489 * configure.in (ALL_LINGUAS): Add `tr'.
17490
17491 2001-09-21 Akim Demaille <akim@epita.fr>
17492
17493 * tests/Makefile.am (package.m4): Move to...
17494 ($(srcdir)/$(TESTSUITE)): here.
17495
17496 2001-09-20 Akim Demaille <akim@epita.fr>
17497
17498 * src/complain.c: No longer try to be standalone: use system.h.
17499 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17500 * src/complain.h: Likewise.
17501 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17502 Remove the unused variable `n'.
17503 From Albert Chin-A-Young.
17504
17505 2001-09-18 Marc Autret <autret_m@epita.fr>
17506
17507 * doc/bison.1: Update.
17508 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17509 descriptions.
17510 (Option Cross Key): Update.
17511 Add --graph.
17512
17513 2001-09-18 Marc Autret <autret_m@epita.fr>
17514
17515 * tests/regression.at: New test (comment in %union).
17516
17517 2001-09-18 Marc Autret <autret_m@epita.fr>
17518
17519 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17520 do that.
17521 Reported by Keith Browne.
17522
17523 2001-09-18 Marc Autret <autret_m@epita.fr>
17524
17525 * tests/output.at: Add tests for --defines and --graph.
17526
17527 2001-09-18 Marc Autret <autret_m@epita.fr>
17528
17529 * tests/output.at: Removes tests of %{header,src}_extension features.
17530
17531 2001-09-18 Akim Demaille <akim@epita.fr>
17532
17533 * tests/Makefile.am (package.m4): New.
17534 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17535 (_AT_CHECK_CALC_ERROR): Likewise.
17536 Factor the `, ' part of verbose error messages.
17537
17538 2001-09-18 Marc Autret <autret_m@epita.fr>
17539
17540 * src/getargs.c (longopts): Declare --defines and --graph as options
17541 with optional arguments.
17542 * src/files.h: Add extern declarations.
17543 * src/files.c (spec_graph_file, spec_defines_file): New.
17544 (output_files): Update.
17545 Remove CPP-outed code.
17546
17547 2001-09-18 Marc Autret <autret_m@epita.fr>
17548
17549 Turn off %{source,header}_extension feature.
17550
17551 * src/files.c (compute_exts_from_gf): Update.
17552 (compute_exts_from_src): Update.
17553 (output_files): CPP-out useless code.
17554 * src/files.h: Remove {header,source}_extension extern declarations.
17555 * src/reader.c (parse_dquoted_param): CPP-out.
17556 (parse_header_extension_decl): Remove.
17557 (parse_source_extension_decl): Remove.
17558 (read_declarations): Remove cases tok_{hdrext,srcext}.
17559 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17560 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17561
17562 2001-09-10 Akim Demaille <akim@epita.fr>
17563
17564 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17565 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17566 (AT_CHECK_OUTPUT): this.
17567 Merely check ls' exit status, its output is useless.
17568
17569 2001-09-10 Akim Demaille <akim@epita.fr>
17570
17571 * tests/calc.at: Use m4_match.
17572 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17573
17574 2001-09-10 Marc Autret <autret_m@epita.fr>,
17575 Akim Demaille <akim@epita.fr>
17576
17577 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17578 enum color_e.
17579 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17580 to `normal'.
17581 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17582 * src/lex.h: Adjust prototype.
17583 (token_t): Add `tok_undef'.
17584 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17585 (parse_percent_token): Now returns token_t.
17586 Add default statement in switch.
17587 (lex): Separate `c' as an input variable, from the token_t result
17588 part.
17589 (unlexed): Is a token_t.
17590
17591 2001-09-10 Akim Demaille <akim@epita.fr>
17592
17593 * configure.in: Bump to 1.29a.
17594
17595 2001-09-07 Akim Demaille <akim@epita.fr>
17596
17597 Version 1.29.
17598
17599 2001-08-30 Akim Demaille <akim@epita.fr>
17600
17601 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17602 * m4/atconfig.m4: Remove.
17603 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17604 * tests/bison: New.
17605 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17606 m4_if, m4_patsubst, and m4_regexp.
17607 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17608 `input' file instead of echo.
17609
17610 2001-08-29 Akim Demaille <akim@epita.fr>
17611
17612 Bump to 1.28e.
17613
17614 2001-08-29 Akim Demaille <akim@epita.fr>
17615
17616 Version 1.28d.
17617
17618 2001-08-29 Paul Eggert <eggert@twinsun.com>
17619
17620 * src/bison.simple (yyparse): Don't take the address of an
17621 item before the start of an array, as that doesn't conform to
17622 the C Standard.
17623
17624 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17625
17626 * doc/bison.texinfo (Location Tracking Calc): New node.
17627
17628 2001-08-29 Paul Eggert <eggert@twinsun.com>
17629
17630 * src/output.c (output): Do not define const, as this now
17631 causes more problems than it cures.
17632
17633 2001-08-29 Akim Demaille <akim@epita.fr>
17634
17635 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17636 the nodes.
17637 Be sure to tag the `detailmenu'.
17638
17639 2001-08-29 Akim Demaille <akim@epita.fr>
17640
17641 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17642 download in a tmp dir.
17643
17644 2001-08-28 Marc Autret <autret_m@epita.fr>
17645
17646 * config/depcomp: New file.
17647
17648 2001-08-28 Marc Autret <autret_m@epita.fr>
17649
17650 * doc/bison.1 (mandoc): Adjust.
17651 From Juan Manuel Guerrero.
17652
17653 2001-08-28 Marc Autret <autret_m@epita.fr>
17654
17655 * src/print_graph.c (print_state): Fix.
17656
17657 2001-08-27 Marc Autret <autret_m@epita.fr>
17658
17659 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17660 char * members.
17661 Echo modifications to the functions prototypes.
17662 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17663
17664 2001-08-27 Marc Autret <autret_m@epita.fr>
17665
17666 * src/vcg.c: Include `xalloc.h'.
17667 (add_colorentry): New.
17668 (add_classname): New.
17669 (add_infoname): New.
17670 * src/vcg.h: Add new prototypes.
17671
17672 2001-08-27 Akim Demaille <akim@epita.fr>
17673
17674 * Makefile.maint: Sync. again with CVS Autoconf.
17675
17676 2001-08-27 Akim Demaille <akim@epita.fr>
17677
17678 * Makefile.maint: Formatting changes.
17679 (po-update, cvs-update, update): New targets.
17680 (AMTAR): Remove.
17681
17682 2001-08-27 Akim Demaille <akim@epita.fr>
17683
17684 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17685 * Makefile.maint: Sync. with CVS Autoconf.
17686
17687 2001-08-27 Marc Autret <autret_m@epita.fr>
17688
17689 * src/vcg.h (struct infoname_s): New.
17690 (struct colorentry_s): New.
17691 (graph_s): New fields {vertical,horizontal}_order in structure.
17692 Add `infoname' field.
17693 Add `colorentry' field;
17694 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17695 (G_HORIZONTAL_ORDER): New.
17696 (G_INFONAME): New.
17697 (G_COLORENTRY): New.
17698 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17699 Add output of `infoname'.
17700 Add output of `colorentry'.
17701
17702 2001-08-27 Marc Autret <autret_m@epita.fr>
17703
17704 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17705 This one shadowed a global parameter.
17706
17707 2001-08-24 Marc Autret <autret_m@epita.fr>
17708
17709 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17710 instead of `unsigned'.
17711 (print_state): Do not call obstack_object_size () in obstack_grow ()
17712 to avoid macro variables shadowing.
17713
17714 2001-08-23 Marc Autret <autret_m@epita.fr>
17715
17716 * src/lex.c (percent_table): Typo: s/naem/name/.
17717 Add graph option.
17718 Normalize new options declarations.
17719
17720 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17721
17722 * tests/suite.at: Exercise %header_extension and %source_extension.
17723
17724 2001-08-16 Marc Autret <autret_m@epita.fr>
17725
17726 * src/reader.c (parse_dquoted_param): New.
17727 (parse_header_extension_decl): Use it.
17728 (parse_source_extension_decl): Likewise.
17729
17730 2001-08-16 Marc Autret <autret_m@epita.fr>
17731
17732 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17733 (get_xxxx_str): Use assert () instead of complain ().
17734 Remove return invokations in default cases.
17735 (get_decision_str): Modify default behaviour. Remove second argument.
17736 Echo modifications on calls.
17737 (output_graph): Fix.
17738
17739 2001-08-16 Marc Autret <autret_m@epita.fr>
17740
17741 * src/getargs.c (usage): Update with ``-g, --graph''.
17742
17743 2001-08-16 Marc Autret <autret_m@epita.fr>
17744
17745 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17746 (Option Cross Key): Likewise.
17747 * doc/bison.1: Update.
17748
1c8c2190
PB
177492001-09-25 Pascal Bart <pascal.bart@epita.fr>
17750
17751 * src/output.c (output_master_parser): Don't finish action_obstack.
17752 (output_parser): Don't care about the muscle action, here.
17753 (prepare): Copy the action_obstack in the action muscle.
17754 (output): Free action_obstack.
17755
180d45ba
PB
177562001-09-23 Pascal Bart <pascal.bart@epita.fr>
17757
17758 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17759 will contain `%union' declaration.
17760 (parse_union_decl): Delete #line directive output.
17761 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17762 informations about %union.
17763 (parse_union_decl): Copy the union_obstack in the muscle stype.
17764 * src/bison.simple: Add new #line directive.
17765 Add typdef %%stype YYSTYPE.
17766
c51d1a19
PB
177672001-09-23 Pascal Bart <pascal.bart@epita.fr>
17768
17769 * src/bison.simple: Add new `#line' directive.
17770
6f9344da
PB
177712001-09-22 Pascal Bart <pascal.bart@epita.fr>
17772
17773 * src/bison.simple: New `#line' directive.
17774 * src/output.c (output_parser): Support new dynamic muscle input_line.
17775
652def80
MA
177762001-09-22 Marc Autret <autret_m@epita.fr>
17777
17778 * src/output.c (output_master_parser): New.
17779 (output_parser): Be more re-entrant.
17780
25b222fa
MA
177812001-09-21 Marc Autret <autret_m@epita.fr>
17782
17783 * src/reader.c (copy_definition, parse_union_decl): Update and use
17784 `linef' muscle.
17785 (copy_action): Likewise.
17786 Use obstack_1grow ().
17787 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17788
6bc35ae5
MA
177892001-09-21 Marc Autret <autret_m@epita.fr>
17790
17791 * src/options.c (option_table): Adjust.
17792 * src/lex.c (parse_percent_token): Fix.
17793
c0629aa1
PB
177942001-09-20 Pascal Bart <pascal.bart@epita.fr>
17795
17796 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 17797
82b6d266
PB
177982001-09-20 Pascal Bart <pascal.bart@epita.fr>
17799
17800 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17801 is now an option_table_struct*.
17802 (option_strcmp): New function option_strcmp.
17803 (parse_percent_token): Call option_strcmp.
17804 * src/getargs.c (xalloc.h, options.h): Include it.
17805 (getargs): Call create_long_option_table.
17806 (getargs): Free longopts at the end of the function.
17807 (shortopts): Move in options.c.
17808 * src/options.c (create_long_option_table): New function. Convert
17809 information from option_table to option structure.
17810 * src/reader.c (options.h): Include it.
17811
17812 * src/Makefile.am: Adjust.
17813 * src/options.c (option_table): Create from longopts and percent_table.
17814 * src/getargs.c (longopts): Delete.
17815 * src/lex.c (struct percent_table_struct): Delete.
17816 (percent_table): Delete.
17817 (options.h): Include it.
17818 * src/options.c: Create.
17819 * src/options.h: Create.
17820 Declare enum opt_access_e.
17821 Define struct option_table_struct.
17822
75f5aaea
MA
178232001-09-20 Marc Autret <autret_m@epita.fr>
17824
17825 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17826 sections of Bison.
17827
f508cb0a
PB
178282001-09-19 Pascal Bart <pascal.bart@epita.fr>
17829
17830 * src/bison.simple: s/%%filename/%%skeleton.
17831 * src/muscle_tab.c (getargs.h): Include it.
17832 (muscle_init): Insert new muscle skeleton.
17833
13105fc1
PB
178342001-09-18 Pascal Bart <pascal.bart@epita.fr>
17835
17836 * src/output.c (output_parser): Delete unused variable actions_dumped.
17837
b0c4483e
PB
178382001-09-07 Pascal Bart <pascal.bart@epita.fr>
17839
17840 * src/output.c (output): Delete call to reader_output_yylsp.
17841 * src/reader.c (reader): Likewise.
ba0fe3c7 17842 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 17843
11d82f03
MA
178442001-09-02 Marc Autret <autret_m@epita.fr>
17845
17846 * src/reader.c: Include muscle_tab.h.
17847 (parse_union_decl): Update.
17848 (parse_macro_decl): Rename parse_muscle_decl.
17849 Update to use renamed functions and variable.
17850 (read_declarations, copy_action, read_additionnal_code, : Updated
17851 with correct variables and functions names.
17852 (packsymbols, reader): Likewise.
342b8b6e 17853
11d82f03 17854 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 17855
11d82f03
MA
17856 * src/output.c: Include muscle_tab.h
17857 In all functions using macro_insert, change by using muscle_insert ().
17858 (macro_obstack): Rename muscle_obstack.
17859 Echo modifications in the whole file.
17860 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17861 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17862 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17863
17864 * src/muscle_tab.h: Update double inclusion macros.
17865 (macro_entry_s): Rename muscle_entry_s.
17866 Update prototypes.
342b8b6e 17867
11d82f03
MA
17868 * src/muscle_tab.c: Include muscle_tab.h.
17869 Rename macro_tabble to muscle_table.
17870 (mhash1, mhash2, mcmp): Use muscle_entry.
17871 (macro_init): Rename muscle_init. Update.
17872 (macro_insert): Rename muscle_insert. Update.
17873 (macro_find): Rename muscle_find. Update.
17874
17875 * src/main.c: Include muscle_tab.h.
17876 (main): Call muscle_init ().
17877 * src/Makefile.am (bison_SOURCES): Echo modifications.
17878
93a37297
MA
178792001-09-02 Marc Autret <autret_m@epita.fr>
17880
f753cd62 17881 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 17882
f753cd62
MA
17883 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17884
178852001-09-02 Marc Autret <autret_m@epita.fr>
17886
17887 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 17888
682d48cd
PB
178892001-09-01 Pascal Bart <pascal.bart@epita.fr>
17890
342b8b6e 17891 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
17892 filename.
17893
087c8fda
MA
178942001-09-01 Marc Autret <autret_m@epita.fr>
17895
17896 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17897 to an explicit value to activate the feature. We do it here.
17898
dda680cb
PB
178992001-08-31 Pascal Bart <pascal.bart@epita.fr>
17900
17901 * src/output.c (prepare): Delete the `filename' muscule insertion.
17902 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17903 (parse_union_decl): Likewise.
17904 * src/macrotab.c (macro_init): Initialize filename by infile.
17905
9e644e64
MA
179062001-08-31 Marc Autret <autret_m@epita.fr>
17907
17908 * src/bison.simple (YYLSP_NEEDED): New definition.
17909 * src/output.c (prepare): Add macro insertion of `locations_flag'
17910
17da6427
PB
179112001-08-31 Pascal Bart <pascal.bart@epita.fr>
17912
17913 * src/output.c (prepare): Delete insertion of previous muscles,
17914 and insert the `prefix' muscles.
17915 * src/macrotab.c (macro_init): Likewise.
17916 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 17917 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
17918 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17919 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 17920 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
17921 name_prefix.
17922
e8cb70b9
PB
179232001-08-31 Pascal Bart <pascal.bart@epita.fr>
17924
17925 * src/main.c (main): Standardize.
17926 * src/output.c (output_table_data, output_parser): Likewise.
17927 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17928
63c2d5de
MA
179292001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17930
342b8b6e 17931 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
17932 %%epilogue.
17933 * src/output.c (output): Rename %%declarations to %%prologue.
17934 * src/bison.simple: Echo modifications.
342b8b6e 17935
d8cb5183
MA
179362001-08-31 Marc Autret <autret_m@epita.fr>
17937
17938 * src/reader.c (readgram): CleanUp.
17939 (output_token_defines): Likewise.
17940 (packsymbols): Likewise.
17941 (reader): Likewise.
17942 * src/output.c (output): CPP-out useless code.
17943
6c686258
PB
179442001-08-31 Pascal Bart <pascal.bart@epita.fr>
17945
342b8b6e 17946 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
17947 output_trailers and output_headers.
17948 * src/output.h: Remove obsolete functions prototypes of output_headers
17949 and output_trailers.
17950
8f451ef7
PB
179512001-08-30 Pascal Bart <pascal.bart@epita.fr>
17952
17953 * src/main.c: Include macrotab.h.
342b8b6e 17954 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
17955 Adjust functions prototypes.
17956 * src/macrotab.c (macro_insert): Constify key and value.
17957 (macro_find): Constify key.
17958 (macro_insert): Include 'xalloc.h'
17959 (macro_insert): Use XMALLOC.
17960 (macro_find): Constify return value.
17961 * src/output.c (output_table_data): Rename table to table_data.
17962 (output_parser): Constify macro_key, macro_value.
17963
997b6fd0 179642001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
17965
17966 * src/reader.c (parse_skel_decl): New.
342b8b6e 17967 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
17968 * src/lex.h (token_t): New token `tok_skel'.
17969 * src/lex.c (percent_table): Add skeleton option entry.
17970 Standardize.
17971
ff48177d
MA
179722001-08-29 Marc Autret <autret_m@epita.fr>
17973
17974 * src/bison.simple: Add %%user_code directive at the end.
17975 * src/reader.c (read_additionnal_code): New.
17976 (reader): Use it.
17977 * src/output.c (output_program): Remove.
17978 (output): Update.
17979
b33160bf
MA
179802001-08-28 Marc Autret <autret_m@epita.fr>
17981
17982 * src/output.c (output_actions): Clean up.
4e5caae2 17983 (output_gram): CPP-out useless code.
b33160bf
MA
17984 * src/reader.c (reader): Clean up, CPP-out useless code.
17985
d1a2daf7
PB
179862001-08-28 Pascal Bart <pascal.bart@epita.fr>
17987
342b8b6e 17988 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 17989 directive.
d1a2daf7
PB
17990 * src/bison.simple: Add `%%definitions'.
17991
2b763dfe
MA
179922001-08-28 Marc Autret <autret_m@epita.fr>
17993
17994 * config/depcomp: New file.
17995
f1a87ef6
PE
179962001-08-27 Paul Eggert <eggert@twinsun.com>
17997
17998 * src/bison.simple (yyparse): Don't take the address of an
17999 item before the start of an array, as that doesn't conform to
18000 the C Standard.
18001
82e236e2
RA
180022001-08-27 Robert Anisko <robert.anisko@epita.fr>
18003
f1a87ef6 18004 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
18005 obstack. It was done too late here.
18006
18007 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18008 completely wrong.
18009 (reader): Initialize the macro obstack here, since we need it to grow
18010 '%define' directives.
18011
18012 * src/reader.h: Declare the macro obstack as extern.
18013
b0cfa28a
RA
180142001-08-27 Robert Anisko <robert.anisko@epita.fr>
18015
18016 * src/output.c (output_parser): Fix. Store single '%' characters in
18017 the output obstack instead of throwing them away.
18018
6fc74234
AD
180192001-08-27 Akim Demaille <akim@epita.fr>
18020
18021 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18022
9c76d118
RA
180232001-08-25 Robert Anisko <robert.anisko@epita.fr>
18024
18025 * lib/Makefile.am: Adjust.
18026
a8289c62
RA
180272001-08-25 Robert Anisko <robert.anisko@epita.fr>
18028
18029 * src/bison.simple: Update and add '%%' directives.
18030
b6610515
RA
180312001-08-25 Robert Anisko <robert.anisko@epita.fr>
18032
18033 * src/reader.c (reader): Remove calls to 'output_headers' and
18034 'output_trailers'. Remove some C output.
18035 (readgram): Disable a piece of code that was writing a default
18036 definition for 'YYSTYPE'.
18037 (reader_output_yylsp): Remove.
18038 (packsymbols): Output token defintions to a macro.
18039 (copy_definition): Disable C output.
6fc74234 18040
b6610515
RA
18041 * src/reader.c (parse_macro_decl): New function used to parse macro
18042 declarations.
18043 (copy_string2): Put the body of copy_string into this new function.
18044 Add a parameter to let the caller choose whether he wants to copy the
18045 string delimiters or not.
18046 (copy_string): Be a simple call to copy_string2 with the last argument
18047 bound to true.
18048 (read_declarations): Add case for macro definition.
18049 (copy_identifier): New.
6fc74234 18050 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
18051 rather than lex.
18052
26f609ff
RA
180532001-08-25 Robert Anisko <robert.anisko@epita.fr>
18054
18055 * src/output.c (prepare): Add prefixed names.
18056 (output_parser): Output semantic actions.
18057 (output_parser): Fix bug on '%%line' directives.
6fc74234 18058
26f609ff
RA
18059 * src/output.c (output_headers): Remove. The C code printed by this
18060 function should now be in the skeletons.
18061 (output_trailers): Remove.
18062 (output): Disable call to 'reader_output_yylsp'.
18063 (output_rule_data): Do not output tables to the table obstack.
18064
18065 * src/output.c: Remove some C dedicated output.
18066 Improve the use of macro and output obstacks.
18067 (output_defines): Remove.
6fc74234 18068
26f609ff
RA
18069 * src/output.c (output_token_translations): Associate 'translate'
18070 table with a macro. No output to the table obstack.
18071 (output_gram): Same for 'rhs' and 'prhs'.
18072 (output_stos): Same for 'stos'.
18073 (output_rule_data): Same for 'r1' and 'r2'.
18074 (token_actions): Same for 'defact'.
18075 (goto_actions): Same for 'defgoto'.
18076 (output_base): Same for 'pact' and 'pgoto'.
18077 (output_table): Same for 'table'.
18078 (output_check): Same for 'check'.
6fc74234 18079
26f609ff
RA
18080 * src/output.c (output_table_data): New function.
18081 (output_short_table): Remove.
18082 (output_short_or_char_table): Remove.
6fc74234 18083
26f609ff
RA
18084 * src/output.c (output_parser): Replace most of the skeleton copy code
18085 with something new. Skeletons are now processed character by character
18086 rather than line by line, and Bison looks for '%%' macros. This is the
18087 first step in making Bison's output process (a lot) more flexible.
18088 (output_parser): Use the macro table.
18089
6f43b113
RA
180902001-08-25 Robert Anisko <robert.anisko@epita.fr>
18091
18092 * src/main.c (main): Initialize the macro table.
18093
dd3127cf
RA
180942001-08-25 Robert Anisko <robert.anisko@epita.fr>
18095
18096 * src/lex.c (percent_table): Add tok_define.
18097 * src/lex.h: Add tok_define.
18098
aa321494
RA
180992001-08-25 Robert Anisko <robert.anisko@epita.fr>
18100
18101 * src/macrotab.c: New file.
18102 * src/macrotab.h: New file.
18103 * src/Makefile.am: Update.
18104
68bd3b6b
RA
181052001-08-25 Robert Anisko <robert.anisko@epita.fr>
18106
18107 * lib/hash.c: New file.
18108 * lib/hash.h: New file.
18109 * lib/Makefile.am: Update.
18110
45f8dd1e
AD
181112001-08-15 Akim Demaille <akim@epita.fr>
18112
18113 Version 1.28c.
18114
40a64a7a 181152001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
18116
18117 * src/reader.c (readgram): Indent output macro YYSTYPE.
18118 (packsymbols): Likewise.
18119 (output_token_defines): Likewise.
18120 * src/files.c: Standardize.
18121 (compute_header_macro): New.
18122 (defines_obstack_save): New. Use compute_header_macro.
18123 (output_files): Update. Use defines_obstack_save.
18124
f9a8293a
AD
181252001-08-15 Akim Demaille <akim@epita.fr>
18126
18127 * doc/bison.texinfo (Table of Symbols): Document
18128 YYSTACK_USE_ALLOCA.
18129
150ca7a7
AD
181302001-08-15 Akim Demaille <akim@epita.fr>
18131
18132 * missing: Update from CVS Automake.
18133 * config/config.guess, config/config.sub, config/texinfo.tex:
18134 Update from gnu.org.
18135
69b5cec4
AD
181362001-08-15 Akim Demaille <akim@epita.fr>
18137
18138 * Makefile.maint: Sync with CVS Autoconf.
18139
f2b5126e
PB
181402001-08-14 Pascal Bart <pascal.bart@epita.fr>
18141
69b5cec4 18142 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
18143 `fdl.texi'.
18144 * doc/fdl.texi: Add to package.
18145
4ecbf796
MA
181462001-08-14 Marc Autret <autret_m@epita.fr>
18147
18148 Turn on %{source,header}_extension features.
18149
69b5cec4 18150 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
18151 source_extension.
18152 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 18153 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
18154 between options.
18155
95fb5662
MA
181562001-08-14 Marc Autret <autret_m@epita.fr>
18157
18158 * src/files.c (compute_base_names): Add extensions computing when
18159 `--file-prefix' used.
18160 Standardize function calls.
18161
78d09da9
MA
181622001-08-13 Marc Autret <autret_m@epita.fr>
18163
69b5cec4 18164 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
18165 defining it (defined but null disables alloca).
18166
5a009f2c
MA
181672001-08-13 Marc Autret <autret_m@epita.fr>
18168
18169 * src/bison.simple (_yy_memcpy): CPP reformat.
18170
1e41465a
PB
181712001-08-13 Pascal Bart <pascal.bart@epita.fr>
18172
18173 * tests/atconfig.in (CPPFLAGS): Fix.
18174
c67a198d
PB
181752001-08-10 Pascal Bart <pascal.bart@epita.fr>
18176
79282c6c 18177 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
18178 `gpl.texi'.
18179 * doc/gpl.texi: Add to package.
18180
09a6de7e
MA
181812001-08-10 Marc Autret <autret_m@epita.fr>
18182
18183 * src/print_graph.h: Fix.
18184 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18185
b77b9ee0
AD
181862001-08-10 Akim Demaille <akim@epita.fr>
18187
18188 * src/system.h: Provide default declarations for stpcpy, strndup,
18189 and strnlen.
18190
3e259915
MA
181912001-08-10 Robert Anisko <anisko_r@epita.fr>
18192
18193 * doc/bison.texinfo (Locations): Update @$ stuff.
18194
ca96bc2d
MA
181952001-08-09 Robert Anisko <anisko_r@epita.fr>
18196
18197 * src/bison.simple (YYLLOC_DEFAULT): Update.
18198 (yyparse): Adjust.
18199
fdc6758b
MA
182002001-08-08 Marc Autret <autret_m@epita.fr>
18201
b77b9ee0 18202 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
18203 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18204 Reported by Fabrice Bauzac.
957d4dbf 18205
600cad3b
MA
182062001-08-08 Marc Autret <autret_m@epita.fr>
18207
18208 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18209 * src/vcg.c (output_node): Fix.
18210 * src/vcg.h: Cleanup.
18211 * src/print_graph.c: Add comments.
b77b9ee0 18212 (node_output_size): New global variable. Simplify the formatting of
600cad3b 18213 the VCG graph output.
b77b9ee0 18214 (print_actions): Unused code is now used. It notifies the final state
600cad3b 18215 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 18216 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
18217 blue.
18218 Get the current node name and node_obstack by argument.
18219 (node_obstack): New variable.
18220 (print_state): Manage node_obstack.
18221 (print_core): Use node_obstack given by argument.
18222 A node is not only computed here but in print_actions also.
18223 (print_graph): CPP out useless code instead of commenting it.
18224
976e528f
AD
182252001-08-07 Pascal Bart <pascal.bart@epita.fr>
18226
18227 * tests/atconfig.in (CPPFLAGS): Fix.
18228
20e8e5ca
AD
182292001-08-07 Akim Demaille <akim@epita.fr>
18230
18231 * src/print_graph.c (quote): New.
18232 (print_core): Use it.
18233
957d4dbf 182342001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 18235
3e3da797
AD
18236 * src/vcg.c (complain.h): Include it.
18237 Unepitaize `return' invocations.
c4b66126 18238 [NDEBUG] (main): Remove.
79282c6c 18239 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
18240 * src/files.c (open_files): Initialize graph_obstack.
18241 * src/print_graph.c (print_actions): CPP out useless code.
18242 (print_core): Don't output the last `\n' in labels.
18243 Use `quote'.
18244 * src/files.c (output_files): Output the VCG file.
18245 * src/main.c (main): Invoke print_graph ();
3e3da797 18246
957d4dbf 182472001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
18248
18249 Automaton VCG graph output.
18250 Using option ``-g'' or long option ``--graph'', you can generate
18251 a gram_filename.vcg file containing a VCG description of the LALR (1)
18252 automaton of your grammar.
18253
18254 * src/main.c: Call to print_graph() function.
18255 * src/getargs.h: Update.
18256 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18257 (graph_flag): New flag.
18258 (longopts): Update.
18259 (getargs): Add case `g'.
18260 * src/files.c (graph_obstack): New obstack struct.
18261 (open_files): Initialize new obstack.
18262 (output_files): Saves graph_obstack if required.
18263 * src/files.h (graph_obstack): New extern declaration.
18264 * src/Makefile.am: Add new source files.
18265
927c1557 182662001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
18267
18268 * src/print_graph.c, src/print_graph.h (graph): New.
18269 * src/vcg.h: New file.
18270 * src/vcg.c: New file, VCG graph handling.
18271
7333d403
AD
182722001-08-06 Marc Autret <autret_m@epita.fr>
18273
18274 Add of %source_extension and %header_extension which specify
18275 the source or/and the header output file extension.
18276
18277 * src/files.c (compute_base_names): Remove initialisation of
18278 src_extension and header_extension.
18279 (compute_exts_from_gf): Update.
18280 (compute_exts_from_src): Update.
18281 (output_files): Update.
18282 * src/reader.c (parse_header_extension_decl): New.
18283 (parse_source_extension_decl): New.
18284 (read_declarations): New case statements for the new tokens.
18285 * src/lex.c (percent_table): Add entries for %source_extension
18286 and %header_extension.
18287 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18288
84163231
AD
182892001-08-06 Marc Autret <autret_m@epita.fr>
18290
18291 * configure.in: Bump to 1.28c.
18292 * doc/bison.texinfo: Texinfo thingies.
18293
8303fc42
AD
182942001-08-04 Pascal Bart <pascal.bart@epita.fr>
18295
18296 * tests/atconfig.in (CPPFLAGS): Add.
18297 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18298
70a84437
AD
182992001-08-03 Akim Demaille <akim@epita.fr>
18300
18301 Version 1.28b.
18302
2ce10144
AD
183032001-08-03 Akim Demaille <akim@epita.fr>
18304
18305 * tests/Makefile.am (check-local): Ship testsuite.
18306 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18307 Include `string.h'.
18308
1e3e4bc1
AD
183092001-08-03 Akim Demaille <akim@epita.fr>
18310
18311 * configure.in: Try using -Wformat when compiling.
18312
42b45b7f
AD
183132001-08-03 Akim Demaille <akim@epita.fr>
18314
18315 * configure.in: Bump to 1.28b.
18316
8f13fe33
AD
183172001-08-03 Akim Demaille <akim@epita.fr>
18318
18319 * src/complain.c: Adjust strerror_r portability issues.
18320
b37ba92c
AD
183212001-08-03 Akim Demaille <akim@epita.fr>
18322
18323 Version 1.28a.
18324
b0ce6046
AD
183252001-08-03 Akim Demaille <akim@epita.fr>
18326
18327 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18328 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18329 * src/getargs.c: Include complain.h.
18330 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18331 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18332
d01c415b
AD
183332001-08-03 Akim Demaille <akim@epita.fr>
18334
18335 * src/reader.c (readgram): Display hidden chars in error messages.
18336
459dd1a6
AD
183372001-08-03 Akim Demaille <akim@epita.fr>
18338
18339 Update to gettext 0.10.39.
18340
53b74c0c
AD
183412001-08-03 Akim Demaille <akim@epita.fr>
18342
18343 * lib/strspn.c: New.
18344
234a3be3
AD
183452001-08-01 Marc Autret <autret_m@epita.fr>
18346
18347 * doc/bison.texinfo: Update.
18348 * doc/bison.1 (mandoc): Update.
18349 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18350 * src/files.c: Support output files extensions computing.
18351 (src_extension): New static variable.
18352 (header_extension): New static variable.
18353 (tr): New function.
18354 (get_extension_index): New function, gets the index of an extension
18355 filename in a string.
18356 (compute_exts_from_gf): New function, computes extensions from the
18357 grammar file extension.
18358 (compute_exts_from_src): New functions, computes extensions from the
18359 C source file extension, file given by ``-o'' option.
18360 (compute_base_names): Update.
18361 (output_files): Update.
18362
847bf1f5
AD
183632001-08-01 Robert Anisko <anisko_r@epita.fr>
18364
d995fee7 18365 * doc/bison.texi: Document @$.
847bf1f5
AD
18366 (Locations): New section.
18367
d074a105
AD
183682001-07-18 Akim Demaille <akim@epita.fr>
18369
18370 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18371 * config/prev-version.txt, config/move-if-change: New.
18372 * Makefile.am: Adjust.
18373
3419715d
AD
183742001-07-08 Pascal Bart <pascal.bart@epita.fr>
18375
18376 * src/bison.simple (yyparse): Suppress warning `comparaison
18377 between signed and unsigned'.
18378
62ab6972
AD
183792001-07-05 Pascal Bart <pascal.bart@epita.fr>
18380
18381 * src/getargs.h (raw_flag): Remove.
18382 * src/getargs.c: Die on `-r'/`--raw'.
18383 * src/lex.c (parse_percent_token): Die on `%raw'.
18384 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18385 * tests/calc.at: Suppress test with option `--raw'.
18386
1e24cc5b
AD
183872001-07-14 Akim Demaille <akim@epita.fr>
18388
18389 * config/: New.
18390 * configure.in: Require Autoconf 2.50.
18391 Update to gettext 0.10.38.
18392
32dfccf8
AD
183932001-03-16 Akim Demaille <akim@epita.fr>
18394
18395 * doc/bison.texinfo: ANSIfy the examples.
18396
cd5bd6ac
AD
183972001-03-16 Akim Demaille <akim@epita.fr>
18398
18399 * getargs.c (skeleton): New variable.
18400 (longopts): --skeleton is a new option.
18401 (shortopts, getargs): -S is a new option.
18402 * getargs.h: Declare skeleton.
18403 * output.c (output_parser): Use it.
18404
5141b016
AD
184052001-03-16 Akim Demaille <akim@epita.fr>
18406
18407 * m4/strerror_r.m4: New.
18408 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18409 * lib/error.h, lib/error.c: Update.
18410
447992b9
AD
184112001-03-16 Akim Demaille <akim@epita.fr>
18412
18413 * src/getargs.c (longopts): Clean up.
18414
274d42ce
AD
184152001-02-21 Akim Demaille <akim@epita.fr>
18416
18417 * src/reader.c (gensym): `gensym_count' is your own.
18418 Use a static buf to create the symbol name, as token_buffer is no
18419 longer a buffer.
18420
22c821f3
AD
184212001-02-08 Akim Demaille <akim@epita.fr>
18422
18423 * src/conflicts.c (conflict_report): Be sure not to append to res
18424 between two calls, which could happen if both first sprintf were
18425 skipped, but not the first cp += strlen.
18426
18569462
AD
184272001-02-08 Akim Demaille <akim@epita.fr>
18428
18429 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18430 New, from fileutils 4.0.37.
18431 * configure.in: Require Autoconf 2.49c. I took some time before
18432 making this decision. This is the only way out for portability
18433 issues in Bison, it would mean way too much duplicate effort to
18434 import in Bison features implemented in 2.49c since 2.13.
18435 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18436
0d8f3c8a
AD
184372001-02-02 Akim Demaille <akim@epita.fr>
18438
18439 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 18440 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 18441
f17bcd1f
AD
184422001-01-19 Akim Demaille <akim@epita.fr>
18443
18444 Get rid of the ad hoc handling of token_buffer in the scanner: use
18445 the obstacks.
18446
18447 * src/lex.c (token_obstack): New.
18448 (init_lex): Initialize it. No longer call...
18449 (grow_token_buffer): this. Remove it.
18450 Adjust all the places which used it to use the obstack.
18451
511e79b3
AD
184522001-01-19 Akim Demaille <akim@epita.fr>
18453
18454 * src/lex.h: Rename all the tokens:
18455 s/\bENDFILE\b/tok_eof/g;
18456 s/\bIDENTIFIER\b/tok_identifier/g;
18457 etc.
18458 Let them be enums, not #define, to ease debugging.
18459 Adjust all the code.
18460
0d6508ef
AD
184612001-01-18 Akim Demaille <akim@epita.fr>
18462
18463 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18464 * src/lex.c (maxtoken, grow_token_buffer): Static.
18465
6deb4447
AD
184662001-01-18 Akim Demaille <akim@epita.fr>
18467
18468 Since we now use obstacks, more % directives can be enabled.
18469
18470 * src/lex.c (percent_table): Also accept `%yacc',
18471 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18472 `%debug'.
18473 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18474 instead of returning a token.
18475 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18476 * src/reader.c (read_declarations): Adjust.
18477 * src/files.c (open_files): Don't call `compute_base_names', don't
18478 compute `attrsfile' since they depend upon data which might be
18479 *in* the input file now.
18480 (output_files): Do it here.
18481 * src/output.c (output_headers): Document the fact that this patch
18482 introduces a guaranteed SEGV for semantic parsers.
18483 * doc/bison.texinfo: Document them.
18484 * tests/suite.at: Exercise these %options.
18485
ff4423cc
AD
184862000-12-20 Akim Demaille <akim@epita.fr>
18487
18488 Also handle the output file (--verbose) with obstacks.
18489
18490 * files.c (foutput): Remove.
18491 (output_obstack): New.
18492 Adjust all dependencies.
18493 * src/conflicts.c: Return a string.
18494 * src/system.h (obstack_grow_string): Rename as...
18495 (obstack_sgrow): this. Be ready to work with non literals.
18496 (obstack_fgrow4): New.
18497
956dba3a
AD
184982000-12-20 Akim Demaille <akim@epita.fr>
18499
18500 * src/files.c (open_files): Fix the computation of short_base_name
18501 in the case of `-o foo.tab.c'.
18502
337bab46
AD
185032000-12-20 Akim Demaille <akim@epita.fr>
18504
18505 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18506 (copy_dollar): Now that everything uses obstacks, get rid of the
18507 FILE * parameters.
18508
5d3214b8
AD
185092000-12-20 Akim Demaille <akim@epita.fr>
18510
18511 * src/files.c (open_files): Actually the `.output' file is based
18512 on the short_base_name, not base_name.
18513 * tests/suite.at (Checking output file names): Adjust.
18514
29092a57
AD
185152000-12-20 Akim Demaille <akim@epita.fr>
18516
18517 * src/bison.s1: Remove, we now use directly...
18518 * src/bison.simple: this.
18519 * src/Makefile.am: Use pkgdata instead of data.
18520
ea5607fd
AD
185212000-12-20 Akim Demaille <akim@epita.fr>
18522
18523 * src/files.c (guard_obstack): New.
18524 (open_files): Initialize it.
18525 (output_files): Dump it...
18526 * src/files.h: Export it.
18527 * src/reader.c (copy_guard): Use it.
18528
27110317
AD
185292000-12-19 Akim Demaille <akim@epita.fr>
18530
18531 * src/files.c (outfile, defsfile, actfile): Removed as global
18532 vars.
18533 (open_files): Don't compute them.
18534 (output_files): Adjust.
18535 (base_name, short_base_name): Be global.
18536 Adjust dependencies.
18537
19c50364
AD
185382000-12-19 Akim Demaille <akim@epita.fr>
18539
18540 * src/files.c (strsuffix): New.
18541 (stringappend): Be just like strcat but allocate.
18542 (base_names): Eve out from open_files.
18543 Try to simplify the rather hairy computation of base_name and
18544 short_base_name.
18545 (open_files): Use it.
18546 * tests/suite.at (Checking output file names): New test.
18547
573c1d9f
AD
185482000-12-19 Akim Demaille <akim@epita.fr>
18549
18550 * src/system.h (obstack_grow_literal_string): Rename as...
18551 (obstack_grow_string): this.
18552 * src/output.c (output_parser): Recognize `%% actions' instead of
18553 `$'.
18554 * src/bison.s1: s/$/%% actions/.
18555 * src/bison.hairy: Likewise.
18556
ef7ddedd
AD
185572000-12-19 Akim Demaille <akim@epita.fr>
18558
18559 * src/output.c (output_parser): Compute the `#line' lines when
18560 there are.
18561 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18562 Suggested by Hans Aberg.
18563
ff61dabd
AD
185642000-12-19 Akim Demaille <akim@epita.fr>
18565
18566 Let the handling of the skeleton files be local to the procedures
18567 that use it.
18568
18569 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18570 longer static.
18571 (fparser, open_extra_files): Remove.
18572 (open_files, output_files): Don't take care of fparser.
18573 * src/files.h: Adjust.
18574 * src/output.c (output_parser): Open and close the file to the
18575 skeleton.
18576 * src/reader.c (read_declarations): When %semantic_parser, open
18577 fguard.
18578
55b96341
AD
185792000-12-19 Akim Demaille <akim@epita.fr>
18580
18581 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18582 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18583
358c15b7
AD
185842000-12-19 Akim Demaille <akim@epita.fr>
18585
18586 * src/files.c (open_files): Yipee! We no longer need all the code
18587 looking for `/tmp' since we have no tmp file.
18588
7de3329e
AD
185892000-12-19 Akim Demaille <akim@epita.fr>
18590
18591 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18592 New macros.
18593 * src/files.c (open_files): Less dependency on MSDOS etc.
18594
3abcd459
AD
185952000-12-14 Akim Demaille <akim@epita.fr>
18596
18597 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18598 Provide a default definition.
18599 Use it when executing the default @ action.
18600 * src/reader.c (reader_output_yylsp): No longer include
18601 `timestamp' and `text' in the default YYLTYPE.
18602
2a91a95e
AD
186032000-12-12 Akim Demaille <akim@epita.fr>
18604
18605 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18606 (copy_guard): Quote the file names.
18607 Reported by Laurent Mascherpa.
18608
14d3eb9b
AD
186092000-12-12 Akim Demaille <akim@epita.fr>
18610
18611 * src/output.c (output_headers, output_program, output): Be sure
18612 to escape special characters when outputting filenames.
18613 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18614 (output_headers): Don't depend on them, Use ACTSTR.
18615
d7045ec6
AD
186162000-11-17 Akim Demaille <akim@epita.fr>
18617
18618 * lib/obstack.h: Formatting changes.
18619 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18620 prevents type checking.
18621 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18622 cast the value to (void *): assigning a `foo *' to a `void *'
18623 variable is valid.
18624 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18625 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18626 append characters.
18627
6fd54b73
AD
186282000-11-17 Akim Demaille <akim@epita.fr>
18629
18630 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18631 as...
18632 (suite.m4, regression.m4, calc.m4): these.
18633 * tests/atgeneral.m4: Update from CVS Autoconf.
18634
4c50eae6
AD
186352000-11-17 Akim Demaille <akim@epita.fr>
18636
18637 * tests/regression.m4 (%union and --defines): New test,
18638 demonstrating a current bug in the obstack implementation.
18639
a35f64ea
AD
186402000-11-17 Akim Demaille <akim@epita.fr>
18641
18642 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18643 macros.
18644 Use them to declare the variables which are global or local to
18645 `yyparse'.
18646
7de23534
AD
186472000-11-17 Akim Demaille <akim@epita.fr>
18648
18649 * acconfig.h: Remove, no longer used.
18650
aa7815f5
AD
186512000-11-07 Akim Demaille <akim@epita.fr>
18652
18653 * src: s/Copyright (C)/Copyright/g.
18654
5af1f549
AD
186552000-11-07 Akim Demaille <akim@epita.fr>
18656
18657 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18658 defining.
18659 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18660
553e2b22
AD
186612000-11-07 Akim Demaille <akim@epita.fr>
18662
18663 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18664 Merge in a single CPP if/else.
18665
8a4f41d6
AD
186662000-11-07 Akim Demaille <akim@epita.fr>
18667
18668 * src/output.c (output): Remove useless variables.
18669 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18670 argument `data' for consistency with the prototypes.
18671 Qualify it `const'.
18672 (obstack_copy, obstack_copy0): Rename the second argument as
18673 `address' for consistency. Qualify it `const'.
18674 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18675 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18676 `const' their input argument (`data' or `address').
18677 Adjust the corresponding macros to include `const' in casts.
18678
095a3fb5
AD
186792000-11-03 Akim Demaille <akim@epita.fr>
18680
18681 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18682 s/PFILE1/BISON_HAIRY/.
18683 Adjust dependencies.
18684
d1cdce7c
AD
186852000-11-03 Akim Demaille <akim@epita.fr>
18686
090c5ebf 18687 For some reason, this was not applied.
d1cdce7c
AD
18688
18689 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18690 `unlink': it's no longer used.
18691
9311529b
AD
186922000-11-03 Akim Demaille <akim@epita.fr>
18693
18694 * src/files.c (skeleton_find): New function, eved out of...
18695 (open_files, open_extra_files): here.
18696
d8880f69
AD
186972000-11-03 Akim Demaille <akim@epita.fr>
18698
18699 Don't use `atexit'.
18700
18701 * src/files.c (obstack_save): New function.
18702 (done): Rename as...
18703 (output_files): this.
18704 Use `obstack_save'.
18705 * src/main.c (main): Don't use `atexit' to register `done', since
18706 it no longer has to remove tmp files, just call `output_files'
18707 when there are no errors.
18708
0dbb648e
AD
187092000-11-02 Akim Demaille <akim@epita.fr>
18710
18711 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18712 `unlink': it's no longer used.
18713 * src/files.h: Formatting changes.
18714
896fe5c1
AD
187152000-11-02 Akim Demaille <akim@epita.fr>
18716
18717 Remove the last uses of mktemp and unlink/delete.
18718
18719 * src/files.c (fdefines, ftable): Removed.
18720 (defines_ostack, table_obstack): New.
18721 Adjust dependencies of the former into uses of the latter.
18722 * src/output.c (output_short_or_char_table, output_short_table):
18723 Convert to using obstacks.
18724 * src/reader.c (copy_comment2): Accept one FILE * and two
18725 obstacks.
18726 (output_token_defines, reader_output_yylsp): Use obstacks.
18727 * src/system.h (obstack_fgrow3): New.
1f65350a 18728 * po/POTFILES.in: Adjust.
896fe5c1 18729
dd60faec
AD
187302000-11-01 Akim Demaille <akim@epita.fr>
18731
18732 Change each use of `fattrs' into a use of `attrs_obstack'.
18733
18734 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18735 * src/files.c (fattrs): Remove.
18736 (attrs_obstack): New.
18737 Adjust all dependencies.
18738 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18739
8c7ebe49
AD
187402000-11-01 Akim Demaille <akim@epita.fr>
18741
18742 Introduce obstacks.
18743 Change each use of `faction' into a use of `action_obstack'.
18744
18745 * lib/obstack.h, lib/obstack.c: New files.
18746 * src/files.c (faction): Remove.
18747 (action_obstack): New.
18748 Adjust all dependencies.
18749
77aee789
AD
187502000-10-20 Akim Demaille <akim@epita.fr>
18751
18752 * lib/quote.h (PARAMS): New macro. Use it.
18753
43591cec
AD
187542000-10-16 Akim Demaille <akim@epita.fr>
18755
18756 * src/output.c (output_short_or_char_table): New function.
18757 (output_short_table, output_token_translations): Use it.
18758 (goto_actions): Use output_short_table.
18759
1e9798d5
AD
187602000-10-16 Akim Demaille <akim@epita.fr>
18761
18762 * src/symtab.c (bucket_new): New function.
18763 (getsym): Use it.
18764
18765 * src/output.c (output_short_table): New argument to display the
18766 comment associated with the table.
18767 Adjust dependencies.
18768 (output_gram): Use it.
18769 (output_rule_data): Nicer output layout for YYTNAME.
18770
f282676b
AD
187712000-10-16 Akim Demaille <akim@epita.fr>
18772
18773 * src/lex.c (read_typename): New function.
18774 (lex): Use it.
18775 * src/reader.c (copy_dollar): Likewise.
18776
550a72a3
AD
187772000-10-16 Akim Demaille <akim@epita.fr>
18778
18779 * src/reader.c (copy_comment2): Expect the input stream to be on
18780 the `/' which is suspected to open a comment, instead of being
18781 called after `//' or `/*' was read.
18782 (copy_comment, copy_definition, parse_union_decl, copy_action)
18783 (copy_guard): Adjust.
18784
131e2fef
AD
187852000-10-16 Akim Demaille <akim@epita.fr>
18786
18787 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18788 `read_signed_integer'.
18789
79282c5a
AD
187902000-10-16 Akim Demaille <akim@epita.fr>
18791
18792 * src/reader.c (copy_dollar): New function.
18793 (copy_guard, copy_action): Use it.
18794
ff4a34be
AD
187952000-10-16 Akim Demaille <akim@epita.fr>
18796
18797 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18798 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18799 New files, from Fileutils 4.0.27.
18800 * src/main.c (printable_version): Remove.
18801 * src/lex.c, src/reader.c: Use `quote'.
18802
188032000-10-04 Akim Demaille <akim@epita.fr>
18804
18805 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18806
14ded682
AD
188072000-10-04 Akim Demaille <akim@epita.fr>
18808
18809 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18810
8e03724b
AD
188112000-10-04 Akim Demaille <akim@epita.fr>
18812
18813 When a literal string is used to define two different tokens,
18814 `bison -v' segfaults.
18815 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18816
18817 * tests/regression.m4: New file.
18818 Include the core of the sample provided by Piotr Gackiewicz.
18819 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18820 properly.
18821
a9e64249
AD
188222000-10-04 Akim Demaille <akim@epita.fr>
18823
18824 * src/reader.c (parse_expect_decl): Keep `count' within the size
18825 of `buffer'.
18826 From Neil Booth.
18827
da9abf43
AD
188282000-10-02 Paul Eggert <eggert@twinsun.com>
18829
18830 * bison.s1 (yyparse): Assign the default value
18831 unconditionally, to avoid a GCC warning and make the parser a
18832 tad smaller.
18833
c33638bb
AD
188342000-10-02 Akim Demaille <akim@epita.fr>
18835
18836 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18837 options.
18838
444c570a
AD
188392000-10-02 Akim Demaille <akim@epita.fr>
18840
18841 * src/derives.c, src/print.c, src/reduce.c: To ease the
18842 translation, move some `\n' out of the translated strings.
18843
89cab50d
AD
188442000-10-02 Akim Demaille <akim@epita.fr>
18845
18846 The location tracking mechanism is precious for parse error
18847 messages. Nevertheless, it is enabled only when `@n' is used in
18848 the grammar, which is a different issue (you can use it in error
18849 message, but not in the grammar per se). Therefore, there should
18850 be another means to enable it.
18851
18852 * src/getargs.c (getargs): Support `--locations'.
18853 (usage): Report it.
18854 * src/getargs.h (locationsflag): Export it.
18855 * src/lex.c (percent_table): Support `%locations'.
18856 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18857 with `locationsflag'.
18858 * doc/bison.texinfo: Document `--locations' and `%locations'.
18859 Sort the options.
18860 * tests/calc.m4: Test it.
18861
18862 For regularity of the names, replace each
18863 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18864 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18865 In addition replace each `flag' with `_flag'.
18866
d6c2cba0
AD
188672000-10-02 Akim Demaille <akim@epita.fr>
18868
18869 Also test parse error messages, including with YYERROR_VERBOSE.
18870
18871 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18872 associative).
18873 Use it to check the computations.
18874 Use it to check `nonassoc' is honored.
18875 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18876 `--yyerror-verbose'.
18877 (_AT_CHECK_CALC): Adjust to this option.
18878 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18879
5a35a6cb
AD
188802000-10-02 Akim Demaille <akim@epita.fr>
18881
18882 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18883 the latter demonstrates a flaw in the handling of non debugging
18884 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18885 was used in order to simplify:
18886
18887 #if YYDEBUG
18888 if (yydebug)
18889 {
18890 ...
18891 }
18892 #endif
18893
18894 into
18895
18896 if (yydebug)
18897 {
18898 ...
18899 }
18900
18901 unfortunately this leads to a CPP conflict when
18902 `--name-prefix=foo' is used since it produces `#define yydebug
18903 foodebug'.
18904
18905 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18906 (YYDPRINTF): New macro.
18907 Spread its use.
18908 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18909 the bison options.
18910 Also test `--verbose', `--defines' and `--name-prefix'.
18911
71da9eea
AD
189122000-10-02 Akim Demaille <akim@epita.fr>
18913
18914 Improve the readability of the produced parsers.
18915
18916 * src/bison.s1: Formatting changes.
18917 Improve the comment related to the `$' mark.
18918 (yydefault): Don't fall through to `yyresume': `goto' there.
18919 * src/output.c (output_parser): When the `$' is met, skip the end
18920 of its line.
18921 New variable, `number_of_dollar_signs', to check there's exactly
18922 one `$' in the parser skeleton.
18923
95e36146
AD
189242000-10-02 Akim Demaille <akim@epita.fr>
18925
18926 * lib/xstrdup.c: New file, from the fileutils.
18927 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18928 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18929 instead of strlen + xmalloc + strcpy.
18930 * src/symtab.c (copys): Remove, use xstrdup instead.
18931
d7020c20
AD
189322000-10-02 Akim Demaille <akim@epita.fr>
18933
18934 * src/gram.h (associativity): New enum type which replaces the
18935 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18936 `right_assoc', `left_assoc' and `non_assoc'.
18937 Adjust all dependencies.
18938 * src/reader.c: Formatting changes.
18939 (LTYPESTR): Don't define it, use it as a literal in
18940 `reader_output_yylsp'.
18941 * src/symtab.h (symbol_class): New enum type which replaces the
18942 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18943 `sunknown', `stoken and `snterm'.
18944
1916f98e
AD
189452000-10-02 Akim Demaille <akim@epita.fr>
18946
18947 * src/getargs.c (fixed_outfiles): Rename as...
18948 (yaccflag): for consistency and accuracy.
18949 Adjust dependencies.
18950
d7913476
AD
189512000-10-02 Akim Demaille <akim@epita.fr>
18952
18953 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18954 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18955 difficult and introduced a lot of core dump. It turns out that
18956 Bison used an implementation of `xmalloc' based on `calloc', and
18957 at various places it does depend upon the initialization to 0. I
18958 have not tried to isolate the pertinent places, and all the former
18959 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18960 someone should address this issue.
18961
18962 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18963 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18964 files.
18965 Adjust dependencies.
18966 * src/warshall.h: New file.
18967 Propagate.
18968
340ef489
AD
189692000-10-02 Akim Demaille <akim@epita.fr>
18970
18971 Various anti-`extern in *.c' changes.
18972
18973 * src/system.h: Include `assert.h'.
18974
b2ca4022
AD
189752000-10-02 Akim Demaille <akim@epita.fr>
18976
18977 * src/state.h (nstates, final_state, first_state, first_shift)
18978 (first_reduction): Move their exportation from here...
18979 * src/LR0.h: to here.
18980 Adjust dependencies.
18981 * src/getargs.c (statisticsflag): New variable.
18982 Add support for `--statistics'.
18983 Adjust dependencies.
18984
18985 Remove a lot of now useless `extern' statements in most files.
18986
403b315b
AD
189872000-10-02 Akim Demaille <akim@epita.fr>
18988
18989 * src/LR0.h: New file.
18990 Propagate its use.
18991
07a58c13
AD
189922000-10-02 Akim Demaille <akim@epita.fr>
18993
18994 * src/print.h: New file.
18995 Propagate its use.
18996 * src/print.c: Formatting and ordering changes.
18997 (verbose, terse): Replace with...
18998 (print_results): this new function.
18999 Adjust dependencies.
19000
0619caf0
AD
190012000-10-02 Akim Demaille <akim@epita.fr>
19002
19003 * src/conflicts.c (conflict_report): New function.
19004 (conflict_log, verbose_conflict_log): Replace with...
19005 (print_conflicts): this function.
19006 Adjust dependencies.
19007 * src/conflicts.h: New file.
19008 Propagate its inclusion.
19009
3519ec76
AD
190102000-10-02 Akim Demaille <akim@epita.fr>
19011
19012 * src/nullable.h: New file.
19013 Propagate its inclusion.
19014 * src/nullable.c: Formatting changes.
19015
015acc48
AD
190162000-10-02 Akim Demaille <akim@epita.fr>
19017
19018 * src/reduce.h: New file.
19019 Propagate its inclusion.
19020 * src/reduce.c: Topological sort and other formatting changes.
19021 (bool, TRUE, FALSE): Move their definition to...
19022 * src/system.h: here.
19023
8963a27b
AD
190242000-10-02 Akim Demaille <akim@epita.fr>
19025
19026 * src/files.c: Formatting changes.
19027 (tryopen, tryclose, openfiles): Rename as...
19028 (xfopen, xfclose, open_files): this.
19029 (stringappend): static.
19030 * src/files.h: Complete the list of exported symbols.
19031 Propagate its use.
19032
a70083a3
AD
190332000-10-02 Akim Demaille <akim@epita.fr>
19034
19035 * src/reader.h: New file.
19036 Propagate its use instead of tedious list of `extern' and
19037 prototypes.
19038 * src/reader.c: Formatting changes, topological sort,
19039 s/register//.
19040
abadc117
AD
190412000-10-02 Akim Demaille <akim@epita.fr>
19042
19043 * src/lex.h: Prototype `lex.c' exported functions.
19044 * src/reader.c: Adjust.
19045 * src/lex.c: Formatting changes.
19046 (safegetc): Rename as...
19047 (xgetc): this.
19048
720d742f
AD
190492000-10-02 Akim Demaille <akim@epita.fr>
19050
19051 * src/lalr.h: New file.
19052 Propagate its inclusion instead of prototypes and `extern'.
19053 * src/lalr.c: Formatting changes, topological sorting etc.
19054
f2acea59
AD
190552000-10-02 Akim Demaille <akim@epita.fr>
19056
19057 * src/output.c (token_actions): Introduce a temporary array,
19058 YYDEFACT, that makes it possible for this function to use
19059 output_short_table.
19060
d019d655
AD
190612000-10-02 Akim Demaille <akim@epita.fr>
19062
19063 `user_toknums' is output as a `short[]' in `output.c', while it is
19064 defined as a `int[]' in `reader.c'. For consistency with the
19065 other output tables, `user_toknums' is now defined as a table of
19066 shorts.
19067
19068 * src/reader.c (user_toknums): Be a short table instead of an int
19069 table.
19070 Adjust dependencies.
19071
19072 Factor the short table outputs.
19073
19074 * src/output.c (output_short_table): New function.
19075 * src/output.c (output_gram, output_stos, output_rule_data)
19076 (output_base, output_table, output_check): Use it.
19077
6c89f1c1
AD
190782000-10-02 Akim Demaille <akim@epita.fr>
19079
19080 * src/output.c (output): Topological sort of the functions, in
19081 order to get rid of the `static' prototypes.
19082 No longer use `register'.
19083 * src/output.h: New file.
19084 Propagate its inclusion in files explicitly prototyping functions
19085 from output.c.
19086
d9efd181
AD
190872000-09-21 Akim Demaille <akim@epita.fr>
19088
19089 * src/atgeneral.m4: Update from Autoconf.
19090
c29240e7 190912000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
19092
19093 * src/closure.h: New file.
19094 * src/closure.c: Formatting changes, topological sort over the
19095 functions, use of closure.h.
19096 (initialize_closure, finalize_closure): Rename as...
19097 (new_closure, free_closure): these. Adjust dependencies.
19098 * src/LR0.c: Formatting changes, topological sort, use of
19099 cloture.h.
19100 (initialize_states): Rename as...
19101 (new_states): this.
19102 * src/Makefile.am (noinst_HEADERS): Adjust.
19103
499daa50
AD
191042000-09-20 Akim Demaille <akim@epita.fr>
19105
19106 * src/acconfig.h: Don't protect config.h against multiple
19107 inclusion.
19108 Don't define PARAMS.
19109 * src/system.h: Define PARAMS.
19110 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19111 purpose of config.h. system.h must not try to fix wrong
19112 definitions in config.h.
19113
cc84fd5d
AD
191142000-09-20 Akim Demaille <akim@epita.fr>
19115
19116 * src/derives.h: New file.
19117 * src/main.c, src/derives.h: Use it.
19118 Formatting changes.
19119 * src/Makefile.am (noinst_HEADERS): Adjust.
19120
db5b3a89
AD
191212000-09-20 Akim Demaille <akim@epita.fr>
19122
19123 * tests/atgeneral.m4: Update from Autoconf.
19124 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19125 (AT_CHECK_CALC): New macros.
19126 Use these macros to test bison with options `', `--raw',
19127 `--debug', `--yacc', `--yacc --debug'.
19128
ceed8467
AD
191292000-09-19 Akim Demaille <akim@epita.fr>
19130
19131 * src/output.c: Formatting changes.
19132 * src/machine.h: Remove, leaving its contents in...
19133 * src/system.h: here.
19134 Include stdio.h.
19135 Adjust all dependencies on stdio.h and machine.h.
19136 * src/getargs.h: New file.
19137 Let all `extern' declarations about getargs.c be replaced with
19138 inclusion of `getargs.h'.
19139 * src/Makefile.am (noinst_HEADERS): Adjust.
19140
19141 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19142 scope.
19143 (yyerror): Returns void, not int.
19144 * doc/bison.texinfo: Formatting changes.
19145
05a1d24b
AD
191462000-09-19 Akim Demaille <akim@epita.fr>
19147
19148 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19149 portable.
19150
cbd25751
AD
191512000-09-18 Akim Demaille <akim@epita.fr>
19152
19153 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19154 * src/Makefile.am (INCLUDES): Don't.
19155 Be ready to fetch headers in lib/.
19156
13863333
AD
191572000-09-18 Akim Demaille <akim@epita.fr>
19158
19159 * doc/bison.texinfo: Update the copyright.
19160 ANSIfy and GNUify the examples.
19161 Remove the old menu.
19162
0d533154
AD
191632000-09-18 Akim Demaille <akim@epita.fr>
19164
19165 First set of tests: use the `calc' example from the documentation.
19166
19167 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19168 is defined only when YYDEBUG is.
19169 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19170 * src/files.c (tryopen, tryclose): Formatting changes.
19171 Move to the top and be static.
19172 * src/reader.c (read_signed_integer): Likewise.
19173 * tests/calc.m4: New file.
19174 * Makefile.am, suite.m4: Adjust.
19175 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19176
e79137ac
AD
191772000-09-18 Akim Demaille <akim@epita.fr>
19178
19179 Add support for an Autotest test suite for Bison.
19180
19181 * m4/m4.m4, m4/atconfig.m4: New files.
19182 * m4/Makefile.am (EXTRA_DIST): Adjust.
19183 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19184 files.
19185 * src/getargs.c: Display a more standard --version message.
19186 * src/reader.c (reader): Formatting changes.
19187 No longer depend upon VERSION_STRING.
19188 * configure.in: No longer use `dnl'.
19189 Set up the test suite and the new directory `tests/.
19190 (VERSION_STRING): Remove.
19191
27821bff
AD
191922000-04-14 Akim Demaille <akim@epita.fr>
19193
19194 * src/reader.c (copy_comment2): New function, same as former
19195 `copy_comment', but outputs into two FILE *.
19196 (copy_comment): Use it.
19197 (parse_union_decl): Use it.
19198 (get_type, parse_start_decl): Use the same `invalid' message.
19199 (parse_start_decl, parse_union_decl): Use the same `multiple'
19200 message.
19201 (parse_union_decl, copy_guard, copy_action): Use the same
19202 `unmatched' message.
19203 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19204
cfe5fbc0
AD
192052000-03-31 Akim Demaille <akim@epita.fr>
19206
19207 * src/files.c (tryopen, tryclose): Move to the top.
19208 Be static.
19209
cb7db13e
AD
192102000-03-31 Akim Demaille <akim@epita.fr>
19211
19212 * src/main.c (main): Don't call `done', exit does it.
19213
a0f6b076
AD
192142000-03-31 Akim Demaille <akim@epita.fr>
19215
36281465
AD
19216 * allocate.c: s/return (foo)/return foo/.
19217 * lalr.c: Likewise.
19218 * LR0.c: Likewise.
19219 * output.c: Likewise.
19220 * reader.c: Likewise.
19221 * symtab.c: Likewise.
19222 * vmsgetargs.c: Likewise.
19223
192242000-03-31 Akim Demaille <akim@epita.fr>
19225
19226 Clean up the error reporting functions.
a0f6b076
AD
19227
19228 * src/report.c: New file.
19229 * src/report.h: Likewise.
19230 * src/Makefile.am: Adjust.
19231 * m4/error.m4: New file.
19232 * m4/Makefile.am: Adjust.
19233 * configure.in (jm_PREREQ_ERROR): Call it.
19234 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19235 Remove.
19236 (fatal, fatals): Remove. All callers use complain.c::fatal.
19237 (warn, warni, warns, warnss, warnss): Remove. All callers use
19238 complain.c::complain.
19239 (toomany): Remove, use fatal instead.
19240 * src/files.c (done): No argument, use complain_message_count.
19241 * src/main.c (main): Register `done' to `atexit'.
19242
19243 * src/getargs.c (usage): More `fputs', less `fprintf'.
19244
18539825
AD
192452000-03-28 Akim Demaille <akim@epita.fr>
19246
19247 * lib/: New directory.
19248 * Makefile.am (SUBDIRS): Adjust.
19249 * configure.in: Adjust.
19250 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19251 useless.
19252 * src/alloca.c: Moved to lib/.
19253 * src/getopt.c: Likewise.
19254 * src/getopt1.c: Likewise.
19255 * src/getopt.h: Likewise.
19256 * src/ansi2knr.c: Likewise.
19257 * src/ansi2knr.1: Likewise.
19258 * src/Makefile.am: Adjust.
19259 * lib/Makefile.am: New file.
19260
9f306f2a
AD
192612000-03-28 Akim Demaille <akim@epita.fr>
19262
19263 * src/getargs.c (usage): Refresh the help message.
19264
0ba347b6
AD
192652000-03-17 Akim Demaille <akim@epita.fr>
19266
19267 * src/getopt1.c: Updated from textutils 2.0e
19268 * src/getopt.c: Likewise.
19269 * src/getopt.h: Likewise.
19270
dbe7f271
AD
192712000-03-17 Akim Demaille <akim@epita.fr>
19272
19273 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19274 the file name, not the whole `#line LINE FILE'.
19275
75bbe78d
AD
192762000-03-17 Akim Demaille <akim@epita.fr>
19277
19278 On syntax errors, report the token on which we choked.
19279
aa5fd0ee
AD
19280 * src/bison.s1 (yyparse): In the label yyerrlab, when
19281 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 19282
7b306f52
AD
192832000-03-17 Akim Demaille <akim@epita.fr>
19284
aa5fd0ee 19285 * src/reader.c (copy_at): New function.
7b306f52
AD
19286 (copy_guard): Use it.
19287 (copy_action): Use it.
19288
e87b5700
AD
192892000-03-17 Akim Demaille <akim@epita.fr>
19290
19291 Be kind to translators, save some useless translations.
19292
aa5fd0ee 19293 * src/main.c (banner): New function.
e87b5700
AD
19294 (fatal_banner): Use it.
19295 (warn_banner): Use it.
19296
ae3c3164
AD
192972000-03-17 Akim Demaille <akim@epita.fr>
19298
aa5fd0ee
AD
19299 * src/reader.c (copy_definition): Use copy_string and
19300 copy_comment. Removed now unused `match', `ended',
19301 `cplus_comment'.
ae3c3164
AD
19302 (copy_comment, copy_string): Moved, to be visible from
19303 copy_definition.
19304
4dc58e7c
AD
193052000-03-17 Akim Demaille <akim@epita.fr>
19306
aa5fd0ee
AD
19307 * src/reader.c (copy_string): Declare `static inline'. No
19308 problems with inline, since it is checked by configure.
4dc58e7c
AD
19309 (copy_comment): Likewise.
19310
0a6384c4
AD
193112000-03-17 Akim Demaille <akim@epita.fr>
19312
aa5fd0ee 19313 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 19314
3cef001a
AD
193152000-03-17 Akim Demaille <akim@epita.fr>
19316
aa5fd0ee 19317 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
19318 (copy_action): Use it. Removed now unused `match', `ended',
19319 `cplus_comment'.
19320 (copy_guard): Likewise.
19321
ca36d2ef
AD
193222000-03-17 Akim Demaille <akim@epita.fr>
19323
aa5fd0ee 19324 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
19325 (copy_action): Use it.
19326 (copy_guard): Likewise.
19327
6666f98f
AD
193282000-03-17 Akim Demaille <akim@epita.fr>
19329
19330 Change the handling of @s so that they behave exactly like $s.
19331 There is now a pseudo variable @$ (readble and writable), location
19332 of the lhs of the rule (by default ranging from the location of
19333 the first symbol of the rhs, to the location of the last symbol,
19334 or, if the rhs is empty, YYLLOC).
19335
19336 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19337 yyval.
19338 (yyparse): When providing a default semantic action, provide a
19339 default location action.
19340 (after the $): No longer change `*YYLSP', just stack YYLOC the
19341 same way you stack YYVAL.
19342 * src/reader.c (read_declarations): Use warns.
19343 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19344 (copy_action, case '@'): Likewise.
19345 Use a standard error message, to save useless work from
19346 translators.
19347
41aca2e0
AD
193482000-03-17 Akim Demaille <akim@epita.fr>
19349
aa5fd0ee
AD
19350 * src/bison.s1: Formatting and cosmetics changes.
19351 * src/reader.c: Likewise.
41aca2e0
AD
19352 Update the Copyright notice.
19353
dc08c1d5
AD
193542000-03-17 Akim Demaille <akim@epita.fr>
19355
aa5fd0ee
AD
19356 * src/bison.s1 (#line): All set to `#line' only, since the
19357 Makefile now handles them.
dc08c1d5 19358
9ee3c97b
AD
193592000-03-16 Akim Demaille <akim@epita.fr>
19360
19361 * src/output.c (output_rule_data): Output the documentation of
19362 some of the tables.
19363 (Copyright notice): Update.
19364 Formatting changes.
19365
0de741ca
AD
193662000-03-16 Akim Demaille <akim@epita.fr>
19367
19368 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19369 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19370 One `#if YYDEBUG' remains, since it uses variables which are
19371 defined only if `YYDEBUG != 0'.
19372
bb10be54
AD
193732000-03-16 Akim Demaille <akim@epita.fr>
19374
19375 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19376 and related variables so that the similarities are highlighted.
19377
b07b484a
AD
193782000-03-16 Akim Demaille <akim@epita.fr>
19379
19380 * src/bison.s1: Properly indent CPP directives.
19381
361f60b3
AD
193822000-03-16 Akim Demaille <akim@epita.fr>
19383
19384 * src/bison.s1: Properly indent the `alloca' CPP section.
19385
8c44d3ec
AD
193862000-03-16 Akim Demaille <akim@epita.fr>
19387
19388 Do not hard code values of directories in `configure.in'.
19389 Update the `configure' tool chain.
19390
19391 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19392 src/makefile.am.
19393 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19394 (AC_OUTPUT): Add m4/Makefile.
19395 Bump to bison 1.28a, 1.29 has never been released.
19396 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19397 handled via src/Makefile.am.
19398 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19399 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19400 autoheader.
19401 * Makefile.am (SUBDIRS): Add m4.
19402 (ACLOCAL_AM_FLAGS): New variable.
19403 (AUTOMAKE_OPTIONS): Add check-news.
19404 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19405 the proper line number and file name.
19406 (DEFS): Propagate the location of bison library files and of the
19407 locale files.
19408 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19409 builddir.
19410 * acinclude.m4: Remove, replaced by the directory m4.
19411 * m4/Makefile.am (EXTRA_DIST): New variable.
19412 * m4/gettext.m4: New file, from the fileutils.
19413 * m4/lcmessage.m4: Likewise
19414 * m4/progtest.m4: Likewise.
19415 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19416
f95997e7
AD
194172000-03-10 Akim Demaille <akim@epita.fr>
19418
19419 * src/closure.c:
19420 Formatting changes of various comments.
19421 Respect the GNU coding standards at various places.
19422 Don't use `_()' when no translation is needed.
19423
194241999-12-13 Jesse Thilo <jthilo@gnu.org>
19425
19426 * src/files.c:
19427 OS/2 honors TMPDIR environment variable.
19428
194291999-12-13 Jesse Thilo <jthilo@gnu.org>
19430
19431 * doc/bison.texinfo: Tweaked spelling and grammar.
19432 Updated ISBN.
19433 Removed reference to price of printed copy.
19434 Mention BISON_SIMPLE and BISON_HAIRY.
19435
194361999-12-13 Jesse Thilo <jthilo@gnu.org>
19437
19438 * configure.in, NEWS:
19439 Bison 1.29 released.
19440
194411999-10-27 Jesse Thilo <jthilo@gnu.org>
19442
19443 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19444 Added reference card.
19445
194461999-07-26 Jesse Thilo <jthilo@gnu.org>
19447
19448 * po/ru.po: Added Russian translation.
19449
194501999-07-26 Jesse Thilo <jthilo@gnu.org>
19451
19452 * configure.in: Added Russian translation.
19453
194541999-07-06 Jesse Thilo <jthilo@gnu.org>
19455
19456 * configure.in, NEWS, README:
19457 Released version 1.28.
19458
194591999-06-14 Jesse Thilo <jthilo@gnu.org>
19460
19461 * src/system.h:
19462 Squashed redefinition warning on some systems.
19463
19464 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19465 Have configure build version string instead of relying on ANSI string
19466 concatentation.
19467
194681999-06-14 Jesse Thilo <jthilo@gnu.org>
19469
19470 * po/POTFILES.in: Got rid of version.c.
19471
194721999-06-14 Jesse Thilo <jthilo@gnu.org>
19473
19474 * acconfig.h, configure.in:
19475 Have configure build version string instead of relying on ANSI string
19476 concatentation.
19477
194781999-06-08 Jesse Thilo <jthilo@gnu.org>
19479
19480 * doc/bison.1:
19481 Dropped mention of `+' for long-named options.
19482
194831999-05-30 Jesse Thilo <jthilo@gnu.org>
19484
19485 * src/files.c: Added <unistd.h> for unlink().
19486
19487 * src/Makefile.am, src/system.h:
19488 I18n fixes.
19489
194901999-05-30 Jesse Thilo <jthilo@gnu.org>
19491
19492 * README: Added a FAQ list.
19493
19494 * configure.in, acconfig.h:
19495 I18n fixes.
19496
194971999-05-30 Jesse Thilo <jthilo@gnu.org>
19498
19499 * doc/FAQ, doc/Makefile.am:
19500 Added a FAQ list.
19501
195021999-05-19 Jesse Thilo <jthilo@gnu.org>
19503
19504 * src/alloc.h, src/symtab.h, src/version.c:
19505 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19506
195071999-04-18 Jesse Thilo <jthilo@gnu.org>
19508
19509 * src/.cvsignore, src/Makefile.am:
19510 Reorganized: sources in `src', documentation in `doc'.
19511
19512 * src/lex.c (literalchar):
19513 fixed the code for escaping double quotes (thanks
19514 Jonathan Czisny.)
19515
195161999-04-18 Jesse Thilo <jthilo@gnu.org>
19517
19518 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19519 Adjusted paths to reflect directory reorganization.
19520
195211999-04-18 Jesse Thilo <jthilo@gnu.org>
19522
19523 * doc/.cvsignore, doc/Makefile.am:
19524 Reorganized: sources in `src', documentation in `doc'.
19525
195261999-04-18 Jesse Thilo <jthilo@gnu.org>
19527
19528 * configure.in:
19529 Updated AC_INIT file to reflect directory reorganization.
19530
19531 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19532 Reorganized: sources in `src', documentation in `doc'.
19533
195341999-04-13 Jesse Thilo <jthilo@gnu.org>
19535
19536 * src/allocate.c:
19537 Don't declare calloc() and realloc() if not necessary.
19538
195391999-04-13 Jesse Thilo <jthilo@gnu.org>
19540
19541 * configure.in, acconfig.h, acinclude.m4:
19542 Don't declare calloc() and realloc() if not necessary.
19543
195441999-03-23 Jesse Thilo <jthilo@gnu.org>
19545
19546 * po/.cvsignore: Added i18n support.
19547
195481999-03-23 Jesse Thilo <jthilo@gnu.org>
19549
19550 * acconfig.h, configure.in, Makefile.am:
19551 Added i18n support.
19552
195531999-03-22 Jesse Thilo <jthilo@gnu.org>
19554
19555 * src/bison.s1: Fixed #line numbers.
19556
195571999-03-15 Jesse Thilo <jthilo@gnu.org>
19558
19559 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19560 Added PO files from Translation Project.
19561
195621999-03-03 Jesse Thilo <jthilo@gnu.org>
19563
19564 * Makefile.am:
19565 Added support for non-ANSI compilers (ansi2knr).
19566
195671999-02-16 Jesse Thilo <jthilo@gnu.org>
19568
19569 * configure.in: Bumped version number to 1.27.
19570
19571 * Makefile.am:
19572 Added `bison.simple' to list of files removed by `make distclean'.
19573
195741999-02-12 Jesse Thilo <jthilo@gnu.org>
19575
19576 * src/files.c, src/files.h:
19577 Defined locations of parser files in config.h instead of Makefile.
19578
195791999-02-12 Jesse Thilo <jthilo@gnu.org>
19580
19581 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19582 Defined locations of parser files in config.h instead of Makefile.
19583
195841999-02-09 Jesse Thilo <jthilo@gnu.org>
19585
19586 * Makefile.am:
19587 Removed inappropriate use of $< macro.
19588
195891999-02-05 Jesse Thilo <jthilo@gnu.org>
19590
19591 * po/Makefile.in.in, po/POTFILES.in:
19592 Add `po' directory skeleton.
19593
195941999-01-27 Jesse Thilo <jthilo@gnu.org>
19595
19596 * README: Document help-bison list.
19597
19598 * configure.in: Add check for mkstemp().
19599
196001999-01-20 Jesse Thilo <jthilo@gnu.org>
19601
19602 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19603 Hush a few compiler warnings.
19604
19605 * src/files.c:
19606 Add tryclose(), which verifies that fclose was successful.
19607 Hush a couple of compiler warnings.
19608
196091999-01-20 Jesse Thilo <jthilo@gnu.org>
19610
19611 * Makefile.am, OChangeLog:
19612 ChangeLog is now automatically generated. Include the old version as
19613 OChangeLog.
19614
196151999-01-14 Jesse Thilo <jthilo@gnu.org>
19616
19617 * 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:
19618 Update FSF address.
19619
196201999-01-14 Jesse Thilo <jthilo@gnu.org>
19621
19622 * doc/bison.texinfo: Fix formatting glitch.
19623
19624 * doc/bison.texinfo: Update FSF address.
19625
196261999-01-14 Jesse Thilo <jthilo@gnu.org>
19627
19628 * acconfig.h: Update FSF address.
19629
196301999-01-08 Jesse Thilo <jthilo@gnu.org>
19631
19632 * src/system.h:
19633 Don't define PACKAGE here, since config.h defines it.
19634
196351998-12-30 Jesse Thilo <jthilo@gnu.org>
19636
19637 * src/reader.c: Update copyright date.
19638
19639 * src/main.c:
19640 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19641 favor of output directly to stderr (avoids buffer overruns).
19642
19643 * src/reader.c: Some checks for premature EOF.
19644
19645 * 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:
19646 Use prototypes if the compiler understands them.
19647
19648 * src/files.c: Honor TMPDIR on Unix hosts.
19649 Use prototypes if the compiler understands them.
19650
19651 * src/reader.c:
19652 Fix a couple of buffer overrun bugs.
19653 Use prototypes if the compiler understands them.
19654
19655 * src/system.h: Include unistd.h and ctype.h.
19656 Use #ifdef instead of #if for NLS symbols.
19657
196581998-12-30 Jesse Thilo <jthilo@gnu.org>
19659
19660 * doc/bison.texinfo:
19661 Delete comment "consider using @set for edition number, etc..." since
19662 we now are doing so.
19663
196641998-12-30 Jesse Thilo <jthilo@gnu.org>
19665
19666 * configure.in:
19667 Use prototypes if the compiler understands them.
19668
19669 * NEWS: Document 1.26 highlights.
19670
19671 * Makefile.am: Require Automake 1.3 or later.
19672
19673 * acconfig.h:
19674 Use prototypes if the compiler understands them.
19675
196761998-12-29 Jesse Thilo <jthilo@gnu.org>
19677
19678 * src/version.c:
19679 Use VERSION symbol from automake for version number.
19680
196811998-12-29 Jesse Thilo <jthilo@gnu.org>
19682
19683 * acconfig.h, configure.in, version.cin:
19684 Use VERSION symbol from automake for version number.
19685
196861998-11-28 Jesse Thilo <jthilo@gnu.org>
19687
19688 * Makefile.am:
19689 Distribute original version of simple parser (bison.s1), not built
19690 version (bison.simple).
19691
196921998-11-28 Jesse Thilo <jthilo@gnu.org>
19693
19694 * doc/bison.texinfo: Add info dir entry.
19695
19696 * doc/bison.texinfo:
19697 Let automake put version number into documentation.
19698
196991998-11-26 Jesse Thilo <jthilo@gnu.org>
19700
19701 * src/bison.cld, src/build.com, src/vmshlp.mar:
19702 Add non-RCS files from /gd/gnu/bison.
19703
197041998-11-26 Jesse Thilo <jthilo@gnu.org>
19705
19706 * doc/bison.1:
19707 Document the BISON_HAIRY and BISON_SIMPLE variables.
19708
197091998-11-25 Jesse Thilo <jthilo@gnu.org>
19710
19711 * src/version.c: Build version.c automatically.
19712
19713 * src/reader.c:
19714 Fix token numbering (used to start at 258, not 257).
19715
19716 * src/system.h: Include config.h.
19717
19718 * src/getargs.c: Update bug report address.
19719
19720 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19721 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19722
197231998-11-25 Jesse Thilo <jthilo@gnu.org>
19724
19725 * Makefile.am:
19726 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19727
19728 * configure.in, version.cin:
19729 Build version.c automatically.
19730
19731 * AUTHORS: Add AUTHORS file.
19732
19733 * README: Update bug report address.
19734
19735 * bison.simple:
19736 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19737
19738 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19739 Add automake stuff.
19740
197411998-11-25 Jesse Thilo <jthilo@gnu.org>
19742
19743 * doc/bison.texinfo: Clean up some formatting.
19744
197451998-05-05 Richard Stallman <rms@gnu.org>
19746
19747 * doc/bison.texinfo:
19748 Explain better why to make a pure parser.
19749
197501998-01-05 Richard Stallman <rms@gnu.org>
19751
19752 * src/files.c (openfiles):
19753 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19754 find a temporary directory, if possible. Do not unlink files while
19755 they are open.
19756
197571997-08-25 Richard Stallman <rms@gnu.org>
19758
19759 * src/reader.c (stack_offset;):
19760 Change some warni to warns.
19761
19762 * src/lex.c (literalchar): Use warns, not warni.
19763
197641997-06-28 Richard Stallman <rms@gnu.org>
19765
19766 * src/bison.s1: Add a Bison version comment.
19767
19768 * src/main.c (fatal, warn, berror):
19769 Use program_name.
19770
197711997-06-28 Richard Stallman <rms@gnu.org>
19772
19773 * Makefile.in (bison_version): New variable.
19774 (dist): Use that variable.
19775 (bison.s1): Substitute the Bison version into bison.simple.
19776
19777 * bison.simple: Add a Bison version comment.
19778
197791997-06-18 Richard Stallman <rms@gnu.org>
19780
19781 * src/main.c (fatal, warn, berror):
19782 Make error messages standard.
19783 (toomany): Improve error message text.
19784
19785 * 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:
19786 new.h renamed to alloc.h.
19787
197881997-06-18 Richard Stallman <rms@gnu.org>
19789
19790 * Makefile.in: new.h renamed to alloc.h.
19791
197921997-05-24 Richard Stallman <rms@gnu.org>
19793
19794 * src/lex.c (literalchar):
19795 Fix the code for escaping \, " and '.
19796
19797 (lex): Avoid trouble when there are many chars
19798 to discard in a char literal with just several chars in it.
19799
198001997-05-17 Richard Stallman <rms@gnu.org>
19801
19802 * src/bison.s1:
19803 Use malloc, if using alloca is troublesome.
19804 (YYSTACK_USE_ALLOCA): New flag macro.
19805 Define it for some systems and compilers.
19806 (YYSTACK_ALLOC): New macro.
19807 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19808 If it was malloc'd, free it.
19809
198101997-05-17 Richard Stallman <rms@gnu.org>
19811
19812 * bison.simple:
19813 Use malloc, if using alloca is troublesome.
19814 (YYSTACK_USE_ALLOCA): New flag macro.
19815 Define it for some systems and compilers.
19816 (YYSTACK_ALLOC): New macro.
19817 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19818 If it was malloc'd, free it.
19819
198201997-04-23 Richard Stallman <rms@gnu.org>
19821
19822 * src/bison.s1:
19823 (alloca) [__hpux]: Always define as __builtin_alloca.
19824
198251997-04-23 Richard Stallman <rms@gnu.org>
19826
19827 * bison.simple:
19828 (alloca) [__hpux]: Always define as __builtin_alloca.
19829
198301997-04-22 Richard Stallman <rms@gnu.org>
19831
19832 * src/bison.s1:
19833 [__hpux]: Include alloca.h (right for HPUX 10)
19834 instead of declaring alloca (right for HPUX 9).
19835
19836 * src/bison.s1 (__yy_memcpy):
19837 Declare arg `count' as unsigned int.
19838 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19839
198401997-04-22 Richard Stallman <rms@gnu.org>
19841
19842 * bison.simple:
19843 [__hpux]: Include alloca.h (right for HPUX 10)
19844 instead of declaring alloca (right for HPUX 9).
19845
19846 * bison.simple (__yy_memcpy):
19847 Declare arg `count' as unsigned int.
19848 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19849
198501997-01-03 Richard Stallman <rms@gnu.org>
19851
19852 * src/allocate.c: [__STDC__ or _MSC_VER]:
19853 Declare calloc and realloc to return void *.
19854
198551997-01-02 Richard Stallman <rms@gnu.org>
19856
19857 * src/system.h:
19858 [_MSC_VER]: Include stdlib.h and process.h.
19859 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19860
19861 * src/main.c (main): Return FAILURE as a value.
19862 (printable_version): Declare arg as int, not char.
19863
198641997-01-02 Richard Stallman <rms@gnu.org>
19865
19866 * Makefile.in (dist):
19867 Explicitly check for symlinks, and copy them.
19868
198691996-12-19 Richard Stallman <rms@gnu.org>
19870
19871 * src/files.c:
19872 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19873
198741996-12-18 Paul Eggert <eggert@gnu.org>
19875
19876 * src/bison.s1 (yyparse):
19877 If __GNUC__ and YYPARSE_PARAM are both defined,
19878 declare yyparse to have a void * argument.
19879
198801996-12-18 Paul Eggert <eggert@gnu.org>
19881
19882 * bison.simple (yyparse):
19883 If __GNUC__ and YYPARSE_PARAM are both defined,
19884 declare yyparse to have a void * argument.
19885
198861996-12-17 Richard Stallman <rms@gnu.org>
19887
19888 * src/reduce.c (nbits): Add some casts.
19889
198901996-08-12 Richard Stallman <rms@gnu.org>
19891
19892 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19893
198941996-08-12 Richard Stallman <rms@gnu.org>
19895
19896 * bison.simple: Test _MSDOS as well as _MSDOS_.
19897
198981996-07-31 Richard Stallman <rms@gnu.org>
19899
19900 * src/bison.s1:
19901 [__sun && __i386]: Include alloca.h.
19902
199031996-07-31 Richard Stallman <rms@gnu.org>
19904
19905 * bison.simple:
19906 [__sun && __i386]: Include alloca.h.
19907
199081996-07-30 Richard Stallman <rms@gnu.org>
19909
19910 * src/bison.s1: Comment change.
19911
19912 * src/bison.s1: Test _MSDOS_, not MSDOS.
19913
199141996-07-30 Richard Stallman <rms@gnu.org>
19915
19916 * bison.simple: Comment change.
19917
19918 * bison.simple: Test _MSDOS_, not MSDOS.
19919
199201996-06-01 Richard Stallman <rms@gnu.org>
19921
19922 * 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:
19923 Insert `_' macro around many string constants.
19924
19925 * src/main.c:
19926 Insert `_' macro around many string constants.
19927
19928 (main): Call setlocale, bindtextdomain and textdomain.
19929
19930 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19931 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19932 [ENABLE_NLS]: Include libintl.h.
19933 [ENABLE_NLS] (gettext): Define.
19934 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19935 (N_, PACKAGE, LOCALEDIR): New macros.
19936
199371996-06-01 Richard Stallman <rms@gnu.org>
19938
19939 * POTFILES.in: New file.
19940
19941 * Makefile.in (allocate.o):
19942 Define target explicitly.
19943
19944 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19945 (LDFLAGS): Set to @LDFLAGS@.
19946 (configure): Run autoconf only if preceding `cd' succeeds.
19947 (bison.s1): Redirect output to temporary file then move the
19948 temporary to the target, rather than redirecting directly to bison.s1.
19949 (clean): Remove config.status and config.log.
19950 (distclean): Don't remove config.status here.
19951
199521996-05-12 Richard Stallman <rms@gnu.org>
19953
19954 * src/bison.s1:
19955 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19956
199571996-05-12 Richard Stallman <rms@gnu.org>
19958
19959 * bison.simple:
19960 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19961
199621996-05-11 Richard Stallman <rms@gnu.org>
19963
19964 * src/bison.s1 (__yy_memcpy):
19965 Really reorder the args, as was supposedly done on Feb 14 1995.
19966 (yyparse): Calls changed accordingly.
19967
199681996-05-11 Richard Stallman <rms@gnu.org>
19969
19970 * Makefile.in (dist): Don't use $(srcdir).
19971
19972 * bison.simple (__yy_memcpy):
19973 Really reorder the args, as was supposedly done on Feb 14 1995.
19974 (yyparse): Calls changed accordingly.
19975
199761996-01-27 Richard Stallman <rms@gnu.org>
19977
19978 * src/output.c (output_rule_data):
19979 Test YYERROR_VERBOSE in the conditional
19980 around the definition of ttyname.
19981
199821995-12-29 Richard Stallman <rms@gnu.org>
19983
19984 * src/bison.s1:
19985 Fix line numbers in #line commands.
19986
199871995-12-29 Richard Stallman <rms@gnu.org>
19988
19989 * bison.simple:
19990 Fix line numbers in #line commands.
19991
199921995-12-27 Richard Stallman <rms@gnu.org>
19993
19994 * src/bison.s1 (YYPARSE_PARAM_DECL):
19995 In C++, make it always null.
19996 (YYPARSE_PARAM_ARG): New macro.
19997 (yyparse): Use YYPARSE_PARAM_ARG.
19998
199991995-12-27 Richard Stallman <rms@gnu.org>
20000
20001 * bison.simple (YYPARSE_PARAM_DECL):
20002 In C++, make it always null.
20003 (YYPARSE_PARAM_ARG): New macro.
20004 (yyparse): Use YYPARSE_PARAM_ARG.
20005
200061995-11-29 Richard Stallman <rms@gnu.org>
20007
20008 * doc/bison.texinfo:
20009 Describe literal string tokens, %raw, %no_lines, %token_table.
20010
200111995-11-29 Daniel Hagerty <hag@gnu.org>
20012
20013 * doc/bison.texinfo: Fixed update date
20014
200151995-10-16 Richard Stallman <rms@gnu.org>
20016
20017 * src/version.c: Version 1.25.
20018
200191995-10-16 Richard Stallman <rms@gnu.org>
20020
20021 * NEWS: *** empty log message ***
20022
200231995-10-16 Richard Stallman <rms@gnu.org>
20024
20025 * doc/bison.1, doc/bison.rnh:
20026 Add new options.
20027
200281995-10-15 Richard Stallman <rms@gnu.org>
20029
20030 * src/vmsgetargs.c, src/getargs.c:
20031 Added -n, -k, and -raw switches.
20032 (noparserflag, toknumflag, rawtoknumflag): New variables.
20033
20034 * src/symtab.h (SALIAS):
20035 New #define for adding aliases to %token.
20036 (struct bucket): Added `alias' field.
20037
20038 * src/reduce.c (reduce_grammar):
20039 Revise error message.
20040 (print_notices): Remove final `.' from error message.
20041
20042 * src/reader.c (reader_output_yylsp):
20043 New function.
20044 (readgram): Use `#if 0' around code that accepted %command
20045 inside grammar rules: The documentation doesn't allow it,
20046 and it will fail since the %command processors scan for the next %.
20047 (parse_token_decl): Extended the %token
20048 declaration to allow a multi-character symbol as an alias.
20049 (parse_thong_decl): New function.
20050 (read_declarations): Added %thong declarations.
20051 (read_declarations): Handle NOOP to deal with allowing
20052 % declarations as another means to specify the flags.
20053 (readgram): Allow %prec prior to semantics embedded in a rule.
20054 (skip_to_char, read_declarations, copy_definition)
20055 (parse_token_decl, parse_start_decl, parse_type_decl)
20056 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20057 (get_type_name, copy_guard, copy_action, readgram)
20058 (get_type, packsymbols): Revised most error messages.
20059 Changed `fatal' to `warnxxx' to avoid aborting for error.
20060 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20061 (read_declarations): Improve the error message for
20062 an invalid character. Do not abort.
20063 (read_declarations, copy_guard, copy_action): Use
20064 printable_version to avoid unprintable characters in printed output.
20065 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20066 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20067 Allow the type of a non-terminal can be given
20068 more than once, as long as all specifications give the same type.
20069
20070 * src/output.c:
20071 (output_headers, output_trailers, output, output_gram)
20072 (output_rule_data): Implement noparserflag variable.
20073 Implement toknumflag variable.
20074 (output): Call reader_output_yylsp to output LTYPESTR.
20075
20076 * src/main.c (main):
20077 If reader sees an error, don't process the grammar.
20078 (fatals): Updated to not use VARARGS1.
20079 (printable_version, int_to_string, warn, warni, warns, warnss)
20080 (warnsss): New error reporting functions. Avoid abort for error.
20081
20082 * src/lex.h:
20083 Added THONG and NOOP for alias processing.
20084 Added SETOPT for the new code that allows setting options with %flags.
20085
20086 * src/lex.c:
20087 Include getopt.h. Add some extern decls.
20088 (safegetc): New function to deal with EOF gracefully.
20089 (literalchar); new function to deal with reading \ escapes.
20090 (lex): Use literalchar.
20091 (lex): Implemented "..." tokens.
20092 (literalchar, lex, parse_percent_token): Made tokenbuffer
20093 always contain the token. This includes growing the token
20094 buffer while reading an integer.
20095 (parse_percent_token): Replaced if-else statement with percent_table.
20096 (parse_percent_token): Added % declarations as another
20097 way to specify the flags -n, -l, and -r. Also added hooks for
20098 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20099 major changes to files.c.
20100 (lex) Retain in the incoming stream a character following
20101 an incorrect '/'.
20102 (skip_white_space, lex): Revised most error messages
20103 and changed fatal to warn to avoid aborting.
20104 (percent_table): Added %thong declarations.
20105
20106 * src/gram.h: Comment changes.
20107
20108 * src/files.c (openfiles, open_extra_files, done):
20109 Add faction flag
20110 and actfile file. Handle noparserflag. Both for -n switch.
20111
20112 * src/conflicts.c (resolve_sr_conflict):
20113 Remove use of alloca.
20114
201151995-06-01 Jim Meyering <meyering@gnu.org>
20116
20117 * doc/bison.texinfo: *** empty log message ***
20118
201191995-05-06 Richard Stallman <rms@gnu.org>
20120
20121 * src/bison.s1: Comment change.
20122
201231995-05-06 Richard Stallman <rms@gnu.org>
20124
20125 * bison.simple: Comment change.
20126
201271995-05-03 Richard Stallman <rms@gnu.org>
20128
20129 * src/version.c: Version now 1.24.
20130
20131 * src/bison.s1: Change distribution terms.
20132
20133 * src/version.c: Version now 1.23.
20134
201351995-05-03 Richard Stallman <rms@gnu.org>
20136
20137 * doc/bison.texinfo:
20138 Rewrite "Conditions for Using Bison".
20139 Update version to 1.24.
20140
201411995-05-03 Richard Stallman <rms@gnu.org>
20142
20143 * bison.simple: Change distribution terms.
20144
201451995-02-23 Richard Stallman <rms@gnu.org>
20146
20147 * src/files.c: Test __VMS_POSIX as well as VMS.
20148
201491995-02-14 Jim Meyering <meyering@gnu.org>
20150
20151 * src/bison.s1 (__yy_memcpy):
20152 Renamed from __yy_bcopy to avoid
20153 confusion. Reverse FROM and TO arguments to be consistent with
20154 those of memcpy.
20155
201561995-02-14 Jim Meyering <meyering@gnu.org>
20157
20158 * bison.simple (__yy_memcpy):
20159 Renamed from __yy_bcopy to avoid
20160 confusion. Reverse FROM and TO arguments to be consistent with
20161 those of memcpy.
20162
201631994-11-10 David J. MacKenzie <djm@gnu.org>
20164
20165 * NEWS: reformat
20166
20167 * NEWS: New file.
20168
20169 * Makefile.in (DISTFILES): Include NEWS.
20170
20171 * Makefile.in (DISTFILES):
20172 Include install-sh, not install.sh.
20173
20174 * configure.in: Update to Autoconf v2 macro names.
20175
201761994-10-05 David J. MacKenzie <djm@gnu.org>
20177
20178 * Makefile.in: fix typo
20179
20180 * Makefile.in (prefix, exec_prefix):
20181 Let configure set them.
20182
201831994-09-28 David J. MacKenzie <djm@gnu.org>
20184
20185 * Makefile.in: Set datadir to $(prefix)/share.
20186
201871994-09-15 Richard Stallman <rms@gnu.org>
20188
20189 * src/bison.s1:
20190 Update copyright notice and GPL version.
20191
201921994-09-15 Richard Stallman <rms@gnu.org>
20193
20194 * bison.simple:
20195 Update copyright notice and GPL version.
20196
201971994-07-12 Richard Stallman <rms@gnu.org>
20198
20199 * src/reduce.c, src/reader.c:
20200 entered into RCS
20201
202021994-05-05 David J. MacKenzie <djm@gnu.org>
20203
20204 * Makefile.in: entered into RCS
20205
202061994-03-26 Richard Stallman <rms@gnu.org>
20207
20208 * src/bison.s1: entered into RCS
20209
202101994-03-26 Richard Stallman <rms@gnu.org>
20211
20212 * bison.simple: entered into RCS
20213
202141994-03-25 Richard Stallman <rms@gnu.org>
20215
20216 * src/main.c: entered into RCS
20217
202181994-03-24 Richard Stallman <rms@gnu.org>
20219
20220 * src/conflicts.c: entered into RCS
20221
202221994-01-02 Richard Stallman <rms@gnu.org>
20223
20224 * Makefile.in: *** empty log message ***
20225
202261993-11-21 Richard Stallman <rms@gnu.org>
20227
20228 * src/bison.s1: *** empty log message ***
20229
202301993-11-21 Richard Stallman <rms@gnu.org>
20231
20232 * doc/bison.texinfo: entered into RCS
20233
20234 * doc/bison.texinfo: *** empty log message ***
20235
202361993-11-21 Richard Stallman <rms@gnu.org>
20237
20238 * bison.simple: *** empty log message ***
20239
202401993-10-25 David J. MacKenzie <djm@gnu.org>
20241
20242 * doc/bison.texinfo: *** empty log message ***
20243
202441993-10-19 Richard Stallman <rms@gnu.org>
20245
20246 * src/bison.s1: *** empty log message ***
20247
202481993-10-19 Richard Stallman <rms@gnu.org>
20249
20250 * bison.simple: *** empty log message ***
20251
202521993-10-14 Richard Stallman <rms@gnu.org>
20253
20254 * src/bison.s1: *** empty log message ***
20255
202561993-10-14 Richard Stallman <rms@gnu.org>
20257
20258 * bison.simple: *** empty log message ***
20259
202601993-09-14 David J. MacKenzie <djm@gnu.org>
20261
20262 * doc/bison.texinfo: *** empty log message ***
20263
202641993-09-13 Noah Friedman <friedman@gnu.org>
20265
20266 * Makefile.in: *** empty log message ***
20267
202681993-09-10 Richard Stallman <rms@gnu.org>
20269
20270 * src/conflicts.c: *** empty log message ***
20271
20272 * src/system.h: entered into RCS
20273
202741993-09-10 Richard Stallman <rms@gnu.org>
20275
20276 * doc/bison.1: entered into RCS
20277
202781993-09-06 Noah Friedman <friedman@gnu.org>
20279
20280 * src/version.c: entered into RCS
20281
202821993-09-06 Noah Friedman <friedman@gnu.org>
20283
20284 * Makefile.in: *** empty log message ***
20285
202861993-07-30 David J. MacKenzie <djm@gnu.org>
20287
20288 * Makefile.in: *** empty log message ***
20289
202901993-07-24 Richard Stallman <rms@gnu.org>
20291
20292 * src/bison.s1: *** empty log message ***
20293
202941993-07-24 Richard Stallman <rms@gnu.org>
20295
20296 * bison.simple: *** empty log message ***
20297
202981993-07-08 David J. MacKenzie <djm@gnu.org>
20299
20300 * Makefile.in: *** empty log message ***
20301
203021993-07-04 Richard Stallman <rms@gnu.org>
20303
20304 * src/bison.s1: *** empty log message ***
20305
203061993-07-04 Richard Stallman <rms@gnu.org>
20307
20308 * bison.simple: *** empty log message ***
20309
203101993-06-26 David J. MacKenzie <djm@gnu.org>
20311
20312 * src/getargs.c: entered into RCS
20313
203141993-06-26 David J. MacKenzie <djm@gnu.org>
20315
20316 * doc/bison.texinfo: *** empty log message ***
20317
20318 * doc/bison.1: New file.
20319
203201993-06-25 Richard Stallman <rms@gnu.org>
20321
20322 * src/getargs.c: New file.
20323
203241993-06-16 Richard Stallman <rms@gnu.org>
20325
20326 * src/bison.s1: *** empty log message ***
20327
203281993-06-16 Richard Stallman <rms@gnu.org>
20329
20330 * bison.simple: *** empty log message ***
20331
203321993-06-03 Richard Stallman <rms@gnu.org>
20333
20334 * src/bison.s1: New file.
20335
203361993-06-03 Richard Stallman <rms@gnu.org>
20337
20338 * doc/bison.texinfo: *** empty log message ***
20339
203401993-06-03 Richard Stallman <rms@gnu.org>
20341
20342 * bison.simple: New file.
20343
203441993-05-19 Richard Stallman <rms@gnu.org>
20345
20346 * doc/bison.texinfo: New file.
20347
203481993-05-07 Noah Friedman <friedman@gnu.org>
20349
20350 * Makefile.in: *** empty log message ***
20351
203521993-04-28 Noah Friedman <friedman@gnu.org>
20353
20354 * src/reader.c: *** empty log message ***
20355
203561993-04-23 Noah Friedman <friedman@gnu.org>
20357
20358 * src/alloc.h: entered into RCS
20359
203601993-04-20 David J. MacKenzie <djm@gnu.org>
20361
20362 * src/version.c: *** empty log message ***
20363
20364 * src/files.c, src/allocate.c:
20365 entered into RCS
20366
20367 * src/reader.c: *** empty log message ***
20368
20369 * src/lex.c: entered into RCS
20370
20371 * src/conflicts.c: New file.
20372
20373 * src/symtab.c: entered into RCS
20374
20375 * src/alloc.h: New file.
20376
20377 * src/LR0.c: entered into RCS
20378
203791993-04-18 Noah Friedman <friedman@gnu.org>
20380
20381 * src/reader.c: New file.
20382
20383 * src/version.c: *** empty log message ***
20384
203851993-04-18 Noah Friedman <friedman@gnu.org>
20386
20387 * Makefile.in: *** empty log message ***
20388
203891993-04-17 Noah Friedman <friedman@gnu.org>
20390
20391 * Makefile.in: *** empty log message ***
20392
203931993-04-15 Richard Stallman <rms@gnu.org>
20394
20395 * src/main.c, src/files.c:
20396 New file.
20397
203981993-04-15 Noah Friedman <friedman@gnu.org>
20399
20400 * configure.in: entered into RCS
20401
20402 * configure.in: *** empty log message ***
20403
20404 * configure.in: New file.
20405
204061993-04-14 Richard Stallman <rms@gnu.org>
20407
20408 * Makefile.in: New file.
20409
204101993-04-13 Richard Stallman <rms@gnu.org>
20411
20412 * src/version.c: New file.
20413
204141993-03-25 Richard Stallman <rms@gnu.org>
20415
20416 * src/output.c: entered into RCS
20417
204181992-09-25 Richard Stallman <rms@gnu.org>
20419
20420 * configure.bat: entered into RCS
20421
204221992-06-22 Richard Stallman <rms@gnu.org>
20423
20424 * src/vmsgetargs.c: entered into RCS
20425
204261992-06-22 Richard Stallman <rms@gnu.org>
20427
20428 * doc/bison.rnh: entered into RCS
20429
204301992-04-20 David J. MacKenzie <djm@gnu.org>
20431
20432 * README: entered into RCS
20433
204341992-01-22 Richard Stallman <rms@gnu.org>
20435
20436 * src/machine.h: entered into RCS
20437
204381991-12-21 Richard Stallman <rms@gnu.org>
20439
20440 * src/lalr.c, src/closure.c:
20441 entered into RCS
20442
204431991-12-20 Richard Stallman <rms@gnu.org>
20444
20445 * src/state.h: entered into RCS
20446
204471991-12-18 Richard Stallman <rms@gnu.org>
20448
20449 * src/print.c, src/nullable.c, src/derives.c:
20450 entered into RCS
20451
204521991-11-03 David J. MacKenzie <djm@gnu.org>
20453
20454 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20455 entered into RCS
20456
204571988-09-09 Richard Stallman <rms@gnu.org>
20458
20459 * src/bison.hairy: entered into RCS
20460
204611987-12-16 Richard Stallman <rms@gnu.org>
20462
20463 * REFERENCES: entered into RCS
dc546b0f 20464
f294a2c2 20465
04098407 20466 -----
f294a2c2 20467
04098407 20468 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
95021767
JD
20469 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20470 Free Software Foundation, Inc.
f294a2c2 20471
04098407
PE
20472 Copying and distribution of this file, with or without
20473 modification, are permitted provided the copyright notice and this
20474 notice are preserved.
e9071366
AD
20475
20476$Id$