]> git.saurik.com Git - bison.git/blame - ChangeLog
Fix some .gitignore and .cvsignore problems.
[bison.git] / ChangeLog
CommitLineData
9aacab9a
JD
12008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Fix some .gitignore and .cvsignore problems.
4 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5 (insert_vc_ignore): ... this new function, which prepends `/' to all
6 .gitignore entries before passing them to insert_sorted_if_absent.
7 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
8 .cvsignore files are maintained even though Bison developers run
9 bootstrap while using Git.
10 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
11 unneeded by Bison.
12 (gnulib): Add.
13 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
14 unneeded. Reported by Eric Blake.
15 * lib/.gitignore (/*~): Add.
16 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
17 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
18 Blake.
19 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
20
a9fc7990
JD
212008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
22
23 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
24 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
25 * bootstrap.conf (gnulib_modules): Add unsetenv.
26 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
27 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
28 (/setenv.m4): Add.
29 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
30 the first argument because it may become position-dependent, and unset
31 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
32 Add comments explaining these issues in more detail.
33
0f1d6f10
JD
342008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
35
36 Add .gitignore everywhere based on .cvsignore.
37 * .gitignore: New.
38 * build-aux/.gitignore: New.
39 * data/.gitignore: New.
40 * doc/.gitignore: New.
41 * etc/.gitignore: New.
42 * examples/.gitignore: New.
43 * examples/calc++/.gitignore: New.
44 * lib/.gitignore: New.
45 * m4/.gitignore: New.
46 * po/.gitignore: New.
47 * runtime-po/.gitignore: New.
48 * src/.gitignore: New.
49 * tests/.gitignore: New.
50
7bd1665a
JD
512008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
52
53 * NEWS (2.3b+): New section, empty for now.
54 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
55
72c5b982
JD
562008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
57
58 * NEWS (2.3b): Update release date since there has been a delay in
59 getting the announcements and tarballs out.
60
bd02cd5d
JD
612008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
62
63 * NEWS: Version 2.3b.
64 * configure.ac (AC_INIT): Likewise.
65 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
66
9126263e
JD
672008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
68
69 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
70 been doing it for years.
71 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
72 (Release Procedure): Add FIXME about make alpha being unmaintained.
73
fa6aa7b3
JD
742008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
75
76 * data/yacc.c: Reformat m4 a little for readability.
77 * src/lalr.c (build_relations): Correct comment.
78
d30b312d
JMG
792008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
80
81 DJGPP specific issue.
82 * djgpp/config.sed: Fixes required to run configure scripts generated
83 by autoconf 2.62.
84
138d4cd9
JD
852008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
86
87 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
88 coordinator@translationproject.org.
89
8f7e2e1f
JD
902008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
91
92 * THANKS: Add Eric Blake.
93
f55efa38
JD
942008-04-23 Eric Blake <ebb9@byu.net>
95
96 Revert prior patch, by working around autoconf regression.
97 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
98 ("Output file name: ("): Uncomment test.
99 ("Output file name: )"): Likewise.
100 Based on an idea from Noah Misch.
101
096c9f9d
JD
1022008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
103
104 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
105 2.61. Reported by Juan Manuel Guerrero at
106 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
107 * tests/output.at ("Output file name: ("): Comment out test case for
108 now.
109 ("Output file name: )"): Likewise.
110
0f664b89
JD
1112008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
112
113 * GNUmakefile: Update git-version-gen invocation so make dist
114 succeeds.
115
1cfe6375
JD
1162008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
117
118 Update to the current gnulib CVS repository, and fix trigraph handling
119 in Bison.
120 * bootstrap: Update gnulib CVS repository URL.
121 (symlink_to_dir): Encapsulate the code that guarantees the destination
122 directory exists into...
123 (check_dst_dir): ... this new function, and...
124 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
125 fail when copying files into lib/uniwidth/.
126 * src/output.c (prepare_symbols): When writing yytname muscles, where
127 symbol names will be encoded in C-string literals, tell quotearg to
128 escape trigraphs. This used to be the default in gnulib.
129 * tests/regression.at (Token definitions): Because of the change in
130 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
131 escapes trigraphs in symbol names. Thus, yytname no longer has
132 trigraphs unnecessarily doubly escaped. Update test case output.
133 Extend test case to be sure Bison's own error messages will no longer
134 have trigraphs in symbol names unnecessarily escaped once.
135
74c52fc8
JD
1362008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
137
138 Fix make dist infinite loop reported by Juan Manuel Guerrero at
139 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
140 * .cvsignore: Add .version.
141 * .version.in: New.
142 * bootstrap.conf (gnulib_modules): Add git-version-gen.
143 * configure.ac (AC_CONFIG_FILES): Add .version.
144 * build-aux/.cvsignore: Add git-version-gen.
145
8e55b3aa
JD
1462008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
147
148 * NEWS (2.3a+): Mention that -g now takes an argument.
149 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
150 consistency. Update the -g and -x entries now that they take
151 arguments. Use brackets to indicate optional arguments.
152 * src/getargs.c (usage): Explain the relationship between arguments of
153 long and short options more completely. Document --defines and -d
154 separately since the former takes an argument but, for POSIX Yacc, the
155 latter does not.
156 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 157 (getargs): Sort cases.
8e55b3aa 158
59c5ac72
AD
1592008-02-28 Akim Demaille <demaille@gostai.com>
160
161 * doc/bison.texinfo: Fix a few typos.
162
118d4978
AD
1632008-02-28 Akim Demaille <akim@epita.fr>
164
165 * doc/bison.texinfo (Bison Options): Document -W.
166 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
167
7020f1e9
AD
1682008-02-28 Akim Demaille <akim@epita.fr>
169
170 * src/getargs.c (short_options): Split and sort for readability.
171 -g and -x take optional arguments, just like their long options.
172 * build-aux/cross-options.pl: Use /x to make the regexp easier to
173 understand.
174 Fix the handling of $opt which resulted in all the argument to be
175 considered as optional.
176
59da312b
JD
1772008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
178
179 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
180 say its interface is experimental.
181 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
182 Java.
183 (Bison Options): In the -L and --language entry, mention Java.
184 (Java Bison Interface): Say the interface is experimental.
185 * src/getargs.c (usage): Mention -L and --language.
186
187 * NEWS (2.3a+): Say the push parsing interface is experimental.
188 * doc/bison.texinfo (Push Decl): Likewise.
189 (Decl Summary): Likewise in the "%define api.push_pull" entry.
190 (Push Parser Function): Likewise.
191 (Pull Parser Function): Likewise.
192 (Parser Create Function): Likewise.
193 (Parser Delete Function): Likewise.
194 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
195 yypull_parse, and yypush_parse entries.
196
197 * NEWS (2.3a+): Mention XML support, and say the schema is
198 experimental.
199 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
200 * src/getargs.c (usage): Say the XML schema is experimental.
201
202 * NEWS (2.3a+): Say option instead of flag.
203
2bb3ebec
WP
2042008-02-21 Wojciech Polak <polak@gnu.org>
205
206 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
207 text.
208
333e670c
JD
2092008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
210
211 Fix impure push parser compile error reported by Bob Rossi at
212 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
213 * data/yacc.c: Clean up whitespace in the output a little.
214 (yypstate_allocated): Define for impure push parsers regardless of
215 whether the pull interface is also requested.
216 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
217 check impure push parsers without the pull interface.
218
219 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
220 yyerror takes arguments specified by %parse-param while yypstate_new
221 does not.
222 * doc/bison.texinfo (Parser Create Function): Document that
223 yypstate_new returns 0 for multiple impure parser instances.
224 * tests/push.at (Push Parsing: Multiple impure instances): Update
225 expected stderr output.
226
798096e1
JD
2272008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
228
229 * runtime-po/POTFILES.in (push.c): Remove.
230
9ca7f077
JD
2312008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
232
233 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
234 * data/push.c: Rename to...
235 * data/yacc.c: ... this, overwriting it.
236 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
237 `%push-pull-parser' -> `%define api.push_pull "both"'.
238 Remove old yacc.c tests, and update push.c tests to yacc.c.
239
42ee26bb
JD
2402008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
241
242 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
243 `"%code top" blocks' instead of `%code "top" blocks'.
244 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
245 Clean up whitespace in the output a little.
246
b1cc23c4
JD
2472008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
248
249 Fix documentation problems reported by Tim Josling at
250 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
251 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
252 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
253 integers. Explain the effect of literal string aliases on error
254 messages. Copy token 0 documentation from the C++ skeleton
255 documentation.
256
ab7f29f8
JD
2572008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
258
259 Accept a token number in a %left, %right, or %nonassoc for POSIX
260 conformance. Reported by Tim Josling at
261 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
262 * NEWS (2.3a+): Mention.
263 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
264 and code numbers are treated by precedence declarations.
265 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
266 of symbols.1.
267 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
268 of symbol.
269 (symbol.prec): New, just like symbol but allows INT.
270 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
271 longer holds.
272 * tests/regression.at (Token number in precedence declaration): New
273 test case.
274
a924ef36
JMG
2752008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
276
277 DJGPP specific issues.
278 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
279 be changed. Copyright timestamp adjusted.
280 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
281 be changed. Copyright timestamp adjusted.
282 * djgpp/config.site: Copyright timestamp adjusted.
283 * djgpp/config_h.sed: Copyright timestamp adjusted.
284 * djgpp/djunpack.bat: Copyright timestamp adjusted.
285 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
286 filename translation list.
287 * djgpp/subpipe.c (init_subpipe): Check the environment variables
288 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
289 files shall be created. Before trying to use the temp dir where the
290 environment variable points to check that the dir really exists. If
291 not default to the cwd as temp dir. Copyright timestamp adjusted.
292 * djgpp/subpipe.h: Copyright timestamp adjusted.
293 * djgpp/testsuite.sed: Copyright timestamp adjusted.
294
389c8cfd
PE
2952008-01-30 Paul Eggert <eggert@cs.ucla.edu>
296
297 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
298
5d1cfef4
PE
2992008-01-09 Paul Eggert <eggert@cs.ucla.edu>
300
301 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
302 Problem reported by Claudio Saavedra in
303 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
304
e2dcf996
WP
3052008-01-05 Wojciech Polak <polak@gnu.org>
306
307 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
308 document's title with the input grammar file name.
309
da730230
JD
3102007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
311
312 Automate regression testing of the XML/XSLT implementation. Discussed
313 starting at
314 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
315 * configure.ac (XSLTPROC): New substitution.
316 * Makefile.am (maintainer-xml-check): New phony target invoking...
317 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
318 invoking make maintainer-check with BISON_TEST_XML=1.
319 * tests/atlocal.in (XSLTPROC): New.
320 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
321 not to report reachable memory when Bison is expected to have a
322 non-zero exit status and (2) to compare XML/XSLT output with --graph
323 and --report=all output for every working grammar when
324 BISON_TEST_XML=1.
325 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
326 (AT_BISON_CHECK_XML): New.
327 (AT_QUELL_VALGRIND): New.
328 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
329 (AT_CHECK): ... don't redefine this since this was the old way to
330 quell Valgrind.
331 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
332 AT_BISON_CHECK invocations.
333 * tests/c++.at: Likewise.
334 * tests/calc.at: Likewise.
335 * tests/conflicts.at: Likewise.
336 * tests/cxx-type.at: Likewise.
337 * tests/existing.at: Likewise.
338 * tests/glr-regression.at: Likewise.
339 * tests/headers.at: Likewise.
340 * tests/input.at: Likewise.
341 * tests/java.at: Likewise.
342 * tests/output.at: Likewise.
343 * tests/push.at: Likewise.
344 * tests/reduce.at: Likewise.
345 * tests/regression.at: Likewise.
346 * tests/sets.at: Likewise.
347 * tests/skeletons.at: Likewise.
348 * tests/synclines.at: Likewise.
349 * tests/torture.at: Likewise.
350 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
351 tends to hang xsltproc.
352 (Big horizontal): Likewise.
353
408476bc
JD
3542007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
355
356 In XML output, remove redundant class attribute on symbol element.
357 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
358 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
359 look up a symbol to determine whether it's a nonterminal or terminal.
360 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
361 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
362
363 Add prec/assoc information to XML output.
364 * src/gram.c (grammar_rules_print_xml): For each rule that has a
365 %prec, add a percent_prec attribute.
366 * src/print-xml.c (print_grammar): For each terminal that has a
367 precedence or associativity, add a prec or assoc attribute.
368 (xml_indent): New.
369 (xml_puts): Use xml_indent.
370 (xml_printf): Use xml_indent.
371 * src/print-xml.h (xml_indent): Prototype.
372
373 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
374 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
375
d4a26c48
JD
3762007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
377
378 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
379 (bison:ruleByNumber): ... this for clarity.
380 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
381 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
382 (xsl:template match="reduction"): Update.
383 (xsl:template match="item"): Update.
384 (xsl:template match="reduction"): Update.
385
386 In the XML output, don't print the list of rules where symbols appear.
387 Compute it in XSLT instead. Discussed at
388 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
389 * data/xslt/bison.xsl (bison:ruleByLhs): New.
390 (bison:ruleByRhs): New.
391 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
392 bison:ruleByRhs.
393 (xsl:template match="terminal/rule"): Remove.
394 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
395 bison:ruleByRhs.
396 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
397 Remove.
398 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
399 bison:ruleByRhs and mode="number-link" for rule template.
400 (xsl:template match="terminal/rule"): Remove.
401 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
402 bison:ruleByRhs and mode="number-link" for rule template.
403 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
404 Rewrite as...
405 (xsl:template match="rule" mode="number-link"): ... this.
406 * src/print-xml.c (print_grammar): Don't print the list of rules.
407
ef1b4273
JD
4082007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
409
410 Don't let --report affect XML output; always print all information.
411 Discussed at
412 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
413 * src/conflicts.c (log_resolution): Implement.
414 * src/print-xml.c (print_core): Implement.
415 (print_state): Implement.
416 (print_xml): Implement.
417
418 * NEWS (2.3a+): Fix quotes.
419 * src/parse-gram.y (prologue_declaration): For consistency with -v,
420 don't let %verbose clear the list specified by --report.
421
0f6cd9e3
AD
4222007-11-26 Akim Demaille <akim@epita.fr>
423
424 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
425
d80fb37a
JD
4262007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
427
428 In the XML output, list useless and unused symbols and rules with the
429 useful ones and add a "usefulness" attribute. Discussed starting at
430 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
431 * src/gram.c (grammar_rules_partial_print_xml): Remove.
432 (grammar_rules_print_xml): Print all rules instead of just those
433 useful in the grammar, and add a "usefulness" attribute.
434 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
435 * src/print-xml.c (print_rules_useless_in_parser): Remove.
436 (print_grammar): Print all nonterminals instead of just useful ones,
437 and add a "usefulness" attribute to nonterminals and terminals.
438 (print_xml): Don't print a separate "reductions" or
439 "rules-useless-in-parser" element.
440 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
441 (reduce_xml): Remove.
442 (reduce_token_unused_in_grammar): New.
443 (reduce_nonterminal_useless_in_grammar): New.
444 * src/reduce.h (reduce_xml): Remove prototype.
445 (reduce_token_unused_in_grammar): Add prototype.
446 (reduce_nonterminal_useless_in_grammar): Add prototype.
447 * data/xslt/xml2text.xsl: Update for XML changes.
448 * data/xslt/xml2xhtml.xsl: Update for XML changes.
449 * tests/reduce.at (Useless Terminals): Update output.
450 (Useless Rules): Update output.
451 (Reduced Automaton): Update output.
452
453 Say "Terminals unused in grammar" instead of "Unused terminals".
454 * NEWS (2.3a+): Update.
455 * doc/bison.texinfo (Understanding): Update example output.
456 * src/reduce.c (reduce_output): Implement.
457 * data/xslt/xml2text.xsl: Implement.
458 * data/xslt/xml2xhtml.xsl: Implement.
459
1bb2bd75
JD
4602007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
461
462 Accept --report-file=FILE to override the default `.output' filename.
463 * NEWS (2.3a+): Mention.
464 * doc/bison.texinfo (Bison Options): Add an entry.
465 * src/files.c (compute_output_file_names): Don't override
466 spec_verbose_file if already set.
467 * src/getargs.c (usage): Document --report-file.
468 (REPORT_FILE_OPTION): New anonymous enum member.
469 (long_options): Add entry for it.
470 (getargs): Add case for it setting spec_verbose_file.
471
472 * build-aux/cross-options.pl: Don't record a short option just because
473 there's an arg.
474 * doc/.cvsignore: Add yacc.1.
475
a005a9c4
AD
4762007-11-14 Akim Demaille <akim@epita.fr>
477
478 * doc/yacc.1.in: New.
479 * configure.ac, doc/Makefile.am: Adjust.
480 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
481 config.h symbol.
482 Use AC_SUBST for assignments too.
483 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
484
cff03fb2
JD
4852007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
486
487 * src/gram.c: Remove comments that duplicate comments in gram.h.
488
489 When reporting useless rules and nonterminals, say "useless in grammar"
490 instead of "useless", and say "useless in parser" instead of "never
491 reduced". Discussed starting at
492 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
493 * NEWS (2.3a+): Mention this change.
494 * data/xslt/xml2text.xsl: Update output text and expected input XML
495 element names to match changes below.
496 * data/xslt/xml2xhtml.xsl: Likewise.
497 (xsl:template match="bison-xml-report"): Add missing entry in Table of
498 Contents: "Rules useless in parser due to conflicts".
499 * doc/bison.texinfo (Decl Summary): Reword a little.
500 (Understanding): Update example output for changes below.
501 * src/gram.c: (rule_useful_p): Rename to...
502 (rule_useful_in_grammar_p): ... this.
503 (rule_useless_p): Rename to...
504 (rule_useless_in_grammar_p): ... this.
505 (rule_never_reduced_p): Rename to...
506 (rule_useless_in_parser_p): ... this.
507 (grammar_rules_print): Update for renames.
508 (grammar_rules_print_xml): Update for renames.
509 (grammar_rules_never_reduced_report): Rename to...
510 (grammar_rules_useless_report): ... this since it is used for either
511 kind of useless rule.
512 * src/gram.h: Reword comments and update function names in prototypes.
513 * src/main.c (main): Say "rule useless in parser due to conflicts".
514 * src/print-xml.c (print_rules_never_reduced): Rename to...
515 (print_rules_useless_in_parser): ... this, and rename output XML
516 element "rules-never-reduced" to "rules-useless-in-parser".
517 (print_xml): Update for rename.
518 * src/print.c (print_results): Say "Rules useless in parser due to
519 conflicts".
520 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
521 (nonterminals_reduce): Say "nonterminal useless in grammar".
522 (reduce_output): Say "Nonterminals useless in grammar".
523 Say "Rules useless in grammar".
524 (reduce_xml): Rename output XML element "useless" to
525 "useless-in-grammar".
526 (reduce_print): Don't report the count of grammatically useless rules
527 as "rules never reduced" just because %yacc is specified.
528 In the correct report of this count, say nonterminal(s) and rule(s)
529 "useless in grammar".
530 * tests/conflicts.at (S/R in initial): Update expected output.
531 (Defaulted Conflicted Reduction): Likewise.
532 (Unreachable States After Conflict Resolution): Likewise.
533 * tests/existing.at (GNU pic Grammar): Likewise.
534 * tests/reduce.at (Useless Nonterminals): Likewise.
535 (Useless Rules): Likewise.
536 (Reduced Automaton): Likewise.
537 (Underivable Rules): Likewise.
538 (Empty Language): Likewise.
539
66f0441d
JD
5402007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
541
542 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
543 here document and before the EOF so that BSD's implementation of Bourne
544 shell doesn't parse the delimiter as part of the here document.
545 * doc/.cvsignore: Add cross-options.texi.
546 * src/getargs.c (usage): Add a blank line after the warning categories.
547
d0ee4105
PB
5482007-11-08 Paolo Bonzini <bonzini@gnu.org>
549
550 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
551
e8b1fb9b
AD
5522007-11-05 Akim Demaille <akim@epita.fr>
553
554 Remove Id: from bison.1.
555 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
556 (perl -0777 -pi -e 's/\.PP\nId): New.
557 (.x.1): Use it to ignore the version control revision.
558
2f7a96b5
AD
5592007-11-05 Akim Demaille <demaille@gostai.com>
560
561 * build-aux/Makefile.am: Ship cross-options.pl.
562 * doc/Makefile.am: Always refer to cross-options.texi with
563 $(srcdir).
564 (MAINTAINERCLEANFILES): Add it.
565
f4101aa6
AD
5662007-11-04 Akim Demaille <demaille@gostai.com>
567
568 Generate the long/short option cross-table.
569 * build-aux/cross-options.pl: New.
570 * doc/Makefile.am (cross-options.texi): New.
571 * doc/bison.texinfo: Use it.
572
727a1401
AD
5732007-11-04 Akim Demaille <demaille@gostai.com>
574
575 Generate bison.1 using help2man.
576 * doc/common.x, doc/bison.x: New.
577 * doc/Makefile.am (bison.1, .x.1): New.
578 The code is taken from autoconf-2.61/man/Makefile.am.
579 * configure.ac: Look for help2man.
580
6aeb9c57
AD
5812007-11-04 Akim Demaille <demaille@gostai.com>
582
583 Complete --help.
584 * src/getargs.c (usage): Document -W, make it clear that -d,
585 -g and -x have optional arguments.
586
d7be4085
AD
5872007-11-04 Akim Demaille <demaille@gostai.com>
588
589 Find sha1sum when named gsha1sum.
590 * bootstrap (find_tool): New.
591 ($SHA1SUM): New.
592
d9df47b6
JD
5932007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
594
595 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
596 at
597 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
598 * NEWS (2.3a+): Mention.
599 * data/bison.m4 (b4_pure_if): Don't define it here.
600 * data/c.m4 (b4_identification): Depend on individual skeletons to
601 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
602 values of the %define variables api.pure or api.push_pull. Define
603 YYPURE, YYPUSH, and YYPULL accordingly.
604 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
605 glr.cc has already defined b4_pure_flag.
606 * data/push.c: Define b4_pure_if based on `%define api.pure'.
607 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 608 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
609 * doc/bison.texinfo (Pure Decl): Update.
610 (Push Decl): Update.
611 (Decl Summary): Add api.pure to %define entry.
612 In %pure-parser entry, say it's deprecated and reference %define.
613 (Pure Calling): Update.
614 (Error Reporting): Update.
615 (C++ Scanner Interface): Update.
616 (How Can I Reset the Parser): Update.
617 (Table of Symbols): In %pure-parser entry, say it's deprecated and
618 reference %define.
619 * src/getargs.c (pure_parser): Remove global variable.
620 * src/getargs.h (pure_parser): Remove extern.
621 * src/output.c (prepare): Don't define pure_flag muscle.
622 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
623 wrapper around `%define api.pure'.
624 * tests/calc.at (Simple LALR Calculator): Update.
625 (Simple GLR Calculator): Update.
626 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
627 Update.
628 (GLR: Resolve ambiguity, pure, locations): Update.
629 (GLR: Merge conflicting parses, pure, no locations): Update.
630 (GLR: Merge conflicting parses, pure, locations): Update.
631 * tests/glr-regression.at (Uninitialized location when reporting
632 ambiguity): Update
633 * tests/input.at (Unused %define api.pure): New test case.
634 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
635 AT_PURE_IF and AT_PURE_AND_LOC_IF.
636 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
637
c373bf8b
JD
6382007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
639
640 %define push_pull -> %define api.push_pull. Discussed starting at
641 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
642 * data/push.c: Expect the new name.
643 * data/yacc.c: Likewise.
644 * doc/bison.texinfo (Push Decl): Update.
645 (Decl Summary): Update %define entry.
646 (Push Parser Function): Update.
647 (Pull Parser Function): Update.
648 (Parser Create Function): Update.
649 (Parser Delete Function): Update.
650 * tests/calc.at (Simple LALR Calculator): Update.
651 * tests/input.at (%define enum variables): Update.
652 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
653 (Push Parsing: Multiple impure instances): Update.
654 (Push Parsing: Unsupported Skeletons): Update.
655 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
656 (Exploding the Stack Size with Malloc): Update.
657
658 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
659 other entries some.
660
32f19b6b
JD
6612007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
662
663 For the XML output's terminal element, rename @number to @token-number,
664 and add @symbol-number. In the nonterminal element, rename @number to
665 @symbol-number. Discussed starting at
666 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
667 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
668 renames.
669 (xsl:template match="nonterminal"): Likewise.
670 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
671 (xsl:template match="nonterminal"): Likewise.
672 * src/print-xml.c (print_grammar): Implement.
673
255a6b90
JD
6742007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
675
676 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
677 2007-10-11 change, the child elements here are items not rules.
408476bc 678 (xsl:template match="item"): New.
255a6b90
JD
679 (xsl:template match="rule"): Update for new reduced itemset.
680 (xsl:template match="point"): Remove.
681 (xsl:template match="empty"): For consistency with --graph, don't
682 output "/* empty */".
683 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
684 line-wrap, don't pass a negative value as first-line-length since this
685 won't work with the following changes.
686 (xsl:template name="line-wrap"): Simplify slightly.
687 (xsl:template name="ws-search"): Eliminate recursion.
688 * src/print_graph.c (print_core): Don't print a reduction's lookahead
689 set next to an item whose dot is not at the end of the RHS even if it
690 happens to be associated with the same rule.
691
88c78747
JD
6922007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
693
31984206
JD
694 Add %define lr.keep_unreachable_states.
695 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
696 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
697 * src/main.c (main): Implement it.
698 * tests/conflicts.at (Unreachable States After Conflict Resolution):
699 Extend to test it, and fix a typo.
700
7012007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
702
703 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
704 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
705 the example .output text.
706 * tests/regression.at (Extra lookahead sets in report): Improve wording
707 of comments.
708
b7a70162
WP
7092007-10-17 Wojciech Polak <polak@gnu.org>
710
711 * src/print-xml.c (print_grammar): Renamed
712 <terminal> and <nonterminal> attributes:
713 "type" to "number" and "symbol" to "name".
714 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
715 Use new attribute names.
716 (xsl:template match="nonterminal"): Likewise.
717 * data/xslt/xml2xhtml.xsl: Likewise.
718
a0de5091
JD
7192007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
720
721 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
722 (Option Cross Key): Likewise.
723
724 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
725 next to an item whose dot is not at the end of the RHS even if it
726 happens to be associated with the same rule.
727 * src/print.c (print_core): Likewise.
728 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
729 (Resolved SR Conflicts): Update output.
730 * tests/regression.at (Extra lookahead sets in report): New test case.
731
4c20d18d
WP
7322007-10-11 Wojciech Polak <polak@gnu.org>
733
734 * src/print-xml.c (print_core): Remove item set
735 redundancy.
736 * data/xslt/bison.xsl (bison:ruleNumber): New key.
737 Improve processing time. Suggested by Joel E. Denny.
738 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
739 Write xsl:param "required" attribute as comment.
740 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
741 (xsl:template match="rule"): Support new reduced itemset.
742 (xsl:template match="point"): Remove.
743 * data/xslt/xml2xhtml.xsl: Likewise.
744
f506ad1c
JD
7452007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
746
747 * src/getargs.c (version): Update copyright year.
748
21f1b063
JD
7492007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
750
751 Make xml2dot.xsl and --graph produce the same output.
752 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
753 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
754 escaped later.
755 (xsl:template name="output-node"): Use the new escape template instead
756 of the string-replace template directly.
757 (xsl:template name="output-edge"): Likewise.
758 (xsl:template name="escape"): New, escapes backslashes and newlines in
759 addition to quotation marks.
760 * src/graphviz.c (start_graph, output_node, output_edge): Add
761 whitespace to output for legibility.
762
763 Make xml2text.xsl and --report produce the same output, and remove the
764 XML "conflicts" element since a conflict summary is easily extracted
765 from the automaton.
766 * data/xslt/bison.xsl: New.
767 (xsl:template match="state" mode="bison:count-conflicts): New.
768 * data/xslt/xml2text.xsl: Import bison.xsl.
769 (xsl:template match="bison-xml-report"): Instead of styling the
770 "conflicts" element, style the "automaton" element with mode
771 "conflicts". Unlike the former, the latter lists S/R and R/R
772 conflicts for a state on the same line.
773 (xsl:template match="conflicts"): Remove.
774 (xsl:template match="conflict"): Remove.
775 (xsl:template match="terminal"): Line-wrap the list of rules in which
776 the terminal is used.
777 (xsl:template match="nonterminal"): Likewise for nonterminals.
778 (xsl:template match="automaton" mode="conflicts"): New.
779 (xsl:template match="state" mode="conflicts"): New.
780 (xsl:template name="line-wrap"): New.
781 (xsl:template name="ws-search"): New.
782 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
783 (xsl:template match="bison-xml-report"): Instead of styling the
784 "conflicts" element, style the "automaton" element with mode
785 "conflicts."
786 (xsl:template match="conflicts"): Remove.
787 (xsl:template match="conflict"): Remove.
788 (xsl:template match="automaton" mode="conflicts"): New.
789 (xsl:template match="state" mode="conflicts): New.
790 * src/conflicts.c (conflicts_output_xml): Remove.
791 * src/conflicts.h (conflicts_output_xml): Remove prototype.
792 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
793 * src/print.c (print_grammar): Consistently wrap at the 66th column so
794 the corresponding XSLT is easier. Also, never wrap between a word and
795 the comma that follows it.
796
793fbca5
JD
7972007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
798
799 Improve C++ namespace support. Discussed starting at
800 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
801 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
802 b4_namespace_close): New macros that interpret the %define variable
803 "namespace" so its value can contain "::" to indicate nested
804 namespaces.
805 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
806 the above macros.
807 * data/lalr1.cc (b4_namespace): Likewise.
808 * data/location.cc (b4_namespace): Likewise.
809 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
810 inside a new table in the general %define entry. Document `%define
811 namespace' there as well. Point the %name-prefix entry to it since it
812 explains it more completely in the case of C++.
813 (C++ Bison Interface): Mention `%define namespace' instead of
814 %name-prefix.
815 (Table of Symbols): Remove the `%define push_pull' entry. The %define
816 entry suffices.
817 * tests/c++.at (Relative namespace references): New test case.
818 (Absolute namespace references): New test case.
819 (Syntactically invalid namespace references): New test case.
820 * tests/input.at (C++ namespace reference errors): New test case.
821
35b8730d
JD
8222007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
823
824 Add syncline support and location accessor to internal %define
825 interfaces.
826 * data/bison.m4 (b4_percent_define_get_loc): New.
827 (b4_percent_define_get_syncline): New.
828 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
829 (b4_percent_define_default): Record defining location as line 1 rather
830 than 0 for the sake of synchronizing #line's, and define
831 b4_percent_define_syncline(VARIABLE).
832 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
833 * src/muscle_tab.c (muscle_syncline_grow): New.
834 (muscle_code_grow): Use muscle_syncline_grow.
835 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
836 define b4_percent_define_syncline(VARIABLE).
837 (muscle_percent_define_get_loc): New.
838 (muscle_percent_define_get_syncline): New.
839 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
840 remove some unused variables.
841 (muscle_percent_define_default): Record defining location as line 1
842 rather than 0 for the sake of synchronizing #line's, and define
843 b4_percent_define_syncline(VARIABLE).
844 (muscle_percent_define_check_values): Use
845 muscle_percent_define_get_loc.
846 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
847 (muscle_percent_define_get_syncline): Prototype.
848 * tests/skeletons.at (%define Boolean variables: invalid skeleton
849 defaults): Update output for location change.
850 (Complaining during macro argument expansion): Extend to test
851 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
852
7dc4a694
JD
8532007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
854
855 Fix some error-reporting macro bugs.
856 * data/bison.m4 (b4_cat): New.
857 (b4_error, b4_error_at): Use b4_cat to send error directives directly
858 to stdout so they don't become arguments to other macros. Update
859 comments and add examples.
860 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
861 add examples.
862 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
863 after printing the error directive so that M4 doesn't report subsequent
864 problems that are induced by this problem.
865 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
866 instead of just in them. Recognize @\n in both places. Both expand to
867 the empty string. Needed by b4_cat.
868 * tests/skeletons.at (Complaining during macro argument expansion):
869 New test case.
870 (Fatal errors make M4 exit immediately): New test case.
871
d4bd2295
JD
8722007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
873
874 Implement --print-datadir.
875 * src/getargs.c (usage): Mention.
876 (PRINT_DATADIR_OPTION): New anonymous enum member.
877 (long_options): Add entry for it.
878 (getargs): Add case for it calling compute_pkgdatadir.
879 * src/output.c (output_skeleton): Encapsulate data directory
880 computation from here...
881 (prepare): ... and from here...
882 (compute_pkgdatadir): ... into this new function.
883 * src/output.h (compute_pkgdatadir): Prototype.
884
34cdeddf
JD
8852007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
886
887 * src/print-xml.c (escape_bufs): New static global variable
888 replacing...
889 (xml_escape_n): ... the static local variable buf here.
890 (print_xml): Free memory for escape_bufs.
891 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
892
d782395d
JD
8932007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
894
895 Replace `%push-parser' and `%push-pull-parser' with
896 `%define push_pull "push"' and `%define push_pull "both"'.
897 `%define push_pull "pull"' is the default.
898 * doc/bison.texinfo (Push Decl, Push Parser Function,
899 Pull Parser Function, Parser Create Function, Parser Delete Function):
900 Update declarations.
901 (Decl Summary, Table of Symbols): Replace %push-parser and
902 %push-pull-parser entries with a %define push_pull entry.
903 * data/bison.m4 (b4_percent_define_check_values): New macro.
904 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
905 definitions...
906 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
907 definitions...
908 * data/push.c: ... to here and compute them from the value of the
909 %define variable push_pull.
910 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
911 parsing requests here...
912 * data/yacc.c: ... hack this to switch to push.c any time
913 b4_use_push_pull_flag or the %define variable push_pull is set. This
914 will go away when we mv push.c yacc.c.
915 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
916 push parsing is not supported since unused %define variables are
917 reported anyway.
918 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
919 * src/muscle_tab.h (muscle_percent_define_check_values): Update
920 comments for consistency with b4_percent_define_check_values.
921 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
922 muscles.
923 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
924 Remove.
925 (prologue_declaration): Remove %push-parser and %push-pull-parser
926 rules.
927 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
928 * tests/calc.at: Update declarations.
929 * tests/input.at (%define enum variables): New test case.
930 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
931 declaration.
932 (Push Parsing: Multiple impure instances): Update declaration.
933 (Push Parsing: Unsupported Skeletons): New test case.
934 * tests/torture.at (Exploding the Stack Size with Alloca): Update
935 declaration.
936 (Exploding the Stack Size with Malloc): Update declaration.
937
3f999f78
WP
9382007-09-24 Wojciech Polak <polak@gnu.org>
939
940 Add XSLT transformations.
941
942 * data/xslt/xml2dot.xsl: Transform XML into DOT.
943 * data/xslt/xml2text.xsl: Transform XML into plain text.
944 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
945 * data/Makefile.am (xsltdir): New variable.
946 (dist_xslt_DATA): Add xslt/*.xsl files.
947
a4f75309
PE
9482007-09-23 Paul Eggert <eggert@cs.ucla.edu>
949
950 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
951 Problem reported by Wojciech Polak.
952 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
953 (xml_printf): Undo change I made on 21 September; that is,
954 indent 2 spaces, not 1.
955
ad5feac4
JD
9562007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
957
958 Pacify ./configure --enable-gcc-warnings.
959 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
960 `char const *' instead of `char *'.
961 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
962 local variable `sep'.
963
41d7a5f2
PE
9642007-09-21 Paul Eggert <eggert@cs.ucla.edu>
965
966 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
967 elsewhere.
968 * src/print-xml.c: Prefer "const" after types; that's more consistent.
969 (xml_printf): Indent just 1 space for level.
970 (e_char, xlate_char): Remove.
971 (xml_escape_string): Rewrite to avoid undefined behavior (used
972 storage that was freed from the stack).
973 (xml_escape_n): Don't bother checking for subscript error.
974
3f999f78
WP
9752007-09-21 Wojciech Polak <polak@gnu.org>
976
977 Add Bison XML Automaton Report.
41d7a5f2
PE
978
979 Add support for an -x option to generate an XML report.
980 It is not documented yet.
981 * src/print-xml.c: New file.
982 * src/print-xml.h: Likewise.
983 * lib/timevar.def (TV_XML): New var.
984 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
985 * src/conflicts.c: Include print-xml.h.
986 (solved_conflicts_xml_obstack): New var.
987 (log_resolution, conflicts_solve, conflicts_free):
988 Add support for XML report.
989 (conflicts_output_val): New function.
990 * src/conflicts.h (conflicts_output_val): New decl.
991 * src/files.c (spec_xml_file): New var.
992 (compute_output_file_names, output_file_names_free): Add XML support.
993 * src/files.h (spec_xml_file): New decl.
994 * src/getargs.c (xml_flag): New var.
995 (usage, short_options, long_options, getargs): Add XML support.
996 * src/getargs.h (xml_flag): New decl.
997 * src/gram.c: Include print-xml.h.
998 (rule_lhs_print_xml, rule_rhs_print_xml):
999 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
1000 New functions.
1001 * src/gram.h: Declare external ones.
1002 * src/main.c: Include print-xml.h.
1003 (main): Add XML support.
1004 * src/reduce.c: Include print-xml.h.
1005 (reduce_xml): New function.
1006 * src/reduce.h: Declare it.
1007 * src/state.c: Include print-xml.h.
1008 (state_new): Add XML support.
1009 (state_rule_lookahead_tokens_print_xml): New function.
1010 * src/state.h: Declare it.
1011 (struct state): New member solved_conflicts_xml.
1012 * src/symtab.c (symbol_class_get_string): New function.
1013 * src/symtab.h: Declare it.
1014
6d8e724d
PE
10152007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1016
1017 * GNUmakefile: Switch to coreutils's version.
1018 * bootstrap: Likewise.
1019 * Makefile.cfg: Adjust to new GNUmakefile.
1020 * README-hacking: Likewise.
1021
1022 Import from gnulib:
1023
1024 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1025 Bruno Haible <bruno@clisp.org>
1026
1027 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
1028 and is a script that invokes bison. Tighten the code. Add comments.
1029
922bdd7f
JD
10302007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
1031
1032 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1033 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1034 * doc/bison.texinfo (Decl Summary): Fix.
1035 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1036 * tests/input.at (Boolean %define variables): Update output.
1037 * tests/skeletons.at (%define boolean variables: invalid skeleton
1038 defaults): Rename to...
1039 (%define Boolean variables: invalid skeleton defaults): ... this and
1040 update output.
1041
1b17b01d
JD
10422007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1043
1044 In impure push mode, don't allow more than one yypstate to be allocated
1045 since multiple impure parsers would corrupt yynerrs.
1046 * data/push.c (yypstate_allocated): New static global variable
1047 initialized to 0.
1048 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1049 exhaustion if yypstate_allocated is 1, but still return 2.
1050 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1051 already 1. Otherwise, set it to 1.
1052 (yypstate_delete): Set it to 0.
1053 * tests/push.at (Push Parsing: Multiple impure instances): New test
1054 case.
1055
9987d1b3
JD
10562007-08-17 Bob Rossi <bob@brasko.net>
1057
1058 * doc/bison.texinfo (Push Decl): Document the push parser.
1059 (Table of Symbols): Ditto.
1060 (Pure Decl): Ditto.
1061 (Decl Summary): Ditto.
1062 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1063 Parser Create Function, Parser Delete Function):
1064 Add new push parser symbols.
1065 (Table of Symbols): Document push-parser, push-pull-parser,
1066 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1067
f16b0819
PE
10682007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1069
1070 Update to GPLv3.
1071 * doc/gpl-3.0.texi: New file.
1072 * doc/gpl.texi: Remove.
1073 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1074 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1075 * README-hacking, TODO, bootstrap, bootstrap.conf:
1076 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1077 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1078 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1079 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1080 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1081 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1082 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1083 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1084 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1085 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1086 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1087 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1088 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1089 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1090 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1091 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1092 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1093 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1094 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1095 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1096 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1097 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1098 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1099 * src/complain.c, src/complain.h, src/conflicts.c:
1100 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1101 * src/files.h, src/flex-scanner.h, src/getargs.c:
1102 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1103 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1104 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1105 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1106 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1107 * src/print.c, src/print.h, src/print_graph.c:
1108 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1109 * src/reduce.h, src/relation.c, src/relation.h:
1110 * src/revision.h, src/scan-code.h, src/scan-code.l:
1111 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1112 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1113 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1114 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1115 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1116 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1117 * tests/existing.at, tests/glr-regression.at:
1118 * tests/headers.at, tests/input.at, tests/java.at:
1119 * tests/local.at, tests/output.at, tests/push.at:
1120 * tests/reduce.at, tests/regression.at, tests/sets.at:
1121 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1122 * tests/torture.at:
1123 Update to GPLv3.
1124
728c4be2
JD
11252007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1126
1127 Get rid of broken %no-parser, -n, and --no-parser implementation and
1128 documentation.
1129 * TODO: Don't mention them.
1130 * doc/bison.1: Likewise.
1131 * doc/bison.texinfo (Decl Summary): Likewise.
1132 (Bison Options): Likewise.
1133 (Option Cross Key): Likewise.
1134 * src/getargs.c (no_parser_flag): Remove global variable.
1135 (usage): Don't print description of -n and --no-parser.
1136 (long_options): Remove --no-parser entry here.
1137 (getargs): Remove -n case in the switch here.
1138 * src/getargs.h (no_parser_flag): Remove extern.
1139 * tests/regression.at (Web2c Actions): Remove comment that mentions
1140 --no-parser.
1141
5d31a216
JD
11422007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1143
1144 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1145 name user variables starting with `yy'. Just pass NULL instead of a
1146 dummy local &yylval to yypush_parse.
1147 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1148 starting with `yy'.
1149
a2ea208d
JD
11502007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1151
1152 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1153 true since it's then always used regardless of whether yyoverflow is
1154 defined. Reported by Christian Burger at
1155 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1156 * THANKS: Add Christian Burger.
1157
91661ebb
JD
1158 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1159 node names: say "Decl Summary" not "Bison Declaration Summary".
1160
cbd50549
JD
11612007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1162
1163 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1164 determine whether this function has already complained about an invalid
1165 value for a %define boolean variable, don't check whether Bison has
1166 ever examined the value. As written, the check was a tautology.
1167 Instead, record and check for this complaint using a separate muscle.
1168
eb1b0740
JD
11692007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1170
1171 Fix push parsing memory leak reported by Brandon Lucia at
1172 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1173 * THANKS: Add Brandon Lucia.
1174 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1175 but the parse never completed and thus freed it.
1176 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1177 * tests/testsuite.at: Include push.at.
1178 * test/push.at: New.
1179 (Push Parsing: Memory Leak for Early Deletion): New test case.
1180
9d774aff
JD
11812007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1182
1183 Improve handling of multiple S/R conflicts in the same state and of S/R
1184 conflicts involving multiple reductions.
1185 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1186 set for a state here or Bison will abort if it is reassigned on a
1187 later conflicted reduction in the same state.
1188 Similarly, don't finalize and assign the solved conflicts report here
1189 or it will be lost if it is reassigned on a later conflicted reduction
1190 in the same state.
1191 (set_conflicts): Instead, assign them both here after all S/R conflicts
1192 in the state have been fully examined.
1193 * src/print.c (shift_set): Rename to...
1194 (no_reduce_set): ... this.
1195 (print_reductions): Update for rename, and add %nonassoc error action
1196 tokens to no_reduce_set so that, when printing the first remaining
1197 reduction on an error action token, the reduction is enclosed in
1198 brackets.
1199 (print_results): Update for rename.
1200 * tests/conflicts.at (Solved conflicts report for multiple reductions
1201 in a state): New test case.
1202 (%nonassoc error actions for multiple reductions in a state): New test
1203 case.
1204
1205 * src/main.c (main): Don't depend on C99 features.
1206
10159d2a
JD
12072007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1208
1209 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
1210 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1211 uniwidth.
10159d2a 1212
953b3935
JD
12132007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1214
1215 * bootstrap (slurp): Create target directories that don't exist.
1216 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1217
6ce2d93a
JD
12182007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1219
1220 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1221 than item number.
1222 * closure.c (closure): Likewise.
1223 * state.h (reductions): Comment sorting of rules.
1224 (state): Comment sorting of items.
1225
ce3448d5
JD
12262007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1227
1228 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1229 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1230 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1231 definition in order to avoid Gnulib headers since we don't use config.h
1232 here.
1233 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1234 rather than AT_DATA so that config.h is included.
1235
8a86eef0
JD
12362007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1237
1238 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1239 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1240 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1241 and so that YYFPRINTF is guaranteed to be defined here.
1242
b1a81613
JD
12432007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1244
1245 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1246 with...
1247 (muscle_percent_define_check_values): ... this more helpful function.
1248 Again, it's not used yet, but it will be.
1249 * src/muscle_tab.h: Likewise.
1250
71b61d4d
JD
1251 Improve some comments in parser table construction.
1252 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1253 (generate_states): Don't mention ruleset, which is internal to closure.
1254 * src/closure.c (closure): Explain sorting of core and itemset, which
1255 is required for this function to behave correctly.
1256 * src/closure.h (closure): Mention sorting.
1257
2a6b783d
JD
12582007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1259
1260 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1261 move the check for disabled transitions to an aver since conflict
1262 resolution hasn't happened yet.
1263
1264 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1265 labels a state as inconsistent just because it has error transitions.
1266 The original form of this check appeared in revision 1.1 of lalr.c,
1267 which was committed on 1991-12-21. Now (at least), changing the
1268 consistency label on such a state appears to have no useful effect in
1269 any of the places it is examined, which I enumerate below. The key
1270 point to understanding each item in this enumeration is that a state
1271 with an error transition is labelled consistent in the first place only
1272 if it has no rules, so the check cannot matter for states that have
1273 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1274 to try to identify its conflicts, and a state must have *rules* to have
1275 conflicts. (2) Labelling a state as inconsistent will affect how
1276 action_row sets the default *rule* for the state. (3) Labelling a
1277 state as inconsistent will cause build_relations to add lookback edges
1278 to *rules* in that state.
1279 * src/state.h (struct state): Word the comment for member consistent
1280 more carefully.
1281
14462c2b
JD
12822007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1283
1284 Don't depend on C99 features.
1285 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1286 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1287 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1288 * src/state.c (state_mark_reachable_states): Fix for-loop.
1289 (state_remove_unreachable_states): Fix for-loop.
1290
1291 Don't widen struct state with member reachable just to temporarily
1292 record reachability. Instead, use a local bitset.
1293 * src/state.h (struct state): Remove member.
1294 * src/state.c (state_new): Don't initialize it.
1295 (state_mark_reachable_states): Rename to...
1296 (state_record_reachable_states): ... this, and use bitset.
1297 (state_remove_unreachable_states): Use bitset.
1298
5a43d418
JD
12992007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1300
1301 * src/Makefile.am (yacc): Quote target action commands properly so
1302 that the yacc script isn't corrupt. Reported by Hans Aberg at
1303 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1304
0c650a20
JD
1305 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1306 the case of pure parsers. Reported by Frans Englich at
1307 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1308 * THANKS: Add Frans Englich.
1309
61fee93e
JD
1310 * NEWS (2.3a+): In the %code entry, reference section `Bison
1311 Declaration Summary' from the manual now since the %code summary has
1312 moved there.
1313 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1314 in the rules section must be terminated by semicolons.
1315
f124d423
JD
13162007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1317
1318 Extend the front-end API for %define variables to more completely
1319 mirror the back-end. This will be useful in the future.
1320 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1321 Update comments to mention the new front-end counterparts of these
1322 macros.
1323 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1324 for muscle_string_decode and muscle_location_decode.
1325 (muscle_string_decode): New static function.
1326 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1327 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1328 functions.
1329 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1330 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1331 implementation more closely.
1332 (muscle_percent_define_invalid_value): New function.
1333 * src/muscle_tab.h (muscle_percent_define_get,
1334 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1335 Prototype.
1336
75ad86ee
JD
13372007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1338
1339 * NEWS (2.3a+): Mention yesterday's state-removal change.
1340 (2.3a): Remove the %language entry, which was added after 2.3a.
1341 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1342 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1343 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1344 tests/existing.at: Update copyright date.
1345
5967f0cf
JD
13462007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1347
1348 If conflict resolution makes states unreachable, remove those states,
1349 report rules that are then unused, and don't report conflicts in those
1350 states.
1351 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1352 New global function.
1353 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1354 function.
1355 * src/main.c (main): After conflict resolution, remove the unreachable
1356 states and update all data structures that reference states by number.
1357 * src/state.c (state_new): Initialize each state's reachable member to
1358 false.
1359 (state_mark_reachable_states): New static function.
1360 (state_remove_unreachable_states): New global function.
1361 * src/state.h (struct state): Add member bool reachable.
1362 (state_remove_unreachable_states): Prototype.
1363 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1364 New test case.
1365 * tests/existing.at (GNU pic Grammar): Update test case output now that
1366 an unused rule is discovered.
1367
b09f4f48
JD
13682007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1369
1370 Minor code cleanup in parser table construction.
1371 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1372 (new_itemsets, save_reductions): Update for rename to nitemset.
1373 * src/closure.c (nritemset): Rename to...
1374 (nitemset): ... this since the "r" appears to meaningless and isn't
1375 used in the comments.
1376 (closure): Update for rename.
1377 * src/closure.h (nritemset): Update extern to...
1378 (nitemset): ... this.
1379 * src/lalr.c (LA): Fix a typo in comments.
1380 * src/print.c (print_core): Update for rename to nitemset.
1381 * src/print_graph.c (print_graph): Likewise.
1382 * src/state.h: Fix some typos in header comments.
1383
bbb44d83
PE
13842007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1385
9b33de72
PE
1386 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1387 still sticks to ASCII. Sorry!
1388
bbb44d83
PE
1389 * README-hacking: New file, taken mostly from coreutils, with changes
1390 for Bison. Contains much of the contents of:
1391 * README-cvs: Remove.
1392 * bootstrap: Sync from gnulib.
1393 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1394 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1395
29553547
JD
13962007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1397
1398 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1399 Setzer.
1400 (Java Differences): Fix some typos.
1401 * THANKS: Add Sebastian Setzer.
1402
01b477c6
PB
14032007-03-07 Paolo Bonzini <bonzini@gnu.org>
1404
730739e4
AD
1405 * data/java.m4 (b4_single_class_if): Remove.
1406 (b4_abstract_if): Look at "%define abstract".
1407 (b4_lexer_if): New.
1408 (b4_union_name): Rename...
1409 (b4_yystype): ... to this. Map to "%define stype".
1410 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1411 b4_maybe_throws): Fix quoting.
1412 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1413 * data/lalr1.java (Lexer interface): Always define.
1414 (Lexer interface within parser class): Remove.
1415 (YYLexer class): New, used when "%code lexer" is present.
1416 (constructor): When "%code lexer" is used, pass %lex-param
1417 to the lexer constructor.
1418 (yylex, yyparse): Remove %lex-param from method invocations
1419 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1420
1421 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1422 abstract". Rename "%define union_name" to "%define stype".
1423 Rename method names according to previous patch.
1424 (Java Scanner Interface): Describe "%code lexer" instead of
1425 "%pure-parser" and "%define single_class".
1426 (Java Differences): Mention "%code lexer".
1427
1428 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1429 Include scanner here, using macros from tests/local.at.
1430 (AT_DATA_CALC_Y): Remove final argument.
1431 (_AT_CHECK_JAVA_CALC): Likewise.
1432 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1433 of %locations and %error-verbose.
1434 (main): Test with and without %lex-param.
1435 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1436 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 1437
122bea3a
JMG
14382007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1439
1440 DJGPP spefic issue. Inhibit the use of disallowed characters for
1441 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1442 and concern testsuite case 46.
1443 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1444 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1445 * djgpp/config.bat: Inhibit the use of disallowed characters.
1446
9611cfa2
JD
14472007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1448
1449 Miscellaneous %define and %code cleanup.
1450 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1451 values are interpreted.
1452 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1453 documentation a little more.
1454 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1455 muscle_percent_define_insert, muscle_percent_code_grow): New
1456 functions/macros.
1457 * src/muscle_tab.h (muscle_percent_define_insert,
1458 muscle_percent_code_grow): Prototype.
1459 * src/parse-gram.y (prologue_declaration): Use
1460 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1461 %define and %code directives.
1462
1463 Make it easy to share %define boolean variables between the front-end
1464 and back-end. Though not used yet, this will be useful in the future.
1465 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1466 Bison uses of names rather than just skeleton uses of names.
1467 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1468 b4_percent_define_skeleton_variables(VARIABLE) to
1469 b4_percent_define_bison_variables(VARIABLE).
1470 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1471 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1472 b4_percent_code_bison_qualifiers(QUALIFIER).
1473 (b4_check_user_names_wrap): Update for renames.
1474 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1475 muscle_percent_define_default): New functions mimicking
1476 b4_percent_define_flag_if and b4_percent_define_default.
1477
1478 For %define variables, report locations for invalid values and
bbb44d83 1479 redefinitions.
9611cfa2
JD
1480 * data/bison.m4 (b4_percent_define_flag_if): Read
1481 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1482 value for VARIABLE.
1483 (b4_percent_define_default): Save a special location in
1484 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1485 must later be reported as invalid.
1486 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1487 functions.
1488 (muscle_percent_define_insert): Record the location of VARIABLE in
1489 muscle percent_define_loc(VARIABLE), and use it to report the previous
1490 location for a redefinition.
1491 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1492 (muscle_percent_define_default): Update like b4_percent_define_default.
1493 (muscle_grow_user_name_list): Rename to...
1494 (muscle_user_name_list_grow): ... this for consistency and use
1495 muscle_location_grow.
1496 * src/muscle_tab.h (muscle_location_grow): Prototype.
1497 * tests/input.at (%define errors): Update expected output.
1498 * tests/skeletons.at (%define boolean variables: invalid skeleton
1499 defaults): New test case.
1500
0bf92491
JD
15012007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1502
1503 * src/print.c (lookahead_set, state_default_rule): Remove.
1504 (print_reductions): Replace state_default_rule invocation with
1505 equivalent use of yydefact, which was computed in token_actions in
1506 tables.c.
1507 (print_results): Don't allocate lookahead_set.
1508
d3b12988
PB
15092007-02-27 Paolo Bonzini <bonzini@gnu.org>
1510
1511 * data/lalr1.java: Prefix all private members with yy.
1512
f57a7536
JD
15132007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1514
1515 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 1516 Sebastien Fricker at
f57a7536 1517 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 1518 * THANKS: Add Sebastien Fricker.
f57a7536
JD
1519 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1520 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1521 accept a variable number of arguments.
1522
6404a5bf
JD
15232007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1524
1525 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1526
e4e09639
JMG
15272007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1528
1529 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1530 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1531 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1532
d7e0a1a7
PE
15332007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1534
1535 Undo my 2007-02-07 change, switching back to the c-strcase module
1536 introduced in the 2007-02-03 change. Bruno Haible reported that
1537 the 2007-02-07 change would be dangerous in Turkish if we add a
1538 language whose name contains "i", since "i" is not lowercase "I"
1539 in Turkish.
1540 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1541 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1542 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1543 * m4/.cvsignore: Remove strcase.m4.
1544 * src/getargs.c: Revert 2007-02-07 change, as follows.
1545 Include c-strcase.h.
1546 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1547
deee93a1
JD
15482007-02-11 Bruno Haible <bruno@clisp.org>
1549
1550 Enable the Java related testsuite tests when the only Java compiler
1551 found is a gcj < 4.3. Discussed at
1552 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1553 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1554
574add85
JD
15552007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1556
1557 * data/Makefile.am: Update copyright date.
1558 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1559 yypstate_new returns NULL.
1560 (yypstate_new): Return NULL if malloc does.
1561 * src/reader.c (packgram): Move translation of rule actions from the
1562 beginning of packgram to...
1563 (check_and_convert_grammar): ... here right before packgram is invoked
1564 so it's easier to write more complete comments, and remove redundant
1565 code.
1566
e785ccf7
JD
15672007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1568
1569 As in semantic actions, make @$ in %initial-action, %destructor, and
1570 %printer imply %locations.
1571 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1572 scanning @$.
1573 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1574 (@$ in %initial-action implies %locations,
1575 @$ in %destructor implies %locations,
1576 @$ in %printer implies %locations): ... these new test cases.
1577
1cfe1ed7
PE
15782007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1579
1580 Undo most of the 2007-02-03 change, switching to the strcase module
1581 now that gnulib strcase has been fixed.
1582 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1583 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1584 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1585 * m4/.cvsignore: Add strcase.m4.
1586 * src/getargs.c: Revert 2007-02-03 change, as follows.
1587 Don't include c-strcase.h.
1588 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1589 strcasecmp has "unspecified behavior" outside the POSIX locale,
1590 but it works fine in practice if at least one argument is ASCII,
1591 as is the case in Bison.
1592
0049ec86
PB
15932007-02-07 Paolo Bonzini <bonzini@gnu.org>
1594
1595 * tests/java.at: Skip tests if only one of javac/java is present.
1596 Reported by Joel E. Denny.
1597 * tests/atlocal.in: Adjust copyright years.
1598
15992007-02-05 Paolo Bonzini <bonzini@gnu.org>
1600
1601 * data/lalr1.java (Stack): Work around old verifiers that disallow
1602 access to the private fields of an inner class, from the outer class.
1603 We can make Stack's fields public because user code doesn't have access
1604 to the instance of Stack used by parse(). Reported by Paul Eggert.
1605
2c2b7220
PE
16062007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1607
1608 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1609 the right spot for these files?
1610 * bootstrap.conf (gnulib_modules): Add c-strcase.
1611 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1612 c-strncasecmp.c.
1613 * src/getargs.c: Include c-strcase.h.
1614 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1615 to avoid unspecified behavior.
1616
b2b81dae
JD
16172007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1618
1619 * doc/bison.texinfo (Decl Summary): Correct typo.
1620
c1d19e10
PB
16212007-01-30 Paolo Bonzini <bonzini@gnu.org>
1622
1623 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1624 Complain if the value does not match empty, "true" or "false".
1625 * data/c++.m4: Adjust default definitions of %define variables.
1626 * data/java.m4: Adjust default definitions of %define variables.
1627 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1628 to above behavior.
1629 * tests/input.at (Boolean %define variables): Test new behavior.
1630
8405b70c
PB
16312007-01-29 Paolo Bonzini <bonzini@gnu.org>
1632
1633 * NEWS: Mention java.
1634 * TODO: Remove things that are done.
1635 * bootstrap.conf: Add javacomp-script and javaexec-script.
1636 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1637
1638 * data/Makefile.am: Add new files.
1639 * data/java-skel.m4: New.
1640 * data/java.m4: New.
1641 * data/lalr1.java: New.
1642
1643 * doc/bison.texinfo: Put "A Complete C++ Example" under
1644 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1645 under Other Languages.
1646
1647 * src/getargs.c (valid_languages): Add Java.
1648 * src/getargs.h (struct bison_language): Update size of string fields.
1649
1650 * tests/Makefile.am: Add java.at.
1651 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1652 * tests/java.at: New.
1653 * tests/testsuite.at: Include it.
1654
3eb82471
JD
16552007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1656
1657 Clean up.
1658 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1659 at_directive_argv arguments so these no longer have to be global
1660 variables. Also, update the implementation for the following changes.
1661 (fail_for_at_directive_too_many_args,
1662 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1663 (at_directive_name): Remove as at_directive_argv[0] will be used for
1664 this now.
1665 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1666 for the directive name.
1667 (at_directive_argc, at_directive_argv): Make these local within
1668 skel_lex instead of global.
1669 (INITIAL): Update directive start action for above changes.
1670 (SC_AT_DIRECTIVE_ARG): Rename to...
1671 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1672 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1673 (scan_skel): Move yylex_destroy to...
1674 (skel_scanner_free): ... here.
1675 * tests/skeletons.at (installed skeleton file name): Rename to...
1676 (installed skeleton file names): ... this.
1677
148d66d8
JD
16782007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1679
1680 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1681 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1682 Summary" not "Directives".
1683 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1684 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1685 since the former is now the more complete one.
1686 (Prologue Alternatives): Likewise and do the same for %defines.
1687 (Table of Symbols): Add summary of %code, add summary of %define, and
1688 move full %code documentation to...
1689 (Decl Summary): ... here for consistency with other entries in these
1690 sections.
1691 Move %define entry in order to keep this list alphabetized.
1692 Reword %define entry a little to put less emphasis on the skeleton
1693 concept, which most users shouldn't have to think about.
1694
665f0c24
PE
16952007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1696
1697 Adjust to recent gnulib changes.
1698 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1699 Add string.h, string_.h, unistd_.h, wchar_.h.
1700 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1701 * src/system.h: Don't include <stpcpy.h>; this is now done by
1702 <string.h>.
1703
592d0b1e
PB
17042007-01-23 Paolo Bonzini <bonzini@gnu.org>
1705
1706 Simplify implementation of unqualified %code, implement macros for
1707 uniform treatment of boolean %define flags. Document %define.
1708 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1709 b4_percent_code_ifdef): New.
1710 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1711 * data/c++.m4: Define default value for global_tokens_and_yystype.
1712 * data/glr.cc: Likewise.
1713 * data/location.cc: Use b4_percent_define_flag_if.
1714
148d66d8 1715 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
1716
1717 * src/parse-gram.y (Unqualified %code): Change muscle name to
1718 b4_percent_code().
1719 (content.opt): Default to empty.
1720
a7867f53
JD
17212007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1722
1723 Implement support for relative and absolute skeleton file names.
1724 Discussed starting at
1725 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1726 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1727 (Bison Options): Document in --skeleton entry.
1728 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1729 full_skeleton can't necessarily hold all of pkgdatadir.
1730 If the specified skeleton file name contains a `/', don't prepend
1731 pkgdatadir.
1732 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1733 file name contains a `/', prepend the grammar file directory.
1734 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1735 * skeletons.at: New file.
1736 (relative skeleton file names): New test case.
1737 (installed skeleton file names): New test case.
1738 * tests/testsuite.at: Include skeletons.at.
1739
1740 * bootstrap: Update copyright to 2007.
1741
830c9b18
PB
17422007-01-17 Paolo Bonzini <bonzini@gnu.org>
1743
1744 * bootstrap: Remove occurrences of .#bootmp from the files.
1745
a8c2e813
AD
17462007-01-17 Akim Demaille <akim@epita.fr>
1747
1748 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1749 nonterminals.
1750 Use per-type %printer.
1751
279cabb6
JD
17522007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1753
1754 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1755 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1756 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1757 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1758 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1759 tests/glr-regression.at, tests/input.at, tests/local.at,
1760 tests/output.at, tests/torture.at: Update copyright to 2007.
1761
bb32f4f2
AD
17622007-01-16 Akim Demaille <akim@epita.fr>
1763
1764 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1765 error code.
1766 (Calc++ Scanner): Exit with failure if we can't open the input
1767 file.
1768 Accept "-" standing for stdin.
1769 (Calc++ Top Level): Print the result only if the parsing was
1770 successful.
1771
7cff04b5
AD
17722007-01-16 Akim Demaille <akim@epita.fr>
1773
1774 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1775
a4e25e1d
JD
17762007-01-15 Paolo Bonzini <bonzini@gnu.org>
1777 and Joel E. Denny <jdenny@ces.clemson.edu>
1778
1779 Clean up %define and %code implementation in M4 some. Most
1780 importantly, rename all related macros to be in the b4_percent_define
1781 and b4_percent_code namespaces. Also, complete support for `.' in
1782 %define variable names and %code qualifiers.
1783 * data/bison.m4 (b4_check_user_names): Check for special
1784 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1785 m4_foreach loops.
1786 (b4_get_percent_define, b4_get_percent_code): Rename to...
1787 (b4_percent_define_get, b4_percent_code_get): ... these.
1788 Extend documentation with examples.
1789 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1790 b4_percent_define_skeleton_variables and
1791 b4_percent_code_skeleton_qualifiers.
1792 Expect any value for the %define variable `foo' to be stored in the
1793 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1794 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1795 expect any unqualified %code blocks to be stored in a macro named
1796 `b4_percent_code_unqualified'.
1797 Use m4_indir so that %define variable names and %code qualifiers can
1798 contain `.', which is allowed by the grammar parser.
1799 (b4_percent_define_default): New macro to set a default value for a
1800 %define variable.
1801 (m4_wrap): Update wrapped code, and fix some underquoting.
1802 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1803 Expect grammar uses of %define variables and %code qualifiers to be
1804 defined in b4_percent_define_user_variables and
1805 b4_percent_code_user_qualifiers.
1806 * data/c++.m4: Use b4_percent_define_default rather than
1807 m4_define_default. Fix some underquoting. Skeleton usage of %define
1808 variable define_location_comparison now implies skeleton usage of
1809 %define variable filename_type.
1810 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1811 data/push.c, data/yacc.c: Update macro names.
1812 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1813 muscle names.
1814
e37c665c
JMG
18152007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1816
1817 DJGPP specific issues.
1818
1819 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1820 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1821
7d2d521f
JD
18222007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1823
1824 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1825 run parsers in all tests so that Valgrind is invoked during
1826 maintainer-check-valgrind.
1827 (Duplicate representation of merged trees): Free all semantic values.
1828 (Duplicated user destructor for lookahead): Likewise.
1829
e0ac9b4b
JD
18302007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1831
1832 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1833 command-line prefix.
1834 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1835 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1836 miss Valgrind messages.
1837 (Exploding the Stack Size with Malloc): Likewise.
1838
78143faa
JD
18392007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1840
1841 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1842 locals. Reported by Juan Manuel Guerrero at
1843 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1844 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1845 Fix some indentation also.
1846 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1847 explaining this issue.
1848
7ecec4dd
JD
18492007-01-09 Paolo Bonzini <bonzini@gnu.org>
1850 and Joel E. Denny <jdenny@ces.clemson.edu>
1851
1852 Simplify union and prologue handling, and escape union and lex/parse
1853 params with digraphs.
1854 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1855 values to the empty string since these are no longer guaranteed
1856 initialized by the front-end.
1857 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1858 braces around b4_user_stype since this is no longer done by the
1859 front-end.
1860 * src/files.c, src/files.h (pre_prologue_obstack,
1861 post_prologue_obstack): Remove.
1862 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1863 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1864 with digraphs. This fixes lex params and parse params.
1865 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1866 * src/output.c (prepare): Remove muscle insertion of the prologues.
1867 (output): Remove freeing of pre_prologue_obstack and
1868 post_prologue_obstack.
1869 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1870 than prologue_augment for prologue parsing so you don't need prologue
1871 obstacks.
5c80250c
JD
1872 (grammar_declaration): For %union RHS, use `braceless' instead of
1873 "{...}" so that braces are already stripped and code is escaped with
1874 digraphs.
7ecec4dd
JD
1875 * src/reader.c (prologue_augment): Remove.
1876 (reader): Remove initialization of pre_prologue_obstack and
1877 post_prologue_obstack.
1878 * src/reader.h (prologue_augment): Remove.
1879
1880 * data/c.m4: Remove stray parenthesis.
1881
16dc6a9e
JD
18822007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1883
1884 Remove quotes from variables names in %define directives and from
1885 qualifiers in %code directives, and restrict the characters that are
1886 allowed in them to M4-friendly ones. For %define, continue to support
1887 the quoted form as a deprecated feature. Discussed starting at
1888 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1889 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1890 %code.
1891 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
1892 (Decl Summary): In %defines entry, update mention of `%code requires'
1893 and `%code provides'.
16dc6a9e
JD
1894 (C++ Location Values): Update %define uses.
1895 (Calc++ Parser Interface): Likewise.
1896 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 1897 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
1898 * src/parse-gram.y (prologue_declaration): For %define variables, use
1899 `variable' instead of `STRING'.
1900 (grammar_declaration): For %code qualifiers, use `ID' instead of
1901 `STRING'.
1902 (variable): New nonterminal that takes an `ID' or a `STRING'.
1903 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1904 and %define uses.
1905 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1906 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1907 (%define errors): Update %define uses.
1908
e9813cd4
JD
19092007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1910
1911 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1912 instead of muscle_insert for %define values so that M4-special
1913 characters are replaced with digraphs.
1914 * tests/input.at (%define errors): Extend to check weird values.
1915
6afc30cc
JD
19162007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1917
1918 Instead of having skeletons declare all valid %define variables and
1919 %code qualifiers, provide macros that retrieve the associated values
1920 and build these lists automatically. Thus Bison will now warn when a
1921 variable or qualifier is not used by the skeleton in the current
1922 invocation regardless of whether it might sometimes be used by that
1923 skeleton in other invocations. Also, move all %define value macros to
1924 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1925 form, which is replaced by %code.
1926 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1927 (b4_check_user_names): ... this, and change the series of valid name
1928 arguments to a single list argument for names used in the skeleton
1929 similar to the existing list argument for names used in the grammar.
1930 Warn instead of complaining.
1931 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1932 values and %code code, to format %code code properly, and to build
1933 lists of all %define variables and %code qualifiers used in the
1934 skeleton: b4_skeleton_percent_define_variables and
1935 b4_skeleton_percent_code_qualifiers.
1936 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1937 Remove, and...
1938 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1939 the skeleton names lists can finish building first. In place of
1940 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1941 expect the lists b4_user_percent_define_variables and
1942 b4_user_percent_code_qualifiers.
1943 * data/c++.m4: Where setting default values for b4_parser_class_name,
1944 b4_location_type, b4_filename_type, b4_namespace, and
1945 b4_define_location_comparison, update their names to the
1946 b4_percent_define_ namespace.
1947 * data/glr.c: Don't use b4_check_percent_define_variables and
1948 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1949 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1950 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 1951 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
1952 * data/location.cc: Use b4_get_percent_define.
1953 * data/push.c: Don't use b4_check_percent_define_variables and
1954 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1955 * data/yacc.c: Likewise, and don't call m4_exit in
1956 b4_use_push_for_pull_if or m4_wrap code will never execute.
1957 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1958 Rename to...
1959 (muscle_grow_user_name_list): ... this for consistency with the
1960 terminology used in bison.m4.
1961 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1962 %define variable names, and rename muscle used_percent_define_variables
1963 to user_percent_define_variables.
1964 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1965 user_percent_code_qualifiers.
1966 (content): Remove.
1967 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1968 {CODE} form is no longer accepted.
1969 * tests/input.at (Reject bad %code qualifiers): Rename to...
1970 (Reject unused %code qualifiers): ... this, and update test output.
1971 (%define error): Update test output.
1972
7eb8a0bc
JD
19732007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1974
1975 Check for unrecognized %define variables similar to checking for
1976 unrecognized %code qualifiers. Check for redefined %define variables.
1977 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1978 generalizes...
1979 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1980 (b4_check_percent_define_variables): New, also wraps it.
1981 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1982 variables using b4_check_percent_define_variables.
1983 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1984 all those exercised in the test suite and all those listed in the
1985 `Default values' section of c++.m4. Are there others?
1986 * data/push.c, data/yacc.c: Declare no valid %define variables.
1987 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1988 similar to muscle_find, but it works even when the muscle stores a
1989 const value.
1990 (muscle_grow_used_name_list): New function for constructing the used
1991 name list muscles that b4_check_for_unrecognized_names requires.
1992 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1993 %define'd more than once. Define the b4_used_percent_define_variables
1994 muscle with muscle_grow_used_name_list.
1995 (grammar_declaration): Abbreviate %code code with
1996 muscle_grow_used_name_list.
1997 * tests/input.at (%define errors): New.
1998
3fc65ead
JD
19992007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2000
2001 Provide warn_at, complain_at, and fatal_at function callbacks to the
2002 skeletons, and use this for %code qualifier complaints.
2003 * data/bison.m4 (b4_error_at): New, invoked by...
2004 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
2005 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
2006 @fatal_at(...@) directives.
2007 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
2008 qualifiers in b4_used_percent_code_qualifiers and to use
2009 b4_complain_at.
2010 * src/location.c, src/location.h (boundary_set_from_string): New global
2011 function.
2012 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
2013 function.
2014 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
2015 to b4_used_percent_code_qualifiers.
2016 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
2017 function.
2018 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
2019 (lineno): Rename to...
2020 (out_lineno): ... this so I don't misunderstand it again.
2021 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
2022 here; these newlines are in the input but not the output file.
2023 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
2024 (at_directive_perform): ... this new static function, and add handling
2025 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
2026 directives.
2027 * tests/input.at (Reject bad %code qualifiers): Update test output with
2028 locations and extend.
2029
2030 * tests/output.at (Output file name: [, Output file name: ]): Remove
2031 bogus comment about these tests failing.
2032
1c7b7e1d
JD
20332007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2034
2035 Clean up b4_check_percent_code_qualifiers a little.
2036 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2037 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2038 documentation and add examples.
2039 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2040 qualifiers here.
2041
08af01c2
JD
20422007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2043
2044 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2045 unreliable -- especially when they're hidden inside another macro.
2046 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2047 data/c.m4: Remove m4_divert(-1).
2048 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2049 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2050 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 2051 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
2052 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2053 pushed and popped by m4sugar, should be first on the stack.
2054
2055 Provide warn, complain, and fatal function callbacks to the skeletons.
2056 This provides more flexibility than m4_fatal, improves the error
2057 message format, and captures messages for translation. Discussed
2058 starting at
2059 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2060 * data/bison.m4 (b4_error): New, invoked by...
2061 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2062 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2063 directives. Because these M4 macros might be called when the current
2064 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2065 the previous removal of uses of m4_divert, which caused trouble.
2066 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2067 m4_fatal to report unrecognized %code qualifiers.
2068 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2069 push parser requests.
2070 * data/glr.c: Use b4_complain instead of m4_fatal to report
2071 non-deterministic push parser requests.
2072 Update @output usage to @output(...@) form.
2073 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2074 report missing %defines. Update @output usage to @output(...@) form.
2075 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2076 @output(...@) form.
2077 * src/main.c (main): Invoke skel_scanner_free.
2078 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2079 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2080 obstack_for_string from flex-scanner.h.
2081 (YY_DECL): Use to declare skel_lex static.
2082 (decode_at_digraphs): Remove; now handled in the new
2083 SC_AT_DIRECTIVE_ARG start condition.
2084 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2085 functions.
2086 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2087 at_directive_argv): New static globals.
2088 (INITIAL): Use fail_for_invalid_at.
2089 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2090 recognize the start of a generalized `@directive(...@)' form and
2091 start...
2092 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2093 directive args (using the new obstack_for_string), to decode the
2094 contained @ diagraphs, and to perform the directive. It recognizes
2095 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2096 @output(...@).
2097 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2098 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2099 `@,'.
2100 (scan_skel): Initialize obstack_for_string on the first call.
2101 (skel_scanner_free): New function to free obstack_for_string.
2102 * tests/input.at (Reject bad %code qualifiers): Update test output.
2103
8e0a5e9e
JD
21042007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2105
2106 Consolidate the 4 prologue alternative directives (%code, %requires,
2107 %provides, and %code-top) into a single %code directive with an
2108 optional qualifier field. Discussed at
2109 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2110 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2111 alternatives.
2112 * doc/bison.texinfo (Prologue Alternatives): Update.
2113 (Decl Summary): Update to %code "requires" and %code "provides".
2114 (Calc++ Parser): Update to %code "requires".
148d66d8 2115 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
2116 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2117 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2118 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2119 which are skeleton-specific.
2120 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2121 declare what %code qualifiers it supports and to complain if any other
2122 qualifiers were used in the grammar.
2123 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2124 and b4_user_code([b4_percent_code_provides]) in place of
2125 b4_user_requires and b4_user_provides.
2126 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2127 Add b4_user_code([b4_percent_code_top]) and
2128 b4_user_code([b4_percent_code]).
2129 Invoke b4_check_percent_code_qualifiers.
2130 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2131 PERCENT_REQUIRES): Remove.
2132 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2133 %requires. Rewrite the %code RHS as the unqualified form defining the
2134 muscle b4_percent_code. Add another RHS for the qualified %code form,
2135 which defines muscles of the form b4_percent_code_QUALIFIER and the
2136 b4_used_percent_code_qualifiers muscle.
2137 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2138 PERCENT_REQUIRES): Remove.
2139 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2140 %code "requires" and %code "provides".
2141 * tests/input.at (Reject bad %code qualifiers): New.
2142
95021767
JD
21432007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2144
2145 Use the new code_props interface for destructors and printers.
2146 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2147 printer_location members, and change the type of the destructor and
2148 printer members to code_props.
2149 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2150 symbol_printer_get, semantic_type_destructor_set,
2151 semantic_type_printer_set, default_tagged_destructor_set,
2152 default_tagless_destructor_set, default_tagged_printer_set,
2153 default_tagless_printer_set): Use code_props in arguments and return
2154 types in place of char const * and location.
2155 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2156 since the locations are now contained in the return of
2157 symbol_destructor_get and symbol_printer_get.
2158 * src/output.c (symbol_destructors_output, symbol_printers_output):
2159 Replace with...
2160 (symbol_code_props_output): ... this to eliminate duplicate code.
2161 (output_skeleton): Update to use symbol_code_props_output.
2162 * src/reader.c (symbol_should_be_used): Update use of
2163 symbol_destructor_get.
2164 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2165 Update uses of the various _destructor_set and _printer_set functions.
2166 * src/symtab.c: (default_tagged_destructor_location,
2167 default_tagless_destructor_location, default_tagged_printer_location,
2168 default_tagless_printer_location): Remove since we...
2169 (default_tagged_destructor, default_tagless_destructor,
2170 default_tagged_printer, default_tagless_printer): ... change the type
2171 of these to code_props.
2172 (symbol_new, semantic_type_new, symbol_destructor_set,
2173 semantic_type_destructor_set, symbol_destructor_get,
2174 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2175 symbol_check_alias_consistency, default_tagged_destructor_set,
2176 default_tagless_destructor_set, default_tagged_printer_set,
2177 default_tagless_printer_set): Update.
2178 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2179 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2180 code_props members.
2181 (symbol_print): Use SYMBOL_CODE_PRINT.
2182
f6857bbf
JD
21832007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2184
2185 Use the new code_props interface for rule actions.
2186 * src/symlist.h (symbol_list): Replace action, action_location, and
2187 used members with a code_props action_props member.
2188 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2189 grammar_midrule_action, grammar_current_rule_merge_set,
2190 grammar_current_rule_symbol_append, packgram): Update.
2191 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2192 * src/scan-code.l (handle_action_dollar): Update.
2193 (translate_rule_action): Remove, no longer used.
2194 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2195
7c0c6181
JD
21962007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2197
2198 Use the new code_props interface in parse-gram.y.
2199 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2200 Update all uses of translate_* functions to use the new code_props
2201 interface and to use gram_scanner_last_string_free and
2202 code_scanner_last_string_free where possible.
2203 (grammar_declaration): symbol_list_destructor_set and
2204 symbol_list_printer_set now perform the translation, so don't do it
2205 here. Use gram_scanner_last_string_free where possible.
2206 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2207 translate_code): Remove, no longer used.
2208 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2209 symbol_list_printer_set): Perform code translation here rather than
2210 depending on the caller to do so.
2211
2212 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2213 * src/scan-gram.h (gram_last_string): Remove declaration.
2214 * src/scan-gram.l (last_string): Declare it static.
2215
28e52c0d
JD
22162007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2217
2218 Encapsulate code properties and related functionality for the various
2219 destructors, printers, and actions into a code_props structure and
2220 interface. This patch merely implements code_props in scan-code.h and
2221 scan-code.l. Future patches will rewrite other modules to use it.
2222 Discussed starting at
2223 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2224 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2225 consistently initialize const structs that have an empty location
2226 field.
2227 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2228 to ensure consistency.
2229 * src/scan-code.h (code_props): New structure.
2230 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2231 function, macro, and const global variable for initializing a
2232 code_props with no code.
2233 (code_props_plain_init, code_props_symbol_action_init,
2234 code_props_rule_action_init, code_props_translate_code): The rest of
2235 the new code_props functional interface. Among other things, the init
2236 functions set the code_props kind field so that
2237 code_props_translate_code will know whether to behave like
2238 translate_symbol_action, translate_rule_action, or translate_code.
2239 These old translate functions must remain until all other modules are
2240 updated to use the new code_props interface.
2241 (code_scanner_last_string_free): New function similar to
2242 gram_scanner_last_string_free.
2243 (code_scanner_free): Add documentation.
2244 * src/scan-code.l: Implement the new interface.
2245 (code_lex): Make it static, add a code_props* argument, and remove the
2246 rule argument.
2247 (last_string): New static global similar to the one in scan-gram.l.
2248 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2249 instead of rule.
2250 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2251 code_props since Bison may one day use this information for destructors
2252 and printers.
2253 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2254 (handle_action_dollar): Use symbol_list_n_get and set used flag
2255 directly since symbol_list_n_used_set is removed.
2256 (translate_action): Add a code_props* argument and remove the rule,
2257 action, and location arguments. Pass the code_props* on to code_lex.
2258 (translate_rule_action, translate_symbol_action, translate_code):
2259 Rewrite as wrappers around the new code_props interface.
2260 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2261 it would eventually need to break the encapsulation of code_props.
2262
96034983
JD
22632007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2264
2265 * etc/.cvsignore: New.
2266
945e396c
JD
22672007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2268
2269 Add maintainer-push-check to run maintainer-check using push parsing in
2270 place of pull parsing where available.
2271 * Makefile.am (maintainer-push-check): New.
2272 * data/bison.m4 (b4_use_push_for_pull_if): New.
2273 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2274 appropriately based on their existing values.
2275 (yypush_parse): Don't print push-parser-specific diagnostics if push
2276 parsing is being used in place of pull parsing.
2277 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2278 push.c.
2279 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2280 variable, and insert b4_use_push_for_pull_flag into muscles.
2281 * tests/Makefile.am (maintainer-push-check): New.
2282
7d596384
JD
22832006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2284
2285 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2286 (whether successful or failed) so that yypush_parse can be invoked
2287 again to start a new parse using the same yypstate.
2288 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2289 check multiple yypull_parse invocations on the same yypstate. For pull
2290 mode, extend to check multiple yyparse invocations.
2291 (Exploding the Stack Size with Alloca): Extend to try with
2292 %push-pull-parser.
2293 (Exploding the Stack Size with Malloc): Likewise.
2294
2295 * tests/calc.at (Simple LALR Calculator): Don't specify
2296 %skeleton "push.c" since %push-pull-parser implies that now.
2297 * tests/headers.at (export YYLTYPE): Don't check for the push
2298 declarations. Otherwise, this test case can't be used to see if push
2299 mode can truly emulate pull mode.
2300 * tests/input.at (Torturing the Scanner): Likewise.
2301 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2302 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2303 AT_YACC_IF, which now includes the case of push mode since %skeleton
2304 need not be used for push mode. This will be more intuitive once
2305 push.c is renamed to yacc.c.
2306
7172e23e
JD
23072006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2308
2309 For push mode, convert yyparse from a macro to a function, invoke yylex
2310 instead of passing a yylexp argument to yypull_parse, and don't
2311 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2312 Discussed starting at
2313 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2314 * data/bison.m4 (b4_pull_if): New.
2315 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2316 * data/push.c: Improve M4 quoting a little.
2317 (b4_generate_macro_args, b4_parenthesize): Remove.
2318 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2319 any time a pull parser is requested.
2320 Don't #define this as a wrapper around yypull_parse. Instead, when
2321 both push and pull are requested, make it a function that does that
2322 same thing.
2323 (yypull_parse): If there's a b4_prefix, #define this to
2324 b4_prefix[pull_parse] when both push and pull are requested.
2325 Don't define this as a function unless both push and pull are
2326 requested.
2327 Remove the yylexp argument and hard-code yylex invocation instead.
2328 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2329 %push-parser.
2330 * src/getargs.c (pull_parser): New global initialized to true.
2331 * getargs.h (pull_parser): extern it.
2332 * src/output.c (prepare): Insert pull_flag muscle.
2333 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2334 (prologue_declaration): Set both push_parser and pull_parser = true for
2335 %push-pull-parser. Set push_parser = true and pull_parser = false for
2336 %push-parser.
2337 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2338 %push-parser since there's no backward-compatibility concern here.
2339 Scan %push-pull-parser.
2340 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2341 instead of %push-parser.
2342 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2343 prototype it in the module that calls yyparse.
2344 * tests/input.at (Torturing the Scanner): Likewise.
2345 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2346
2e7944cb
JD
23472006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2348
2349 Update etc/bench.pl. Optimize push mode a little (the yyn change
2350 deserves most of the credit).
2351 * Makefile.am (SUBDIRS): Add etc subdirectory.
2352 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2353 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2354 yytoken, yyval, and yyloc declarations to...
2355 (yyparse or yypush_parse): ... here to improve performance. For
2356 yypush_parse invocations after the first, be sure to assign yyn its old
2357 value again.
2358 (yypstate_new): Don't bother initializing the yyresult field since the
2359 initial value isn't used.
2360 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2361 remove the #define that, in push mode, set it to yyps->NAME.
2362 * etc/Makefile.am: New.
2363 * etc/bench.pl: Remove and build it instead from...
2364 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2365 "tests/bison" from the build directory by default rather than just
2366 invoking "bison" from $PATH.
2367 (calc_grammar): Update push parser code: don't declare yylval globally,
2368 don't define yyparse_wrapper, and don't #define yyparse.
2369 (bench_grammar): Update to check all working combinations of yacc.c,
2370 push.c, impure, pure, pull, and push.
2371
c3d50342
JD
23722006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2373
2374 For push mode, add pull wrappers around yypush_parse.
2375 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2376 (yypull_parse): New function wrapping yypush_parse.
2377 (yyparse): New #define wrapping yypull_parse.
2378 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2379 is declared.
2380 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2381 prototype yylex in the module that calls yyparse, and don't prototype
2382 yyparse there. Otherwise, the yyparse expansion won't compile.
2383 * tests/input.at (Torturing the Scanner): Likewise.
2384
94ebeba5
JD
23852006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2386
2387 Enable push parsers to operate in impure mode. Thus, %push-parser no
2388 longer implies %pure-parser. The point of this change is to move
2389 towards being able to test the push parser code by running the entire
2390 test suite as if %push-parser had been declared.
2391 * data/push.c (yypush_parse): For impure mode, remove the
2392 yypushed_char, yypushed_val, and yypushed_loc arguments.
2393 Instead, declare these as local variables initialized to the global
2394 yychar, yylval, and yylloc.
2395 For the first yypush_parse invocation only, restore the initial values
2396 of these global variables when it's time to read a token since they
2397 have been overwritten.
2398 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2399 %push-parser.
2400 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2401 %pure-parser along with %push-parser since this test case was designed
2402 for pure push parsers.
2403 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2404 (AT_YACC_OR_PUSH_IF): New.
2405 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2406 add a note that it's still wrong for some cases (as it has been for a
2407 while).
2408 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2409 %push-parser no longer implies %pure-parser.
2410
a0633178
JD
24112006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2412
2413 Remove some unnecessary differences between the pull parser code and
2414 the push parser code. This patch enables yynerrs in push mode.
2415 * data/push.c: Reformat M4 a little.
2416 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2417 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2418 because push mode is on. Instead, if pure mode is on, move yynerrs
2419 to...
2420 (b4_declare_parser_state_variables): ... here.
2421 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2422 to yyps->NAME so it can be used in yypush_parse.
2423 (yypush_parse): Don't omit uses of yynerrs in push mode.
2424
8646b6a3
JD
24252006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2426
2427 Fix bug such that the first pushed token's value and location are
2428 sometimes overwritten (sometimes by %initial-action) before being used.
2429 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2430 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2431 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2432 more closely mimic the pull parser logic.
2433 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2434 time to read a token, which is after any initialization of yylval and
2435 yylloc.
2436 (gottoken): Rename label to...
2437 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2438 user namespace.
2439
9baf4d74
JD
24402006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2441
2442 Rearrange initialization of the parser state variables so that the
2443 skeleton doesn't have to have a copy for pull mode and another for push
2444 mode. This patch also fixes at least a bug such that yylloc was not
2445 initialized (with b4_location_initial_line and
2446 b4_location_initial_column) upon calling yypush_parse. However, that
2447 initialization now overwrites the first token's location;
2448 %initial-action assigning @$ already did the same thing, and both bugs
2449 will be fixed in a later patch.
2450 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2451 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2452 yyss, yyvs, yyls, and yystacksize.
2453 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2454 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2455 yylsp.
2456 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2457 yyps->NAME so it can be used in yypush_parse.
2458 (yyparse or yypush_parse): For yypush_parse, don't print the
2459 "Starting parse" diagnostic for invocations after the first.
2460 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2461 yypush_parse, only do it for the first invocation.
2462 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2463 initialization to occur in yypush_parse but only on the first
2464 invocation.
2465
23522164
JD
24662006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2467
2468 * data/push.c: Add CPP guards around push parser declarations in both
2469 the header and the code file.
2470 In the code file, move the push parser declarations to the same place
2471 they appear in the header file.
2472 Clean up the M4 some, especially the inconsistent underquoting in
2473 some b4_c_function_def and b4_c_function_decl uses.
2474
bb010fe5
JD
24752006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2476
2477 Encapsulate the push parser state variables into an M4 macro so the
2478 push skeleton doesn't have to list them again for pull mode's yyparse.
2479 For push mode, remove yypush_parse's local equivalents of these
2480 variables to eliminate unnecessary copying between the two sets at
2481 run-time. This patch also fixes at least a bug related to multiple
2482 %initial-action invocations in push mode.
2483 * data/push.c (b4_declare_parser_variables): Rename to...
2484 (b4_declare_scanner_communication_variables): ... this for clarity and
2485 update both uses.
2486 (b4_declare_yyparse_variables): Remove and move its contents to the one
2487 spot where it was invoked.
2488 (b4_declare_parser_state_variables): New macro containing the parser
2489 state variables required by push mode.
2490 (struct yypstate): Replace all fields but yynew with
2491 b4_declare_parser_state_variables.
2492 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2493 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2494 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2495 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2496 parser state variable declarations with
2497 b4_declare_parser_state_variables.
2498 Don't initialize parser state variables when calling yypush_parse since
2499 yypstate_new already does that.
2500 Invoke the user's initial action only upon the first yypush_parse
2501 invocation.
2502 Remove all code that copies between the local parser state variables
2503 and the yypstate.
2504
2d212f8c
JD
25052006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2506
2507 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2508 prevent a name collision in a future patch where these names will
2509 sometimes be #define'd.
2510 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2511 since it no longer has the same name as the existing argument.
2512 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2513
e6e704dc
JD
25142006-12-19 Paolo Bonzini <bonzini@gnu.org>
2515 and Joel E. Denny <jdenny@ces.clemson.edu>
2516
2517 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2518 that the argument is case-insensitive, and there's no `=' here.
2519 For the %skeleton entry, mention that %language is better.
2520 (Bison Options): Likewise for --language and --skeleton. Move the
2521 --skeleton entry so that the `Tuning the parser' section is sorted
2522 alphabetically on long options.
2523 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2524 %language directive in detail here; cross-reference the %language
2525 documentation instead.
2526 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2527 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 2528 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
2529 * examples/extexi (normalize): Instead of replacing every %require
2530 argument with the current Bison version, just substitute for
2531 `@value{VERSION}'. This guarantees that we're testing what actually
2532 appears in the documentation.
2533 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2534 rather than `@VERSION@'.
2535
0e021770
PE
25362006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2537
fd575f05
PE
2538 * NEWS: Reword the %language news a bit, and put it earlier.
2539
0e021770
PE
2540 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2541 Rewrite to simplify the logic.
2542 (language_argmatch): Likewise.
fd575f05
PE
2543 (program_name): We now own this var.
2544 * src/getargs.h (struct bison_language): Use char[] rather than
2545 const char *.
0e021770
PE
2546
2547 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2548 Java is supported.
2549 * src/complain.c (program_name): Remove decl; no longer needed.
2550 * src/main.c (program_name): Remove; now belongs to getargs.
2551
25522006-12-18 Paolo Bonzini <bonzini@gnu.org>
2553
2554 * NEWS: Document %language.
2555
2556 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2557
2558 * data/c-skel.m4, data/c++-skel.m4: New files.
2559 * data/glr.c: Complain on push parsers.
2560
2561 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2562 over %skeleton.
148d66d8 2563 (Decl Summary): Document %language and %skeleton.
0e021770
PE
2564 (Command line): Document -L.
2565
2566 * examples/extexi: Rewrite %require directive.
2567 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2568
2569 * src/files.c (compute_exts_from_gc): Look in language structure
2570 for .y extension.
2571 (compute_file_name_parts): Check whether .tab should be added.
2572 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2573 (language, skeleton_arg, language_argmatch): New.
2574 (long_options): Add --language.
2575 (getargs): Use skeleton_arg, add -L/--language.
2576 * src/getargs.h: Include location.h.
2577 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2578 * src/output.c (prepare): Pick default skeleton from struct language.
2579 Don't dispatch C skeletons here.
2580 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2581 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2582 * src/scan-gram.l ("%language"): New rule.
2583
2584 * tests/calc.at: Test %skeleton and %language.
2585 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2586 (AT_GLR_IF): Look for %skeleton "glr.cc".
2587 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2588 (AT_YACC_IF): Reject %language.
2589
5691bf57
PE
25902006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2591
db06f0ce
PE
2592 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2593 since it wasn't used; only the typedef name 'semantic_type' is needed.
2594 Also, omit trailing white space.
2595
5691bf57
PE
2596 * bootstrap: Sync from coreutils.
2597 (gnulib_extra_files): Add build-aux/announce.gen.
2598 (slurp): Adjust .gitignore files like .cvsignore files.
2599 * build-aux/announce-gen: Remove from CVS, since bootstrap
2600 now creates this.
2601
791934e4
JD
26022006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2603
2604 Make %push-parser imply %pure-parser. This fixes several bugs; see
2605 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2606 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2607 pure_parser = true.
2608 * data/push.c: Don't bother testing b4_push_if when deciding whether
2609 to expand b4_declare_parser_variables globally.
2610 (yypush_parse): Likewise in here.
2611
2612 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2613 (yy_reduce_print): Reformat M4 for readability.
2614
ee5abb37
JD
26152006-12-15 Bob Rossi <bob@brasko.net>
2616 and Joel Denny <jdenny@ces.clemson.edu>
2617
2618 * data/push.c (yypstate): Add typedef, and update all uses of
2619 struct yypstate to just yypstate.
2620 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2621
16ca01f9
JD
26222006-12-14 Bob Rossi <bob@brasko.net>
2623
2624 * data/push.c (yypush_parse): Declare prototype regardless of
2625 %locations option.
2626
ab8e7e1a
JD
26272006-12-14 Bob Rossi <bob@brasko.net>
2628
2629 * data/push.c (yyparse): Remove the prototype and the #define when in
2630 push-parser mode.
2631
9bf32be3
JD
26322006-12-13 Bob Rossi <bob@brasko.net>
2633
2634 * data/push.c (yypstate_init): Rename to...
2635 (yypstate_new): ... this and use b4_c_function_def.
2636 (yypstate_delete): New.
2637 (yypush_parse): Change parameters yynval and yynlloc to be const.
2638 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2639 yypstate_delete functions.
2640
f02e2948
JD
26412006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2642
2643 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2644 strange test case titles. Reported by Bob Rossi.
2645
38eb7751
PE
26462006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2647
2648 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2649 of potential ambiguities in GLR grammers.
2650
bd9d212b
JD
26512006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2652
2653 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2654 `bison ', use m4_index instead of m4_substr since chopping up a string
2655 containing M4-special characters causes problems here.
2656
2657 Fix a couple of bugs related to special characters in user-specified
2658 file names, and make it easier for skeletons to compute output file
2659 names with the same file name prefix as Bison-computed output file
2660 names.
2661 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2662 b4_parser_file_name and b4_spec_defines_file instead of
2663 @output_parser_name@ and @output_header_name@, which are now redundant.
2664 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2665 b4_parser_file_name, b4_spec_defines_file, and the new
2666 @basename(FILENAME@) instead of @output_parser_name@ and
2667 @output_header_name@, which inappropriately escaped the file names as
2668 C string literals.
2669 * src/files.c (all_but_ext): Remove static qualifier.
2670 (compute_output_file_names): Move `free (all_but_ext)' to...
2671 (output_file_names_free): ... here since all_but_ext is needed later.
2672 * src/files.h (all_but_ext): Extern.
2673 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2674 exactly what MUSCLE_INSERT_STRING used to do.
2675 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2676 characters are escaped properly.
2677 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2678 all_but_ext.
2679 For pkgdatadir muscle, maintain previous functionality by using
2680 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2681 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2682 digraphs would never be expanded. Hopefully no one has M4-special
2683 characters in his Bison installation path.
2684 * src/scan-skel.l: Don't parse @output_header_name@ and
2685 @output_parser_name@ anymore since they're now redundant.
2686 In @output, use decode_at_digraphs.
2687 Parse a new @basename command that invokes last_component.
2688 (decode_at_digraphs): New.
2689 (BASE_QPUTS): Remove unused.
2690 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2691 (Output file name): New tests.
2692
3f7ca628
JD
26932006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2694
2695 Warn about output files that are generated by the skeletons and that
2696 conflict with other output files.
2697 * data/glr.c: Don't generate the header file here when glr.cc does.
2698 * src/files.c (file_names, file_names_count): New static globals.
2699 (compute_output_file_names): Invoke output_file_name_check for files
2700 not generated by the skeletons and remove existing checks.
2701 (output_file_name_check): New function that warns about conflicting
2702 output file names.
2703 (output_file_names_free): Free file_names.
2704 * src/files.h (output_file_name_check): Declare.
2705 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2706 the skeletons.
2707 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2708 (Conflicting output files): New tests.
2709
178e123e
PE
27102006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2711
2712 * doc/bison.texinfo: Fix a couple of typos.
2713
27142006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
2715
2716 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2717 Rename to...
2718 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2719 update all uses.
2720 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2721 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2722 local pv.
2723 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2724 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2725
ea17f233
JD
27262006-12-07 Bob Rossi <bob@brasko.net>
2727 and Joel Denny <jdenny@ces.clemson.edu>
2728
2729 * data/push.c (yypvarsinit): Change return type from void* to struct
2730 yypvars*. No longer cast to void* on return.
2731 (struct yypvars): Remove yylen since it need not be remembered between
2732 yypushparse invocations.
2733 (yypushparse): Don't copy between yylen and pv->yylen.
2734
55a30bda
JD
27352006-12-05 Bob Rossi <bob@brasko.net>
2736
2737 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2738 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2739 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2740 (struct yypvars): Remove b4_declare_parser_variables.
2741 (yypvarsinit): Remove init code for removed variables.
2742 (global scope): Do not declare b4_declare_parser_variables if
2743 push or pure mode.
2744 (yypushparse): Add b4_declare_parser_variables.
2745 Init new local variables, and remove init code for removed
2746 yypvars variables.
2747 (yyparse): Delete.
2748 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2749 and yyparse for other modes.
2750 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2751 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2752 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2753 (AT_PURE_LEX_IF): True if pure or push parser.
2754
85894313
JD
27552006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2756
2757 Document Yacc prologue alternatives and default %destructor's and
2758 %printer's as experimental. Don't mention Java yet. Discussed at
2759 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2760 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2761 (2.3a): Annotate this entry to say the old forms of these features were
2762 also experimental.
2763 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 2764 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
2765 of Java (we'll want this back eventually).
2766
02975b9a
JD
27672006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2768
2769 Support a file name argument to %defines. Deprecate `=' in
2770 %file-prefix, %name-prefix, and %output. Discussed at
2771 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2772 * NEWS (2.3a+): Mention.
148d66d8 2773 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
2774 form of %defines, and remove `=' from entries for %file-prefix,
2775 %name-prefix, and %output.
2776 * src/parse-gram.y (prologue_declaration): Implement.
2777 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2778 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2779 all but one occurrence of %name-prefix.
2780 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2781 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2782 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2783 occurrence of each of %file-prefix and %output. Add check for %defines
2784 with argument.
2785 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2786 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2787 Remove the `=' from %output.
2788
287b314e
JD
27892006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2790
2791 Don't escape $ in test case titles since Autoconf 2.61 now does that
2792 correctly.
2793 * tests/actions.at (Default %printer and %destructor are not for error
2794 or $undefined): Here.
2795 (Default %printer and %destructor are not for $accept): Here.
2796 * tests/input.at (Invalid $n and @n): Here.
2797
3ebecc24
JD
27982006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2799
2800 Rename <!> to <>. Discussed starting at
2801 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2802 * NEWS (2.3a+): Update.
148d66d8 2803 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
2804 Update.
2805 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2806 * src/scan-gram.l (INITIAL): Implement.
2807 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2808 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2809 comment.
2810 * tests/actions.at (Default tagless %printer and %destructor,
2811 Default tagged and per-type %printer and %destructor,
2812 Default %printer and %destructor are not for error or $undefined,
2813 Default %printer and %destructor are not for $accept,
2814 Default %printer and %destructor for mid-rule values): Update.
2815 * tests/input.at (Default %printer and %destructor redeclared,
2816 Unused values with default %destructor): Update.
2817
26b8a438
JD
28182006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2819
2820 Don't let %prec take a nonterminal.
2821 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2822 token.
2823 * tests/input.at (%prec takes a token): New test checking that %prec
2824 won't take a nonterminal.
2825
07c39ae9
JD
28262006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2827
405d53b7
JD
2828 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2829 it was double-quoted.
07c39ae9
JD
2830 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2831 grammar is maintained with Bison's highest standards.
2832 * src/getargs.c: Fix some typos in Doxygen comments.
2833
580b8926
JD
28342006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2835
2836 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2837 later. Reported by Paul Eggert in
2838 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2839 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2840 * src/scan-code.l (translate_action): Don't bother invoking
2841 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2842 (code_scanner_free): Instead of invoking
2843 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2844 which frees more.
2845 * src/scan-gram.l (gram_scanner_free): Likewise.
2846 * src/scan-skel.l (scan_skel): Likewise.
2847
4502eadc
JD
28482006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2849
2850 * src/files.c (tr): Change return type to void.
2851 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2852 has been called previously for the same key.
2853 (muscle_find): Return storage instead of value so that
2854 --enable-gcc-warnings doesn't produce warnings that the return discards
2855 const. aver that the value and storage are the same since storage
2856 could potentially be NULL when value is not.
2857 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2858 same as 0.
2859
7746c8f6
PE
28602006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2861
2862 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2863 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2864 us a slightly cleaner distribution, and also works.
2865 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2866 gnulib changes.
2867
eb095650
PE
28682006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2869 and Paul Eggert <eggert@cs.ucla.edu>
2870
2871 Don't let Bison leak memory except when it complains.
2872 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2873 (spec_defines_file, dir_prefix): Now char *, not const char *,
2874 since they are freed.
2875 * src/files.c: Likewise.
2876 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2877 Likewise.
2878 (tr): Now operates in-place. All uses changed.
2879 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2880 values.
2881 (compute_file_name_parts, compute_output_file_names): Don't store
2882 read-only data in variables that will be freed.
2883 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2884 src_extension, and header_extension.
2885 (output_file_names_free): New public function to free
2886 spec_verbose_file, spec_graph_file, spec_defines_file,
2887 parser_file_name, and dir_prefix.
2888 * src/getargs.c (getargs): Don't store read-only data in variables that
2889 will be freed.
2890 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2891 (which previously existed but was unused), and quotearg_free.
2892 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2893 * src/muscle_tab.c: Likewise.
2894 (muscle_entry): Make the value char const *,
2895 and add a new storage member that is char * and can be freed.
2896 (muscle_entry_free): New private function.
2897 (muscle_init): Use it instead of free.
2898 (muscle_insert, muscle_grow): Update and use new storage member.
2899 (muscle_code_grow): Free the string passed to muscle_grow
2900 since it's not needed anymore.
2901 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2902 add a new `char *code' member.
2903 ("{...}"): Declare semantic type as code.
2904 * src/scan-code.h (translate_rule_action):
2905 (translate_symbol_action, translate_code, translate_action): Return
2906 `char const *' rather than `char *' since external code should not free
2907 these strings.
2908 * src/scan-code.l: Likewise.
2909 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2910 which is "{...}" in the parser.
2911 * tests/Makefile.am (maintainer-check-valgrind): Set
2912 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2913 Valgrind.
2914 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2915 complain.
2916 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2917 expecting a non-zero exit status sets --leak-check=summary and
2918 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2919 this case, and we don't want to hear about it.
2920
ac564be4
PE
29212006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2922
2923 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2924 instead of from the template, to simplify configuration a bit.
2925 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2926 and m4/wint_t.m4, as they are needed with the latest gnulib.
2927
17bd8a73
JD
29282006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2929
2930 Disable unset/unused mid-rule value warnings by default, and recognize
2931 --warnings=midrule-values to enable them. Discussed starting at
2932 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2933 * NEWS (2.3a+): Mention.
2934 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2935 warnings): Add entry for midrule-values subargument.
2936 * src/reader.c (symbol_should_be_used): Don't return true just because
2937 the value is a set/used mid-rule value unless
2938 --warnings=midrule-values was specified.
2939 * tests/input.at (Unused values, Unused values before symbol
2940 declarations): Run tests with and without --warnings=midrule-values.
2941
2942 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2943 than LIST_FREE directly.
2944
89eb3c76
JD
29452006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2946
2947 Finish implementing --warnings=error, which should not be implied by
2948 --warnings=all (or by its synonyms -W and --warnings without
2949 subarguments).
2950 * src/complain.c (set_warning_issued): New function to report that
2951 warnings are being treated as errors and to record an error if so.
2952 Invoke...
2953 (warn_at, warn): ... here.
2954 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2955 "error - warnings are errors" does not appear above "all - all of the
2956 above".
2957 (getargs): For -W and --warnings without subarguments, don't let
2958 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2959 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2960
ba7560e2
JD
29612006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2962
2963 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2964 empty subargument list. For example: `bison --warnings= parser.y'.
2965
31283fc3
JD
29662006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2967
2968 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2969 the parser header file so that gcc doesn't warn.
2970
12e35840
JD
29712006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2972
2973 Split the default %destructor/%printer into two kinds: <*> and <!>.
2974 Discussed starting at
2975 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2976 * NEWS (2.3a+): Mention.
2977 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2978 previous change today related to mid-rules.
148d66d8 2979 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 2980 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
2981 (TYPE_TAG_ANY): Add as <*>.
2982 (TYPE_TAG_NONE): Add as <!>.
2983 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2984 for <*> and <!>.
2985 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2986 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2987 * src/symlist.c (symbol_list_default_new): Split into tagged and
2988 tagless versions.
2989 (symbol_list_destructor_set, symbol_list_printer_set): Split
2990 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2991 SYMLIST_DEFAULT_TAGLESS.
2992 * src/symlist.h: Update symbol_list_default*_new prototypes.
2993 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2994 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2995 * src/symtab.c (default_destructor, default_destructor_location,
2996 default_printer, default_printer_location): Split each into tagged and
2997 tagless versions.
2998 (symbol_destructor_get, symbol_destructor_location_get,
2999 symbol_printer_get, symbol_printer_location_get): Implement tagged
3000 default and tagless default cases.
3001 (default_destructor_set, default_printer_set): Split each into tagged
3002 and tagless versions.
3003 * src/symtab.h: Update prototypes.
3004 * tests/actions.at (Default %printer and %destructor): Rename to...
3005 (Default tagless %printer and %destructor): ... this, and extend.
3006 (Per-type %printer and %destructor): Rename to...
3007 (Default tagged and per-type %printer and %destructor): ... this, and
3008 extend.
3009 (Default %printer and %destructor for user-defined end token): Extend.
3010 (Default %printer and %destructor are not for error or $undefined):
3011 Update.
3012 (Default %printer and %destructor are not for $accept): Update.
3013 (Default %printer and %destructor for mid-rule values): Extend.
3014 * tests/input.at (Default %printer and %destructor redeclared): Extend.
3015 (Unused values with default %destructor): Extend.
3016
f91b1629
JD
30172006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3018
3019 Don't apply the default %destructor/%printer to an unreferenced midrule
3020 value. Mentioned at
3021 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
3022 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
3023 like $@n instead of just @n so that the default %destructor/%printer
3024 logic doesn't see them as user-defined symbols.
3025 (symbol_is_dummy): Check for both forms of the name.
3026 * src/reader.c (packgram): Remove the `$' from each midrule symbol
3027 name for which the midrule value is referenced in any action.
3028 * tests/actions.at (Default %printer and %destructor for mid-rule
3029 values): New test.
3030 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
3031 for change to dummy symbol names.
3032
519d0004
JD
30332006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3034
3035 Warn about unset midrule $$ if the corresponding $n is used.
3036 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3037 $n usage.
3038 (packgram): Before invoking grammar_rule_check on any rule, make sure
3039 all actions have already been scanned in order to set `used' flags.
3040 Otherwise, checking that a midrule's $$ is set will not always work
3041 properly because the midrule check must forward-reference the midrule's
3042 parent rule.
3043 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3044 warning.
3045
a501eca9
JD
30462006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3047
3048 More improvements to the documentation of the prologue alternatives:
3049 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3050 Bison manual.
3051 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3052 some text to clarify the relative importance of the new directives and
3053 to show how these directives may be viewed as code labels.
3054
2cbe6b7f
JD
30552006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3056
3057 Similar to the recently removed %before-header, add %code-top as the
3058 alternative to the pre-prologue. Mentioned at
3059 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3060 Also, let the prologue alternatives appear in the grammar section.
3061 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3062 (prologue_declaration): Move the existing prologue alternatives to...
3063 (grammar_declaration): ... here and add %code-top.
3064 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3065
3066 Clean up and extend documentation for the prologue alternatives.
3067 * NEWS (2.3a+): Describe prologue alternatives.
3068 * doc/bison.texinfo (Prologue): Move discussion of prologue
3069 alternatives to...
3070 (Prologue Alternatives): ... this new section, and extend it to discuss
3071 all 4 directives in detail.
148d66d8
JD
3072 (Table of Symbols): Clean up discussion of prologue alternatives and
3073 add %code-top.
2cbe6b7f 3074
e557d3ea
JMG
30752006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3076
3077 DJGPP specific issues.
3078
3079 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3080 config.bat accordingly.
3081 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3082 * djgpp/config.site: Likewise.
3083
136a0f76
PB
30842006-10-16 Paolo Bonzini <bonzini@gnu.org>
3085
27bd5d67
PB
3086 Replace %*-header with %provides, %requires, %code. See discussion at
3087 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3088
136a0f76
PB
3089 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3090 (b4_user_start_header): Remove.
3091 * data/glr.c: Use new macros instead of b4_*start_header
3092 and b4_*end_header.
3093 * data/glr.cc: Likewise.
3094 * data/lalr1.cc: Likewise.
3095 * data/push.c: Likewise.
3096 * data/yacc.c: Likewise.
3097
3098 * doc/bison.texinfo: Remove %before-header, rename
3099 %{start,end,after}-header to %requires, %provides, %code.
3100
3101 * src/parse-gram.y: Likewise (also rename token names accordingly).
3102 * src/scan-gram.l: Likewise.
3103 * tests/actions.at: Likewise.
3104
10f429ef
PE
31052006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3106
3107 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3108 Problem reported by Joel E. Denny.
3109
31102006-10-14 Jim Meyering <jim@meyering.net>
3111
3112 (Sync from coreutils.)
3113 Work also when the working directory (with e.g. coreutils sources)
3114 is version controlled with git, rather than CVS.
3115 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3116 rather than CVS.
3117 In messages and comments, say e.g., "checked-out sources",
3118 rather than "CVS sources".
3119 (version_controlled_file): New function. Work for git as well as
3120 for CVS. Don't use grep's -q option.
3121 (slurp): Call it here, in place of CVS-specific code.
3122
c4bd5bf7
JD
31232006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3124
3125 Fix testsuite for ./configure --enable-gcc-warnings:
3126 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3127 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3128 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3129 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3130 * test/regression.at (Diagnostic that expects two alternatives):
3131 Likewise.
3132
46356ea4
PE
31332006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3134
231ed89a
PE
3135 * bootstrap.conf (gnulib_modules): Add config-h.
3136 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3137 worry about HAVE_CONFIG_H.
3138 * lib/abitset.c: Likewise.
3139 * lib/bitset.c: Likewise.
3140 * lib/bitset_stats.c: Likewise.
3141 * lib/bitsetv-print.c: Likewise.
3142 * lib/bitsetv.c: Likewise.
3143 * lib/ebitset.c: Likewise.
3144 * lib/get-errno.c: Likewise.
3145 * lib/lbitset.c: Likewise.
3146 * lib/subpipe.c: Likewise.
3147 * lib/timevar.c: Likewise.
3148 * lib/vbitset.c: Likewise.
3149 * lib/bitset.c: Include "bitset.h" first, to test interface.
3150 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3151 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3152 * lib/bitsetv.c: Include "bitsetv.h" first.
3153 * lib/get-errno.c: Include "get-errno.h" first.
3154 * m4/.cvsignore: Add config-h.m4.
3155 * tests/actions.at (Default %printer and %destructor for ...):
3156 Adjust expected line numbers in output to reflect removal of #if
3157 HAVE_CONFIG_H lines.
3158 * tests/glr-regression.at (Missed %merge type warnings when ...):
3159 Likewise.
3160 * tests/regression.at (Braced code in declaration in rules section):
3161 Likewise.
3162 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3163 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3164 Include <config.h> unconditionally.
3165
46356ea4
PE
3166 * bootstrap: Sync from coreutils, as follows:
3167
3168 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3169
3170 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3171 variable was sometimes used without being initialized. This
3172 messed up the installation of the INSTALL file in some cases.
3173
3174 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3175
3176 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3177 --copy. Inspired by a suggestion from Bruno Haible.
3178
3179 2006-10-03 Jim Meyering <jim@meyering.net>
3180
3181 * bootstrap: Undo last change to this file, since now gnulib-tool
3182 sticks with the automake default in generating dependencies.
3183
dd4bf078
PE
31842006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3185
cf2a5f7c
PE
3186 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3187 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3188
3189 * doc/bison.1: Add copyright notice.
3190
3191 * data/glr.c: Don't include <stdarg.h>; not used.
3192
35fe0834
PE
3193 * NEWS: The -g and --graph options now output graphs in Graphviz
3194 DOT format, not VCG format.
3195 * doc/bison.1: Likewise.
3196 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
3197 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3198 of this change in
3199 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
3200 * TODO: Remove Graphviz entry.
3201 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3202 remove vcg.c, vcg.h, vcg_defaults.h.
3203 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3204 * src/graphviz.c, src/graphviz.h: New files.
3205 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3206 * src/files.h: Make comment more generic.
3207 * src/main.c (main): Likewise.
3208 * src/print_graph.h: Likewise.
3209 * src/getargs.c (usage): Make usage description more generic.
3210 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3211 (static_graph, fgraph): Remove. All uses changed to pass
3212 arguments instead of sharing a static var.
3213 (print_core, print_actions, print_state, print_graph):
3214 Output graphviz format rather than VCG format.
3215 * tests/.cvsignore: Remove *.vcg; add *.dot.
3216 * tests/output.at: Expect *.dot files, not *.vcg files.
3217
dd4bf078
PE
3218 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3219 accommodates the 2006-10-08 change.
3220
efdd7421
PE
32212006-10-11 Bob Rossi <bob@brasko.net>
3222
3223 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3224 (b4_yyssa, b4_yyerror_range): New macros.
3225 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3226 (yypvarsinit): Remove init of removed fields.
3227 (yypushparse): Remove use of removed fields; use new macros instead.
3228
96a1981a
PE
32292006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3230
3231 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3232 in a push parser. Reindent slightly to match yacc.c better.
3233
32342006-10-11 Bob Rossi <bob@brasko.net>
3235
46356ea4
PE
3236 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3237 yymsg_alloc fields.
3238 (yypvarsinit, yypushparse): Remove init of removed fields.
3239 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 3240
c1630a8b
PE
32412006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3242
3243 * THANKS: Add Paolo Bonzini and Bob Rossi.
3244
90b9908d
PB
32452006-10-08 Paolo Bonzini <bonzini@gnu.org>
3246
3247 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3248 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3249 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3250 b4_define_user_cde and uses): Remove.
3251 (b4_comment, b4_prefix, b4_sync_start): New.
3252 * data/bison.m4: New file, with most of the content removed from c.m4.
3253 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3254 * src/output.c (output_skeleton): Pass bison.m4.
3255 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3256 only if specified.
3257
cf806753
PE
32582006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3259
3260 Fix test failure reported by Tom Lane in
3261 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3262 and try to make such failures easier to catch in the future.
3263 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3264 that's now the caller's responsibility.
3265 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3266 Set yychar = YYEOF if it's negative.
3267 * tests/actions.at (yylex): Abort if asked to read past EOF.
3268 * tests/conflicts.at (yylex): Likewise.
3269 * tests/cxx-type.at (yylex): Likewise.
3270 * tests/glr-regression.at (yylex): Likewise.
3271 * tests/input.at (yylex): Likewise.
3272 * tests/regression.at (yylex): Likewise.
3273 * tests/torture.at (yylex): Likewise.
3274
0e2f006a
PE
32752006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3276
3277 Fix problems with translating English-language diagnostics.
3278 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3279 respect to bison-runtime pot generation. The YY_ stuff
3280 wasn't being captured.
3281 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3282 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3283 * runtime-po/POTFILES.in: Add data/push.c.
3284
e3ddc1e3
PE
32852006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3286
3287 Merge bootstrap changes from coreutils.
3288
3289 2006-09-28 Jim Meyering <jim@meyering.net>
3290
3291 Automatically generated dependencies are important even
3292 when all of the sources in a directory come from gnulib.
3293 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3294 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3295
3296 2006-09-23 Jim Meyering <jim@meyering.net>
3297
3298 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3299
3300 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3301
3302 * bootstrap: Add support for --force.
3303 (usage): New function. Describe usage less tersely.
3304 (CVS_only_file): New var.
3305
01e972b3
PE
33062006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3307
3308 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3309 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3310 Adjust white space and comments to match GNU style better.
3311
c63d3e90
PE
33122006-09-20 Bob Rossi <bob@brasko.net>
3313
3314 * data/push.c (yyresult_get): Remove function.
3315 (YYPUSH_MORE): Add #define.
3316 (yypushparse): Modify return value.
3317
e70f46d1
PE
33182006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3319
3320 * stamp-h.in: Remove; no longer needed.
3321 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3322 Remove config.h, config.hin, intl (no longer created).
3323 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3324 stamp-h1.
3325
3326 Sync bootstrap from coreutils, as follows:
3327
3328 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3329
3330 * bootstrap (symlink_to_gnulib): New function.
3331 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3332 to copies-of-gnulib.
3333 (cp_mark_as_generated, slurp, gnulib_files):
3334 Avoid making a copy if it's the same as the old version.
3335 (gnulib_files): Add support for this variable (used by Bison).
3336
a92be413
PE
33372006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3338
3339 * src/getargs.c (usage): Rework to use conventions similar to
3340 coreutils, to make translation a bit easier and the code a bit
3341 smaller. Problem reported by Tim Van Holder.
3342
4f82b42a
PE
33432006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3344
3b2942e6
PE
3345 Use some of gnulib's new modules, taken from coreutils.
3346
3347 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3348 * bootstrap.conf: New file.
3349 (gnulib_modules): Add configmake, inttypes, unistd.
3350 (XGETTEXT_OPTIONS): Add complain, complain_at,
3351 fatal, fatal_at, warn, warn_at, unexpected_end.
3352 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3353 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3354 (gl_EARLY): Add.
3355 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3356 (gl_INIT): Add
3357 (GNULIB_AUTOCONF_SNIPPET): Remove.
3358 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3359 the pickiest.
3360 * lib/.cvsignore: Add inttypes_.h.
3361 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3362 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3363 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3364 no-longer-necessary initializations.
3365 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3366 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3367 use the unistd module.
3368 * src/system.h: Likewise.
3369 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3370 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3371 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3372 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3373 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3374 * src/system.h: Include inttypes.h unconditionally, now that we
3375 use the inttypes module. Don't bother to include stdint.h, since
3376 inttypes.h now does that for us.
3377 (LOCALEDIR): Remove, now that we use the configmake module.
3378 * src/getargs.c: Include configmake.h.
3379 * src/main.c: Likewise.
3380 * src/output.c: Likewise.
3381 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3382 not from $abs_top_builddir, since config.h moved.
3383
3384
4f82b42a
PE
3385 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3386 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3387
3388 * src/parse-gram.y (symbol_declaration): Don't put statements
3389 before declarations; it's not portable to C89.
3390 * src/scan-code.l (handle_action_at): Likewise.
3391
3392 * src/scan-code.l: Always initialize braces_level; the old code
3393 left it uninitialized and therefore had undefined behavior.
3394
3395 Don't attempt to redefine 'assert', since it runs afoul of
3396 systems where standard headers (mistakenly) include <assert.h>.
3397 Instead, define and use our own alternative, called 'aver'.
3398 * src/reader.c: Don't include assert.h, since we no longer
3399 use assert.
3400 * src/scan-code.l: Likewise.
3401 * src/system.h (assert): Remove, replacing with....
3402 (aver): New function, taking a bool arg. All uses changed.
3403 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3404 not merely an integer.
3405
31c10e38
PE
34062006-09-15 Bob Rossi <bob@brasko.net>
3407
3408 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3409 * data/c.m4 (YYPUSH): New.
3410 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3411 * src/getargs.c (push_parser): New var.
3412 * src/getargs.h (push_parser): New declaration.
3413 * src/output.c (prepare): Add macro insertion of `push_flag'.
3414 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3415 (prologue_declaration): Parse %push-parser.
3416 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3417 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3418 list of removed lines from the traces observed.
3419 (AT_CHECK_CALC_LALR): Added push parser tests.
3420
fa7b79c0
PE
34212006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3422
21fe08ca
PE
3423 * NEWS: Version 2.3a.
3424 * configure.ac (AC_INIT): Likewise.
3425
e8ec4d9b
PE
3426 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3427 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3428 due to header ordering dependencies. I don't know why the #define
3429 was there.
3430
fa7b79c0
PE
3431 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3432 runtime cost when YYDEBUG is not defined, and so that some tests
3433 that used to fail now work. Problem and initial suggestion by
3434 Paolo Bonzini.
3435 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3436 * data/glr.cc (b4_parser_class_name):
3437 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3438 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3439 (yydebug_) [YYDEBUG]: New member.
3440 (yycdebug_): Now defined only if YYDEBUG.
3441 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3442 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3443 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3444 if YYYDEBUG.
3445 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3446 Define only if YYDEBUG.
3447 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3448 set_debug_level.
3449 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3450 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3451 AT_CHECK_CALC_GLR_CC that are working now.
3452
4ec13d60
PE
34532006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3454
3455 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3456 We don't need them in glr.cc, and glr.c defines them.
3457 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3458 assumes that defining it to anything is the same as defining
3459 it to 1. Problem reported by Paolo Bonzini.
3460
8e1687ae
PE
34612006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3462
3463 * data/c.m4 (b4_null, b4_case): Define.
3464 * src/output.c (prepare_symbols): Use b4_null.
3465 (user_actions_output): Use b4_case.
3466
3dc5e96b
PE
34672006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3468
aef3da86
PE
3469 * data/glr.c (b4_shared_declarations): Put start-header first,
3470 before any #includes that we generate, so that feature-test
3471 macros work. Problem reported by Michael Deutschmann in
3472 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3473 * data/lalr1.cc: Likewise.
3474 * doc/bison.texinfo (Prologue): Document that feature-test macros
3475 should be defined before any Bison declarations.
3476 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3477 that depend on location.hh after, not before, Bison decls, since
3478 we now include location.hh after the first user prologue.
3479
3dc5e96b
PE
3480 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3481 Sander Brandenburg in
3482 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3483 Also, fix minor white space and comment issues.
aef3da86
PE
3484 (Prologue): Mention that it's better to define feature-test macros
3485 before Bison declarations. Problem reported by Michael Deutschmann.
3486
3487 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3488 by Jim Meyering.
3489 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3490 This adjusts to recent gnulib changes.
3dc5e96b 3491
b2a0b7ca
JD
34922006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3493
3494 Finish implementation of per-type %destructor/%printer. Discussed
3495 starting at
3496 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3497 and
3498 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3499 * NEWS (2.3+): Add a description of this feature to the default
3500 %destructor/%printer description.
3501 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3502 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3503 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3504 list node contains a semantic type.
3505 * src/symtab.c, src/symtab.h: Extend with a table that associates
3506 semantic types with their %destructor's and %printer's.
3507 (semantic_type_from_uniqstr, semantic_type_get,
3508 semantic_type_destructor_set, semantic_type_printer_set): New functions
3509 composing the public interface of that table.
3510 (symbol_destructor_get, symbol_destructor_location_get,
3511 symbol_printer_get, symbol_printer_location_get): If there's no
3512 per-symbol %destructor/%printer, look up the per-type before trying
3513 the default.
3514 * tests/actions.at (Per-type %printer and %destructor): New test case.
3515 * tests/input.at (Default %printer and %destructor redeclared):
3516 Extend to check that multiple occurrences of %symbol-default in a
3517 single %destructor/%printer declaration is an error.
3518 (Per-type %printer and %destructor redeclared, Unused values with
3519 per-type %destructor): New test cases.
3520
3be03b13
JD
35212006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3522
3523 Require default %destructor/%printer to be declared using
3524 %symbol-default instead of an empty symbol list, and start working on
3525 new per-type %destructor/%printer. Discussed at
3526 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3527 * NEWS (2.3+): Add %symbol-default to example.
3528 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 3529 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
3530 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3531 (generic_symlist, generic_symlist_item): New nonterminals for creating
3532 a list in which each item is a symbol, semantic type, or
3533 %symbol-default.
3534 (grammar_declaration): Use generic_symlist in %destructor and %printer
3535 declarations instead of symbols.1 or an empty list.
3536 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3537 for changes to symbol_list.
3538 * src/reader.c: Update for changes to symbol_list.
3539 * src/scan-code.l: Likewise.
3540 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3541 * src/symlist.c, src/symlist.h: Extend such that a list node may
3542 represent a semantic type or a %symbol-default in addition to just an
3543 ordinary symbol. Add switched functions for setting %destructor's and
3544 %printer's.
3545 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3546 %destructor/%printer declarations.
3547
3508ce36
JD
35482006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3549
3550 Whether the default %destructor/%printer applies to a particular symbol
3551 isn't a question of whether the user *declares* that symbol (in %token,
3552 for example). It's a question of whether the user by any means
3553 *defines* the symbol at all (by simply using a char token, for
3554 example). $end is defined by Bison whereas any other token with token
3555 number 0 is defined by the user. The error token is always defined by
3556 Bison regardless of whether the user declares it with %token, but we
3557 may one day let the user define error as a nonterminal instead.
3558 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3559 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3560 the meaning of "user-defined".
3561 * tests/actions.at (Default %printer and %destructor for user-declared
3562 end token): Rename to...
3563 (Default %printer and %destructor for user-defined end token): ...
3564 this.
3565
3566 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3567 computation of whether to apply the default, don't maintain a list of
3568 every Bison-defined symbol. Instead, just check for a first character
3569 of '$', which a user symbol cannot have, and check for the error token.
3570
9350499c
JD
35712006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3572
3573 Don't apply the default %destructor or %printer to the error token,
3574 $undefined, or $accept. This change fits the general rule that the
3575 default %destructor and %printer are only for user-declared symbols,
3576 and it solves several difficulties that are described in the new test
3577 cases listed below.
3578 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3579 * tests/actions.at (Default %printer and %destructor are not for error
3580 or $undefined, Default %printer and %destructor are not for $accept):
3581 New test cases.
3582
4d7370cb
JD
35832006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3584
3585 Allow %start after the first rule.
3586 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3587 when parsing the first rule.
3588 (check_and_convert_grammar): Search for it here after all grammar
3589 declarations have been parsed. Skip midrules, which have dummy LHS
3590 nonterminals.
3591 * src/symtab.c (symbol_is_dummy): New function.
3592 * src/symtab.h (symbol_is_dummy): Declare it.
3593 * tests/input.at (%start after first rule): New test.
3594
6d0ef4ec
JD
35952006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3596
3597 Redo some of the previous commit: add back the ability to use
3598 non-aliased/undeclared string literals since it might be useful to
3599 those declaring %token-table.
3600 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3601 commit: don't worry about complaints from symbols_pack.
3602 * src/symtab.c (symbol_new, symbol_class_set,
3603 symbol_check_alias_consistency): Undo changes in previous commit: count
3604 each string literal as a new symbol and token, assign it a symbol
3605 number, and don't complain about non-aliased string literals.
3606 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3607 and token counts but does still set aliased tokens to the same number,
3608 symbol_pack_processor now leaves empty slots in the symbols array.
3609 Remove those slots.
3610 * tests/regression.at (Undeclared string literal): Remove test case
3611 added in previous commit since non-aliased string literals are allowed
3612 again.
3613 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3614 remove unnecessary string literal declarations.
3615 * tests/sets.at (Firsts): Likewise.
3616
965537bc
JD
36172006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3618
3619 Don't allow an undeclared string literal, but allow a string literal to
3620 be used before its declaration.
3621 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3622 symbols_pack complained.
3623 * src/symtab.c (symbol_new): Don't count a string literal as a new
3624 symbol.
3625 (symbol_class_set): Don't count a string literal as a new token, and
3626 don't assign it a symbol number since symbol_make_alias does that.
3627 (symbol_make_alias): It's not necessary to decrement the symbol and
3628 token counts anymore. Don't assume that an alias declaration occurs
3629 before any uses of the identifier or string, and thus don't assert that
3630 one of them has the highest symbol number so far.
3631 (symbol_check_alias_consistency): Complain if there's a string literal
3632 that wasn't declared as an alias.
3633 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3634 symbol_pack asserts that every token has been assigned a symbol number
3635 although undeclared string literals have not.
3636 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 3637 string literal): New test cases.
965537bc
JD
3638 (Characters Escapes, Web2c Actions): Declare string literals as
3639 aliases.
3640 * tests/sets.at (Firsts): Likewise.
3641
47aee066
JD
36422006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3643
3644 In the grammar scanner, STRING_FINISH unclosed constructs and return
3645 them to the parser in order to improve error messages.
3646 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3647 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3648 * tests/input.at (Unclosed constructs): New test case.
3649 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3650 seen.
3651
3652 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3653 unused global.
3654
1f6b3679
JD
36552006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3656
3657 Handle string aliases for character tokens correctly.
3658 * src/symtab.c (symbol_user_token_number_set): If the token has an
3659 alias, check and set its alias's user token number instead of its own,
3660 which is set to indicate the alias. Previously, every occurrence of
3661 the character token in the grammar overwrote that alias indicator with
3662 the character code.
3663 * tests/input.at (String aliases for character tokens): New test.
3664
219741d8
JD
36652006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3666
3667 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3668
11daa4e7
PE
36692006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3670
3671 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3672 to prevent failures when building on older platforms.
3673 Check for autopoint failure.
3674 Set XGETTEXT_OPTIONS to values that check for C format strings,
3675 so that translators are warned about them (this also helps
3676 prevent core dumps).
3677
3678 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3679 function, since it simplifies our code a bit.
3680
3681 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3682 rather than -W, so we don't get bogus warnings about sign comparisons.
3683 Add -Wpointer-arith, since that warning is useful (it reports code
3684 that does not conform to C89 and that some compilers reject).
3685 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3686 since it's no longer needed.
3687
f9bfc42a
JD
36882006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3689
3690 Clean up scanners a bit.
3691 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3692 definitions so gcc won't warn when obstack_for_string is unused.
3693 * src/scan-code.l: config.h and system.h are already #include'd by
3694 scan-code-c.c, so get rid of them here.
3695 * src/scan-gram.l: Likewise.
3696 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3697 definitions rather than duplicating the rest of it.
3698 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3699
06e8700a
JD
37002006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3701
3702 Suppress signed/unsigned comparison warnings for yycheck.
3703 * data/c.m4 (b4_safest_int_type): New macro.
3704 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3705 a signed int type, cast it to b4_safest_int_type first.
3706 * data/yacc.c: Likewise.
3707 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3708 also overwritten.
3709
9c437126
PE
37102006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3711
3712 * doc/bison.texinfo: Fix some typos.
3713
284d8a13
PE
37142006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3715
3716 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3717 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3718
3719 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3720 the latest gnulib does this a different way.
3721 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3722 translation was patched, so stop omitting it.
3723
ec5479ce
JD
37242006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3725
3726 Enable declaration of default %printer/%destructor. Make the parser
3727 use these for all user-declared grammar symbols for which the user does
3728 not declare a specific %printer/%destructor. Thus, the parser uses it
3729 for token 0 if the user declares it but not if Bison generates it as
3730 $end. Discussed starting at
3731 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3732 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3733 and
3734 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3735 * NEWS (2.3+): Mention.
3736 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3737 declare a %destructor for a mid-rule's semantic value. It's just
3738 impossible to declare one specific to it.
3739 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3740 code. Describe default %destructor form.
3741 * src/parse-gram.y (grammar_declaration): Parse default
3742 %printer/%destructor declarations.
3743 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3744 and symbol_destructor_location_get rather than accessing the destructor
3745 and destructor_location members of struct symbol.
3746 (symbol_printers_output): Likewise but for %printer's.
3747 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3748 again.
3749 * src/symtab.c (default_destructor, default_destructor_location,
3750 default_printer, default_printer_location): New static global
3751 variables to record the default %destructor and %printer.
3752 (symbol_destructor_get, symbol_destructor_location_get,
3753 symbol_printer_get, symbol_printer_location_get): New functions to
3754 compute the appropriate %destructor and %printer for a symbol.
3755 (default_destructor_set, default_printer_set): New functions to set the
3756 default %destructor and %printer.
3757 * src/symtab.h: Prototype all those new functions.
3758 * tests/actions.at (Default %printer and %destructor): New test to
3759 check that the right %printer and %destructor are called, that they're
3760 not called for $end, and that $$ and @$ work correctly.
3761 (Default %printer and %destructor for user-declared end token): New
3762 test to check that the default %printer and %destructor are called for
3763 a user-declared end token.
3764 * tests/input.at (Default %printer and %destructor redeclared, Unused
3765 values with default %destructor): New tests to check related grammar
3766 warnings and errors.
3767
868d2d96
JD
37682006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3769
3770 Clean up handling of %destructor for the end token (token 0).
3771 Discussed starting at
3772 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3773 and
3774 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3775
3776 Make the skeletons consistent in how they pop the end token and invoke
3777 its %destructor.
3778 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3779 state, which has token number 0, since this would invoke the
3780 %destructor for the end token.
3781 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3782 until after shifting the end token, or else it won't be popped.
3783 * data/yacc.c (yyparse): Likewise.
3784
3785 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3786 it's the end token. Upon termination, destroy an unshifted lookahead
3787 even when it's the end token.
3788 * data/lalr1.cc (yy::parser::parse): Likewise.
3789 * data/yacc.c (yyparse): Likewise.
3790
3791 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3792 value warnings for the end token when the user gives the end token a
3793 %destructor.
3794
3795 * tests/actions.at (Printers and Destructors): Test all the above.
3796
62a9592d
PE
37972006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3798
3799 Update to latest gnulib and gettext versions.
3800 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3801 Add fopen-safer.
3802 (gnulib_files): Add m4/warning.m4. Don't worry about files
3803 overwritten by autopoint.
3804 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3805 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3806 rejects them.
3807 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3808 so that we can remove the intl files at a better time.
3809 (intl_files_to_remove): Remove aclocal.m4, since it gets
3810 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3811 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3812 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3813 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3814 Remove datarootdir hack; no longer needed.
3815 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3816 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3817 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3818 strdup.h.
3819 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3820 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3821
10d6970f
PE
38222006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3823
3824 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3825 it with --assume-autoconf='latest-stable'.
3826
50a33993
JD
38272006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3828
3829 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3830 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3831 YYSTYPE' and `{'.
3832 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3833 those from muscle_tab.c since the old ones are misleading.
3834
2ce4ed68
AD
38352006-07-13 Akim Demaille <akim@epita.fr>
3836
3837 Support %define "KEY" {VALUE}.
3838 * src/scan-code.h, src/scan-code.l (translate_action)
3839 (translate_rule_action, translate_symbol_action, translate_code):
3840 Return char *, not const char *.
3841 * src/parse-gram.y (declaration): Rename as...
3842 (prologue_declaration): this.
3843 (string_content): Remove this nonterminal, use STRING.
3844 (braceless, content, content.opt): New nonterminal.
3845 Use them.
3846 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3847 as value.
3848 * src/scan-gram.l (getargs.h): Don't include it.
3849
db7e5eb5
PE
38502006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3851
3852 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3853 rather than a for-loop that declares a local bool variable. This
3854 should work around a compatibility problem with a Cray x1e C++
3855 compiler reported by Hung Nguyen in
3856 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3857 The for-loop was introduced in the 2004-11-17 change but I don't
3858 know why it was needed.
3859
a5d80ba5
AD
38602006-07-12 Akim Demaille <akim@epita.fr>
3861
3862 * data/c.m4: Comment changes.
3863
23eb2a69
AD
38642006-07-10 Akim Demaille <akim@lrde.epita.fr>
3865
3866 * src/complain.c (error_message, ERROR_MESSAGE): New.
3867 To factor...
3868 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3869 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3870
ddc8ede1
PE
38712006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3872
3873 * NEWS: Instead of %union, you can define and use your own union type
3874 YYSTYPE if your grammar contains at least one <type> tag.
3875 Your YYSTYPE need not be a macro; it can be a typedef.
3876 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3877 (Union Decl, Decl Summary): Document this.
3878 * data/glr.c (YYSTYPE): Implement this.
3879 * data/glr.cc (YYSTYPE): Likewise.
3880 * data/lalr1.cc (YYSTYPE): Likewise.
3881 * data/yacc.c (YYSTYPE): Likewise.
3882 * src/output.c (prepare): Output tag_seen_flag.
3883 * src/parse-gram.y (declaration, grammar_declaration):
3884 Use 'union_seen' rather than 'typed' to determine whether
3885 %union has been seen, since grammars can now be typed without
3886 %union.
3887 (symbol_declaration, type.opt, symbol_def):
3888 Keep track of whether a tag has been seen.
3889 * src/reader.c (union_seen, tag_seen): New vars.
3890 (typed): remove.
3891 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3892 * src/scan-code.l (untyped_var_seen): New variable.
3893 (handle_action_dollar): Adjust to above changes.
3894 (handle_action_dollar, handle_action_at):
3895 Improve overflow checking for outlandish numbers.
3896 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3897 avoid new diagnostics generated by above changes.
3898 * tests/regression.at (YYSTYPE typedef): Add test to check
3899 for type tags without %union.
3900
3901 * src/symlist.c (symbol_list_length): Return int, not unsigned
3902 int, since callers expect int. This may need to get revisited
3903 once we have proper integer overflow checking.
3904
3905 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3906 object is now static.
3907
3908 * src/getargs.c (flags_argmatch): Return void, not int,
3909 to pacify ./configure --enable-gcc-warnings.
3910
3911 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3912 since last_string is already defined to FLEX_PREFIX (last_string).
3913
7b42569e
AD
39142006-07-09 Akim Demaille <akim@lrde.epita.fr>
3915
3916 Implement --warnings/-W.
3917 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3918 replaced by...
3919 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3920 Adjust callers.
3921 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3922 (warnings_args, warnings_types): New.
3923 (getargs, short_options, long_options): Accept -W/--warnings.
3924 Sort the options by alphabetical order, upper case letter right
3925 before its lower case.
3926
3b452f4e
JD
39272006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3928
3929 Change %merge result type clash warnings to errors. Discussed at
3930 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3931 * src/reader.c (record_merge_function_type): Use complain_at.
3932 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3933 declared later): Update test case results.
3934
b8a41559
AD
39352006-07-09 Akim Demaille <akim@lrde.epita.fr>
3936
3937 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3938 to be in alphabetical order.
3939 (trace_args): Spelling fixes.
3940
cd9e1ba2
PE
39412006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3942
3943 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3944 so they don't collide with user-defined macros.
3945 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3946 this was never guaranteed, and now that we're using gnulib stdint,
3947 which defines int_fast16_t to long int, the problem is exposed.
3948
cb48f191
PE
39492006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3950
b8445a15
PE
3951 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3952 need the full POSIX semantics (and weren't implementing them
3953 anyway).
3954
cb48f191
PE
3955 Adjust to Autoconf 2.60 and today's gnulib.
3956 * bootstrap (gnulib_modules): Add stdint.
3957 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3958 no longer copies it.
3959 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3960 since stdint needs the former and wcwidth (which is now required
3961 by mbswidth) needs the latter.
3962 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3963 work around a compatibility glitch between gettext 0.14.6 and
3964 Autoconf 2.60.
3965 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3966 Do not check for uintptr_t, since new stdint module does the right
3967 thing.
3968 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3969 Add stdint.h, stdint_.h, wcwidth.h.
3970 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3971 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3972 stdint.m4, wchar_t.m4, wcwidth.m4.
3973 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3974 usual order for ../lib/*.h files.
3975 (file_name_split): Use last_component, not base_name, to adjust
3976 to gnulib changes.
3977 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3978 for ../lib/*.h files.
3979 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3980 Define unconditionally, since we now assume the stdint module.
3981 * src/scan-skel.l: Include <dirname.h>.
3982 (BASE_QPUTS): Use last_component, not base_name.
3983 * src/system.h: Include <unlocked-io.h> in the usual order
3984 for ../lib/*.h files. Include <stdint.h> unconditionally,
3985 since we now use the stdint module.
3986 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3987 HAVE_UINTPTR_T, since we now use the stdint module.
3988 (base_name): Remove decl, since files now include <dirname.h>
3989 to get the decl.
3990
cd48d21d
AD
39912006-07-08 Akim Demaille <akim@lrde.epita.fr>
3992
3993 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3994 New, default to 1.
3995 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3996 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3997 default.
3998 * tests/calc.at: Adjust.
3999
8ec0a172
AD
40002006-07-08 Akim Demaille <akim@lrde.epita.fr>
4001
b8445a15 4002 * data/c.m4 (b4_basename): New.
8ec0a172
AD
4003 (b4_syncline): Also output the location of its invocation (from
4004 the skeleton).
4005 (b4_user_action, b4_define_user_action, b4_user_actions)
4006 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
4007 (b4_user_stype): New.
4008 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
4009
4a678af8
JD
40102006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4011
4012 In the grammar file, the first column is 1 not 0 on the first line as
4013 on every other line.
4014 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
4015 * tests/input.at (Torturing the Scanner): Update output.
4016
4017 * src/scan-gram.l (scanner_cursor): Declare it static.
4018
dd60572a
JD
40192006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4020
4021 In warnings, say "previous declaration" rather than "first
4022 declaration".
4023 * src/symtab.c (redeclaration): Do that here.
4024 * src/reader.c (record_merge_function_type): In the case of a result
4025 type clash, report the previous declaration rather than the very first
4026 one in the grammar file.
4027 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4028 declared later): Add a third declaration to check this behavior.
4029 * tests/input.at (Incompatible Aliases): Update output.
4030
2073e1b6
AD
40312006-06-27 Akim Demaille <akim@epita.fr>
4032
4033 * doc/Doxyfile.in: New.
4034 * doc/Makefile.am: Use it.
4035 * src/lalr.h, src/symtab.h: Initial doxygenation.
4036
8ee5b538
JD
40372006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4038
4039 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
4040 declared after the %merge. This continues the effort of the previous
4041 patch.
8ee5b538
JD
4042 * src/reader.c (get_merge_function): Don't set the merger type yet.
4043 (record_merge_function_type): New function for setting the merger type
4044 and checking for clashes.
4045 (grammar_current_rule_merge_set): Set the location of the %merge for
4046 the current rule.
4047 (packgram): Invoke record_merge_function_type for each rule now that
4048 all symbol type declarations have been parsed.
4049 * src/reader.h (merger_list.type_declaration_location): New member
4050 storing the location of the first %merge from which the type for this
4051 merging function was derived.
4052 * src/symlist.h (symbol_list.merger_declaration_location): New member
4053 storing the location of a rule's %merge, if any.
4054 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4055 declared later): New test to catch the error fixed by the above patch.
4056
ffa4ba3a
JD
40572006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4058
4059 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
4060 declarations appear after the rules. Discussed at
4061 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4062 and
4063 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4064 Don't mistake the type of $$ in a midrule to be that of its parent
4065 rule's $$.
ffa4ba3a
JD
4066 * src/reader.c (grammar_current_rule_end): Don't invoke
4067 grammar_rule_check yet since not all symbol declarations may have been
4068 parsed yet.
4069 (grammar_midrule_action): Likewise.
4070 Don't record whether the midrule's $$ has been used yet since actions
4071 haven't been translated yet.
4072 Record the midrule's parent rule and its RHS index within the parent
4073 rule.
4074 (grammar_current_rule_action_append): Don't translate the action yet
4075 since not all symbol declarations may have been parsed yet and, thus,
4076 warnings about types for $$, $n, @$, and @n can't be reported yet.
4077 (packgram): Translate the action and invoke grammar_rule_check now that
4078 all symbol declarations have been parsed.
4079 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4080 after parsing the entire grammar file, the symbol list here in the case
4081 of a midrule is actually the midrule's empty RHS, so reference its
4082 parent rule's RHS where necessary.
4083 On the other hand, now that you can already know it's a midrule, you
4084 aren't forced to think $$ has the same type as its parent rule's $$.
4085 (handle_action_at): In the case of a midrule, reference the parent rule
4086 where necessary.
4087 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4088 members.
4089 (symbol_list_length): Now that this is invoked after all rules have
4090 been parsed, a NULL symbol (rather than a NULL symbol list node)
4091 terminates a rule. symbol_list_print already does this correctly.
4092 * src/symlist.h (symbol_list.midrule_parent_rule,
4093 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4094 remember their relationships with their parents.
4095 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4096 fixed by the above patch.
4097 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4098 implementing...
4099 (Unused values): ... this old test case and...
4100 (Unused values before symbol declarations): ... this new test case.
4101 This one is the same as `Unused values' except that all symbol
4102 declarations appear after the rules in order to catch the rest of the
4103 errors fixed by the above patch.
4104
e256e17f
JD
41052006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4106
300a1930
JD
4107 More cleanup.
4108 * src/reader.c (current_rule): Declare it static since it's no longer
4109 used outside this file.
4110 (grammar_current_rule_action_append): Remove redundant arguments from
4111 translate_rule_action invocation.
4112 * src/reader.h (current_rule): Remove this unused extern.
4113 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4114 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 4115
381ecb06
JD
41162006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4117
4118 Clean up yesterday's patch.
4119 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4120 to...
4121 * src/reader.c (grammar_current_rule_action_append): ... here for
4122 consistency with grammar_current_rule_symbol_append.
4123 * tests/regression.at (Braced code in declaration in rules section):
4124 Make yyerror and yylex static as usual.
4125
4210cd0b
JD
41262006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4127
4128 Fix bug that mistakes braced code in a declaration in the rules section
4129 to be a rule action. Mentioned at
4130 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4131 * src/scan-gram.l: Move midrule action detection from the start of the
4132 scanning of any braced code to...
4133 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4134 action. For readability, use $2 and @2 rather than the equivalent
4135 global variables.
4136 * tests/regression.at (Braced code in declaration in rules section):
4137 New test to catch the error fixed by the above patch.
4138
4139 Work on code readability some.
4140 * src/scan-code.l (current_rule): Get rid of this misleading and
4141 redundant declaration: it's actually extern'ed in reader.h.
4142 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4143 translate_action): Add a rule argument and use it instead of the global
4144 current_rule.
4145 (translate_rule_action): This already receives current_rule through an
4146 argument, so pass it on to translate_action instead of assigning
4147 current_rule to current_rule.
4148 (translate_symbol_action, translate_code): Pass rule = NULL to
4149 translate_action.
4150
34f98f46
JD
41512006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4152
4153 Rename %before-definitions to %start-header and %after-definitions to
4154 %end-header. Don't use these declarations to separate pre-prologue
4155 blocks from post-prologue blocks. Add new order-independent
4156 declarations %before-header and %after-header as alternatives to the
4157 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4158 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4159 * NEWS (2.3+): Update for these changes.
4160 * data/glr.c (b4_before_definitions): Update to...
4161 (b4_start_header): ... this.
4162 (b4_after_definitions): Update to...
4163 (b4_end_header): ... this.
4164 * data/glr.cc: Likewise.
4165 * data/lalr1.cc: Likewise.
4166 * data/yacc.c: Likewise.
4167 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4168 prologue blocks with %*-header declarations.
4169 (Calc++ Parser): Likewise.
91661ebb 4170 (Decl Summary): Update names.
148d66d8 4171 (Table of Symbols): Update description.
34f98f46
JD
4172 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4173 (PERCENT_END_HEADER): ... this.
4174 (PERCENT_BEFORE_DEFINITIONS): Update to...
4175 (PERCENT_START_HEADER): ... this.
4176 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4177 (declaration): Update token names and m4 macro names.
4178 When parsing %end-header and %start-header, invoke translate_code
4179 before muscle_code_grow, and no longer set global booleans to remember
4180 whether these declarations have been seen.
4181 Parse new %after-header and %before-header.
4182 * src/reader.c (before_definitions, after_definitions): Remove.
4183 (prologue_augment): Accept a new bool argument to specify whether to
4184 augment the pre-prologue or post-prologue.
4185 * src/reader.h (before_definitions, after_definitions): Remove these
4186 extern's.
4187 (prologue_augment): Add new bool argument.
4188 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4189 (PERCENT_END_HEADER): ... this.
4190 (PERCENT_BEFORE_DEFINITIONS): Update to...
4191 (PERCENT_START_HEADER): ... this.
4192 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4193 * tests/actions.at (Printers and Destructors): Update names.
4194
31b2b07e
JD
41952006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4196
4197 Add comparison operators for C++ location classes. Discussed at
4198 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4199 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4200 declaration indicating whether filename_type has an operator==. If
4201 filename_type is `std::string', it defaults to `1', `0' otherwise.
4202 * data/location.cc: Iff b4_define_location_comparison is `1', add
4203 operator== and operator!= for class position and for class location.
4204
4205 Some minor fixes.
4206 * src/scan-action.l: Remove unused file.
4207 * src/symtab.c (symbol_printer_set): Use printer_location not
4208 destructor_location.
4209 * src/symtab.h (struct symbol): Replace incorrect source comment for
4210 printer members.
4211 * tests/input.at (Incompatible Aliases): Update output with correct
4212 printer location.
4213
9bc0dd67
JD
42142006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4215
4216 Don't put the pre-prologue in the header file. For the yacc.c code
4217 file and the glr.c header and code files, move the pre-prologue before
4218 the token definitions. Add new %before-definitions and
4219 %after-definitions to declare code that will go in both the header file
4220 and code file. Discussed at
4221 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4222 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4223 and
4224 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4225 * NEWS (2.3+): Describe these changes.
4226 * data/glr.c (b4_pre_prologue): Move from within to before...
4227 (b4_shared_declarations): ... this.
4228 Add new b4_before_definitions before b4_token_enums.
4229 Add new b4_after_definitions at the end.
4230 * data/glr.cc (b4_pre_prologue): Replace with...
4231 (b4_before_definitions): ... this in the header file.
4232 (b4_after_definitions): New near the end of the header file.
4233 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4234 code file right before including the header file.
4235 (b4_before_definitions): New in the previous position of
4236 b4_pre_prologue in the header file.
4237 (b4_after_definitions): New near the end of the header file.
4238 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4239 (b4_token_enums_defines): In the code file, move to right before
4240 YYSTYPE for consistency with the header file.
4241 (b4_before_definitions): New right before b4_token_enums_defines in
4242 both the header and code file.
4243 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4244 header and code file.
4245 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4246 of prologues for %union dependencies.
91661ebb
JD
4247 (Decl Summary): In %defines description, mention the effect of
4248 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
4249 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4250 than in the pre-prologue so that make check succeeds.
148d66d8 4251 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
4252 %after-definitions.
4253 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4254 %before-definitions.
4255 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4256 (declaration): Parse those declarations and append to
4257 b4_before_definitions and b4_after_definitions, respectively.
4258 * src/reader.c (before_definitions, after_definitions): New bools to
4259 track whether those declarations have been seen.
4260 (prologue_augment): Add to the post-prologue if %union,
4261 %before-definitions, or %after-definitions has been seen.
4262 * src/reader.h (before_definitions, after_definitions): New extern's.
4263 * src/scan-gram.l: Scan the new declarations.
4264 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4265 prologue block in a %before-definitions or a %after-definitions based
4266 on whether the %union is declared.
4267 * tests/regression.at (Early token definitions with --yacc, Early token
4268 definitions without --yacc): Move tests for token definitions into the
4269 post-prologue since token names are no longer defined in the
4270 pre-prologue.
4271
203b9274
AD
42722006-06-20 Akim Demaille <akim@epita.fr>
4273
4274 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4275 (symbol_get): Use it.
4276 * src/parse-gram.y: Use it.
4277
a7ee59cf
JD
42782006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4279
4280 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4281 build succeeds when configured with --enable-gcc-warnings.
4282
5a2baae7
PE
42832006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4284
33ad1a9c
PE
4285 * src/parse-gram.y (char_name): New function.
4286 (CHAR, STRING, string_content): For %printer, properly escape.
4287 (ID): Prefer fputs to fprintf.
4288 (id): Reindent to be consistent with other rules.
4289 Properly quote char.
4290
5a2baae7
PE
4291 The Translation Project changed its way of publishing translations
4292 to maintainers. I haven't received any responses to my request
4293 for supporting the old way, or for documenting the new way. I
4294 have modified 'bootstrap' to use screen scraping
4295 (in this case, HTML scraping). This is unreliable and inelegant,
4296 but I don't see any better way. Yuck.
4297 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4298 (get_translations): New function, which uses HTML scraping to
4299 deduce locations of latest translations.
4300 Use this function to grab both bison and bison-runtime .po files.
4301 Don't bother priming the pump for the runtime-po domain any more,
4302 as it's now translated better than bison is.
4303
58d7a1a1
AD
43042006-06-19 Akim Demaille <akim@epita.fr>
4305
4306 * src/scan-gram.l: No longer "parse" things after `%union' until
4307 `{'. Rather, return a single "%union" token.
4308 No longer make symbols: return strings, and leave the conversion
4309 to symbols to the parser.
4310 (SC_PRE_CODE, token_type): Remove.
4311 * src/parse-gram.y (%union): New field `character'.
4312 Sort tokens.
4313 (CHAR): New token.
4314 (ID, ID_COLON): Now that the scanner no longer makes them
4315 identifiers, adjust all uses to invoke symbol_get.
4316 (id_colon): New, wraps the conversion from string to symbol.
4317 (%union): Accept a possible union_name.
4318 (symbol): Now can be a char.
4319 * data/c.m4 (b4_union_name): Leave a default value.
4320 * data/glr.c, data/yacc.c: Use it.
4321
b931235e
JD
43222006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4323
4324 For associating token numbers with token names for "yacc.c", don't use
4325 #define statements unless `--yacc' is specified; always use enum
4326 yytokentype. Most important discussions start at:
4327 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4328 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4329 and
4330 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4331 * NEWS (2.3+): Mention.
4332 * data/c.m4 (b4_yacc_if): New.
4333 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4334 token #define's.
4335 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4336 on token name definitions.
4337 * src/getargs.c (usage): Capitalize `Yacc' in English.
4338 * src/output.c (prepare): Define b4_yacc_flag.
4339 * tests/regression.at (Early token definitions): Test that tokens names
4340 are defined before the pre-prologue not just before the post-prologue.
4341 Remove this test case and copy to...
4342 (Early token definitions with --yacc): ... this to test #define's.
4343 (Early token definitions without --yacc): ... and this to test enums.
4344
9e6e7ed2
PE
43452006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4346
4347 * NEWS: Reword the post-2.3 change to not be so optimistic about
4348 removing the old "look-ahead" spelling.
4349 Update previous look-ahead/lookahead change reports.
4350 * REFERENCES: look-ahead -> lookahead (since that's
4351 what he actually wrote).
4352 * doc/refcard.tex: look ahead -> lookahead,
4353 look-ahead -> lookahead
4354
742e4900
JD
43552006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4356
4357 For consistency, use `lookahead' instead of `look-ahead' or
4358 `look_ahead'. Discussed starting at
4359 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4360 and then at
4361 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4362 * NEWS: For the next release, note the change to `--report'.
4363 * TODO, doc/bison.1: Update English.
4364 * doc/bison.texinfo: Update English.
4365 (Understanding Your Parser, Bison Options): Document as
4366 `--report=lookahead' rather than `--report=look-ahead'.
4367 * src/conflicts.c: Update English in comments.
4368 (lookahead_set): Rename from look_ahead_set.
4369 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4370 (resolve_sr_conflict): Rename local look_ahead_tokens to
4371 lookahead_tokens, and update other uses.
4372 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4373 count_rr_conflicts, conflicts_free): Update uses.
4374 * src/getargs.c (report_args): Move "lookahead" before alternate
4375 spellings.
4376 (report_types): Update uses.
4377 (usage): For `--report' usage description, state `lookahead' spelling
4378 rather than `look-ahead'.
4379 * src/getargs.h (report.report_lookahead_tokens): Rename from
4380 report_look_ahead_tokens.
4381 * src/lalr.c: Update English in comments.
4382 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4383 (state_lookahead_tokens_count): Rename from
4384 state_look_ahead_tokens_count.
4385 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4386 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4387 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4388 Update other uses.
4389 Update English in output.
4390 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4391 * src/print.c: Update English in comments.
4392 (lookahead_set): Rename from look_ahead_set.
4393 (print_reduction): Rename argument lookahead_token from
4394 look_ahead_token.
4395 (print_core, state_default_rule, print_reductions, print_results):
4396 Update uses.
4397 * src/print_graph.c: Update English in comments.
4398 (print_core): Update uses.
4399 * src/state.c: Update English in comments.
4400 (reductions_new): Update uses.
4401 (state_rule_lookahead_tokens_print): Rename from
4402 state_rule_look_ahead_tokens_print, and update other uses.
4403 * src/state.h: Update English in comments.
4404 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4405 (state_rule_lookahead_tokens_print): Rename from
4406 state_rule_look_ahead_tokens_print.
4407 * src/tables.c: Update English in comments.
4408 (conflict_row, action_row): Update uses.
4409 * tests/glr-regression.at
4410 (Incorrect lookahead during deterministic GLR,
4411 Incorrect lookahead during nondeterministic GLR): Rename
4412 print_look_ahead to print_lookahead.
4413 * tests/torture.at: Update English in comments.
4414 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4415 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4416 (Many lookahead tokens): Update uses.
4417 * data/glr.c: Update English in comments.
4418 * lalr1.cc: Likewise.
4419 * yacc.c: Likewise.
4420 * src/conflicts.h: Likewise.
4421 * src/lalr.h: Likewise.
4422 * src/main.c: Likewise.
4423 * src/output.c: Likewise.
4424 * src/parse-gram.c: Likewise.
4425 * src/tables.h: Likewise.
4426 * tests/calc.at: Likewise.
4427
3c40d0b5
JD
44282006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4429
4430 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4431
5d278082
PE
44322006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4433
4434 * TODO: Add request from Nelson H. F. Beebe to be able to install
4435 Bison without installing the yacc script.
4436
9e668899
JD
44372006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4438
4439 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4440 and yytext if they're already #define'd.
4441 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4442 * src/scan-code-c.c: ... here.
4443 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4444 <config.h>.
4445
0c8e079f
JD
44462006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4447
4448 Get Bison to build again when configured with --enable-gcc-warnings.
4449 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4450 missing #include's.
4451 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4452 loc argument as it shadows a global.
4453 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4454 invocation.
4455
4456 * src/.cvsignore: Add scan-code.c.
4457
2346344a
AD
44582006-06-07 Akim Demaille <akim@epita.fr>
4459
4460 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4461 to...
4462 * src/scan-code.l: here.
4463 * tests/input.at (Torturing the Scanner): Fix another location
4464 error.
4465
4862bdfd
AD
44662006-06-07 Akim Demaille <akim@epita.fr>
4467
4468 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4469
e9071366
AD
44702006-06-06 Akim Demaille <akim@epita.fr>
4471
4472 Extract the parsing of user actions from the grammar scanner.
4473 As a consequence, the relation between the grammar scanner and
4474 parser is much simpler. We can also split "composite tokens" back
4475 into simple tokens.
4476 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4477 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4478 rename as...
4479 * src/location.h, src/location.c (add_column_width)
4480 (location_compute): these.
4481 Fix the column count: the initial column is 0.
4482 (location_print): Be robust to ending column being 0.
4483 * src/location.h (boundary_set): New.
4484 * src/main.c: Adjust to scanner_free being renamed as
4485 gram_scanner_free.
4486 * src/output.c: Include scan-code.h.
4487 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4488 Use boundary_set.
4489 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4490 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4491 which is now, again, a separate token.
4492 Adjust all dependencies.
4493 Whereever actions with $ and @ are used, use translate_code.
4494 (action): Remove this nonterminal which is now useless.
4495 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4496 (grammar_current_rule_action_append): Use translate_code.
4497 (packgram): Bound check ruleno, itemno, and rule_length.
4498 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4499 (last_string, last_braced_code_loc, max_left_semantic_context)
4500 (scanner_initialize, scanner_free, scanner_last_string_free)
4501 (gram_out, gram_lineno, YY_DECL_): Move to...
4502 * src/scan-gram.h: this new file.
4503 (YY_DECL): Rename as...
4504 (GRAM_DECL): this.
4505 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4506 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4507 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4508 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4509 Move these declarations, and...
4510 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4511 these to...
4512 * src/flex-scanner.h: this new file.
4513 * src/scan-gram.l (rule_length, rule_length_overflow)
4514 (increment_rule_length): Remove.
4515 (last_braced_code_loc): Rename as...
4516 (gram_last_braced_code_loc): this.
4517 Adjust to the changes of the parser.
4518 Move all the handling of $ and @ into...
4519 * src/scan-code.l: here.
4520 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4521 (handle_action_dollar, handle_action_at): Move to...
4522 * src/scan-code.l: here.
4523 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4524 scan-code.h, scan-code-c.c, scan-gram.h.
4525 (EXTRA_bison_SOURCES): Add scan-code.l.
4526 (BUILT_SOURCES): Add scan-code.c.
4527 (yacc): Be robust to white spaces.
4528
4529 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4530 * tests/regression.at: Adjust the column numbers.
4531 * tests/regression.at: Adjust the error message.
7891a7c4 4532
184e42f0
JD
45332006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4534
4535 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4536 Use Akim's wording from
4537 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4538
7891a7c4
JD
45392006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4540
4541 Between Bison releases, manually append `+' to the previous Bison
4542 release number, and use that as a signal to automatically print the
4543 ChangeLog's CVS Id keyword from --version. Discussed starting at
4544 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4545 * ChangeLog: Add Id header.
4546 * configure.ac (AC_INIT): Append `+' to `2.3'.
4547 * src/.cvsignore: Add revision.c.
4548 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4549 (BUILT_SOURCES): Add revision.c.
4550 (revision.c): New target rule. This file defines a new global variable
4551 named revision. It initializes it with either the Id from ChangeLog
4552 or, if VERSION doesn't contain `+', with the empty string.
4553 * src/getargs.c (version): Print the value of revision.
4554 * src/revision.h: Extern revision.
4555
4ad3ed84
PE
45562006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4557
4558 * NEWS: Version 2.3.
4559 * configure.ac (AC_INIT): Likewise.
4560
02103984
PE
45612006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4562
4563 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4564 with no arguments, not as an object-like macro. This is for
4565 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4566 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4567 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4568 Document this.
4569
2c08afa5
JD
45702006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4571
4572 * src/getargs.c (usage): Back out yesterday's modification of the
4573 --help output so that we don't have to wait for translation before
4574 releasing 2.3.
4575
6077da58
PE
45762006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4577
4578 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4579 Problem reported by Akim Demaille.
4580
2a26b6c2
JD
45812006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4582
4583 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4584
aefef0d6
PE
45852006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4586
4587 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4588 generated source code. Problem reported by Frans Englich in
4589 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4590
fcd8e201
PE
45912006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4592
4593 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4594 shell, not within 'make', so that 'make' by an ordinary builder
4595 (using GNU make) does not worry about configuring gzip. This also
4596 works around a bug reported independently by Keith Thompson and by
4597 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4598 stderr rather than stdout, messing up the build logs.
4599
7b5cdcbd
JD
46002006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4601
4602 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4603 to make sure that YYID will never be unused. This fixes a 'make
4604 maintainer-check' failure caused by the recent changes to the 'Trivial
4605 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4606 not used.
4607 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4608
5ad0a449
JD
46092006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4610
4611 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4612 state before an empty RHS is always resolved here. Only the location
4613 of that state is guaranteed to be resolved, and that's enough. This
4614 fixes the remaining bug reported by Derek M. Jones in
4615 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4616 * tests/glr-regression.at (Uninitialized location when reporting
4617 ambiguity): Test the above case.
4618 Also, the embedded comments in this test case claim it checks the case
4619 of an empty RHS that has inherited the initial location. However, the
4620 corresponding LHS was already resolved, so yyresolveLocations didn't
4621 actually have reason to modify it. Fix this by forcing
4622 nondeterministic operation at the beginning of the parse.
4623
50cce58e
PE
46242006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4625
4626 * data/c.m4 (b4_yy_symbol_print_generate):
4627 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4628 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4629 of the bugs reported today by Derek M Jones in
4630 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4631 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4632 defined to be a type name without parens or brackets.
4633 (Location Type): Similarly for YYLTYPE.
4634 * tests/regression.at (Trivial grammars): Put in a test for this
4635 bug that will be caught by 'make maintainer-check' (though not,
4636 alas, by 'make check' unless your compiler is picky).
4637
ab8d9dc5
PE
46382006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4639
0d2c8934 4640 * NEWS: Version 2.2.
ab8d9dc5
PE
4641 * configure.ac (AC_INIT): Likewise.
4642
9138c575
JD
46432006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4644
4645 * data/glr.c (yyreportTree): Make room in yystates for the state
4646 preceding the RHS. This fixes the segmentation fault reported by Derek
4647 M. Jones in
4648 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4649 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4650 to the user. Reported for yyreportTree by Derek M. Jones later in the
4651 same thread.
4652 * THANKS: Add Derek M. Jones.
4653 Update my email address.
4654 Fix typo in Steve Murphy's name.
4655
276f48df
PE
46562006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4657
d6645148
PE
4658 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4659 checking against YYLAST that caused the parser to miss a potential
4660 alternative in its diagnostic.
4661 Problem reported by Maria Jose Moron Fernandez in
4662 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4663 * data/lalr1.cc (yysyntax_error_): Likewise.
4664 * data/yacc.c (yysyntax_error): Likewise.
4665 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4666 tokens, in case we run into an older C compiler.
4667 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4668 Use them to check for the off-by-one error fixed above.
4669
276f48df
PE
4670 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4671 YYSIZE_T, not size_t.
4672 * tests/regression.at (Trivial grammars): New test, to catch
4673 the error fixed by the above patch.
4674
cd8b5791
AD
46752006-05-14 Akim Demaille <akim@lrde.epita.fr>
4676
4677 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4678 scheme.
4679 Reported by Steve Murphy.
4680
34376418
AD
46812006-05-14 Akim Demaille <akim@lrde.epita.fr>
4682
4683 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4684 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4685
327afc7c
AD
46862006-05-14 Akim Demaille <akim@lrde.epita.fr>
4687
4688 Implement --trace=m4.
4689 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4690 * src/output.c (output_skeleton): When set, pass -dV to m4.
4691
4692 Factor the handling of flags in m4.
4693 * src/output.c (prepare): Rename the muscle names debug, defines,
4694 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4695 * data/c.m4: Adjust.
4696 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4697 Use b4_define_flag_if to define other b4_FLAG_if macros.
4698 (b4_location_if): As a consequence, rename as...
4699 (b4_locations_if): this, for consistency.
4700 Adjust all the skeletons.
4701
ba9ecd19
AD
47022006-05-14 Akim Demaille <akim@lrde.epita.fr>
4703
4704 * etc/bench.pm: Shorten bench names.
4705
4e83ea15
AD
47062006-05-14 Akim Demaille <akim@lrde.epita.fr>
4707
4708 * src/output.h, src/output.c (error_verbose): Move to...
4709 * src/getargs.h, src/getargs.c: here.
4710 Sort the flags.
4711 Adjust dependencies.
4712
6e93d810
PE
47132006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4714
4715 * data/c.m4 (b4_copyright): Put the special exception for Bison
4716 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
4717 uses changed. Suggested by Akim Demaille. Also, wrap the
4718 copyright notice, in case it is longer than 80 columns. Replace
4719 comma by newline after title.
6e93d810 4720
eaea13f5
PE
47212006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4722
4723 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4724 incompatibility, not a bug. Mention that it wasn't fixed as of
4725 flex 2.5.33.
4726
3cf084ec
AD
47272006-05-11 Akim Demaille <akim@lrde.epita.fr>
4728
4729 * examples/extexi: Enforce the precedence of concatenation over
4730 >>.
0a9f1c7d 4731 Reported by Tommy Nordgren.
3cf084ec 4732
32c96bd7
AD
47332006-05-11 Akim Demaille <akim@lrde.epita.fr>
4734
4735 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4736 with the member "token".
f94705b2 4737 Reported by Martin Nylin.
32c96bd7 4738
eaea13f5
PE
47392006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4740
4741 * data/glr.c: Switch to Bison 2.2 special-exception language in
4742 the copyright notice. Use more-regular format for titles and
4743 copyright notices.
4744 * data/glr.cc: Likewise.
4745 * data/location.cc: Likewise.
4746 * data/yacc.cc: Likewise.
4747 * doc/bison.texinfo (Conditions): Document this.
4748 * NEWS: likewise. Upgrade version to 2.2.
4749
6e2d1146
AD
47502006-04-27 Akim Demaille <akim@lrde.epita.fr>
4751
4752 * data/glr.cc: Remove dead code.
4753
47671055
PE
47542006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4755
4756 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4757 that variable and the line breaks the bootstrap. Problem reported
4758 by Juan M. Guerrero.
4759
ed2e6384
AD
47602006-04-24 Akim Demaille <akim@lrde.epita.fr>
4761
4762 * doc/bison.texinfo (Multiple start-symbols): New.
4763
3cedc2dc
AD
47642006-04-24 Akim Demaille <akim@lrde.epita.fr>
4765
4766 * etc/README, etc/bench.pl: New.
4767
b2ddc3f3
AD
47682006-04-03 Akim Demaille <akim@lrde.epita.fr>
4769
4770 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4771 rule.
4772 Reported by Mickael Labau.
4773 * tests/input.at (Torturing the Scanner): Test it.
4774
91e3ac9a
PE
47752006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4776
4777 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4778 Problem reported by Bob Rossi.
4779
47802006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4781
4782 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4783 and didn't really work.
4784 For the index, use @ifnotinfo, not @iftex.
4785 Minor cleanups of spacing and terminology.
4786
5cf61e93
AD
47872006-03-12 Akim Demaille <akim@lrde.epita.fr>
4788
4789 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4790 of AT_NAME_PREFIX when %name-prefix is not used.
4791
aa08666d
AD
47922006-03-12 Akim Demaille <akim@lrde.epita.fr>
4793
4794 Apply --prefix to C++ skeletons too: they change the namespace.
4795 The test suite already exercize these cases.
4796 * data/c++.m4 (b4_namespace): New.
4797 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4798 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4799 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4800 * doc/bison.texinfo: Document it.
4801 (Option Cross Key): Use @multitable in all formats. It looks
4802 nicer, even in TeX outputs.
4803 (Rules): Use the same code whatever the output type is.
4804 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4805 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4806 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 4807
45567173
AD
48082006-03-10 Akim Demaille <akim@lrde.epita.fr>
4809
4810 * TODO: Remove dead items.
4811
e9d8f881 48122006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
4813
4814 * doc/FAQ: Remove, merged into...
4815 * doc/bison.texinfo (FAQ): this.
4816 * doc/Makefile.am (EXTRA_DIST): Adjust.
4817
c095d689
AD
48182006-03-10 Akim Demaille <akim@lrde.epita.fr>
4819
4820 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4821 even if empty.
4822 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4823 * doc/bison.texinfo (Calc++ Scanner): Use it.
4824
6e0f8287
PE
48252006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4826
4827 Fix two nits reported by twlevo, plus one more that I discovered.
4828
4829 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4830 this is the usual Bison style.
4831 * src/location.h (location_print): Likewise.
4832
4833 * src/reader.h (token_name): Likewise.
4834
d6b771c3
PE
48352006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4836
4837 Fix some nits reported by twlevo.
4838 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4839 and "POSIX". Use more-modern syntax for URLs. Mention C++
4840 and ask for Java. Don't hardwire OS version numbers. Add
4841 copyright notice.
4842 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4843 * src/conflicts.c (solved_conflicts_obstack): Now static.
4844
1e137b71
JD
48452006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4846
4847 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4848 page. Say "you can use it" not "you may use it" as on the web page;
4849 we're describing capabilities not granting permission.
4850
73f2e47e
PE
48512006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4852
6d05403d
PE
4853 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4854 shadowing warnings. Use usual patter for iterating through RHS.
4855 * tests/glr-regression.at
4856 (Uninitialized location when reporting ambiguity):
4857 Modify yylex so that it uses its argument, rather than trying
4858 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4859 const char -> char const.
4860
73f2e47e
PE
4861 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4862 Don't use tabs inside commands; it messes up 'ps'.
4863 Problem reported by twlevo.
4864
8710fc41
JD
48652006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4866
4867 * tests/glr-regression.at (Uninitialized location when reporting
4868 ambiguity): New test case.
4869 * data/glr.c (yyresolveLocations): New function, which uses
4870 YYLLOC_DEFAULT.
4871 (yyresolveValue): Invoke yyresolveLocations before reporting an
4872 ambiguity.
4873 * doc/bison.texinfo (Default Action for Locations): Note
4874 YYLLOC_DEFAULT's usage for ambiguity locations.
4875 (GLR Semantic Actions): Cross-reference those notes.
4876
ae952af2
JD
48772006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4878
4879 * tests/glr-regression.at (Leaked semantic values when reporting
4880 ambiguity): Remove unnecessary union and type declarations.
4881 (Leaked lookahead after nondeterministic parse syntax error): New test
4882 case.
4883 * data/glr.c (yyparse): Check for zero stacks remaining before
4884 attempting to shift the lookahead so that you don't lose it.
4885
35ee866a
JD
48862006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4887
4888 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4889 * tests/glr-regression.at (Leaked semantic values when reporting
4890 ambiguity): New test case.
4891 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4892 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4893 now unnecessary yystackp parameter.
4894 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4895 destructors can be called.
4896
4897 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4898 in existing testcases.
4899
520181ab
JD
49002006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4901
4902 Don't leak semantic values for parent RHS when a user action cuts the
4903 parser, and clean up related code a bit.
4904 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
4905 cuts parse): Rename to...
4906 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
4907 for leaked parent RHS values.
4908 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4909 between an unresolved state (non-empty chain of semantic options) and
4910 an incomplete one (signaled by an empty chain).
ae952af2 4911 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
4912 successfully or unsuccessfully resolved yyGLRState to...
4913 (yyresolveValue): ... here so that yyresolveValue always leaves a
4914 yyGLRState with consistent data and thus is easier to understand.
4915 Remove the yyvalp and yylocp parameters since they are always just
4916 taken from the yys parameter. When reporting a discarded merged value
4917 in debugging output, note that it is incompletely merged. Document the
4918 interface.
4919 (yyresolveAction): If resolving any of the RHS states fails, destroy
4920 them all rather than leaking them. Thus, as long as user actions are
4921 written to clean up the RHS correctly, yyresolveAction always cleans up
4922 the RHS of a semantic option. Document the interface.
4923
18d9185c
PE
49242006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4925
4926 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4927 led to a segmentation fault in GNU Pascal. Problem reported
4928 by Waldek Hebisch.
4929
841a7737
JD
49302006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4931
4932 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4933 mid-rule action inside a nonterminal symbol in order to declare a
4934 destructor for its semantic value.
4935
fc3f467f
PE
49362006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4937
4938 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4939 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4940 __cplusplus && ! defined _STDLIB_H && !
4941 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4942 defined free))]: Include <stdlib.h> rather than rolling our own
4943 declarations of malloc and free, to avoid problems with
4944 incompatible declarations (using 'throw') C++'s stdlib.h. This
4945 should fix Debian bug 340012
4946 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4947 reported by Guillaume Melquiond.
4948
a3af26dd
PE
49492006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4950
4d7bc38c
PE
4951 * NEWS: Clarify symbols versus types in unused-value warnings.
4952
a3af26dd
PE
4953 * configure.ac (AC_INIT): Bump version number.
4954
4e26c69e
PE
49552006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4956
4957 * NEWS: Version 2.1a.
4958 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4959 since C99 requires this.
4960
498e897c
PE
49612006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4962
4963 * m4/c-working.m4: New file.
4964 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4965
57bb17ca
PE
49662006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4967
4968 * Makefile.maint: Merge from coreutils.
4969
0be105dc
PE
49702006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4971
4972 More portability fixes for problems summarized by Nelson H. F. Beebe.
4973
4974 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4975 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4976 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4977 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4978 messes up because C++ code is compiled in 32-bit mode but linked
4979 in 64-bit mode.
4980
6fc0c024
PE
49812006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4982
4983 More portability fixes for problems summarized by Nelson H. F. Beebe.
4984
7870f699
PE
4985 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4986 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4987
6fc0c024
PE
4988 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4989 nodist_PROGRAMS, since we don't need to actually compile the
4990 example if we're just doing a plain 'make'. This avoids bothering
4991 the installer unnecessarily about problems due to weird C++
4992 compilers.
4993
fe6c2fde
PE
49942006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4995
4996 More portability fixes for problems summarized by Nelson H. F. Beebe.
4997
4998 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4999 than #include "...", and compile with -I'.'. The old method was
5000 not portable, according to Posix and the C standard, and it does
5001 not work with Sun C 5.7, where previous #line directives affect
5002 the working directory used in later #include "..." directives.
5003
927b425b
JMG
50042006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5005
5006 Various DJGGP specific issues in /djgpp
5007
d9735e9e
PE
50082006-02-02 Paul Eggert <eggert@cs.ucla.edu>
5009
5010 More portability fixes for problems summarized by Nelson H. F. Beebe.
5011
5012 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
5013 '#include <map>' works and that you can apply ++ to iterators.
5014
5a6755af
PE
50152006-02-01 Paul Eggert <eggert@cs.ucla.edu>
5016
67a0dc4f
PE
5017 Work around portability problems summarized by Nelson H. F. Beebe in
5018 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
5019
8c86f0ef
PE
5020 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5021 that '#include <string>' works.
5022
de35dd59
PE
5023 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
5024 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
5025 "warning: sorry: semantics of inline function static data `const
5026 unsigned char translate_table[262]' are wrong (you'll wind up with
5027 multiple copies)".
5028
67a0dc4f
PE
5029 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
5030 or, xor to not_, and_, or_, and xor_, respectively. This works
5031 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
5032 random system header somewhere that includes the equivalent of
5033 <iso646.h>.
5034
5a6755af
PE
5035 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5036 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 5037 Suite Version 2.0.
5a6755af 5038
3f001415
JD
50392006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5040
5041 During deterministic GLR operation, user actions should be able to
5042 influence the parse by changing yychar. To make this easier to fix and
5043 to make glr.c easier to evolve in general, don't maintain yytoken in
5044 parallel with yychar; just compute yytoken when needed.
5045 * tests/glr-regression.at (Incorrect lookahead during deterministic
5046 GLR): Check that setting yychar in a user action has the intended
5047 effect.
5048 * data/glr.c (yyGLRStack): Remove yytokenp member.
5049 (yyclearin): Don't set *yytokenp.
5050 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5051 yychar rather than *yytokenp to determine the current lookahead.
5052 Compute yytoken locally when needed.
5053 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5054 point to.
5055
5056 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5057 after `--report' documentation.
5058
e2a8c0f5
PE
50592006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5060
5061 * src/parse-gram.y (grammar_declaration): Location of printer
5062 symbol is @1, not list->location. Bug reported by twlevo.
5063 * tests/input.at (Incompatible Aliases): Adjust to above change.
5064
6b702268
PE
50652006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5066
27622431
PE
5067 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5068 all the test at once. This makes the output easier to read in the
5069 normal case.
5070
6b702268
PE
5071 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5072 got from <http://bro-ids.org/download.html>. The bug is that
5073 when two actions appeared in succession, the second one was
5074 scanned before the first one was added to the grammar rule
5075 as a midrule action. Bison then output the incorrect warning
5076 "parse.y:905.17-906.36: warning: unused value: $3".
5077 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5078 associated with a value.
5079 (rhs): Don't invoke grammar_current_rule_action_append.
5080 (action): Invoke it here instead.
5081 * src/reader.c (grammar_midrule_action): Now extern.
5082 (grammar_current_rule_action_append): Don't invoke
5083 grammar_midrule_action; that is now the scanner's job.
5084 * src/reader.h (last_string, last_braced_code_loc):
5085 (grammar_midrule_action): New decls.
5086 * src/scan-gram.l (last_string): Now extern, sigh.
5087 (last_braced_code_loc): New extern variable.
5088 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5089 rule already has an action.
5090 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5091 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5092 Add some tests to check that the above changes fixed the bug.
5093
d40ba6c2
PE
50942006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5095
5096 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5097 All used changed. Check whether the symbol has a destructor,
5098 not whether it is typed.
5099 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5100 that the values are still reported as unused. All line numbers
5101 adjusted.
5102
401aace6
PE
51032006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5104
5105 Work around a bug in bro 0.8, which underparenthesizes its
5106 definition of YYLLOC_DEFAULT.
5107 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5108 their arguments.
5109 * data/lalr1.cc: Likewise.
5110 * data/yacc.cc: Likewise.
5111
06f01bc4
PE
51122006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5113
401aace6
PE
5114 Work around a bug in Pike 7.0, and give the Pike folks a
5115 better way to override the usual int widths.
5116 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5117 user can override the types.
5118 (short): #undef, to work around a bug in Pike 7.0.
5119 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5120 (union yyalloc.yyss): Use yytype_int16 rather than short.
5121 All uses changed.
5122 (yysigned_char): Remove.
5123 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5124 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5125 * tests/regression.at (Web2c Actions): Adjust to above changes.
5126
5127 * src/reader.c (check_and_convert_grammar): New function.
5128 (reader): Close the input file even if something went wrong during
5129 parsing. Minor file descriptor leak reported by twlevo.
5130
06f01bc4
PE
5131 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5132 to pacify gcc -Wswitch-default.
5133 * src/scan-gram.l (adjust_location): Use a default: break; case
5134 to pacify gcc -Wswitch-default.
5135 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5136 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5137 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5138 Move these decls to scan-skel.l, since they don't need to be
5139 visible elsewhere.
5140 * src/scan-skel.l: Accept the above decls.
5141 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5142 is used.
5143
02650b7f
PE
51442006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5145
5146 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5147 since we don't want to insist on a version number at the start
5148 of the changelog every time.
5149 * Makefile.maint: Sync from coreutils a bit better.
5150 (sc_trailing_blank): Renamed from sc_trailing_space.
5151 All uses changed.
5152 (sc_no_if_have_config_h, sc_require_config_h):
5153 (sc_prohibit_assert_without_use): New rules.
5154 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5155 (sc_dd_max_sym_length): Fix leading spaces in rule.
5156 (sc_system_h_headers): Prefix with @.
5157 (sc_useless_cpp_parens, m4-check): Output line numbers.
5158 (changelog-check): Allow version only in head.
5159 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5160 satisfy new Makefile.maint rule.
5161 * data/glr.c: Likewise.
5162 * data/glr.cc: Likewise.
5163 * data/lalr1.cc: Likewise.
5164 * data/yacc.c: Likewise.
5165 * lib/ebitsetv.c: Likewise.
5166 * lib/lbitset.c: Likewise.
5167 * lib/subpipe.c: Likewise.
5168 * lib/timevar.c: Likewise.
5169 * src/system.h: Likewise.
5170 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5171 * djgpp/Makefile.maint: Add copyright notice.
5172 * djgpp/README.in: Likewise.
5173 * djgpp/config.bat: Likewise.
5174 * djgpp/config.site: Likewise.
5175 * djgpp/config_h.sed: Likewise.
5176 * djgpp/djunpack.bat: Likewise.
5177 * djgpp/config.sed: Fix copyright notice to match standard format.
5178 * djgpp/subpipe.h: Likewise.
5179 * lib/bitsetv-print.c: Likewise.
5180 * lib/bitsetv.c: Likewise.
5181 * lib/subpipe.h: Likewise.
5182 * lib/timevar.c: Likewise.
5183 * lib/timevar.h: Likewise.
5184 * djgpp/subpipe.c: Use standard recipe for config.h.
5185 * lib/abitset.c: Likewise.
5186 * lib/bitset.c: Likewise.
5187 * lib/bitset_stats.c: Likewise.
5188 * lib/bitsetv-print.c: Likewise.
5189 * lib/bitsetv.c: Likewise.
5190 * lib/ebitsetv.c: Likewise.
5191 * lib/get-errno.c: Likewise.
5192 * lib/lbitset.c: Likewise.
5193 * lib/subpipe.c: Likewise.
5194 * lib/timevar.c: Likewise.
5195 * lib/vbitset.c: Likewise.
5196 * tests/local.at: Likewise.
5197 * src/scan-gram.l: Don't include verify.h, since system.h does
5198 that for us.
5199 * .x-sc_require_config_h: New file.
5200 * .x-sc_unmarked_diagnostics: New file.
5201
287c78f6
PE
52022006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5203
287c78f6
PE
5204 Be a bit more systematic about using 'abort'.
5205 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5206 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5207 Put 'default: abort ();' before some other case, to satisfy older
5208 pedantic compilers.
5209 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5210 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5211 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5212 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
5213 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5214 (get_decision_str, get_orientation_str, get_node_alignment_str):
5215 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5216 (get_linestyle_str, get_arrowstyle_str): Likewise.
5217 * src/conflicts.c (resolve_sr_conflict):
5218 Use a default case rather than one for the one remaining enum
5219 value, to catch invalid enum values as well.
5220 * src/lalr.c (set_goto_map, map_goto):
5221 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5222 * src/nullable.c (nullable_compute, token_definitions_output):
5223 Likewise.
5224 * src/reader.c (packgram, reader): Likewise.
5225 * src/state.c (transitions_to, state_new, state_reduction_find):
5226 Likewise.
5227 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5228 (symbol_pack): Likewise.
5229 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
5230 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5231 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
5232 * src/system.h: Don't include <assert.h>.
5233 (assert): New macro.
5234
5235 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5236 (Destructor Decl, Parser Function, Pure Calling):
5237 Describe rules for braces inside C code more carefully.
287c78f6 5238
c66dfadd
PE
52392006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5240
c21493b8
PE
5241 Fix some porting glitches found by Nelson H. F. Beebe.
5242 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5243 compilers that don't understand that abort () does not return.
5244 * src/state.c (transitions_to): Likewise.
5245 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5246 that '#include <cstdlib>' works.
5247 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5248 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5249 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5250 for the benefit of some pre-C99 compilers.
5251
b6e3facf
PE
5252 * bootstrap: Undo changes to gnulib files that autoreconf made.
5253
c66dfadd
PE
5254 Minor fixups to get 'make maintainer-check' to work.
5255 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5256 with the new verify.h implementation.
5257 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5258 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5259 * data/yacc.c (YYUSE): Likewise.
5260 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5261 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5262 * src/parse-gram.y (declaration): Don't pass a string constant
5263 to a function that expects char *, since GCC might complain
5264 about the constant value.
5265 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5266 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5267 before #defining them.
5268 * tests/glr-regression.at
5269 (Incorrectly initialized location for empty right-hand side in GLR):
5270 In yyerror, use the msg arg.
5271 (Corrupted semantic options if user action cuts parse):
5272 (Incorrect lookahead during deterministic GLR):
5273 (Incorrect lookahead during nondeterministic GLR):
5274 Don't name a local var 'index'; it shadows string.h's 'index'.
5275
ed94ef2a
AD
52762006-01-19 Akim Demaille <akim@epita.fr>
5277
5278 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5279 location, not just parts of it.
5280
e9ad4aec
PE
52812006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5282
d6ca7905
PE
5283 * NEWS: Document the fact that multiple %unions are now allowed.
5284 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
5285 * TODO: This feature is now implemented, so remove it from
5286 the wishlist.
d6ca7905 5287
ef1b70e0
PE
5288 * Makefile.maint: Merge with coreutils Makefile.maint.
5289 (CVS_LIST): Use build-aux version if available.
5290 (VERSION_REGEXP): New macro.
5291 (syntax-check-rules): Add sc_no_if_have_config_h,
5292 sc_prohibit_assert_without_use, sc_require_config_h,
5293 sc_useless_cpp_parens.
5294 (sc_obsolete_symbols): Check for O_NDELAY.
5295 (sc_dd_max_sym_length): Track coreutils.
5296 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5297 (sc_useless_cpp_parens): New rule.
5298 (news-date-check): Look for version or today's date.
5299 (changelog-check): Don't require version number near head.
5300 (copyright-check): Use current year instead of hardwiring 2005.
5301 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5302 (announcement): Add --gpg-key-ID.
5303
5304 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5305 with "file system".
5306
2073ce56 5307 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
5308 array. Problem reported by twlevo.
5309 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5310 * src/lalr.c (build_relations): Rely on new sentinel.
5311 * src/gram.c (gram_free): Adjust to new sentinel.
5312
b7691f15
JD
53132006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5314
5315 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5316 yylookaheadNeeds. All uses updated.
5317 (yysplitStack): Rename local yynewLookaheadStatuses to
5318 yynewLookaheadNeeds.
5319 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5320 GLR): In comments, change `lookahead status' to `lookahead need'.
5321
ddee1b06
PH
53222006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5323
5324 * data/glr.c (yysplitStack): A little stylistic rewrite.
5325
12f4614d
PH
53262006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5327
5328 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5329
32c29292
JD
53302006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5331
5332 * doc/bison.texinfo: Fix some typos.
5333 (GLR Semantic Actions): New subsection discussing special
5334 considerations because GLR semantic actions might be deferred.
5335 (Actions): Mention look-ahead usage of yylval.
5336 (Actions and Locations): Mention look-ahead usage of yylloc.
5337 (Special Features for Use in Actions): Add YYEOF entry and mention it
5338 in the yychar entry.
5339 In the yychar entry, remove mention of the local yychar case (pure
5340 parser) since this is irrelevant information when writing semantic
148d66d8 5341 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
5342 yychar is otherwise described as an external variable.
5343 In the yychar entry, don't call it the `current' look-ahead since it
5344 isn't when semantic actions are deferred.
5345 In the yychar and yyclearin entries, add note about deferred semantic
5346 actions.
5347 Add yylloc and yylval entries discussing look-ahead usage.
5348 (Look-Ahead Tokens): When discussing yychar, don't call it the
5349 `current' look-ahead, and do mention yylval and yylloc.
5350 (Error Recovery): Cross-reference `Action Features' when mentioning
5351 yyclearin.
148d66d8 5352 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
5353 look-ahead.
5354 In the yylloc and yylval entries, mention look-ahead usage.
5355
de366a2f 53562006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
5357
5358 * tests/glr-regression.at: Update copyright year to 2006.
5359
bf70fa87
JD
53602006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5361
5362 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5363 use during nondeterministic operation to track which stacks have
5364 actually needed the current lookahead.
5365 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5366 Allocate, deallocate, resize, and otherwise shuffle space for
5367 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5368 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5369 appropriately during nondeterministic operation.
5370 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5371 members to store the current lookahead to be used by the deferred
5372 user action.
5373 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5374 from which the RHS is taken. Set the lookahead members of the new
5375 yySemanticOption according to the lookahead status for stack yyk.
5376 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5377 yyaddDeferredAction.
5378 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5379 members of yySemanticOption before invoking yyuserAction, and then set
5380 them back to their current values afterward.
5381 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5382 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5383 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5384 titles for consistency.
5385 (Leaked merged semantic value if user action cuts parse): In order to
5386 suppress lint warnings, use arguments in merge function, and assign
5387 char value < 128 in main.
5388 (Incorrect lookahead during deterministic GLR): New test case.
5389 (Incorrect lookahead during nondeterministic GLR): New test case.
5390
05449a2c
JD
53912006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5392
de366a2f 5393 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
5394 !yyvaluep as signal that no semantic value is available to print.
5395 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5396 to print a semantic value.
5397
4158e0a1 53982006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 5399
4158e0a1
JD
5400 * tests/glr-regression.at: For consistency with my newer test cases,
5401 don't thank myself.
5402
d659304d
JD
54032006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5404
5405 * data/glr.c (yyresolveValue): When merging semantic options, if at
5406 least one user action succeeds but a later one cuts the parse, then
5407 destroy the semantic value before returning rather than leaking it.
5408 (yyresolveStates): If a user action cuts the parse and thus
5409 yyresolveValue fails, ignore the (unset) semantic value rather than
5410 corrupting the yyGLRState, and empty the semantic options list since
5411 the user actions should have called all necessary destructors.
5412 Simplify code with YYCHK.
5413 * tests/glr-regression.at (Corrupted semantic options if user action
5414 cuts parse): New test case.
5415 (Undesirable destructors if user action cuts parse): New test case.
5416 Before applying any of this patch, this test case never actually failed
5417 for me... but only because the corrupted semantic options usually
5418 masked this bug.
5419 (Leaked merged semantic value if user action cuts parse): New test
5420 case.
5421
6ec2c0f2
AD
54222006-01-05 Akim Demaille <akim@epita.fr>
5423
5424 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5425
1b9c21fb
PE
54262006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5427
5428 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5429 _MSC_VER. Problem reported by Cenzato Marco.
5430 (b4_c_function_def): Use it.
5431 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5432 b4_c_modern.
5433 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5434 than rolling our own.
5435
84866159
AD
54362006-01-04 Akim Demaille <akim@epita.fr>
5437
5438 Also warn about non-used mid-rule values.
5439 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5440 member.
5441 (symbol_list_new): Adjust.
5442 * src/reader.c (symbol_typed_p): New.
5443 (grammar_rule_check): Use it.
5444 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5445 Check its rule.
5446 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5447 Use it.
5448 * tests/actions.at (Exotic Dollars): Adjust.
5449
378f4bd8
AD
54502006-01-04 Akim Demaille <akim@epita.fr>
5451
5452 * src/reader.c (grammar_midrule_action): If $$ is set in a
5453 mid-rule, move the `used' bit to its lhs.
5454 * tests/input.at (Unused values): New.
5455 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5456
e2a21b6f
PE
54572006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5458
54662697
PE
5459 * doc/bison.texinfo (Bison Options): Say more accurately what
5460 --yacc does.
5461 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5462 about declarations in the grammar when in Yacc mode, as POSIX does
5463 not require a diagnostic when the grammar uses extensions.
5464
5465 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5466
073f9288
PE
5467 Warn about dubious constructions like "%token T T".
5468 Reported by twlevo.
5469 * src/symtab.h (struct symbol.declared): New member.
5470 * src/symtab.c (symbol_new): Initialize it to false.
5471 (symbol_class_set): New arg DECLARING, specifying whether
5472 this is a declaration that we want to warn about, if there
5473 is more than one of them. All uses changed.
5474
1221b78a
PE
5475 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5476 Allow multiple %union directives, whose contents concatenate.
5477 * src/parse-gram.y (grammar_declaration): Likewise.
5478 Use muscle_code_grow, so that we don't need stype_line any more.
5479 All uses changed.
5480
5481 * src/muscle_tab.c (muscle_grow): Fix comment.
5482
e2a21b6f
PE
5483 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5484 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5485 Update copyright year to 2006.
5486
8f7e3cf9
AD
54872006-01-03 Akim Demaille <akim@epita.fr>
5488
5489 Have glr.cc pass (some of) the calc.at tests.
5490 * data/glr.cc (b4_parse_param_orig): New.
5491 (b4_parse_param): Improve its definition, and bound it more
5492 clearly in the skeleton.
5493 (b4_epilogue): Append, instead of prepending, in order to keep
5494 #line consistency.
5495 Simplify the generation of auxiliary functions: locations and
5496 purity are mandated.
5497 (b4_global_tokens_and_yystype): Honor it.
5498 * data/location.cc (c++.m4): Don't include it.
5499 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5500 and AT_SKEL_CC_IF.
5501 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5502 AT_LALR1_CC_IF.
5503 Be sure to initialize the first position's filename.
5504 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5505 mandated anyway.
5506 (AT_CHECK_CALC_GLR_CC): New.
5507 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5508
3953ed88
AD
55092006-01-02 Akim Demaille <akim@epita.fr>
5510
5511 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5512 c.m4.
0a96ba81 5513 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
5514 * data/glr.cc: Do not include stack.hh.
5515
9ecafbbf
AD
55162006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5517
5518 * data/glr.c: Reformat whitespace with tabs.
5519 (b4_lpure_formals): Remove this unused m4 macro.
5520 * tests/cxx-type.at: Reformat whitespace with tabs.
5521 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5522 since it's a member. Rename type to isNterm for clarity.
5523
c4d497a0
AD
55242005-12-29 Akim <akim@sulaco.local>
5525
5526 Let glr.cc catch up with symbol_value_print.
5527 * data/glr.cc (b4_yysymprint_generate): Replace by...
5528 (b4_yy_symbol_print_generate): this.
5529 (yy_symbol_print, yy_symbol_value_print): Declare them.
5530
4517da37
PE
55312005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5532
5533 * src/location.h (boundary): Note that a line or column equal
5534 to INT_MAX indicates an overflow.
5535 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5536 (rule_length_overflow, increment_rule_length, add_column_width):
5537 New functions.
5538 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5539 (<SC_BRACED_CODE>"}"):
5540 Use increment_rule_length rather than incrementing it by hand.
5541 (adjust_location, handle_syncline): Diagnose overflow.
5542 (handle_action_dollar, handle_action_at):
5543 Fix bug with monstrosities like $-2147483648.
5544 Remove now-unnecessary checks.
5545 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5546 (convert_ucn_to_byte): Verify assumptions.
5547 (handle_syncline): New arg LOC. All callers changed.
5548 Don't store through a value derived from char const * pointer.
5549
5550 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5551 GCC warnings.
5552
e3233bf6
PE
55532005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5554
5555 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5556 Remove unnecessary forward static decls.
5557
8f3596a6
AD
55582005-12-27 Akim Demaille <akim@epita.fr>
5559
5560 * src/reader.c (grammar_current_rule_check): Also check that $$
5561 is used.
5562 Take the rule to check as argument, hence rename as...
5563 (grammar_rule_check): this.
5564 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5565 Rename as...
5566 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5567 (grammar_midrule_action, grammar_symbol_append): Now static.
5568 * tests/torture.at (input): Don't rely on the default action
5569 being always performed.
5570 * tests/calc.at: "Set" $$ even when the action is "cut" with
5571 YYERROR or other.
5572 * tests/actions.at (Exotic Dollars): Instead of using unused
5573 values, check that the warning is issued.
5574
721be13c
PE
55752005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5576
5577 * NEWS: Improve wording for unused-value warnings.
5578
a0af42fc
AD
55792005-12-22 Akim Demaille <akim@epita.fr>
5580
5581 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5582 (b4_yysymprint_generate): Rename as...
5583 (b4_yy_symbol_print_generate): this.
5584 Generate yy_symbol_print instead of yysymprint.
5585 Generate also yy_symbol_value_print, and use it.
5586
affac613
AD
55872005-12-22 Akim Demaille <akim@epita.fr>
5588
721be13c 5589 * NEWS: Warn about unused values.
affac613
AD
5590 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5591 a `used' member.
5592 (symbol_list_n_get, symbol_list_n_used_set): New.
5593 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5594 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5595 * src/reader.c (grammar_current_rule_check): Check that values are
5596 used.
5597 * src/symtab.c (symbol_print): Accept 0.
5598 * tests/existing.at: Remove the type information.
5599 Empty the actions.
5600 Remove useless actions (beware of mid-rule actions: perl -000
5601 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5602 * tests/actions.at (Exotic Dollars): Use unused values.
5603 * tests/calc.at: Likewise.
5604 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5605 Likewise.
5606
5607 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5608 rule_useful_p.
5609
9d9b8b70
PE
56102005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5611
8bb4c753
PE
5612 Undo 2005-12-01 tentative license wording change. The wording is
5613 still being reviewed by the lawyers, and we don't want to wait for
5614 them before publishing a test release. For now, revert to the
5615 previous wording.
5616 * NEWS: Undo 2005-12-01 change.
5617 * data/glr.c: Revert to previous license wording.
5618 * data/glr.cc: Likewise.
5619 * data/lalr1.cc: Likewise.
5620 * data/location.cc: Likewise.
5621 * data/yacc.c: Likewise.
5622
9d9b8b70
PE
5623 * NEWS: Reword %destructor vs YYABORT etc.
5624 * data/glr.c: Use American spacing, for consistency.
5625 * data/glr.cc: Likewise.
5626 * data/lalr1.cc: Likewise.
5627 * data/yacc.c: Likewise.
5628 * data/yacc.c: Reformat comments slightly.
5629 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5630 for consistency. Fix some spelling errors and reword recently-included
5631 text slightly.
5632 * tests/cxx-type.at: Cast results of malloc, for C++.
5633
2c3b392a
AD
56342005-12-21 Joel E. Denny <address@hidden>
5635
5636 * tests/cxx-type.at: Construct a tree, count the parents of shared
5637 nodes, and free each node once and only once. Previously, the memory
5638 for semantic values was leaked instead.
5639
d6cff4dc
AD
56402005-12-21 Joel E. Denny <address@hidden>
5641
5642 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5643 (yylval, yylloc): If pure, #define to yystackp->yyval and
5644 yystackp->yyloc similar to yychar and yynerrs.
5645 (yyparse): If pure, remove local yylval and yylloc. Add local
5646 yystackp to accommodate pure definitions of yylval and yylloc.
5647 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5648 yylvalp and yyllocp to &yylval and &yylloc.
5649 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5650 namespace. Previously, nerrs and char were missing, but lval and lloc
5651 weren't necessary.
5652 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5653 yylvalp and yyllocp parameters since, if pure, these are now always
5654 accessible through yystackp. If not pure, they are still accessible
5655 globally.
5656 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5657 `if (YYID (N))' to pacify lint.
5658
a85284cf
AD
56592005-12-21 Akim Demaille <akim@epita.fr>
5660
5661 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5662 destroy the RHS symbols of a rule.
5663 * data/yacc.c (yylen): Initialize to 0.
5664 Keep its value to the number of items to possibly shift.
5665 In particular, a regular successful parse that ends on YYFINAL by
5666 a (internal) YYACCEPT must not have yylen != 0.
5667 (yyerrorlab, yyreturn): Pop the RHS.
5668 Reorder a bit to emphasize the `shifting' bits of code.
5669 (YYPOPSTACK): Now accept a number of items to pop.
5670 * data/lalr1.cc: Likewise.
5671 * data/glr.c: Formatting changes.
5672 Use goto instead of fall through.
5673 * doc/bison.texinfo (Destructor Decl): Complete.
5674
d508c281
JMG
56752005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5676
5677 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5678 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5679 * djgpp/config.bat: Replace every occurence of the file name
5680 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5681 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5682 * djgpp/config.sed: Replace every occurence of the file name
5683 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5684 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5685 * djgpp/djunpack.bat: DJGPP specific file.
5686 * djgpp/fnchange.lst: DJGPP specific file.
5687 * djgpp/README.in: Add new information about how to unpack the bison
5688 source on MSDOS and other systems which have 8.3 file name restrictions
5689 using djunpack.bat and fnchange.lst.
5690
3e7a2cd9
PE
56912005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5692
5693 * bootstrap (build_cvs_prefix): Remove; unused.
5694 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5695 when getting gnulib.
5696
56972005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5698
5699 * data/glr.c: Reorder typedef declarations for structs to match order
5700 of struct declarations.
5701 Rename yystack everywhere to yystackp except in yyparse where it's not
5702 a pointer.
5703 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5704 consistency.
5705 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5706 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5707 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5708 lint.
5709
877519f8
PE
57102005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5711
0eca5a39
PE
5712 * tests/sets.at (Accept): Fix typos in regular expression used to
5713 sed out the final state number.
5714
2cec9080
PE
5715 Work around portability problem on Solaris 10: flex-generated
5716 files include <stdio.h> before <config.h>, which messes up
5717 because the latter defines __EXTENSIONS__. Address the problem
5718 by creating two new little files that include <config.h> first,
5719 then include the flex-generated files. Rewrite everyone else
5720 to include <config.h> first, as well.
5721 * lib/timevar.c: Always include "config.h".
5722 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5723 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5724 (EXTRA_bison_SOURCES): New macro.
5725 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5726 * src/system.h: Don't include config.h.
5727 * src/LR0.c: Include <config.h> first.
5728 * src/assoc.c: Likewise.
5729 * src/closure.c: Likewise.
5730 * src/complain.c: Likewise.
5731 * src/conflicts.c: Likewise.
5732 * src/derives.c: Likewise.
5733 * src/files.c: Likewise.
5734 * src/getargs.c: Likewise.
5735 * src/gram.c: Likewise.
5736 * src/lalr.c: Likewise.
5737 * src/location.c: Likewise.
5738 * src/main.c: Likewise.
5739 * src/muscle_tab.c: Likewise.
5740 * src/nullable.c: Likewise.
5741 * src/output.c: Likewise.
5742 * src/parse-gram.y: Likewise.
5743 * src/print.c: Likewise.
5744 * src/print_graph.c: Likewise.
5745 * src/reader.c: Likewise.
5746 * src/reduce.c: Likewise.
5747 * src/relation.c: Likewise.
5748 * src/state.c: Likewise.
5749 * src/symlist.c: Likewise.
5750 * src/symtab.c: Likewise.
5751 * src/tables.c: Likewise.
5752 * src/uniqstr.c: Likewise.
5753 * src/vcg.c: Likewise.
5754
877519f8
PE
5755 * src/parse-gram.y: Fix minor problems uncovered by lint.
5756 (current_lhs, current_lhs_location): Now static.
5757 (current_assoc): Remove unused variable.
5758
5759 Cleanups so that Bison-generated parsers have less lint.
5760 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5761 Prepend /*ARGSUSED*/, for lint's sake.
5762 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5763 definition if 'lint' is defined.
5764 (YYID): New macro (or function, if lint).
5765 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5766 * data/yacc.c: Likewise.
5767 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5768 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5769 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5770 is C++ only.
5771 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5772 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5773 Use YYID(0) rather than 0, for lint.
5774 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5775 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5776
f5228370
PE
57772005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5778
5779 * tests/glr-regression.at
5780 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5781 Close memory leak reported by twlevo.
5782
69ce078b
PE
57832005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5784
6ff99711
PE
5785 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5786 all stacks.
5787 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
5788 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5789 New test case.
5790 (Duplicated user destructor for lookahead): This test now is expected
5791 to succeed.
5792
af3412cd
PE
57932005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5794
32b5b719 5795 * NEWS: Document the following change.
af3412cd
PE
5796 * data/yacc.c: Say "parser skeleton" rather than "file", since
5797 it's no longer just a file.
5798 * data/glr.c: Grant a special exception for C GLR parsers, that
5799 reads like the already-existing exception for C LALR(1) parsers.
5800 * data/glr.cc: Likewise.
5801 * data/lalr1.cc: Likewise.
5802 * data/location.cc: Likewise.
5803 * data/yacc.c: Reword the "written by" statement to clarify that
5804 it was the parser skeleton, not the entire output file.
5805 * data/glr.c: Written by Paul Hilfinger.
5806 * data/glr.cc: Written by Akim Demaille.
5807 * data/lalr1.cc: Likewise.
5808
035aa4a0
PE
58092005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5810
d9963c85
PE
5811 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5812 Fix typos in previous change that broke 'make check'.
5813 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5814 supported in C.
5815 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5816 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5817 We can revert this once things settle down.
5818
035aa4a0
PE
5819 * src/conflicts.c (conflicts_print): Don't print file name twice
5820 when %expect fails because there were no conflicts.
5821 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5822 change.
5823 * tests/conflicts.at (%expect not enough, %expect too much):
5824 (%expect with reduce conflicts): Adjust to new behavior.
5825
58262005-11-18 Akim Demaille <akim@epita.fr>
5827
5828 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5829 errors.
5830 * NEWS: Document this.
5831 * doc/bison.texinfo (Expect Decl): Likewise.
5832
d1ff7a7c
AD
58332005-11-16 Akim Demaille <akim@epita.fr>
5834
5835 Generalize the display of semantic values and locations in traces.
5836 * data/glr.c (yy_reduce_print): Fix indices (again).
5837 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5838 literal integers.
5839 * data/lalr1.cc (yyreduce_print): Rename as...
5840 (yy_reduce_print): this.
5841 Display values and locations.
5842 * data/yacc.c (yy_reduce_print): Likewise.
5843 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5844 (yysymprint): Move higher to be visible from yy_reduce_print).
5845 (yyparse): Adjust.
5846 * tests/calc.at: Adjust the expected length of the traces.
5847
6de5398d
AD
58482005-11-14 Akim Demaille <akim@epita.fr>
5849
5850 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5851 from 1 to N, while values and location start at 0.
5852 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5853
a1373f55
AD
58542005-11-14 Akim Demaille <akim@epita.fr>
5855
5856 * data/glr.c (yy_reduce_print): Fix the $ number.
5857
613d8952
AD
58582005-11-14 Akim Demaille <akim@epita.fr>
5859
5860 "Use" parse parameters.
5861 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5862 * data/glr.c, data/glr.cc: Use them.
5863 * data/glr.c (YYUSE): Have a C++ definition that supports
5864 non-pointer types.
5865
b2741627
AD
58662005-11-14 Akim Demaille <akim@epita.fr>
5867
5868 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5869
5059b5c8
AD
58702005-11-14 Akim Demaille <akim@epita.fr>
5871
42249483
AD
5872 * data/glr.cc: New.
5873 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 5874
4626a15d
AD
58752005-11-12 Akim Demaille <akim@epita.fr>
5876
5877 Let position and location be PODs.
5878 * data/location.cc (position::initialize, location::initialize): New.
5879 (position::position, location::location): Define only if
5880 b4_location_constructors is defined.
5881 * data/lalr1.cc (b4_location_constructors): Define it for backward
5882 compatibility.
5883 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5884
58852005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
5886
5887 * data/lalr1.cc: Move the body of the ctor and dtor into the
5888 parser file (instead of the header).
5889 Wrap the implementations in a "namespace yy".
5890
58912005-11-12 Akim Demaille <akim@epita.fr>
5892
5893 Have glr.c include its header file when created.
5894 * data/glr.c (b4_shared_declarations): New.
5895 Output them verbatim in the parser if !%defines, otherwise
5896 output then in the header file, and include it instead.
5897
1989d947
AD
58982005-11-11 Akim Demaille <akim@epita.fr>
5899
5900 * data/glr.c: Comment changes.
5901
59022005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
5903
5904 When yydebug, report semantic and location values for reductions.
5905 * data/glr.c (yy_reduce_print): Report the semantic values and the
5906 locations.
5907 (YY_REDUCE_PRINT): Adjust.
5908 (yyglrReduce): Use them.
5909 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5910 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5911 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5912 traces.
5913
02998094
AD
59142005-11-10 Akim Demaille <akim@epita.fr>
5915
5916 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5917 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5918 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5919
5210672f
PE
59202005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5921
5922 * m4/cxx.m4, examples/Makefile.am: Don't build
5923 examples/calc++ if no C++ compiler is available. (trivial change)
5924
a8991a1d
AD
59252005-11-09 Akim Demaille <akim@epita.fr>
5926
5927 * src/scan-skel.l: Use a couple of asserts.
5928
36b5e963
AD
59292005-11-03 Akim Demaille <akim@epita.fr>
5930
5931 In some (weird) cases, the final state number is incorrect.
5932 Reported by Alexandre Duret-Lutz.
5933 * src/LR0.c (state_list_append): Remove the computation of
5934 final_state.
5935 (save_reductions): Do it here.
5936 (get_state): Alpha conversion.
5937 (generate_states): Use a for loop.
5938 * src/gram.h (item_number_is_rule_number)
5939 (item_number_is_symbol_number): New.
5940 * src/state.c: Use assert.
5941 * src/system.h: Include assert.h.
5942 * tests/sets.at (Accept): New.
5943
44e7ead1
PH
59442005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5945
5946 * data/glr.c (yyfill): Adjust comment.
36b5e963 5947 (yyresolveAction): Initialize default location properly
44e7ead1
PH
5948 for empty right-hand sides.
5949 (yydoAction): Ditto.
5950 Add comment explaining apparently dead code.
36b5e963
AD
5951 * tests/glr-regression.at
5952 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 5953 New test.
36b5e963 5954
e10a80ee
PE
59552005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5956
5957 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5958 gnulib when interrupted. This fixes some race conditions and
5959 works around some portability problems (one noted by Paul
5960 Hilfinger).
5961
067b32ee
AD
59622005-10-22 Akim <akim@epita.fr>
5963
5964 * Makefile.cfg: Adjust to config -> build-aux.
5965 Reported by twledo.
5966
4b367315
AD
59672005-10-21 Akim Demaille <akim@epita.fr>
5968
5969 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5970 the %parse-params.
5971 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5972 * data/yacc.c (b4_Pure_if): Rename as...
5973 (b4_yacc_pure_if): this.
5974 (YY_SYMBOL_PRINT, yyparse): Adjust.
5975 * doc/bison.texinfo: Formatting changes.
5976
24cc23d9
AD
59772005-10-21 Akim Demaille <akim@epita.fr>
5978
5979 Finish the transition config -> build-aux.
5980 * configure.ac, Makefile.am: Use build-aux.
5981 * config/prev-version, config/announce-gen, config/Makefile.am:
5982 Move to...
5983 * build-aux/prev-version, build-aux/announce-gen,
5984 * build-aux/Makefile.am: here.
5985
d4476375
AD
59862005-10-14 Akim Demaille <akim@epita.fr>
5987
5988 * examples/calc++/test: Use set -x only when VERBOSE.
5989
302c0aee
PE
59902005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5991
5992 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5993 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5994
7625ec2c
AD
59952005-10-13 Akim Demaille <akim@epita.fr>
5996
5997 * src/scan-skel.l: Output the base name parts of the parser and
5998 header file names.
302c0aee 5999 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
6000 additional checks.
6001 Use this to exercise C++ outputs in subdirs.
6002 Reported by Oleg Smolsky.
6003
ba0fe3c7
PE
60042005-10-12 Paul Eggert <eggert@cs.ucla.edu>
6005
6006 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
6007 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
6008 Problem reported by John P. Hartmann.
6009 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
6010 already defined it.
6011
9b8a5ce0
AD
60122005-10-12 Akim Demaille <akim@epita.fr>
6013
6014 * src/parse-gram.y (version_check): Exit 63 to please missing
6015 (stands for "version mismatch).
6016 * tests/input.at, doc/bison.texinfo: Adjust.
6017
4f6e011e
PE
60182005-10-10 Paul Eggert <eggert@cs.ucla.edu>
6019
6020 Work around portability problems with Visual Age C compiler
6021 (xlc and xlC_r) reported by John P. Hartmann.
6022 * data/location.cc (initial_column, initial_line): Remove.
6023 All uses replaced by 0 and 1.
6024 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
6025 that xlc complains about.
6026 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 6027 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 6028 as __STDC__.
4d7aa45e
PE
6029 * data/yacc.c (YYMODERN_C): New macro, which also looks at
6030 __STDC_VERSION__. Use it everywhere instead of looking at
6031 __STDC__ and __cplusplus.
4f6e011e 6032
a1b3bf8c
AD
60332005-10-10 Akim Demaille <akim@epita.fr>
6034
6035 * examples/calc++/test: Be quiet unless VERBOSE.
6036
412e44aa
PE
60372005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6038
2a4647a3
PE
6039 * data/c.m4 (yydestruct, yysymprint):
6040 Use YYUSE instead of casting to void.
6041 * data/glr.c (YYUSE): New macro.
6042 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6043 Use it instead of rolling our own.
6044 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6045 (YYCHK1):
6046 Use /*CONSTCOND*/ to suppress lint warnings.
6047 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6048 (YY_STACK_PRINT): Use 'false' not '0'.
6049 (YYUSE): New macro.
6050 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6051 * data/yacc.c (YYUSE): New macro.
6052 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6053 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6054 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6055
6056
412e44aa
PE
6057 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6058 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6059
88c6637f
PE
60602005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6061
2f4f028d
PE
6062 Undo the parts of the unlocked-I/O change that substituted
6063 putc or puts for printf. This might hurt performance a bit,
6064 but some people prefer the printf style.
6065 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6066 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6067 All uses replaced by YYFPRINTF and YYDPRINTF.
6068 * data/yacc.c: Likewise.
6069 * lib/bitset.c (bitset_print): Likewise.
6070 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6071 putc and puts.
6072 * lib/lbitset.c (debug_lbitset): Likewise.
6073 * src/closure.c (print_firsts, print_fderives): Likewise.
6074 * src/gram.c (grammar_dump): Likewise.
6075 * src/lalr.c (look_ahead_tokens_print): Likewise.
6076 * src/output.c (escaped_output): Likewise.
6077 (user_actions_output): Break apart two printfs.
6078 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6079 * src/reduce.c (reduce_print): Likewise.
6080 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6081 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6082
88c6637f
PE
6083 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6084 Use assignments rather than casts-to-void to suppress
6085 unused-variable warnings. This pacifies 'lint'.
6086 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6087 unused-variable warnings.
6088
fb32e373
JMG
60892005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6090
6091 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6092
edb8f44f
PE
60932005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6094
fb9c0b33
PE
6095 Use unlocked I/O for a minor performance improvement on hosts like
6096 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6097 is to use the gnlib unlocked-io module, and to prefer putc and
6098 puts to printf when either will work (since the latter doesn't
6099 come in an unlocked flavor).
6100 * bootstrap (gnulib_modules): Add unlocked-io.
6101 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6102 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6103 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6104 and similarly for puts and putc and printf.
6105 * data/yacc.c: Likewise.
6106 * lib/bitset.c (bitset_print): Likewise.
6107 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6108 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6109 to printf.
6110 * lib/lbitset.c (debug_lbitset): Likewise.
6111 * src/closure.c (print_firsts, print_fderives): Likewise.
6112 * src/gram.c (grammar_dump): Likewise.
6113 * src/lalr.c (look_ahead_tokens_print): Likewise.
6114 * src/output.c (escaped_output): Likewise.
6115 (user_actions_output): Coalesce two printfs.
2f4f028d 6116 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
6117 * src/reduce.c (reduce_print): Likewise.
6118 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 6119 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 6120
edb8f44f
PE
6121 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6122 this confuses xgettext.
6123
b50d2359
AD
61242005-10-02 Akim Demaille <akim@epita.fr>
6125
6126 * bootstrap (gnulib_modules): Add strverscmp.
6127 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6128 * m4/.cvsignore: Add strverscmp.m4.
6129 * src/parse-gram.y (%require): New token, new rule.
6130 (version_check): New.
6131 * src/scan-gram.l (%require): Adjust.
6132 * tests/input.at (AT_REQUIRE): New.
6133 Use it.
6134 * doc/bison.texinfo (Require Decl): New.
6135 (Calc++ Parser): Use %require.
6136
21667f64
AD
61372005-10-02 Akim Demaille <akim@epita.fr>
6138
6139 * data/location.cc: New.
6140
2b81e969
AD
61412005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6142 Akim Demaille <akim@epita.fr>
6143
6144 Make sure -odir/foo.cc creates dir/location.hh etc.
6145 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6146 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6147 (spec_defines_file): Now const.
6148 (dir_prefix): New.
6149 (short_base_name): Remove.
6150 * src/files.c: Adjust.
6151 (dirname.h): Include.
6152 (base_name): Don't prototype it.
6153 (finput): Remove, duplicates gram_in.
6154 (full_base_name, short_base_name): Replace by...
6155 (all_but_ext, all_but_tab_ext): these.
6156 (compute_base_names): Rename as...
6157 (compute_file_name_parts): this.
6158 Update to compute the new variables, including dir_prefix.
6159 Adjust dependencies.
6160 * src/output.c (prepare): Output them.
6161 * src/reader.c: Adjust to use gram_in, not finput.
6162 * src/scan-skel.l (@dir_prefix@): New.
6163
ad6a9b97
JMG
61642005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6165
6166 * lib/subpipe.c: New function end_of_output_subpipe() added
6167 to allow support for non-posix systems. This is a no-op function
6168 for posix systems.
6169
6170 * lib/subpipe.h: New function end_of_output_subpipe() added
6171 to allow support for non-posix systems. This is a no-op function
6172 for posix systems.
6173
6174 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6175 handle the lack of pipe/fork functionality on non-posix systems.
6176
6177 * djgpp/Makefile.maint: DJGPP specific file.
6178
6179 * djgpp/README.in: DJGPP specific file.
6180
6181 * djgpp/config.bat: DJGPP specific configuration file.
6182
6183 * djgpp/config.sed: DJGPP specific configuration file.
6184
6185 * djgpp/config.site: DJGPP specific configuration file.
6186
6187 * djgpp/config_h.sed: DJGPP specific configuration file.
6188
6189 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6190
6191 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6192
fc695704
AD
61932005-10-02 Akim Demaille <akim@epita.fr>
6194
6195 * data/location.cc: New, extract from...
6196 * data/lalr1.cc: here.
6197 (location.hh): Include it after the user prologue, in case the
6198 filename type is defined by the user.
6199 Forward declation location and position before the pre-prologue.
6200 (yyresult_): Rename as...
6201 (yyresult): this, it's a local variable, not an attribute.
6202 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6203
62042005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
6205
6206 * examples/extexi: Restore the #line generation.
6207
fb9712a9
AD
62082005-09-30 Akim Demaille <akim@epita.fr>,
6209 Alexandre Duret-Lutz <adl@gnu.org>
6210
6211 Move the token type and YYSTYPE in the parser class.
6212 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6213 (parser::token): New, from the moved free definition of tokens.
6214 (parser::semantic_value): Now a full definition instead of an
6215 indirection to YYSTYPE.
6216 (b4_post_prologue): No longer included in the header file, but
6217 in the implementation file.
6218 * doc/bison.texi (C+ Language Interface): Update.
6219 * src/parse-gram.y: Support unary %define.
6220 * tests/actions.at: Define global_tokens_and_yystype for backward
6221 compatibility until we update the tests.
6222 * tests/calc.at: Idem.
6223 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6224 to simplify the code.
6225
55f0c7b1
PE
62262005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6227
6228 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6229 Ah, the good old days! Problem reported by Peter Klein.
6230 * bootstrap (gnulib_modules): Add strerror, strtoul.
6231 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6232 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6233
fb9712a9 62342005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
6235
6236 * data/c.m4 (b4_error_verbose_if): New.
6237 * data/lalr1.cc: Use it.
6238 (YYERROR_VERBOSE_IF): Remove.
6239 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6240 parser members, replaced by...
6241 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6242 local variables.
6243 (yysyntax_error_): Takes the state number as argument.
6244 (yyreduce_print_): Use the argument yyrule, not the former
6245 attribute yyn_.
6246
8a6f72f3
PE
62472005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6248
6249 * bootstrap (gnulib_modules): Add verify.
6250 * lib/.cvsignore: Add verify.h.
6251 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6252 * src/system.h (verify): Remove.
6253 Include verify.h instead.
6254 * src/tables.c (tables_generate): Use new API for 'verify'.
6255
0d50976f
PE
62562005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6257
ebc3737e
PE
6258 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6259 local variables whose names begin with 'yy'.
6260 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6261 Trivial changes from Joel E. Denny.
6262
0d50976f
PE
6263 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6264 it itself.
6265 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6266 don't use alloca any more.
6267
6268 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6269 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 6270 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
6271 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6272 to match yacc.c, to test more hosts.
6273
a05b79df
PE
62742005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6275
55289366
PE
6276 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6277 doesn't affect behavior.
6278 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6279 Solaris, AIX, MSC.
6280 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6281 This works a bit better with glibc, if user code has already included
6282 stdlib.h.
6283 * doc/bison.texinfo (Bison Parser): Document that users can't
6284 arbitrarily use malloc and free for other purposes. Document
6285 that <alloca.h> and <malloc.h> might be included.
6286 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6287 user must declare alloca.
6288
a05b79df
PE
6289 * HACKING (release): Forwarn the Translation Project about
6290 stable releses.
6291
3ab2ca22
AD
62922005-09-20 Akim Demaille <akim@epita.fr>
6293
6294 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6295
a9739e7c
PE
62962005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6297
a702593e
PE
6298 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6299 (YYSTACK_ALLOC_MAXIMUM): Use it.
6300 (yysyntax_error): New function.
6301 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6302 multiple syntax errors are reported, and alloca is being used.
6303 Instead, reallocate buffers twice as big each time, so that
6304 we waste at most half the allocated memory. Start with a small
6305 (128-byte) buffer that will suffice in most cases anyway.
6306 Use yysyntax_error to do most of the work.
6307
6308 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6309 yynerrs is the number of errors reported, not the number of
6310 errors encountered.
6311
a9739e7c
PE
6312 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6313 Mark it as expected to fail.
6314 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6315 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6316 Don't start user-code symbols with "yy", to avoid name space problems.
6317
f479c6c6
AD
63182005-09-19 Akim Demaille <akim@epita.fr>
6319
6320 Remove the traits, failed experiment.
6321 It never proved useful, and anyway because of the current
6322 definition, it was not possible to have several specialization of
6323 this traits, making it useless.
6324 * data/lalr1.cc (yy:traits): Remove.
6325 Inline its definitions in the parser class.
6326
e2586f82
AD
63272005-09-19 Akim Demaille <akim@epita.fr>
6328
6329 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6330 least Mac OSX with a /usr/local install of gettext.
6331
2e8cf949
AD
63322005-09-19 Akim Demaille <akim@epita.fr>
6333
6334 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6335 and yytoken for similarity with the other skeletons.
6336
c7fb0b90
AD
63372005-09-19 Akim Demaille <akim@epita.fr>
6338
4e26c69e 6339 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 6340
1bd0deda
PE
63412005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6342
6343 * NEWS: Version 2.1.
6344
6345 * NEWS: Remove notice of yytname change, since it was never in an
6346 official release.
6347 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6348 diagnostic.
6349 * src/output.c (prepare): Likewise.
6350 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6351 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6352 is not defined. This is an awful hack, but it's enough for now.
6353 All callers changed.
6354 * tests/glr-regression-at (make_value): Args are const pointers now,
6355 to avoid GCC warning.
6356 (Duplicated user destructor for lookahead): New test. Currently
6357 skipped. It fails on my host but I'm not sure it'll always fail.
6358
63592005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
6360
6361 * src/symtab.h (struct symbol): Declare the printer and destructor
6362 as const, to avoid accidental calls to free.
6363 (symbol_destructor_set, symbol_printer_set): Adjust.
6364 * src/symtab.c: Adjust.
6365
1bd0deda 63662005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
6367
6368 * data/c.m4 (b4_token_enums): New.
6369 (b4_token_defines): Rename as...
6370 (b4_token_enums_defines): this.
6371 (b4_token_defines): New, output only the #defines.
6372 * data/yacc.c, data/glr.c: Adjust.
6373 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6374 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6375 as default values.
6376
dbcdae2d
AD
63772005-09-16 Akim Demaille <akim@epita.fr>
6378
6379 * data/lalr1.cc (yylex_): Remove, inline its code.
6380 (yyreport_syntax_error_): Remove, replaced by...
6381 (yysyntax_error_): this which returns a string and leaves to the
6382 caller the call to the users' error function.
6383 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6384 Move from members of the parser object...
6385 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6386 to local variables of the parse function.
6387
70d8f291
AD
63882005-09-16 Akim Demaille <akim@epita.fr>
6389
6390 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6391 since it's in Bison's name space.
6392
b47dbebe
PE
63932005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6394
ae199bf1
PE
6395 * data/glr.c (yyresolveValue): Add default case to pacify
6396 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6397
b47dbebe
PE
6398 * NEWS: Document when yyparse started to return 2.
6399 * doc/bison.texinfo (Parser Function): Document when yyparse
6400 returns 2.
6401
6402 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6403 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6404 changed.
6405 (class position): file_name -> filename (reverting). All uses changed.
6406
64072005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6408
6409 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6410 do anything if $@ exists. This reverts part of the 2005-07-07
6411 patch.
6412
00292f66
PE
64132005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6414
6415 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6416 contains obsolete information and isn't worth distributing as a
6417 separate file anyway.
6418 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6419 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6420 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6421 (yyparse): Abort if user code uses longjmp to throw an unexpected
6422 value.
6423
a420f962
PE
64242005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6425
00292f66
PE
6426 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6427 Suggested by twlevo@xs4all.nl.
6428
127287e9
PE
6429 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6430 This avoids a diagnostic from gcc -Wswitch-enum.
6431 Problem reported by twlevo@xs4all.nl.
6432
a420f962
PE
6433 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6434 standards. Use "file name" or "file" or "name", depending on
6435 the context.
6436 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6437 not to hack/foo.tab.c.
6438 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
6439 * data/glr.c: b4_filename -> b4_file_name.
6440 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6441 All uses changed.
6442 (class position): filename -> file_name. All uses changed.
6443 * data/yacc.c: b4_filename -> b4_file_name.
6444 * lib/bitset.h: filename -> file_name in local vars.
6445 * lib/bitset_stats.c: Likewise.
6446 * src/files.c: Likewise.
6447 * src/scan-skel.l ("@output ".*\n): Likewise.
6448 * src/files.c (file_name_split): Renamed from filename_split.
6449 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
6450
64512005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6452
6453 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6454 to accommodate latest gnulib.
6455
6456 * tests/glr-regression.at (Duplicate representation of merged trees):
6457 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6458
6459 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6460 needed.
6461
42a6501d
PE
64622005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6463
6464 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6465 All uses changed. Invoke user destructor after an error during a
6466 split parse (trivial change from Joel E. Denny).
6467
6468 * tests/glr-regression.at
6469 (User destructor after an error during a split parse): New test case.
6470 Problem reported by Joel E. Denny in:
6471 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6472
ef9a1faf
PE
64732005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6474
5b4aaf78
PE
6475 * README-cvs: Give URLs for recommended tools.
6476 Mention Gzip version problem, and bootstrapping issues.
6477 Remove troubleshooting section, as it's somewhat obsolete.
6478
b5240ba5
PE
6479 * bootstrap (no_cache): New var, to accommodate different wget
6480 variants. Use it instead of '-C off'. Problem reported by
6481 twlevo@xs4all.nl.
6482
ef9a1faf
PE
6483 * data/glr.c (yydestroyStackItem): New function.
6484 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6485 debugging information. Problem reported by Joel E. Denny.
6486
e6efa9da
AD
64872005-08-25 Akim Demaille <akim@epita.fr>
6488
6489 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6490
adc90f13
PE
64912005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6492
6493 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6494 Don't invoke destructor on unresolved entries.
6495 * tests/glr-regression.at
6496 (User destructor for unresolved GLR semantic value): New test case.
6497 Problem reported by Joel E. Denny in:
6498 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6499
f9315de5
PE
65002005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6501
15d29c1f
PE
6502 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6503 Add strnlen.c.
6504 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6505 lib-prefix.m4, po.m4.
6506
dd5f2af2
PE
6507 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6508 in yydestruct diagnostic, since it might not be an error.
6509 Problem reported by Joel Denny near end of
6510 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 6511 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
6512 * data/yacc.c (yyreturn): Likewise.
6513 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6514
6515 * src/files.c: Remove obsolete FIXME comment.
6516
6517 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6518 with the other templates, and to fix bogus run-on messages such
6519 as the one reported at the end of
6520 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6521 All callers changed to avoid the newline.
6522 (yyprocessOneStack): Output two lines rather than one, to accommodate
6523 the above change. This changes the debug output format slightly.
6524
f9315de5
PE
6525 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6526 reported by Joel E. Denny in
6527 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6528 (trivial change).
6529 * tests/glr-regression.at (Duplicate representation of merged trees):
6530 New test, from Joel E. Denny in:
6531 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6532 * THANKS: Add Joel E. Denny.
6533
6534 * configure.ac (AC_INIT): Bump to 2.0c.
6535
04098407
PE
65362005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6537
6538 * NEWS: Version 2.0b.
6539
ca5d2013
PE
6540 * Makefile.am (SUBDIRS): Put examples before tests, so that
6541 "make check" doesn't finish with "All 1 tests passed".
6542
3d54b576
PE
6543 * tests/regression.at (Token definitions): Don't rely on
6544 AT_PARSER_CHECK for data that contains backslashes. It currently
6545 uses 'echo', and 'echo' isn't portable if its argument contains
6546 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6547 that the byte '\0xff' is not printable in the C locale; it is,
6548 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6549 not printable, so use '\0x81' to test.
6550
d53ae497
PE
6551 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6552 version of GCC, since the macro is used with non-GCC compilers.
6553
fc01665e
PE
6554 Fix core dump reported by Pablo De Napoli in
6555 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6556 * tests/regression.at (Invalid inputs with {}): New test.
6557 * src/parse-gram.y (token_name): Translate type before using
6558 it as an index.
6559
04098407
PE
6560 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6561 the user's name space. All uses changed to __attribute__
6562 ((__unused__)).
6563 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6564 Add __attribute__ ((__noreturn__)).
6565
6566 * etc/clcommit: Remove. We weren't using it, and it failed
6567 "make maintainer-distcheck".
6568 * Makefile.maint: Merge from coreutils.
6569 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6570 (syntax-check-rules): Change list of rules as described below.
6571 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6572 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6573 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6574 (sc_trailing_space): New rules.
6575 (sc_xalloc_h_in_src): Remove.
6576 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6577 (sc_space_tab, sc_error_exit_success, sc_changelog):
6578 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6579 (makefile-check, po-check, author_mark_check):
6580 (makefile_path_separator_check, copyright-check):
6581 Use grep -n, to make it easier to find violations.
6582 Use CVS_LIST and CVS_LIST_EXCEPT.
6583 (header_regexp, h_re): Remove.
6584 (dd_c): New macro.
6585 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6586 (my-distcheck): Use more-modern GCC flags.
6587 (signatures, %.asc): Remove.
6588 (rel-files, announcement): Remove signatures.
6589 Restore old updating code, even though we don't use it, so
6590 that we're the same as coreutils.
6591 (alpha, beta, major): Depend on news-date-check.
6592 Make the upload commands.
6593
6594 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6595 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6596 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6597 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6598 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6599 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6600 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6601 * tests/sets.at: Likewise.
6602
6603 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6604 we comment out the Autoconf version number.
6605 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6606 it's error-prone and "make maintainer-distcheck" rejects it.
6607
6608 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6609 Indent calls to "error" to pacify "make maintainer-distcheck",
6610 when the calls are not intended to be translated.
6611 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6612
6613 * src/Makefile.am (DEFS): Use +=, to pacify
6614 "make maintainer-distcheck".
6615 (bison_SOURCES): Add scan-skel.h.
6616 (sc_tight_scope): New rule, from coreutils.
6617
6618 * src/files.c (src_extension, header_extension):
6619 Now static, not extern.
6620 * src/getargs.c (short_options): Likewise.
6621 * src/muscle_tab.c (muscle_table): Likewise.
6622 * src/parse-gram.y (current_class, current_type, current_prec):
6623 Likewise.
6624 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6625 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6626 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6627 void, to avoid warning when NLS is disabled.
6628 * src/output.c: Include scan-skel.h.
6629 (scan_skel): Remove decl, since scan-skel.h does this.
6630 (output_skeleton):
6631 Indent calls to "error" to pacify "make maintainer-distcheck".
6632 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6633 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6634 "make maintainer-distcheck".
6635 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6636 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6637 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6638 (skel_lex_destroy, scan_skel): Move these decls to...
6639 * src/scan-skel.h: New file.
6640 * src/uniqstr.c (uniqstr_assert):
6641 Indent calls to "error" to pacify "make maintainer-distcheck".
6642
6643 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6644 not @VAR@.
6645
6646 * tests/torture.at: Revamp to avoid misuse of atoi that
6647 "make maintainer-distcheck" complained about.
6648
6649 * examples/extexi (message): Don't print a message more than once,
6650 and omit line-number decoration that makes Emacs compile think
6651 that informative messages are worth worrying about.
6652
66532005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6654
6655 * configure.ac: Update version number.
6656
6657 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6658 accidentally.
6659 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6660 autogenerated by the maintainer.
6661 * examples/calc++/.cvsignore: Add *.yy.
6662
6663 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6664 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6665 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6666
6667 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6668
6669 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6670 from maintainer-distcheck about casting the argument of 'free'.
6671
6672 * NEWS: Mention recent yytname changes.
6673 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6674
6675 * bootstrap: For translations that have not yet been upgraded to
6676 the new runtime-po domain, prime the pump by extracting the
6677 relevant strings from the obsolete translations. This code can be
6678 removed once the bison-runtime domain has been translated by each
6679 team.
6680
6681 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6682 now that token names are already quoted.
6683
6684 Fix problem reported by Anthony Heading.
6685 * data/glr.c (YYTOKEN_TABLE): New macro.
6686 (yytname): Define if YYTOKEN_TABLE.
6687 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6688 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6689 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6690 * src/output.c (prepare_symbols): Output token_table_flag.
6691
0ffda363
PE
66922005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6693
6694 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6695 again if the first call fails.
6696
6697 * data/glr.c (yytnamerr): New function.
6698 (yyreportSyntaxError): Use it to dequote most string literals.
6699 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6700 with other skeletons. All uses changed.
6701 (yytnameerr_): New function.
6702 (yyreport_syntax_error): Use it to dequote most string literals.
6703 * data/yacc.c (yytnamerr): New function.
6704 (yyerrlab): Use it to decode most string literals.
6705 * doc/bison.texinfo (Decl Summary, Calling Convention):
6706 Clarify quoting convention of yytname.
6707 * src/output.c (prepare_symbols): Quote all names. This undoes
6708 the 2005-04-17 change, which is now accomplished (mostly) via
6709 changes in the parsers as described above.
6710 * tests/regression.at (Token definitions, Web2c Actions):
6711 Undo most 2005-04-17 change here, too.
6712
67132005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6714
6715 Fix more problems reported by twlevo@xs4all.nl.
6716 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6717 remove trailing spaces. This loses the exit status of ./types,
6718 and isn't needed since ./types shouldn't be emitting trailing
6719 spaces.
6720 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6721 as the stack isn't valid in that case.
6722
6723 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6724 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6725 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6726 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6727 is used.
6728 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6729 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6730 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6731 Likewise.
6732
6733 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6734 overly-picky compilers that reject 'char *foo = "bar";'.
6735
6736 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6737 to FILE * parameter, not to stderr. This fixes a typo introduced
6738 in the 2005-07-12 change.
6739
6740 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6741 warnings from GCC 4.
6742
6743 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6744 (yyglrShiftDefer, yysplitStack):
6745 Remove unused parameters b4_pure_formals. All uses changed.
6746 (yyglrShift): Remove unused parameters b4_user_formals.
6747 All uses changed.
6748 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6749
6100a9aa
PE
67502005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6751
258b75ca
PE
6752 Destructor cleanups and regularization among the three skeletons.
6753 * NEWS: Document the behavior changes.
6754 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6755 stack before failing, as the cleanup code will do it for us now.
6756 * data/lalr1.cc (yyerrlab): Likewise.
6757 * data/glr.c (yyparse): Pop everything off the stack before
6758 freeing it, so that destructors get called properly.
6759 * data/lalr1.cc (yyreturn): Likewise.
6760 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6761 This is more consistent.
6762 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6763 why destructors might be called. 1.875 -> 2.1.
6764 (Destructor Decl, Decl Summary, Table of Symbols):
6765 Some English-language cleanups for %destructor.
6766 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6767 Add output line for destructor of start symbol.
6768 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6769 because of that same extra output line.
6770
1a059451
PE
6771 * NEWS: Document minor wording changes in diagnostics of
6772 Bison-generated parsers.
6773 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6774 Remove unused formals. All uses changed.
6775 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6776 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6777 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6778 Rename yyoverflowab to yyexhaustedlab.
6779 When memory exhaustion occurs during syntax-error reporting,
6780 report it separately rather than in a single diagnostic; this
6781 eases translation.
6782 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6783 (Memory Exhausted): Renamed from Parser Stack Overflow.
6784 Revamp wording slightly to prefer "memory exhaustion".
6785 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6786
97460c78
PE
6787 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6788
30757c8c
PE
6789 Add i18n support to the GLR skeleton. Partially fix the C++
6790 skeleton; a C++ expert needs to finish this. Remove debugging
6791 msgids; there's little point to having them translated, since they
6792 can be understood only by someone who can read the
6793 (English-language) source code.
6794
6795 Generate runtime-po/bison-runtime.pot automatically, so that we
6796 don't have to worry about garbage getting in that file. We'll
6797 make sure after the next official release that old msgids don't
6798 get lost. See
6799 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6800
6801 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6802 Now auto-generated.
6803 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6804 Fix typos in explanations of the runtime file.
6805 * bootstrap: Change gettext keyword from YYI18N to YY_.
6806 Use standard Makefile.in.in in runtime-po, since we'll arrange
6807 for backward-compatible bison-runtime.po files in a different way.
6808 * data/glr.c (YY_): New macro, from yacc.c.
6809 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6810 Translate messages intended for users.
6811 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6812 the wording in the other skeletons. We don't know that the memory
6813 is virtual.
6814 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6815 Use same method that yacc.c uses.
6816 Don't translate debugging messages.
6817 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6818 it doesn't work (yet), and requires C++ expertise to fix.
6819 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6820 Move defn to a more logical place, to be consistent with other
6821 skeletons.
6822 Don't translate debugging messages.
6823 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6824 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6825 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6826 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6827
ac8c5689
PE
6828 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6829 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6830 void, not int.
6831 * tests/glr-regression.at (Badly Collapsed GLR States):
6832 Likewise.
6833 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6834 yylex should return 0 at EOF rather than aborting.
6835
6100a9aa
PE
6836 Improve tests for stack overflow in GLR parser.
6837 Problem reported by twlevo@xs4all.nl.
6838 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6839 All uses removed.
6840 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6841 can handle the problem.
6842 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6843 (yyparse): New local variable yyresult to record the result.
6844 Use result of setjmp to set it, rather than storing itinto
6845 struct.
6846 (yyDone): Remove label.
6847 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6848 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6849 if YYABORT is used).
6850 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6851 yyparse status; put status > 1 into diagnostic.
6852 Check that status==2 works.
6853 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6854 Use exit status 3 for failure to open (which shouldn't happen).
6855
15f40952
PE
68562005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6857
67fd79c4
PE
6858 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6859 1 on syntax error; just let yyparse do its thing.
6860 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6861 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6862 (Exploding the Stack Size with Alloca):
6863 (Exploding the Stack Size with Malloc):
6864 Expect exit status 2, not 1, since the parser is supposed to blow
6865 its stack. Problem reported by twlevo@xs4all.nl.
6866
15f40952
PE
6867 * data/glr.c (yyparse): Don't assume that the initial calls
6868 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6869 Print a stack-overflow message and fail instead.
6870 Initialize the line-number information before creating the stack,
6871 so that the stack-overflow message can report line zero safely.
6872
f32c66b5
PE
68732005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6874
a22ff96f 6875 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
6876 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6877 (yyuserMerge): Provide a default case if b4_mergers is empty.
6878 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6879 * tests/glr-regression.at
6880 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 6881 Add casts to pacify C++ compilers.
1beb0b24
PE
6882 * tests/glr-regression.at (Improper merging of GLR delayed action
6883 sets): Declare yylex before using it.
f32c66b5 6884 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
6885 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6886 test for valgrind; valgrind is independent of g++.
6887 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6888 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6889 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6890 Use a destructor, so that we can expand the stack. Change
6891 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 6892
d741bd1b
PE
68932005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6894
6895 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6896 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6897
0410a6e0
PE
68982005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6899
6900 * PACKAGING: New file, suggested by Bruno Haible and taken from
6901 similar wording in gettext's PACKAGING file.
6902 * NEWS: Mention PACKAGING.
6903 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6904
f7ab6a50
PE
69052005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6906
baf785db 6907 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
6908 * bootstrap: Get runtime translations into runtime-po.
6909 Create runtime-po files automatically, if possible.
6910 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6911 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6912 does not infringe on the user's name space.
6913 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6914 * doc/bison.texinfo (Internationalization): Revamp the English
6915 and Texinfo syntax a bit, to try to make it clearer.
6916 (Bison Options, Option Cross Key): Mention --print-localedir.
6917 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6918 YYENABLE_NLS. Quote a bit more.
6919 * runtime-po/.cvsignore: New file.
6920 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6921 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6922 * runtime-po/quot.sed: Likewise.
6923 * runtime-po/boldquot.sed: Likewise.
6924 * runtime-po/en@quot.header: Likewise.
6925 * runtime-po/en@boldquot.header: Likewise.
6926 * runtime-po/insert-header.sin: Likewise.
6927 * runtime-po/remove-potcdate.sin: Likewise.
6928 * runtime-po/Makevars: Likewise.
6929 * runtime-po/LINGUAS: Likewise.
6930 * runtime-po/de.po: Likewise; we will rely on the translation project
6931 to maintain this, so "bootstrap" should get it.
0410a6e0 6932 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
6933 its value.
6934 * src/main.c (main): Bind the bison-runtime domain, too.
6935
69362005-07-12 Bruno Haible <bruno@clisp.org>
6937
6938 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6939 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6940 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6941 * runtime-po: New directory.
6942 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6943 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6944 * runtime-po/Rules-quot: New file, copied from po/.
6945 * runtime-po/quot.sed: Likewise.
6946 * runtime-po/boldquot.sed: Likewise.
6947 * runtime-po/en@quot.header: Likewise.
6948 * runtime-po/en@boldquot.header: Likewise.
6949 * runtime-po/insert-header.sin: Likewise.
6950 * runtime-po/remove-potcdate.sin: Likewise.
6951 * runtime-po/Makevars: New file.
6952 * runtime-po/POTFILES.in: New file.
6953 * runtime-po/LINGUAS: New file.
6954 * runtime-po/bison-runtime.pot: New file.
6955 * runtime-po/de.po: New file.
6956 * m4/bison.m4: New file.
6957 * Makefile.am (SUBDIRS): Add runtime-po.
6958 (aclocaldir, aclocal_DATA): New variables.
6959 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6960 Define aclocaldir.
6961 * src/getargs.c (usage): Document --print-localedir option.
6962 (PRINT_LOCALEDIR_OPTION): New enum item.
6963 (long_options): Add --print-localedir option.
6964 (getargs): Handle --print-localedir option.
6965 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6966 (Internationalization): New section.
6967
22dda0f0
AD
69682005-07-12 Akim Demaille <akim@epita.fr>
6969
6970 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6971 for consistency with the rest of the code.
6972 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6973 Add separators.
6974
82b248ad
AD
69752005-07-12 Akim Demaille <akim@epita.fr>
6976
6977 * src/parse-gram.y: Use %printer instead of YYPRINT.
6978
fa0e9314
AD
69792005-07-12 Akim Demaille <akim@epita.fr>
6980
867a3e00
AD
6981 * src/symtab.h, src/symtab.c (symbol_print): New.
6982 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6983 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6984
69852005-07-12 Akim Demaille <akim@epita.fr>
6986
6987 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
6988 b4_at_dollar and b4_dollar_dollar.
6989
e054b190
PE
69902005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6991
6992 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6993 and Pennello's paper.
6994
34160ec4
PE
69952005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6996
407d4a75
PE
6997 * data/yacc.c (yyparse): Undo previous patch. Instead,
6998 set yylsp[0] and yyvsp[0] only if the initial action
6999 sets yylloc and yylval, respectively.
7000
34160ec4
PE
7001 * data/yacc.c (yyparse): In the initial action, set
7002 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
7003 This avoids the use of undefined variables if the initial
7004 action does not set yylloc and/or yylval.
7005
c3d5a4a7
PE
70062005-07-07 Paul Eggert <eggert@cs.ucla.edu>
7007
b34d96c1
PE
7008 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
7009 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
7010 Remove from CVS. These files are automatically generated.
7011 * examples/extexi: Clarify that this file is now part of Bison,
7012 not GNU M4, and that it works with any POSIX-compatible Awk.
7013 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
7014 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
7015 so that we also get calc++-parser.yy. Geneate it.
7016 Use $(AWK), not gawk, since any conforming Awk will do.
7017 Put comment before action, since older 'make' can't handle comment
7018 in action.
7019 $(BUILT_SOURCES): List all built sources, not just some of them.
7020 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
7021 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
7022 $($(calc_sources_generated)): Remove unnecessary test for existence
7023 of target. (This had a shell syntax error anyway; a stray "x".)
7024 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
7025 calc++-parser.yy.
7026 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
7027
c3d5a4a7
PE
7028 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
7029 implied by the other modules.
7030
828c373b
AD
70312005-07-06 Akim Demaille <akim@epita.fr>
7032
7033 Bind examples/calc++ to the package.
7034 * examples/calc++/Makefile: Remove, replaced by...
7035 * examples/calc++/Makefile.am: ... this new file.
7036 * examples/calc++/test: Remove input.
7037 * examples/calc++/compile: Remove.
7038 * examples/Makefile.am: New.
7039 * configure.ac, Makefile.am: Adjust.
7040 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7041
63cb01d6
PE
70422005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7043
fd2df2ed
PE
7044 * data/glr.c (yyFail): Drastically simplify; since the format argument
7045 never had any % directives, we can simply pass it to yyerror.
7046 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7047 be modified later, as that is the usual style in glr.c.
7048 Problems reported by Paul Hilfinger.
7049
63cb01d6
PE
7050 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7051 and size overflow errors.
7052 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7053 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7054 (YYSIZEMAX): New macro.
7055 (yystpcpy): New function, taken from yacc.c.
7056 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7057 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7058 so that we don't have to maintain their signatures.
7059 (yyFail): Check for buffer overflow, by using vsnprintf rather
7060 than vsprintf. Allocate a bigger buffer if possible.
7061 Report an error if buffer allocation fails.
7062 (yyStackOverflow): New function.
7063 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7064 the initialization was successful. It might fail if storage was
7065 exhausted.
7066 (yyexpandGLRStack): Add more checks for storage allocation failure.
7067 Use yyStackOverflow to report failures.
7068 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7069 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7070 Don't assume stack number fits in int.
7071 (yysplitStack): Check for storage allocation failure.
7072 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7073 can print diagnostics on storage allocation failure. All callers
7074 changed.
7075 (yyresolveValue): Use yybool for boolean.
7076 (yyreportSyntaxError): Check for size-calculation overflow.
7077 This code is taken from yacc.c.
7078 (yyparse): Check for storage allocation errors when allocating
7079 the initial stack.
7080
1c59e0a1
AD
70812005-07-05 Akim Demaille <akim@epita.fr>
7082
7083 Extract calc++ from the documentation.
7084 * doc/bison.texinfo (Calc++): Add the extraction marks.
7085 * examples/extexi: New, from the aborted GNU Programming 2E.
7086 Separate the different paragraph of a file with empty lines.
7087 * examples/Makefile: Use it to extract the whole calc++ example.
7088
8a0adb01
AD
70892005-06-24 Akim Demaille <akim@epita.fr>
7090
7091 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7092 class typedefs.
7093
12545799
AD
70942005-06-22 Akim Demaille <akim@epita.fr>
7095
7096 * doc/bison.texinfo (C++ Language Interface): First stab.
7097 (C++ Parsers): Remove.
7098
99be0235
AD
70992005-06-22 Akim Demaille <akim@epita.fr>
7100
7101 * data/lalr1.cc (yylex_): Honor %lex-param.
7102
0ffd4fd1
AD
71032005-06-22 Akim Demaille <akim@epita.fr>
7104
7105 Start a set of simple examples.
7106 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7107 * examples/calc++/calc++-driver.hh,
7108 * examples/calc++/calc++-parser.yy,
7109 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7110 * examples/calc++/compile, examples/calc++/test: New.
7111
0925ebb4
PE
71122005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7113
7114 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7115 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7116 which stems from the 2005-05-27 patch.
7117
43d3b664
PH
71182005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7119
7120 * data/glr.c: Modify treatment of unused parameters to permit use
7121 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7122
3062864d
PE
71232005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7124
7125 Fix infringement on user name space reported by Janos Zoltan Szabo.
7126 * data/yacc.c (yyparse): strlen -> yystrlen.
7127
989b5b8e
AD
71282005-05-30 Akim Demaille <akim@epita.fr>
7129
7130 * data/lalr1.cc (_): New.
7131 Translate the various messages.
7132
bedf57f5
PE
71332005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7134
7135 Fix infringement on user name space reported by Bruno Haible.
7136 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7137 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7138 the user's name space.
7139 (alloca): Include <stdlib.h> to get it, if it's not built in.
7140 (YYMALLOC, YYFREE): Define only if needed.
7141 (malloc, free): Declare, but only if needed, as this infringes on
7142 the user name space.
7143
4d1801f1
PE
71442005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7145
7146 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7147 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7148 with %d format.
7149 * lib/ebitset.c (min, max): Undef before defining.
7150 * lib/vbitset.c (min, max): Likewise.
7151 * lib/subpipe.c (create_subpipe): Save local variables in case
7152 vfork clobbers them.
7153
71542005-05-24 Bruno Haible <bruno@clisp.org>
7155
7156 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7157 error message syntax used by gcc-4.0.
7158
b94a9e1e
PE
71592005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7160
85ac3861
PE
7161 * README: Mention m4 1.4.3. Remove obsolete advice about
7162 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7163
b94a9e1e
PE
7164 * bootstrap: Remove workaround for problem I encountered with
7165 gettext 0.14.1; it seems to be fixed now.
7166
51c30d21
PE
71672005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7168
009ce67d
PE
7169 * NEWS: Version 2.0a.
7170
f2a97c62
PE
7171 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7172 the previous change.
7173
c8775f93
PE
7174 Various maintainer cleanups.
7175 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7176 conftest*, for benefit of CVS commands run at the same time as
7177 "configure". Add build-aux, since "bootstrap" now creates it and
7178 its subfiles.
7179 * Makefile.cfg (move_if_change): Remove.
7180 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7181 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7182 (po_repo, do-po-update, po-update, wget_files, get-targets):
7183 (config.guess-url_prefix, config.sub-url_prefix):
7184 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7185 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7186 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7187 Remove.
7188 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7189 this is now the recommended name.
7190 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7191 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7192 ylwrap. These files now go into build-aux.
7193 * config/move-if-change: Remove.
7194 * config/prev-version.txt: Bump from 1.75 to 2.0.
7195
3ea5f0ec
PE
7196 * bootstrap: Add stdio-safer, unistd-safer modules.
7197 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7198 we don't need it).
7199 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7200 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7201 * lib/subpipe.c: Include "unistd-safer.h".
7202 (create_subpipe): Make sure all the newly-created
7203 file descriptors are > 2, so that diagnostics don't
7204 get sent down them (which might cause Bison to hang, in theory).
7205 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7206 * src/files.c (xfopen): Use fopen_safer, not fopen.
7207
51c30d21
PE
7208 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7209 yesterday's yacc.c fix.
7210
cea1469d
PE
72112005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7212
3ea5f0ec
PE
7213 * data/glr.c, data/lalr1.cc: Update copyright date.
7214
cea1469d
PE
7215 Fix a destructor bug reported by Wolfgang Spraul in
7216 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7217 * data/yacc.c (yyabortlab): Don't call destructor, and
7218 don't set yychar to EMPTY.
7219 (yyoverflowlab): Don't call destructor.
7220 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7221 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7222 since we no longer output the message "discarding lookahead token
7223 end of input ()".
7224
5e6f62f2
PH
72252005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7226
7227 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7228 fix a small glitch in debugging output.
7229 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7230 after YY_SYMBOL_PRINT where needed.
7231
7232 (struct yyGLRState): Add some comments.
7233 (struct yySemanticOption): Add some comments.
7234 (union yyGLRStackItem): Add comment.
7235
7236 (yymergeOptionSets): Correct this to properly perform the union,
7237 avoiding infinite reported by Michael Rosien.
7238 Update comment.
7239
7240 * tests/glr-regression.at: Add test for GLR merging error reported
7241 by M. Rosien.
cea1469d 7242
0fb669f9
PE
72432005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7244
7245 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7246 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7247 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7248 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7249 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7250 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7251 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7252 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7253 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7254 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7255 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7256 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7257 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7258 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7259 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7260 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7261 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7262 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7263 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7264 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7265 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7266 src/output.h, src/parse-gram.c, src/parse-gram.h,
7267 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7268 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7269 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7270 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7271 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7272 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7273 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7274 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7275 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7276 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7277 tests/reduce.at, tests/regression.at, tests/sets.at,
7278 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7279 Update FSF postal mail address.
7280
51f4735e
PE
72812005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7282
7283 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7284 Problem reported by Ralf Menzel.
7285
80ce3401
PE
72862005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7287
7288 * tests/actions.at: Test that stack overflow invokes destructors.
7289 From Marcus Holland-Moritz.
7290 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7291 from here....
7292 (yyreturn): to here. That way, destructors are called properly
7293 even if the stack overflows, or the user calls YYACCEPT or
7294 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7295 (yyoverflowlab): Destroy the lookahead.
7296
72972005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7298
7299 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7300
72f000b0
PE
73012005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7302
7303 * NEWS: Bison-generated C parsers no longer quote literal strings
7304 associated with tokens.
7305 * src/output.c (prepare_symbols): Don't escape strings,
7306 since users don't want to see C escapes.
7307 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7308 in diagnostics.
c19683bb 7309 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
7310 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7311
1094323f
PE
73122005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7313
7314 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7315 the data size is known to be too small and we can't increase it.
7316 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7317
ca407bdf
PE
73182005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7319
7320 * src/parse-gram.y: Include quotearg.h.
7321 (string_as_id): Quote $1 before using it as a key, since the
7322 lexer no longer quotes it for us.
7323 (string_content): Don't strip quotes, since lexer no longer
7324 quotes it for us.
7325 * src/scan-gram.l: Include quotearg.h.
7326 ("\""): Omit quote.
7327 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7328 a key, since the rest of the lexer doesn't quote it.
7329 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7330 * tests/regression.at (Token definitions): Check for backslashes
7331 in token strings.
7332
7333 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7334 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7335 (yyparse): Revamp code to generate long syntax error message, to
7336 make it easier to translate, and to avoid problems with arithmetic
7337 overflow. Change "virtual memory" to "memory" in diagnostic, since
7338 we don't know whether the memory is virtual.
7339
1ce59070
PE
73402005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7341
7342 * NEWS: Bison-generated C parsers now use the _ macro to
7343 translate strings.
7344 * data/yacc.c (_) [!defined _]: New macro.
7345 All English strings wrapped inside this macro.
7346 * doc/bison.texinfo (Bison Parser): Document _.
7347 * po/POTFILES.in: Include src/parse-gram.c, since it now
7348 includes translateable strings that parse-gram.y doesn't.
7349
a749a695
PE
73502005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7351
7352 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7353 reverting the 2004-10-11 change to this function.
7354 (symbol_check_alias_consistency): Don't call symbol_type_set
7355 if the type name is already correct.
7356 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7357
8fb1053b
PE
73582005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7359
7360 * tests/regression.at (Token definitions): Don't use a token named
7361 c, as that generates a "#define c ..." that runs afoul of buggy
7362 stdlib.h that uses the identifier c as a member of struct
7363 drand48_data. Problem reported by Horst Wente.
7364
ff498c4a
PE
73652005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7366
7367 * bootstrap: Change translation URL from
7368 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7369 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7370 redirection glitches. Problem reported by twlevo@xs4all.nl.
7371
65211d70
PE
73722005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7373
7374 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7375 after operands; POSIX says this isn't portable for the c99 command.
7376
9577fb1f
PE
73772005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7378
7379 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7380 immediately if a data overrun has occurred; this may help us track
7381 down what may be a spurious failure on MacOS.
7382
78b178f7
PE
73832005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7384
a2599d0f
PE
7385 Respond to problems reported by twlevo@xs4all.nl.
7386
7387 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7388
78b178f7
PE
7389 * src/vcg.h: Comment fix.
7390 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7391 (G_CMAX): Change to -1 instead of INT_MAX.
7392
7393 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 7394
7296e729
PE
73952005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7396
7397 * src/tables.c (state_number_to_vector_number): Put it inside an
7398 "#if 0", since it's not currently used. Problem reported by
7399 Roland McGrath.
7400
05ac60f3
PE
74012005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7402
7403 * src/output.c (escaped_output): Renamed from
7404 escaped_file_name_output, since we now use it for symbol tags as
7405 well. All uses changed.
7406 (symbol_destructors_output, symbol_printers_output):
7407 Escape symbol tags too.
7408 Problem reported by Matyas Forstner in
7409 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7410
7411 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7412 not needed.
7413 * src/output.c (user_actions_output, token_definitions_output,
7414 symbol_destructors_output, symbol_printers_output): Likewise.
7415 * src/reader.c (prologue_augment): Likewise.
7416 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7417
7418 * src/vcg.c (output_edge): Don't quote linestyle arg.
7419 Problem reported by twlevo@xs4all.nl.
7420
7eb453ac
PE
74212005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7422
7423 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7424 example, reported by Derek M Jones. Also, make the example even
7425 more outrageous, to better illustrate how bad the problem is.
7426
4c04c52a
PE
74272005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7428
7429 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7430 putsym. Typo reported by Sebastian Piping.
7431
a61e1620
PE
74322005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7433
7434 * doc/bison.texinfo (Language and Grammar): some -> same
7435 (Epilogue): int he -> in the
7436 Typos reported by Sebastian Piping via Justin Pence.
7437
9ec93868
PE
74382005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7439
7440 * tests/glr-regression.at (Improper handling of embedded actions
7441 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7442 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7443 with dollar signs in test names.
7444 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7445 for a similar reason.
7446
73ce7e7e
PE
74472005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7448
7449 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7450 wants to redefine G_VIEW.
7451
2e72b98e
PE
74522005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7453
7454 * src/vcg.c (get_view_str): Remove case for normal_view.
7455 Problem reported by twlevo@xs4all.nl.
7456
e0d634e5
PE
74572005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7458
ccf830a4
PE
7459 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7460 Problem reported by twlevo@xs4all.nl.
7461
e0d634e5
PE
7462 * doc/bison.texinfo: Change @dircategory from "GNU programming
7463 tools" to "Software development". Requested by Richard Stallman
7464 via Karl Berry.
7465
7bbc8cb0
PE
74662005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7467
7468 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7469 Problem reported by twlevo@xs4all.nl.
7470
08b770bc
PE
74712005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7472
7473 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7474 keyword; it's not needed with modern compilers, and it doesn't
7475 affect correctness with older compilers. Suggested by
7476 twlevo@xs4all.nl.
7477
95f22ad2
PE
74782005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7479
7480 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7481 gcc -Wswitch-default.
7482 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7483 * data/yacc.c (yyparse): Likewise.
7484
d229d15c
PE
74852005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7486
7487 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7488 already. Let config.h define any nonstandard values.
7489
ecadd90f
PE
74902005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7491
7492 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7493 for the benefit of slower hosts. Problem reported by
7494 Nelson H. F. Beebe.
7495
213744b5
PE
74962005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7497
7498 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7499 being defined and not used.
7500 * data/lalr1.cc (yyparse): Likewise.
7501 Use "if (false)" rather than "if (0)".
7502
249d3236
PE
75032005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7504
7505 * TODO: Mention that we should allow NUL bytes in tokens.
7506
987cc1fb
PE
75072005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7508
7509 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7510 Problem reported by Hans Aberg.
7511
08fe02d9
PE
75122005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7513
7514 * src/getargs.c (version): Happy new year; update overall
7515 program copyright date from 2004 to 2005.
7516
7517 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7518 Problem reported by Hans Aberg.
7519 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7520 (Output file names.): Add a test for the case when standard output
7521 is closed.
7522
010c0266
PE
75232004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7524
7525 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7526 to fix an oversight in the Bison 2.0 manual.
7527
da12206a
PE
75282004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7529
7530 * NEWS: Version 2.0. Reformat the existing news items since
7531 1.875, so that related items are grouped together.
3a4734aa 7532 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
7533 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7534
c935d934
PE
7535 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7536 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7537 otherwise, we're not testing alloca. Unfortunately there's no
7538 simple way to consult HAVE_ALLOCA here.
7539
da12206a
PE
7540 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7541 for yymsg, too.
7542
7543 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7544 hand. This avoids a warning about comparing int to size_t when
7545 GCC warnings are enabled.
7546
0a2c5137
PE
75472004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7548
d7e14fc0
PE
7549 * NEWS: Bison-generated parsers no longer default to using the
7550 alloca function (when available) to extend the parser stack, due
7551 to widespread problems in unchecked stack-overflow detection.
7552 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7553 responsibility to set it to a positive value. This lets the user
7554 specify a value that is not a preprocessor constant.
7555 * data/yacc.c (YYMAXDEPTH): Likewise.
7556 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7557 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7558 to be a compile-time constant. However, explain the constraints on it.
7559 Also, explain the constraints on YYINITDEPTH.
7560 (Table of Symbols): Explain that alloca is no longer the default.
7561 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7562 to 1.
7563
0a2c5137
PE
7564 * doc/bison.texinfo (Location Default Action): Mention that n must
7565 be zero when k is zero. Suggested by Frank Heckenbach.
7566
e019c247
AD
75672004-12-22 Akim Demaille <akim@epita.fr>
7568
7569 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7570 (parser::state_type, parser::semantic_type, parser::location_type):
7571 Private, not public.
7572 (parser::parse): Return ints, not bool.
7573 Returning a bool introduces a problem: 0 corresponds to false, and
7574 it seems weird to return false on success. Returning true changes
7575 the conventions for yyparse.
7576 Alternatively we could return void and send an exception.
7577 There is no clear consensus (yet?).
7578 (state_stack, semantic_stack, location_stack): Rename as...
7579 (state_stack_type, semantic_stack_type, location_stack_type): these.
7580 Private, not public.
7581 * tests/c++.at: New.
7582 * tests/testsuite.at, tests/Makefile.am: Adjust.
7583
72731bb7
AD
75842004-12-21 Akim Demaille <akim@epita.fr>
7585
7586 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7587
9a0d8bec
AD
75882004-12-21 Akim Demaille <akim@epita.fr>
7589
7590 Don't impose std::string for filenames.
7591
7592 * data/lalr1.cc (b4_filename_type): New.
7593 (position::filename): Use it.
7594 (parser.hh): Move the inclusion of stack.hh and location.hh below
7595 the user code, so that needed headers for the filename type can be
7596 included first.
72731bb7
AD
7597 Forward declare them before the user code.
7598 * tests/Makefile.am (check-local, installcheck-local): Pass
7599 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 7600
99880de5
AD
76012004-12-20 Akim Demaille <akim@epita.fr>
7602
7603 Use more STL like names: my_class instead of MyClass.
7604
7605 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7606 (SemanticStack, SemanticType, StateStack, StateType)
7607 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7608 (Parser::value): Rename as...
7609 (location_stack, location_type, rhs_number_type, semantic_stack)
7610 (semantic_type, state_stack, state_type, token_number_type, stack)
7611 (slice, traits, parser::yylloc, parser::yylval): these.
7612
7613 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7614
9bec482e
PE
76152004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7616
7617 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7618 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7619
f6fbd3da
PE
76202004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7621
7622 Remove uses of 'short int' and 'unsigned short int'. This raises
7623 some arbitrary limits. It uses more memory but nowadays that's
7624 not much of an issue.
7625
7626 This change does not affect the generated parsers; that's a different
7627 task, as some users will want to conserve memory there.
7628
7629 Ideally we should use size_t to represent all object counts, and
7630 something like ptrdiff_t to represent signed differences of object
7631 counts; but that will require more code-cleanup than I have the
7632 time to do right now.
7633
7634 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7635 Use size_t, not int or short int, to count objects.
7636 * src/closure.c (nritemset, closure): Likewise.
7637 * src/closure.h (nritemset, closure): Likewise.
7638 * src/nullable.c (nullable_compute): Likewise.
7639 * src/print.c (print_core): Likewise.
7640 * src/print_graph.c (print_core): Likewise.
7641 * src/state.c (state_compare, state_hash): Likewise.
7642 * src/state.h (struct state): Likewise.
7643 * src/tables.c (default_goto, goto_actions): Likewise.
7644
7645 * src/gram.h (rule_number, rule): Use int, not short int.
7646 * src/output.c (prepare_rules): Likewise.
7647 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7648 errs, reductions): Likewise.
7649 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7650 Likewise.
7651 * src/tables.c (vector_number, tally, action_number,
7652 ACTION_NUMBER_MINIMUM): Likewise.
7653 * src/output.c (muscle_insert_short_int_table): Remove.
7654
efeed023
AD
76552004-12-17 Akim Demaille <akim@epita.fr>
7656
7657 * data/lalr1.cc: Extensive Doxygenation.
7658 (error_): Rename as...
7659 (error): this, since it is visible to the user.
7660 Adjust callers.
7661 (Parser::message): Now an automatic variable from...
7662 (Parser::yyreport_syntax_error_): here.
7663 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7664 Parser::error.
7665 * tests/input.at: Escape $.
7666
bc82c5a5
PE
76672004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7668
7669 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7670 Parenthesize rhs to avoid obscure problems with mistakes like
7671 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7672 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7673 b4_rhs_location): Likewise.
7674 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7675 b4_rhs_location): Likewise.
7676
fd19f271
AD
76772004-12-16 Akim Demaille <akim@epita.fr>
7678
7679 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7680 yacc.c: be sure to stay within yycheck_.
7681 * tests/actions.at: Re-enable C++ tests.
7682
10454ea4
AD
76832004-12-16 Akim Demaille <akim@epita.fr>
7684
7685 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7686 real.
7687
c5b95ccf
AD
76882004-12-16 Akim Demaille <akim@epita.fr>
7689
7690 Use #define to handle the %name-prefix.
7691
7692 * data/glr.c, data/yacc.c: Comment changes.
7693 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7694 so that one can refer to yylex in the parser file, and have it
7695 renamed, as is the case with other skeletons.
7696
617a8f12
AD
76972004-12-16 Akim Demaille <akim@epita.fr>
7698
7699 Move lalr1.cc internals into yy*.
7700
7701 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7702 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7703 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7704 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7705 (empty_, final_, terror_, errcode_, ntokens_)
7706 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7707 (looka_, ilooka_, error_range_, nerrs_):
7708 Rename as...
7709 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7710 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7711 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7712 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7713 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7714 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7715 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7716 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7717 these.
7718
1e547e6e
PE
77192004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7720
7721 Fix some problems reported by twlevo at xs4all.
7722 * src/symtab.c (symbol_new): Report an error if the input grammar
7723 contains too many symbols. This is better than calling abort() later.
7724 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7725 (struct node, struct graph):
7726 Rename member expand to stretch. All uses changed.
7727 (struct graph): Remove member layoutalgorithm. All uses removed.
7728 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7729 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7730 All uses changed.
7731 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7732
735d6bd4
AD
77332004-12-15 Akim Demaille <akim@epita.fr>
7734
7735 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7736 Add more Doxygen comments.
7737 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7738 (report_syntax_error_, translate_): Rename as...
7739 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7740 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7741
2e1f5829
AD
77422004-12-15 Akim Demaille <akim@epita.fr>
7743
7744 * data/lalr1.cc (lex_): Rename as...
7745 (yylex_): this.
7746 Move the trace here.
7747 Take the %name-prefix into account.
7748 Reported by Alexandre Duret-Lutz.
7749
a3cb6248
AD
77502004-12-15 Akim Demaille <akim@epita.fr>
7751
7752 Simplify the C++ parser constructor.
7753
7754 * data/lalr1.cc (debug_): Rename as...
7755 (yydebug_): so that the parser's internals are always in the yy*
7756 pseudo namespace.
7757 Adjust uses.
7758 (b4_parse_param_decl): Remove the leading comma as it is now only
7759 called as unique argument list.
7760 (Parser::Parser): Remove the constructor accepting a location and
7761 an initial debugging level.
7762 Remove from the other ctor the argument for the debugging level.
7763 (debug_level_type, debug_level, set_debug_level): New.
7764
7765 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7766 constructor calls.
7767
07fed891
AD
77682004-12-15 Akim Demaille <akim@epita.fr>
7769
7770 Remove b4_root related material: failure experiment
a3cb6248 7771 (which goal was to allow to derive from a class).
07fed891
AD
7772
7773 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7774 definitions and uses.
7775
e603eaa5
PE
77762004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7777
7778 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7779 not 2, since it's not portable to subtract 1 from the start of an
7780 array. The new item 0 is never set or used. All uses changed.
7781
7782 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7783 the default definition of YYLLOC_DEFAULT. Problem reported
7784 by Frank Heckenbach.
7785
fafb007d
PE
77862004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7787
7788 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7789 the normal case and one for the error case. Just use the
7790 first one uniformly. Problem reported by Frank Heckenbach.
7791 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7792 use exactly the same macro in both places.
7793 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7794 so that the normal-case YYRHSLOC works for the error case too.
7795 All uses changed.
7796 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7797 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7798 * doc/bison.texinfo (Location Default Action): Don't claim that
7799 we have an array of locations. Use the same macro for both glr
7800 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7801 the index is 0.
7802
48814dcd
PE
78032004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7804
a4e1a53b
PE
7805 * HACKING: Update email addresses to send announcements to.
7806
48814dcd
PE
7807 * configure.ac (AC_INIT): Bump version to 1.875f.
7808
337116ba
PE
78092004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7810
7811 * NEWS: Version 1.875e.
7812 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7813
7814 * src/scan-skel.l: Include "complain.h", for "fatal".
7815
7816 * src/relation.h (relation_print, relation_digraph):
7817 Relation sizes are of type relation_node, not size_t (this is
7818 merely a doc fix, since the two types are equivalent).
7819 (relation_transpose): Relation sizes are of type relation_node,
7820 not int.
7821 * src/relation.c: Likewise.
7822 (top, infinity): Now of type relation_node, not int.
7823 (traverse, relation_transpose): Use relation_node, not int.
7824
7825 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7826 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7827 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7828
7829 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 7830 specifying whether the test should be skipped. Use it tp
337116ba 7831 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 7832 fail on some hosts, and should be skipped.
337116ba 7833
da2a7671
PE
78342004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7835
7836 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7837 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7838 unless otherwise specified below.
7839
7840 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7841 to allocate kernel_base, kernel_items, kernel_size, since
7842 they needn't be initialized to 0.
7843 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7844 * src/closure.c (new_closure): Likewise, for itemset.
7845 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7846 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7847 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7848 (build_relations): Likewise for edge, states1, includes.
7849 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7850 * src/reader.c (packgram): Likewise, for ritem, rules.
7851 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7852 * src/relation.c (relation_digraph): Likewise for VERTICES.
7853 (relation_transpose): Likewise for new_R, end_R.
7854 * src/symtab.c (symbols_token_translations_init): Likewise for
7855 token_translations.
7856 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7857 (token_actions): Likewise for yydefact, actrow, conflrow,
7858 conflict_list.
7859 (save_column): Likewise for froms[symno], tos[symno].
7860 (goto_actions): Likewise for state_count.
7861 (pack_table): Likewise for base, pos, check.
7862 (tables_generate): Likewise for width.
7863
7864 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7865 for initial core. Just have a separate core, so we needn't worry
7866 about whether kernel_size and kernel_base are initialized.
7867
7868 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7869 kernel_size, kernel_items): Remove unnecessary initialization.
7870 * src/conflicts.c (conflicts): Likewise.
7871 * src/derives.c (derives): Likewise.
7872 * src/muscle_tablc (muscle_insert): Likewise.
7873 * src/relation.c (relation_digraph): Likewise.
7874 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7875 conflrow, conflict_table, conflict_list, table, check):
7876 Likewise.
7877
7878 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7879 This is because all callers pass unsigned int.
7880 * src/closure.h (new_closure): Likewise.
7881
7882 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7883 (build_relations): Initialize includes[i] in all cases.
7884 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7885 and rules[ruleno].precsym. Initialize members in order.
7886 * src/relation.c (relation_transpose): Always initialize new_R[i]
7887 and end_R[i].
7888 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7889
7890 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7891 conflict_list[0] was always 0, but now it isn't initialized.
7892
7893 * src/table.c (table_grow): When conflict_table grew, the grown
7894 area wasn't cleared. Fix this.
7895
7896 * lib/.cvsignore: Add strdup.c, strdup.h.
7897 * m4/.cvsignore: Add strdup.m4.
7898
00baeeac
PE
78992004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7900
7901 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7902 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7903 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7904 ngotos + 1 without checking for overflow.
7905 (build_relations): Use END_NODE, not -1, to denote end of edges.
7906 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7907 build_relations): Use goto_number, not int, for goto numbers.
7908 * src/tables.c (save_column, default_goto): Likewise.
7909
be3d9d42
AD
79102004-11-23 Akim Demaille <akim@epita.fr>
7911
7912 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7913 of #defining from yystype.
7914 Don't typedef yystype, C++ does not need it.
7915 This lets it possible to forward declare it as union.
7916
78e526d5
PE
79172004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7918
7919 * bootstrap (gnulib_modules): Add extensions.
7920 Problem reported by Jim Meyering.
7921
afbb696d
PE
79222004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7923
7924 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7925 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7926 src/system.h, src/tables.c: XFREE -> free, to accommodate
7927 recent change to gnulib xalloc.h.
78e526d5 7928 Problem reported by Jim Meyering.
afbb696d 7929
c1f8f16a
AD
79302004-11-17 Akim Demaille <akim@epita.fr>
7931
7932 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7933
db7e5eb5 79342004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
7935 Alexandre Duret-Lutz <adl@gnu.org>
7936
7937 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7938 changes.
7939 (YYCDEBUG): Adjust.
7940 Use it instead of cdebug_.
7941 (Parser::debug_stream, Parser::set_debug_stream): New.
7942 (Parser::symprint_): Define cdebug_ for temporary backward
7943 compatibility.
7944 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7945 debug_stream ().
7946
68e11668
AD
79472004-11-17 Akim Demaille <akim@epita.fr>
7948
7949 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7950 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7951 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7952 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7953
97cbc73e
PE
79542004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7955
7956 * data/glr.c (yyloc_default): Remove; not used.
7957 Problem reported by Frank Heckenbach.
7958
e342c3be
AD
79592004-10-25 Akim Demaille <akim@epita.fr>
7960
7961 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7962 Introduce another definition to address simple location arrays.
7963 (yyGLRStack): New member: yyerror_range.
7964 (yyrecoverSyntaxError, yyparse): Update it.
7965 (yyrecoverSyntaxError): Use it when shifting the error token to
7966 have an accurate range, equivalent to the one computed by both
7967 yacc.c and lalr1.cc.
7968 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7969 that column numbers start at column 0, as per GNU Coding
7970 Standards, the others tests, and the doc.
7971 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7972 Adjust to the above change (first column is 0).
7973 And adjust the location of the "<error>", now covering the whole
7974 line.
7975
93602feb 79762004-10-22 Akim Demaille <akim@epita.fr>
04098407 7977 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
7978
7979 Remove some arbitrary limits on goto numbers and relations.
7980 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7981 initial values, since they're never used.
7982 (set_goto_map): ngotos is now unsigned, so test for overflow
7983 by seeing whether it wraps around to zero.
7984 * src/lalr.h (goto_number): Now size_t, not short int.
7985 (GOTO_NUMBER_MAXIMUM): Remove.
7986 * src/relation.c (relation_print, traverse, relation_transpose):
7987 Check for END_NODE rather than looking at sign.
7988 * src/relation.h (END_NODE): New macro.
7989 (relation_node): Now size_t, not short int.
7990
dba08b04
PE
79912004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7992
7993 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7994 keyword, not an identifier. Problem reported by Baron Schwartz in
7995 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7996
df09ef2e
AD
79972004-10-11 Akim Demaille <akim@epita.fr>
7998
7999 * src/symtab.c (symbol_check_alias_consistency): Also check
8000 type names, destructors, and printers.
8001 Reported by Alexandre Duret-Lutz.
8002 Recode the handling of associativity and precedence in terms
8003 of symbol_precedence_set.
8004 Accept no redeclaration at all, not even equal to the previous
8005 value.
8006 (redeclaration): New.
8007 Use it to factor redeclaration complaints.
8008 (symbol_make_alias): Don't set the type of the alias, let
8009 symbol_check_alias_consistency do it as for other features.
8010 * src/symtab.h (symbol): Add new member prec_location, and
8011 type_location.
8012 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
8013 * tests/input.at (Incompatible Aliases): New.
8014
146bc99d
PE
80152004-10-09 Paul Eggert <eggert@cs.ucla.edu>
8016
8017 .cvsignore fixes to accommodate gnulib changes,
8018 and the practice of naming build directories "_build".
8019 * .cvsignore: Add "_*". Sort.
8020 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
8021 * m4/.cvsignore: Add "*_gl.m4".
8022
e503aa60
AD
80232004-10-06 Akim Demaille <akim@epita.fr>
8024
8025 * src/parse-gram.y (add_param): Fix the truncation of trailing
8026 spaces.
8027
b4a20338
AD
80282004-10-05 Akim Demaille <akim@epita.fr>
8029
8030 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
8031 whether the reducion was empty or not. This leaves room to
8032 improve the use of YYLLOC_DEFAULT in such a case.
8033 lalr1.cc is still experimental, so changing this is acceptable.
8034 And finally, there are probably not many users who changed the
8035 handling of locations in GLR, so changing is admissible too.
8036
8037 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8038 empty reduction, set @$ to an empty location ending the previously
8039 stacked symbol.
8040 Adjust uses to make sure the code is triggered on empty
8041 reductions.
8042 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8043 expected output: empty reductions have empty locations.
8044
f85a5e6f
AD
80452004-09-29 Akim Demaille <akim@epita.fr>
8046
8047 * data/lalr1.cc: Move towards a more standard C++ coding style
8048 for templates: Class < T > -> Class<T>.
8049
b203fc2c
AD
80502004-09-29 Akim Demaille <akim@epita.fr>
8051
8052 * data/lalr1.cc: Reinstall the former ctor, for sake of
8053 compatibility, but warn it will be removed.
8054 Move towards a more standard C++ coding style (i.e., type *var ->
8055 type* var).
8056
5b7e1e73
PE
80572004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8058
3fee967f
PE
8059 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8060 since it's less likely to work if NULs are involved in the future.
5b7e1e73 8061
0dcca5c2
AD
80622004-09-27 Akim Demaille <akim@epita.fr>
8063
8064 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8065
6dde1c82
AD
80662004-09-27 Akim Demaille <akim@epita.fr>
8067
8068 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 8069 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
8070 and argument names.
8071 (b4_cc_constructor_call): Likewise.
8072
b233d555
AD
80732004-09-24 Akim Demaille <akim@epita.fr>
8074
8075 * src/parse-gram.y (add_param): Strip the leading and trailing
8076 blanks from a formal argument declaration.
8077 (YY_LOCATION_PRINT): New.
8078
619404e3
AD
80792004-09-24 Akim Demaille <akim@epita.fr>
8080
8081 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8082 after the location.
8083
dd8d9022
AD
80842004-09-24 Akim Demaille <akim@epita.fr>
8085
8086 * doc/bison.texinfo (Table of Symbols): Sort.
8087
0092f063
AD
80882004-09-21 Akim Demaille <akim@epita.fr>
8089
8090 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8091 the useless parentheses.
8092 Suggested by Paul Eggert.
8093
451364ed
AD
80942004-09-20 Akim Demaille <akim@epita.fr>
8095
8096 Let the initial-action act on the look-ahead, and use it for the
8097 "initial push" (corresponding to an hypothetical beginning-of-file).
8098 And let lalr1.cc honor %initial-action.
8099
8100 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8101 example.
8102 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8103 (Parser::Parser): Remove the ctor that used to initialize it.
8104 (Parser::parse): Like in the other skeletons, issue the "starting
8105 parse" message before any action.
8106 Honor %initial-action.
8107 Initialize the stacks with the lookahead.
8108 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8109 look-ahead.
8110 Push them in the stacks.
8111 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8112
18d192f0
AD
81132004-09-20 Akim Demaille <akim@epita.fr>
8114
8115 * doc/bison.texinfo (Initial Action Decl): New.
8116
b8458aa5
AD
81172004-09-20 Akim Demaille <akim@epita.fr>
8118
8119 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8120 clearer criterion to define it.
8121 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8122 When reducing on an empty RHS, use the latest stacked location as
8123 location.
8124 yylloc is not always available.
8125 * data/glr.c: Likewise.
8126 Also, honor initial-actions.
8127
3fc16193
AD
81282004-09-20 Akim Demaille <akim@epita.fr>
8129
8130 * data/yacc.c (YY_LOCATION_PRINT): New.
8131 Define when we know YYLTYPE's structure, i.e., when the default
8132 YYLLOC_DEFAULT is used.
8133 * data/c.m4 (b4_yysymprint_generate): Use it.
8134 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8135 value of the result.
8136 (error_start_): Replace with...
8137 (error_range_): this location array.
8138 This allows to replace code relying on the implementation of
8139 locations by portable code.
8140 * data/yacc.c (yylerrsp): Replace with...
8141 (yyerror_range): this.
8142 Every time a token is popped, update yyerror_range[0], to have an
8143 accurate location for the error token.
8144 * data/glr.c (YY_LOCATION_PRINT): New.
8145 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8146 deference a pointer.
8147 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8148 report the location in %printers.
8149
8150 * src/scan-skel.l: Instead of abort, report error messages to ease
8151 understanding skeleton scanning failures.
8152
ecfe33e7
AD
81532004-09-16 Akim Demaille <akim@epita.fr>
8154
8155 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8156 (iterator, const_iterator): these, to be more in the C++ spirit.
8157 Also, return reverse iterators so that when displaying the stack
8158 we display its bottom first.
8159 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8160 from yacc.c.
8161 We should probably use vector here though.
8162
1576d44d
AD
81632004-09-16 Akim Demaille <akim@epita.fr>
8164
8165 Have more complete shift traces.
8166
8167 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8168 to report Shifts instead of ad hoc YYDPRINTF invocations,
8169 including for the error token.
8170 * data/lalr1.cc (symprint_): Output the location.
8171 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8172 output the location within the %printer.
8173 Activate GLR tests, at least to make sure they compile properly.
8174 They still don't pass though.
8175 * tests/calc.at: Adjust expect verbose output, since now "Entering
8176 state..." is on a different line than the "Shifting" message.
8177
9c66f418
AD
81782004-09-08 Akim Demaille <akim@epita.fr>
8179
8180 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8181 Bison directive from the Bison file to the invocation of this
8182 macro, so that these directives are passed to
8183 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8184 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8185 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8186 the extra Bison directives instead of the whole series.
8187 Change the grammar so that there are recoverable errors, and
8188 unrecoverable errors. Now we can have the parser give up before
8189 consuming the whole input. As a result we now can observe that
8190 the lookahead is freed when needed.
8191 Change the parser source to parse argv[1] instead of a hard coded
8192 string.
8193 Simplify yylex, and give a value and location to EOF.
8194 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8195 passed directives already coded in the file.
8196 Add some tests to check the location of "error".
8197 For some tests, the C++ parser is correct, and not yacc.c.
8198 For other tests, they provide different, but unsatisfying, values,
8199 so keep the C++ value so that at least one parser is "correct"
8200 according to the test suite.
8201 (Actions after errors): Remove, this is subsumed by the
8202 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8203
52d5733f
AD
82042004-09-06 Akim Demaille <akim@epita.fr>
8205
8206 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 8207 (Parser::pop): New.
52d5733f
AD
8208 Use it.
8209
a0e68930
AD
82102004-09-06 Akim Demaille <akim@epita.fr>
8211
8212 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8213 argument, an informative message.
8214 Call YY_SYMBOL_PRINT.
8215 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8216 * data/lalr1.cc (destruct_): Likewise.
8217 In addition, no longer depend on b4_yysymprint_generate and
8218 b4_yydestruct_generate to generate these functions, do it "by
8219 hand".
8220
e757bb10
AD
82212004-09-03 Akim Demaille <akim@epita.fr>
8222
8223 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8224 invoked, yydestruct the lookahead.
8225 * tests/calc.at (Calculator $1): Update the expected lengths of
8226 traces: there is an added line for the discarded lookahead.
8227 * doc/bison.texinfo (Destructor Decl): Some rewording.
8228 Define "discarded" symbols.
8229
0fe1f06d
AD
82302004-09-02 Akim Demaille <akim@epita.fr>
8231
8232 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8233
284acc8b
AD
82342004-09-02 Akim Demaille <akim@epita.fr>
8235
8236 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8237 (YYDSYMPRINTF): Rename as...
8238 (YY_SYMBOL_PRINT): this.
8239 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8240 two.
8241 Use it instead of direct symprint_ calls.
8242 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8243 one.
8244
a5eb1ed2
AD
82452004-09-02 Akim Demaille <akim@epita.fr>
8246
b7c72fe1
AD
8247 * data/lalr1.cc (b4_yysymprint_generate): New.
8248 (symprint_): New member function, defined when YYDEBUG.
8249 Use it consistently instead of token/nterm debugging output by
8250 hand.
a5eb1ed2
AD
8251 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8252 %printer calls to use cdebug_ when using lalr1.cc.
8253
417141dd
AD
82542004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8255
8256 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8257 with #ifdef YYDEBUG.
8258
2fa09258
AD
82592004-08-26 Akim Demaille <akim@epita.fr>
8260
8261 * doc/bison.texinfo (Implementing Loops): Rename as...
8262 (Implementing Gotos/Loops): this.
8263
9378b508
PE
82642004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8265
8266 Adjust to latest gnulib.
8267 * bootstrap (gnulib_modules): Add xalloc-die.
8268 Set LC_ALL=C so that file names sort consistently.
8269 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8270 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8271 uintmax_t.m4, ulonglong.m4.
8272 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8273 po.m4 since we are now using _gl.m4 instead.
8274
87a8ad5c
PE
82752004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8276
8277 * src/scan-action.l: Remove. Scanning of semantic actions is
8278 handled in scan-gram.l.
8279
dca81a78
PE
82802004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8281
8282 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8283
8284 * src/location.h (struct): The file member is a uniqstr.
8285 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8286
c9cbf7c5
PE
82872004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8288
8289 Fix bug with non-%union parsers that have printers or destructors,
8290 which led to a Bison core dump. Reported by Peter Fales in
8291 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 8292
c9cbf7c5
PE
8293 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8294 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8295 not to our own type.
8296 * src/output.c (symbol_destructors_output, symbol_printers_output):
8297 Don't assume %union.
8298 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8299 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8300 UNION-FLAG. All callers changed.
8301 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8302 Use type char, not unsigned int, when declaring an array of char;
8303 this lets us remove a cast.
8304 (Printers and Destructors): Add non-%union test cases.
8305
fa7e68c3
PE
83062004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8307
8308 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8309 GLR writeups. E.g., avoid frenchspacing and the future tense,
8310 change "lookahead" to "look-ahead", and change "wrt" to "with
8311 respect to".
2fa09258 8312
fa7e68c3
PE
83132004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8314
8315 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8316 New sections, split off from the GLR Parsers section. Put the new
8317 Simple GLR Parser near the start of the GLR section, for clarity.
8318 Rewrite connective text.
8319
99a9344e
PE
83202004-06-21 Frank Heckenbach <frank@g-n-u.de>
8321
8322 * doc/bison.texinfo (Simple GLR Parsers): New section.
8323
8dd162d3
PE
83242004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8325
8326 * NEWS, TODO, doc/bison.texinfo:
8327 Use "look-ahead" instead of "lookahead", to be consistent.
8328 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8329 while we're fixing "look-ahead".
8330 * src/conflicts.c (shift_set): Renamed from shiftset.
8331 (look_ahead_set): Renamed from lookaheadset.
8332 * src/print.c: Likewise.
8333 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8334 name for "lookahead".
8335 (report_types, usage): Likewise.
8336 * src/getargs.h (report_look_ahead_tokens): Renamed from
8337 report_lookaheads.
8338 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8339 compute_lookaheads.
8340 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8341 (look_ahead_tokens_print): Renamed from lookaheads_print.
8342 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8343 state_rule_lookaheads_print.
8344 * src/state.h: Likewise.
8345 (reductions.look_ahead_tokens): Renamed from lookaheads.
8346 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8347 AT_DATA_LOOKAHEADS_GRAMMAR.
8348
57a90331
PE
83492004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8350
8351 * README: Update location of patched M4 distribution.
8352
8ed3234a
PE
83532004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8354
8355 Don't assume the C++ compiler takes the same arguments as the C compiler
8356 (trivial change).
8357 * configure.ac (O0CXXFLAGS): New var.
8358 * tests/atlocal.in (CXXFLAGS): Use it.
8359
07971983
PE
83602004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8361
8362 Fix some "make check" problems with C++ reported by
8363 Albert Chin-A-Young for Tru64 C++ in this thread:
8364 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8365
8366 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8367 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8368 Output to a .cc file for C++, not to a .c file.
8369 * tests/calc.at (AT_CHECK_CALC): Likewise.
8370 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8371 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8372
29058652
PE
83732004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8374
8375 * tests/calc.at, tests/actions.at: Workaround for SGI
8376 C++ compiler. (trivial change)
8377
62cb8a99
PE
83782004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8379
fd418816
PE
8380 Spent a few hours checking out which prerequisite versions the
8381 current sources actually require. I went all the way back to
8382 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8383 a seemingly endless set of combinations of versions more recent
8384 than that. The bottom line is that the current sources require
8385 fairly recent versions of the build tools, and it'll be some work
8386 to change this.
8387 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8388 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8389 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8390 Add comments explaining why those particular versions are
8391 currently needed.
2fa09258 8392
62cb8a99
PE
8393 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8394 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 8395 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
8396
8397 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8398 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8399
caa52c10
PE
84002004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8401
8402 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8403 0.11.5. Suggested by Bruno Haible.
8404 * bootstrap: Remove gettext version checking.
8405
8406 * doc/bison.texinfo (Decl Summary): Also mention that %union
8407 can depend on prerequisite types. Problem reported by Tim
8408 Van Holder.
8409
4bfd5e4e
PE
84102004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8411
2cef3017
PE
8412 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8413 * README-alpha: Don't tell people not to package this.
8414
b9c85d5c
PE
8415 * bootstrap: Don't assume $(...) works; use `...` instead.
8416 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8417 gettext better.
8418
4bfd5e4e
PE
8419 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8420 put into the -d output file, and mention what to do if YYSTYPE is
8421 defined as a macro.
8422
6a36ff94
PE
84232004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8424
6712933e
PE
8425 Undo change made earlier today: it caused autopoint to not bring
8426 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8427 autopoint's.
8428
8429 * bootstrap: Check that gettext version matches what's in
8430 configure.ac. Warn users to ignore robots.txt ERROR 404.
8431 * bootstrap: Undo today's earlier change (logged below).
8432 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 8433
6a36ff94
PE
8434 The gettext version checking is causing more trouble than it's
8435 curing; remove it. Problem reported by Paul Hilfinger.
8436
8437 * bootstrap: Issue a warning that one can expect a message
8438 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8439 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8440
209ea708
PE
84412004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8442
8443 Ensure that the C++ compiler used for testing actually works on a
8444 simple test program; if not, skip the C++-related tests. Problem
8445 reported by Vin Shelton in:
161a71f3 8446 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
8447
8448 * m4/cxx.m4: New file.
8449 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8450 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8451 * tests/local.at (AT_COMPILE_CXX): Use it.
8452
41ca2549
PE
84532004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8454
383e69dc
PE
8455 * data/glr.c (yylloc): Output this macro even if locations are not
8456 being generated, as the GLR parser needs it even in that case.
8457 Problem reported by Troy A. Johnson
8458 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8459
41ca2549
PE
8460 * configure.ac (AC_INIT): Update to 1.875e.
8461
e476c87d
PE
84622004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8463
8464 * NEWS: Version 1.875d.
8465 * configure.ac (AC_INIT): Likewise.
8466 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8467
8468 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8469 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8470 lalr1.cc runs afoul of the first, and the last two are no longer
8471 supported by GCC 3.4.0.
8472 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8473 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8474
233a88ad
PE
84752004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8476
8477 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8478 unsigned int, for compatibility with latest gnulib hash module.
8479 * src/state.c (state_hash, state_hasher): Likewise.
8480 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8481 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 8482
12ffdd28
PE
84832004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8484
8485 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8486
8487 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8488 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8489 character and string literals.
8490 (unexpected_end): New function.
8491 (unexpected_eof): Use it.
8492 (unexpected_newline): New function.
8493 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8494 actions.
e476c87d 8495
12ffdd28
PE
8496 * NEWS: Document %expect-rr.
8497
8498 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8499 Fix typo by replacing $1 with $option.
8500 Remove more 'intl'-related files.
9668e2be 8501 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
8502
8503 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8504 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8505 strtoul.c.
8506 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8507 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8508 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8509 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8510 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8511 * src/.cvsignore: Add *.output.
8512
8513 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8514 gets copied to the output file.
e476c87d 8515
1f65350a
PE
85162004-04-28 Paul Eggert <eggert@twinsun.com>
8517
8518 Get files from the gnulib and po repositories, instead of relying
8519 on them being in our CVS. Upgrade to latest versions of gnulib
8520 and Automake.
8521
8522 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8523 * bootstrap: Bootstrap from gnulib and po repositories.
8524 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8525 * README-cvs: Document these changes. Remove version numbers from
8526 mentions of build tools, since they change so often. Mention Flex.
8527
8528 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8529 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
8530 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8531 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 8532 does this for us.
12ffdd28
PE
8533 (AC_ISC_POSIX): Remove; we no longer support this
8534 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
8535 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8536 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8537 Do not check for C89 headers, except for locale.h which is used
8538 by the Yacc library and must port to K&R hosts.
8539 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8540 Do not check for C89 functions, except for setlocale which is
8541 used by the Yacc library.
8542 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8543 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8544 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8545 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8546 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8547 AM_GNU_GETTEXT): Remove; now done by:
8548 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8549 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8550 for us.
8551
8552 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8553 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8554 Define to empty, as gnulib.mk will do the rest for us.
8555 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8556 for us.
8557 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8558 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8559
8560 * src/files.c: Include gnulib's xstrndup.h.
8561
8562 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8563 (REALLOC): Use xnrealloc, for likewise.
8564 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8565 (strnlen, memrchr): Remove decls; functions no longer used.
8566 Include <stpcpy.h>.
8567
8568 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8569 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8570 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8571 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8572 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8573 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8574 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8575 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8576 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8577 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8578 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8579 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8580 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8581 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8582 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8583 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8584 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8585 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8586 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8587 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8588 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8589 Remove, as these files are now generated automatically
8590 by bootstrap or automake.
8591
8592 * po/ChangeLog: Remove: all but one entry was a duplicate
8593 of this file, and I moved that 2000-11-02 entry here.
8594
8595 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8596 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8597 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8598 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8599 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8600 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8601 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8602 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8603 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8604 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8605 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8606 xstrndup.h.
8607 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8608 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8609 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8610 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8611 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8612 * src/.cvsignore: Remove *_.c.
8613
8614
8615 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8616 support it. (The latest stable gzip doesn't.)
8617
86182004-04-27 Paul Eggert <eggert@twinsun.com>
8619
8620 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8621 case, as stos_ is now used by destructors due to the 2004-02-09
8622 change.
8623
8624 Remove more K&R C support.
8625 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8626 * lib/subpipe.c (errno): Remove decl.
8627 Include <stdlib.h> unconditionally.
8628 (EXIT_FAILURE): Remove macro.
8629 * src/complain.c (vfprintf, strerror): Remove.
8630 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8631 unconditionally.
8632 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8633 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8634 (strchr, strspn, memchr): Remove decls.
8635 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8636 unconditionally. Do not declare perror.
8637 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8638 unconditionally.
8639
8640 * src/complain.c (_): Remove useless defn, as system.h defines this.
8641
8642 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8643 with latest obstack.h.
8644 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8645 to procedure types, as obstack.h now does that for us.
8646 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8647
8648 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8649 so that this include file can stand alone.
8650 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8651 does this now. Include subpipe.h first after config.h, to
8652 test whether it can stand alone.
8653
8654 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8655 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8656 unused declaration.
8657
8658 * tests/synclines.at (%union synch line): Put a dummy member in
8659 the union, because empty unions aren't allowed in C. Caught
8660 by GCC 3.4.0.
8661
4f16766c
PE
86622004-04-13 Jim Meyering <jim@meyering.net>
8663
8664 * src/conflicts.c (conflicts_print): Correct format string typo:
8665 use `%%' to produce literal `%'. (trivial change)
8666
779e7ceb
PE
86672004-03-30 Paul Eggert <eggert@twinsun.com>
8668
8669 * src/getargs.c (version): Update copyright year to 2004.
8670
8671 * data/c.m4 (b4_int_type): Use 'short int' rather than
8672 'short', and similarly for 'long', 'unsigned', etc.
8673 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8674 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8675 yy_yypstack, yydumpstack): Likewise.
8676 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8677 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8678 Likewise.
8679 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8680 yy_stack_print, yyparse): Likewise.
8681 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8682 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8683 * lib/bitset.c (bitset_print): Likewise.
8684 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8685 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8686 * lib/bitsetv.c (bitsetv_dump): Likewise.
8687 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8688 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8689 Likewise.
8690 * src/LR0.c (allocate_itemsets): Likewise.
8691 * src/gram.h (rule_number, rule): Likewise.
8692 * src/lalr.h (goto_number): Likewise.
8693 * src/nullable.c (nullable_compute): Likewise.
8694 * src/output.c (prepare_rules): Likewise.
8695 * src/relation.c (relation_print, relation_digraph): Likewise.
8696 * src/relation.h (relation_node): Likewise.
8697 * src/state.h (state_number, transitions, errs, reductions,
8698 struct state): Likewise.
8699 * src/symtab.h (symbol_number, struct symbol): Likewise.
8700 * src/tables.c (vector_number, tally, action_number,
8701 default_goto, goto_actions): Likewise.
8702 * tests/existing.at (GNU Cim Grammar): Likewise.
8703 * tests/regression.at (Web2c Actions): Likewise.
8704
8705 * src/output.c (muscle_insert_short_int_table): Renamed from
8706 muscle_insert_short_table. All uses changed.
8707
d6328241
PH
87082004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8709
8710 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8711 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8712 Add %expect-rr rule.
4f16766c 8713
d6328241
PH
8714 * src/scan-gram.l: Recognize %expect-rr.
8715
4f16766c 8716 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 8717 expected_conflicts.
4f16766c 8718 (expected_rr_conflicts): Declare.
d6328241
PH
8719
8720 * src/conflicts.c (expected_sr_conflicts): Rename from
8721 expected_conflicts.
8722 (expected_rr_conflicts): Define.
8723 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8724 for GLR parsers.
8725 Use expected_sr_conflicts in place of expected_conflicts.
8726 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 8727
d6328241 8728 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 8729
1452af69
PE
87302004-03-08 Paul Eggert <eggert@gnu.org>
8731
8732 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 8733 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
8734
8735 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8736 in lalr1.cc.
8737 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8738 * src/scan-gram.l (scan_integer): New function.
8739 ({int}): Use it.
8740 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8741 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8742 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8743 Say "long int", not "long", for uniformity with GNU style.
8744
006d217d
PE
87452004-02-25 Paul Eggert <eggert@twinsun.com>
8746
8747 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8748 compilers. This fixes a problem with Intel's C++ compiler being
8749 chatty, reported by Guido Trentalancia in
161a71f3 8750 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 8751
c2729758
ADL
87522004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8753
8754 Support %destructor and merge error locations in lalr1.cc.
8755
8756 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8757 (Parser::stos_): Define unconditionally.
8758 (Parser::destruct_): New method. Generate its body with
8759 b4_yydestruct_generate.
8760 (Parser::error_start_): New attribute.
8761 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8762 token which are discarded.
8763 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8764 error_start_ when erroneous token are discarded.
8765 (Parser::parse) <yyerrlab1>: Compute the location of the error
8766 token so that it covers all the discarded tokens.
8767 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8768 it can be called with `%skeleton "lalr1.cc"', and do that.
8769
dd0e0635
PE
87702004-02-02 Paul Eggert <eggert@twinsun.com>
8771
8772 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8773 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8774 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8775 There's no need to mention top_builddir since Automake does that
8776 for us.
8777 (INCLUDES): Remove, as Automake says it's obsolescent.
8778 Contents migrated into AM_CPPFLAGS as described above.
8779 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8780
87812004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8782
8783 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8784 (yyreportSyntaxError): Handle case where lookahead token is
8785 YYEMPTY.
8786
be16239b
PH
87872004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8788
8789 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8790 resulting parsers are compilable with C++.
8791
5fa90832
PE
87922003-12-23 Paul Eggert <eggert@twinsun.com>
8793
8794 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8795 * src/output.c (output_skeleton): Rename local var.
8796 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8797 Bison tokens, as this runs afoul of the 2003-10-07 change that
8798 disallowed NUL bytes in character constants or string literals.
8799
8800 * tests/local.at: Require Autoconf 2.59's Autotest.
8801 * tests/testsuite.at: Don't include local.at, since we now assume
8802 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8803 including it.
8804 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8805 multiple inclusion warnings.
dd0e0635 8806
b165c324
AD
88072003-12-02 Akim Demaille <akim@epita.fr>
8808
8809 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8810 conditions.
8811 From Bruno Haible.
8812
26e06a21
ADL
88132003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8814
8815 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8816
92ac3705
PE
88172003-10-07 Paul Eggert <eggert@twinsun.com>
8818
6a5ecb38
PE
8819 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8820 if testsuite doesn't exist.
8821
92ac3705
PE
8822 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8823 literals, unfortunately.
8824 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8825 Complain about NUL bytes in character constants or string literals.
8826
91d2c560
PE
88272003-10-05 Paul Eggert <eggert@twinsun.com>
8828
8829 * NEWS: Don't document %no-default-prec, as it's still
8830 too experimental.
8831 * doc/bison.texinfo: Document %no-default-prec only if
8832 the defaultprec flag is set. Normally it's not.
8833
0cc3da3a
PE
88342003-10-04 Paul Eggert <eggert@twinsun.com>
8835
8836 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8837 non-modifiable lvalue, instead of a modifiable one.
8838 * doc/bison.texinfo (Actions): Document that $$ can
8839 be assigned to. Do not claim that $$ and $N are
8840 array element references: user code should not rely on this.
8841
22fccf95
PE
88422003-10-01 Paul Eggert <eggert@twinsun.com>
8843
8844 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8845 (grammar_declaration): Use it.
8846 * src/scan-gram.l: New token %no-default-prec.
8847 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8848 * NEWS, doc/bison.texinfo: Document the above.
8849
fc8f2965
AD
88502003-10-01 Akim Demaille <akim@epita.fr>
8851
8852 VCG no longer supports long_straight_phase.
8853
8854 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8855 * src/print_graph.c (print_graph): Adjust.
8856
39a06c25
PE
88572003-09-30 Frank Heckenbach <frank@g-n-u.de>
8858 and Paul Eggert <eggert@twinsun.com>
8859
8860 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8861 Table of Symbols): Document %default-prec.
8862 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8863 (grammar_declaration): Set default_prec on %default-prec.
8864 * src/scan-gram.l (%default-prec): New token.
8865 * src/reader.h (default_prec): New flag.
8866 * src/reader.c: Likewise.
8867 (packgram): Handle it.
8868 * tests/conflicts.at (%default-prec without %prec,
8869 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 8870
39a06c25
PE
88712003-09-30 Paul Eggert <eggert@twinsun.com>
8872
8873 * tests/testsuite.at: Include local.at, not input.at, fixing
8874 a typo in the 2003-08-25 patch.
8875
62b6aef9
AD
88762003-08-27 Akim Demaille <akim@epita.fr>
8877
8878 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8879 GCC warnings.
8880
89e1cc61
AD
88812003-08-26 Akim Demaille <akim@epita.fr>
8882
8883 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8884 "<\#" to avoid magic from Gnus when posting parts of this script.
8885
a08460b0
AD
88862003-08-26 Akim Demaille <akim@epita.fr>
8887
8888 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8889 (Parser::parse): here.
8890 Adjust: nerrs and errstatus is now replaced by...
8891 (Parser::nerrs_, Parser::errstatus_): New.
8892
603f1cfd
AD
88932003-08-25 Akim Demaille <akim@epita.fr>
8894
8895 * config/announce-gen, Makefile.cfg: New.
8896 * Makefile.am: Adjust.
8897 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8898 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8899
cd3684cf
AD
89002003-08-25 Akim Demaille <akim@epita.fr>
8901
8902 When reducing initial empty rules, Bison parser read an initial
8903 location that is not defined. This results in garbage, and that
8904 affects Bison's own parser. Therefore we need (i) to extend Bison
8905 to support a means to initialize this location, and (ii) to use
8906 this CVS Bison to fix CVS Bison's parser.
8907
8908 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8909 with...
8910 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8911 * src/parse-gram.y: Adjust.
8912 (%initial-action): New.
8913 (%error-verbose): Since we require CVS Bison, there is no reason
8914 not to use it.
8915 * src/scan-gram.l: Adjust.
8916 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8917 * data/yacc.c (yyparse): Use b4_initial_action.
8918
4e03e201
AD
89192003-08-25 Akim Demaille <akim@epita.fr>
8920
8921 * doc/bison.texinfo: Don't promote stdout for error messages.
8922
8c182d05
AD
89232003-08-25 Akim Demaille <akim@epita.fr>
8924
8925 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8926 From Alexandre Duret-Lutz.
8927
6a60c4cf
PE
89282003-08-25 Akim Demaille <akim@epita.fr>
8929
8930 Version 1.875c.
8931
25f66e1a
AD
89322003-08-25 Akim Demaille <akim@epita.fr>
8933
8934 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8935 Use them.
8936
5348bfbe
AD
89372003-08-25 Akim Demaille <akim@epita.fr>
8938
8939 * data/lalr1.cc (Parser::reduce_print_): New.
8940 Use it.
8941
47301314
AD
89422003-08-25 Akim Demaille <akim@epita.fr>
8943
8944 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8945 error recovery loops. This patch is based on
161a71f3 8946 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
8947 Also, augment the similarity between lalr1.cc and yacc.c.
8948 Note: the locations of error recovery rules are not correct yet.
8949
8950 * data/lalr1.cc: Comment changes to augment the similarity between
8951 lalr1.cc and yacc.c.
8952 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8953 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8954 yyerrlab), when hitting EOF, pop the whole stack here instead of
8955 merely falling thru the default error handling mechanism.
8956 (yyerrorlab): New label, with the old contents of YYERROR,
8957 plus the following change: pop the stack of rhs corresponding
8958 to the production that invoked YYERROR. That is how Yacc
8959 behaves (required by POSIX).
8960 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8961 fail.
8962
1f7a61ff
AD
89632003-08-25 Akim Demaille <akim@epita.fr>
8964
8965 Tune local.at so that people can "autom4te -l autotest calc.at -o
8966 calc" for instance, to extract a sub test suite.
8967
8968 * tests/testsuite.at: Move the initialization, Autotest version
8969 requirement, and AT_TESTED invocation into...
8970 * tests/local.at: here.
8971 * tests/testsuite.at: Include it for compatibility with Autoconf
8972 2.57.
8973 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8974 be ignore.
8975
327b5b56
PE
89762003-08-04 Paul Eggert <eggert@twinsun.com>
8977
8978 Rework code slightly to avoid gcc -Wtraditional warnings.
8979 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8980 The returned value is now stored in *YY0. All callers changed.
8981 * src/output.c (merge_output): Adjust to the above change.
8982
0051e3ed
PE
89832003-07-26 Paul Eggert <eggert@twinsun.com>
8984
8985 * data/glr.c (YYASSERT): New macro.
8986 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8987 yyresolveStates, yyprocessOneStack):
8988 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8989 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 8990
137437c6
PE
89912003-07-25 Paul Eggert <eggert@twinsun.com>
8992
5b620e06
PE
8993 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8994 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 8995 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
8996 by Frank Heckenbach, though I have omitted the structure-initialization
8997 part of his glr-knr.diff patch since I recall that the Portable
8998 C Compiler didn't require that change.
8999
137437c6
PE
9000 Let the user specify how to allocate and free memory.
9001 Derived from a suggestion by Frank Heckenbach in
161a71f3 9002 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
9003 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
9004 All uses of free, malloc, realloc changed to use these macros,
9005 and unnecessary casts removed.
9006 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
9007
ddb85ca5
PE
90082003-07-06 Matthias Mann <MatthiasMann@gmx.de>
9009
9010 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
9011 use s.empty() rather than s == "" to test for empty string; see
161a71f3 9012 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
9013 (trivial change)
9014
39910e09
AD
90152003-06-25 Akim Demaille <akim@epita.fr>
9016
9017 * config/depcomp, config/install-sh: Update from masters.
9018
0ae99356
PE
90192003-06-20 Paul Eggert <eggert@twinsun.com>
9020
9021 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
9022 and return properly parenthesized result.
9023 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
9024 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9025 Remove unnecessary parentheses from uses.
9026 * doc/bison.texinfo (Location Default Action): Describe the
9027 conventions for parentheses.
9028
cd05d13c
PE
90292003-06-19 Paul Eggert <eggert@twinsun.com>
9030
81fd08ca
PE
9031 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
9032 yyreportTree): Do not assume that size_t is the same width as int,
9033 when printing sizes. Print sizes using an unsigned format.
9034 Problem reported by Frank Heckenbach in
161a71f3 9035 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 9036
cd05d13c
PE
9037 Port to Forte Developer 7 C compiler.
9038 * data/glr.c (struct YYLTYPE): If locations are not being used,
9039 declare a single dummy member, as empty structs do not conform
9040 to the C standard.
9041 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9042 the Forte Developer 7 C compiler complains that end-of-loop
9043 code is not reached.
9044
4dcf140b
PE
90452003-06-17 Paul Eggert <eggert@twinsun.com>
9046
9047 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9048 avoid warnings from picky compilers about redefinition of PARAMS.
9049
8dd76bee
PE
90502003-06-17 Paul Eggert <eggert@twinsun.com>
9051
9052 Version 1.875b.
9053
9054 * NEWS: Document 1.875b.
9055
9056 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9057 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9058 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9059 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9060 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9061 per recent gettext manual's suggestion.
9062 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9063 Use prototypes, not old-style definitions.
9064 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9065 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9066 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9067 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9068 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9069 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9070 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9071 vbitset_or_and_cmp, vbitset_copy): Likewise.
9072
9073 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9074 Do not include <stdlib.h>.
9075 (PARAMS): Define unconditionally for C89.
9076 (ATTRIBUTE_NORETURN): Remove.
9077 (ATTRIBUTE_UNUSED): Define unconditionally.
9078
9079 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 9080 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
9081 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9082 * lib/vbitset.c, lib/vbitset.h: New files.
9083 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9084 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9085 from libbitset.
9086
9087 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9088 `How Can I Reset @code{yyparse}', since texinfo does not allow
9089 arbitrary @ in node names.
9090
9091 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9092 shouldn't be needed according to the gettext 0.12.1 documentation
9093 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 9094 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 9095 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 9096 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 9097
8dd76bee
PE
9098 * lib/.cvsignore: Add stdbool.h.
9099 * m4/.cvsignore: Add nls.m4, po.m4.
9100
9101 Upgrade to CVS gnulib.
9102 * stdbool_.h: File renamed from stdbool.h.in.
9103 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9104 AC_HEADER_STDBOOL.
9105 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9106 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9107 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9108 (MOSTLYCLEANFILES): New var.
9109 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9110 (stdbool.h): New rule.
9111 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9112 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9113 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9114 m4/quote.m4: Upgrade to today's gnulib.
9115
9116 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9117 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9118 the tests right now.
9119 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9120 yyerror are declared before use; C99 requires this.
9121
25005f6a
PH
91222003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9123
9124 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9125 first.
9126 (yyrecoverSyntaxError): Correct the logic for setting and testing
9127 yyerrState.
9128 Correct comment on handling EOF.
9129 Allow states with only a default reduction, rather than failing
8dd76bee 9130 (I can't quite reconstruct why these were not allowed before).
25005f6a 9131
137437c6 9132 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 9133 buffer overruns, corrupting state.
8dd76bee
PE
9134
9135 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
9136 definition.
9137 * src/reader.h (max_left_semantic_context): New variable declaration.
9138 * src/scan-gram.l (max_left_semantic_context): Define.
9139 (handle_action_dollar): Update max_left_semantic_context.
9140 * data/glr.c (YYMAXLEFT): New definition.
9141 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9142 (yyresolveAction): Ditto.
9143
9144 Fixes to problems with location handling in GLR parsers reported by
9145 Frank Heckenbach (2003/06/05).
9146
9147 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9148 (YYRHSLOC): Add parentheses, and define only if locations used.
9149 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9150 locations not used.
9151 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9152 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 9153
25005f6a
PH
9154 * tests/cxx-type.at: Exercise location information; update tests
9155 to differentiate output with and without locations.
8dd76bee 9156 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
9157 because default YYLTYPE not yet defined.
9158 Change semantic actions to compute strings, rather than printing
9159 them directly (to test proper passing of semantics values). Change
9160 output to prefix notation and update test data and expected results.
9161 (yylex): Track locations.
9162 (stmtMerge): Return value rather than printing, and include arguments
9163 in value.
8dd76bee 9164
711f40b7
PE
91652003-06-03 Paul Eggert <eggert@twinsun.com>
9166
9167 Avoid warnings generated by GCC 2.95.4 when Bison is
9168 configured with --enable-gcc-warnings.
9169 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9170 yy::]b4_parser_class_name[::translate_,
9171 yy::Stack::operator[] (unsigned),
9172 yy::Stack::operator[] (unsigned) const,
9173 yy::Slice::operator[] (unsigned),
9174 yy::Slice::operator[] (unsigned) const):
9175 Rename local vars to avoid warnings.
9176 * tests/glr-regression.at (Improper handling of embedded actions
9177 and $-N in GLR parsers): Remove unused local variable from yylex.
9178 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9179 (void) as arg when not pure, since we now assume C89 when building
9180 Bison. Pacify GCC by using parameter.
9181
ac695f7d
PE
91822003-06-02 Paul Eggert <eggert@twinsun.com>
9183
9184 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9185 yy::Location::lines, yy::Location::columns): Rename arguments
9186 to avoid shadowing; this removes a warning generated by GCC 3.3.
9187
26ec81e0
PE
91882003-06-01 Paul Eggert <eggert@twinsun.com>
9189
9190 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9191 to g++, as GCC 3.3 complains if you do it.
9192 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9193 everything that WARNING_CFLAGS has, except omit warnings
9194 not suitable for C++.
9195 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9196 * tests/atlocal.in (CXXFLAGS): New var.
9197 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9198
9199 Fix a GLR parser bug I reported in February; see
161a71f3 9200 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
9201 The problem was that GLR parsers did not conform to the C standard,
9202 because actions like { $1 = $2 + $3; } expanded to expressions
9203 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9204 to a local variable. The C standard says that expressions
9205 like (var = f ()) + (var = f ()) have undefined behavior.
9206 Another problem was that GCC sometimes issues warnings that
9207 yyfill and its parameters are unused.
9208
9209 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9210 as possibly unused.
9211 (yyfill): New function.
9212 (YYFILL): Use it.
9213 (yyuserAction): Change type of yynormal to bool, so that it matches
9214 the new yyfill signature. Mark it as possibly unused.
9215
9216
9217 Follow up on a bug I reported in February, where a Bison-generated
9218 parser can loop. Provide a test case and a fix for yacc.c. I
9219 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9220 The original bug report is in:
161a71f3 9221 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
9222
9223 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9224 macro's size was becoming unwieldy.
9225 (yyerrlab): Do not discard an empty lookahead symbol, as this
9226 might destroy garbage.
9227 (yyerrorlab): New label, with the old contents of YYERROR,
9228 plus the following change: pop the stack of rhs corresponding
9229 to the production that invoked YYERROR. That is how Yacc
9230 behaves, and POSIX requires this behavior.
9231 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9232 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9233 Define 'alarm' to do nothing if unistd.h is not available.
9234 Add a new rule "exp: '-' error;" to test the above change to
9235 data/yacc.c. Use 'alarm' to abort any test taking longer than
9236 10 seconds, as it's probably looping.
9237 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9238 Also, the new yacc.c generates two fewer diagnostics for an
9239 existing test.
9240
d0829076
PE
92412003-05-24 Paul Eggert <eggert@twinsun.com>
9242
c6ae27df
PE
9243 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9244 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9245 This fixes a problem reported by John Bowman when the Compaq/HP
9246 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9247 -ansi -Wall -gall).
9248 * data/yacc.c (union yyalloc): Likewise.
9249 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 9250
d0829076
PE
9251 Switch from 'int' to 'bool' where that makes sense.
9252
9253 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9254 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9255 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9256 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9257 Return or accept bool, not int. All callers changed.
9258 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9259 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9260 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9261 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9262 bitset_or_and_cmp_): Likewise.
9263 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9264 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9265 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9266 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9267 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9268 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9269 bitset_stats_or_and_cmp): Likewise.
9270 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9271 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9272 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9273 ebitset_xor_cmp): Likewise.
9274 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9275 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9276 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9277 lbitset_xor_cmp): Likewise.
9278 * lib/bbitset.h: Include <stdbool.h>.
9279 (struct bitset_vtable): The following members now return bool, not
9280 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9281 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9282 or_and_cmp).
9283 * src/conflicts.c (count_rr_conflicts): Likewise.
9284 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9285 All uses changed.
9286 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9287 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9288 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9289 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9290 graph_flag): Likewise.
9291 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9292 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9293 graph_flag): Likewise.
9294 * src/output.c (error_verbose): Likewise.
9295 * src/output.h (error_verbose): Likewise.
9296 * src/reader.c (start_flag, typed): Likewise.
9297 * src/reader.h (typed): Likewise.
9298 * src/getargs.c (LOCATIONS_OPTION): New constant.
9299 (long_options, getargs): Use it.
9300 * src/lalr.c (build_relations): Use bool, not int.
9301 * src/nullable.c (nullable_compute): Likewise.
9302 * src/print.c (print_reductions): Likewise.
9303 * src/tables.c (action_row, pack_vector): Likewise.
9304 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9305 * src/output.c (prepare): Use it.
9306 * src/output.c (token_definitions_output,
9307 symbol_destructors_output, symbol_destructors_output): Use string,
9308 not boolean integer, to keep track of whether to output separator.
9309 * src/print_graph.c (print_core): Likewise.
9310 * src/state.c (state_rule_lookaheads_print): Likewise.
9311
9312 * config/install-sh: Sync from automake 1.7.5.
9313
6b2584b7
PE
93142003-05-14 Paul Eggert <eggert@twinsun.com>
9315
9316 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9317 semicolon after a grammar declaration, in the interest of possible
9318 future changes to the Bison input language.
9319 Do not allow a stray semicolon at the start of the grammar.
9320 (rhses.1): Allow one or more semicolons after any rule, including
9321 just before "|" as required by POSIX.
9322 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9323 grammar.
9324
caf37a36
ADL
93252003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9326
9327 %parse-param support for lalr1.cc.
9328
9329 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9330 b4_cc_constructor_calls, b4_cc_constructor_call,
9331 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9332 definitions.
9333 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9334 parse-param arguments.
9335 (yy::b4_parser_class_name): Declare instance variables to
9336 hold parse-param arguments.
9337 * tests/calc.at: s/value/semantic_value/ because value clashes
9338 with a member of yy::b4_parser_class_name. Adjust C++ code
9339 to handle %parse-param. Enable %parse-param test in C++.
9340
3ab37077
PE
93412003-05-12 Paul Eggert <eggert@twinsun.com>
9342
9343 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9344 English a bit. Fix fclose typo. Change "const char" to "char
9345 const", and use ANSI C rather than K&R for "main". Suggest
9346 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9347 and suggest yy_switch_to_buffer.
9348
93492003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
9350
9351 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9352 C89. This avoids a diagnostic on compilers that define __STDC__
9353 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 9354 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 9355
e743727f
PE
93562003-05-03 Paul Eggert <eggert@twinsun.com>
9357
9358 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9359 Do not overrun array bounds.
9360 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 9361 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 9362
916708d5
AD
93632003-04-29 Akim Demaille <akim@epita.fr>
9364
9365 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9366 * src/getargs.c, src/getargs.h: here, as bool, not int.
9367 (nondeterministic_parser): New.
9368 * src/parse-gram.y, src/scan-gram.l: Support
9369 %nondeterministic-parser.
9370 * src/output.c (prepare): Use nondeterministic_parser instead
9371 of glr_parser where appropriate.
9372 * src/tables.c (conflict_row, action_row, save_row)
9373 (token_actions, token_actions, pack_vector): Ditto.
9374
a06ea4aa
AD
93752003-04-29 Akim Demaille <akim@epita.fr>
9376
9377 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9378
211074ca
AD
93792003-04-29 Akim Demaille <akim@epita.fr>
9380
9381 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9382 with %pure-parser and %locations to exercise the patch from Yakov
9383 Markovitch below.
9384
6175ffe3
PE
93852003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9386
9387 * data/yacc.c: (b4_lex_param): Corrected for the case where
9388 %lex-param is provided and %pure-parser isn't.
9389
b1e95857
PE
93902003-04-27 Paul Eggert <eggert@twinsun.com>
9391
9392 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 9393 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
9394 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9395 if it is not defined.
9396 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9397
acda9df6
PE
93982003-04-26 Paul Eggert <eggert@twinsun.com>
9399
3470c57b
PE
9400 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9401 Declare to be of type suitable for the ninf value itself, not of
9402 type suitable for the corresponding table, since the latter might
9403 be unsigned but the ninf value might be negative. This fixes a
9404 bug reported by Alexandre Duret-Lutz in
161a71f3 9405 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 9406
acda9df6
PE
9407 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9408 invokes it. We shouldn't invoke it twice because it will attempt
9409 to put error.o in the archive twice. This fixes a glitch reported
9410 by Martin Mokrejs in
161a71f3 9411 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 9412
b5250f26
PE
94132003-04-21 Paul Eggert <eggert@twinsun.com>
9414
9415 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9416 to gnulib.
9417
089ac0f1
PE
94182003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9419
9420 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9421 Fix obvious typo that results in uncompilable GLR parsers
9422 when both %pure-parser and %locations are used. (trivial change)
9423
5ededac6
PE
94242003-04-17 Paul Eggert <eggert@twinsun.com>
9425
1b8f2fff
PE
9426 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9427 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9428 Do not insert the expected token via unput, as this runs afoul
9429 of a POSIX-compatibility bug in flex 2.5.31.
9430 All uses changed to BEGIN the parent state,
9431 since we no longer insert the expected token via unput.
9432 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9433 that is no longer emitted after the above change.
9434
5ededac6
PE
9435 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9436 the first one. This change is from Paul Hilfinger, and it fixes
9437 regression reported by Werner Lemberg in
161a71f3 9438 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
9439
9440 (resolve_sr_conflict): Don't invoke state_errs_set
9441 unless one or more tokens have been explicitly made errors.
9442 Otherwise, the above change causes Bison to abort.
9443
9444 * tests/existing.at (GNU pic Grammar): New test case, taken from
9445 Lemberg's email.
9446
b8be9132
AD
94472003-03-31 Akim Demaille <akim@epita.fr>
9448
9449 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9450
d423d460
AD
94512003-03-31 Akim Demaille <akim@epita.fr>
9452
9453 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9454 output.
9455
c7e441b4
AD
94562003-03-31 Akim Demaille <akim@epita.fr>
9457
9458 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9459 From Paul Hilfinger.
9460
231897ad
AD
94612003-03-29 Akim Demaille <akim@epita.fr>
9462
9463 * m4/error.m4: Do not put under dynamic conditions some code which
9464 expansion is under static control.
9465
5b066063
AD
94662003-03-29 Akim Demaille <akim@epita.fr>
9467
9468 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9469
22a74fec
AD
94702003-03-29 Akim Demaille <akim@epita.fr>
9471
9472 * doc/bison.texinfo (Strings are Destroyed): New.
9473
0eee27e7
PE
94742003-03-13 Paul Eggert <eggert@twinsun.com>
9475
9476 * .cvsignore: Add configure.lineno.
9477 * src/.cvsignore: Add yacc.
9478 * tests/.cvsignore: Add testsuite.log.
9479 * doc/fdl.texi: Sync with latest FSF version.
9480
f61aad93
PE
94812003-03-12 Paul Eggert <eggert@twinsun.com>
9482
537636c7
PE
9483 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9484 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9485 cursor, instead of leaving it undefined. This fixes a bug
9486 reported by Tim Van Holder in
161a71f3 9487 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
9488 * tests/input.at (Torturing the Scanner): Test the scanner on
9489 an empty input file, which was Tim Van Holder's test case.
9490
9491 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9492 <sys/resource.h> can be included, include sys/time.h and
9493 sys/times.h first, if available. This works around the SunOS
9494 4.1.4 porting bug reported by Bruce Becker in
161a71f3 9495 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
9496
9497 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9498 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9499 AC_HEADER_SYS_WAIT.
9500
f61aad93
PE
9501 Merge changes from gnulib. This was prompted because the CVS
9502 snapshot didn't build on Solaris 7 due to strnlen problems.
9503
9504 These changes need to be merged back into gnulib:
9505 * lib/hash.c: Include <stdbool.h> unconditionally.
9506 * m4/onceonly.m4 (m4_quote): New macro.
9507 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9508 Quote AC_FOREACH variable-expansions properly.
9509 The 2003-01-03 obstack.h change also needs merging.
9510 {end of changes requiring merging}
5b066063 9511
f61aad93
PE
9512 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9513 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9514 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9515 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9516 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9517 New files, imported from gnulib.
9518 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9519 above.
9520
9521 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9522 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9523 gnulib sources.
9524
9525 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9526 Add.
9527 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9528 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9529 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9530 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9531 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9532 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9533 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9534 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9535 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9536 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9537 (jm_PREREQ_ARGMATCH): Remove.
9538 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9539 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9540
9541 * src/system.h: Include <stdbool.h> unconditionally.
9542
9543 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9544 assuming at least C89 in the bitset code for some time now.
9545
d2ffe116
AD
95462003-03-03 Akim Demaille <akim@epita.fr>
9547
9548 * ro.po: New.
9549
052826fd
AD
95502003-03-02 Akim Demaille <akim@epita.fr>
9551
9552 * doc/bison.texinfo (Table of Symbols): Reactivate the
9553 documentation for %lex-param, and %parse-param.
9554
c4749565
AD
95552003-03-02 Akim Demaille <akim@epita.fr>
9556
9557 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9558 generate verbose error messages.
9559 Use the number of tokens as an upper bound in yytname, as it
9560 cannot be a non terminal.
9561
d5286af1
AD
95622003-03-02 Akim Demaille <akim@epita.fr>
9563
9564 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9565 message.
9566
22e304a6
AD
95672003-03-02 Akim Demaille <akim@epita.fr>
9568
22e304a6
AD
9569 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9570 Use them to exercise yycheck overrun.
9571 Based on Andrew Suffield's grammar.
9572
67a25fed
AD
95732003-03-02 Akim Demaille <akim@epita.fr>
9574
9575 Create tests/local.at for Bison generic testing macros.
9576
9577 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9578 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9579 This new file.
9580 * tests/calc.at (AT_CHECK_CALC): Adjust.
9581 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9582 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9583 * tests/local.at: here.
9584 (AT_COMPILE_CXX): Tags the tests using it as c++.
9585 Ignore the test if CXX is not functional.
9586
9c2b381f
PE
95872003-03-01 Paul Eggert <eggert@twinsun.com>
9588
9589 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9590 not loc->end, since loc->end might contain garbage and this leads
9591 to undefined behavior on some platforms.
9592 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9593 depend on *loc, so that the reader doesn't give the the false
9594 impression that *loc is initialized.
9595 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9596 does not survive the return.
9597
0433ba88
AD
95982003-03-01 Akim Demaille <akim@epita.fr>
9599
9600 * src/scan-gram.l (code_start): Always initialize it when entering
9601 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9602 yylex invocation. An alternative would be making it static, but
9603 then it starts with the second %%'s beginning, instead of its end.
9604
b305ea69
PE
96052003-02-28 Paul Eggert <eggert@twinsun.com>
9606
9607 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9608 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 9609 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 9610
c3d25e01
PE
96112003-02-26 Paul Eggert <eggert@twinsun.com>
9612
9613 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9614 Remove Sequent/Pyramid discussion (nobody uses them any more).
9615 Merge VMS and MS-DOS discussion; these ports may well be dead
9616 but let's keep mentioning them for now. Put <> around email
9617 addresses. Add copyright notice.
9618
c267ffbc
PE
96192003-02-24 Paul Eggert <eggert@twinsun.com>
9620
9621 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9622 to avoid collision with flex use of yylineno.
9623 Problem reported by Bruce Lilly in
161a71f3 9624 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
9625 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9626 * data/yacc.c (yy_reduce_print): Likewise.
9627
9628 * config/depcomp: Sync with Automake 1.7.3.
9629
f939fc12
AD
96302003-02-21 Akim Demaille <akim@epita.fr>
9631
9632 * data/lalr1.cc: Use temporary variables instead of casts to
9633 change integer types.
9634 Suggested by Paul Eggert.
9635
95923bd6
AD
96362003-02-21 Akim Demaille <akim@epita.fr>
9637
9638 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9639 to avoid confusions with lalr1.cc's notion of Position.
9640 Suggested by Paul Eggert.
9641
2cdc240e
AD
96422003-02-20 Akim Demaille <akim@epita.fr>
9643
9644 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9645 before initial_columns.
9646 (location.hh): Use consistent variable names when defining the
9647 operator<<.
9648 Use "last" so that we subtract from Positions, not from unsigned.
9649
5d003116
AD
96502003-02-20 Akim Demaille <akim@epita.fr>
9651
9652 * data/lalr1.cc (position.hh): New subfile, including the extended
9653 and Doxygen'ed documentation of class Position.
9654 (location.hh): Use it.
9655 Document a` la Doxygen.
ba1ecc07 9656 With the help of Benoit Perrot.
5d003116 9657
d02b25f9
AD
96582003-02-20 Akim Demaille <akim@epita.fr>
9659
9660 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9661 AT_YACC_IF.
9662 Redefine AT_YYERROR_SEES_LOC_IF using it.
9663 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9664 not defined.
9665 Don't use the location in yy::Parser::error_ and
9666 yy::Parser::print_ when not %locations.
9667 Activate more lalr1.cc tests.
9668
0d1c3a04
AD
96692003-02-19 Akim Demaille <akim@epita.fr>
9670
9671 * data/lalr1.cc: When displaying a line number, be sure to make it
9672 an int.
9673
60a777aa
AD
96742003-02-19 Akim Demaille <akim@epita.fr>
9675
9676 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9677 Remove, useless.
9678 (YYABORT, YYACCEPT, YYERROR): New.
9679 * tests/calc.at: Renable the lalr1.cc test.
9680
0b86fc41
AD
96812003-02-19 Akim Demaille <akim@epita.fr>
9682
9683 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9684 error recovery, mixing with/without pops and discarding of the
9685 lookahead.
9686 Exercise YYERROR.
9687 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9688
da99a5dc
PE
96892003-02-17 Paul Eggert <eggert@twinsun.com>
9690
9691 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9692 * tests/testsuite.at (AT_COMPILE): Use them.
9693 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 9694 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 9695
93b8c255
PE
96962003-02-12 Paul Eggert <eggert@twinsun.com>
9697
9698 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9699 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 9700 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
9701 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9702 Check for malloc failure, for consistency with yacc.c.
9703 (yytname_size): Remove, for consistency with yacc.c.
9704
9705 The bug still remains in data/lalr1.cc, as I didn't have time
9706 to fix it there.
9707
7548fed2
AD
97082003-02-06 Akim Demaille <akim@epita.fr>
9709
9710 * configure.ac (GXX): Rename as...
9711 (CXX): this, to keep the original Autoconf semantics.
9712 Require 2.57.
9713 * data/lalr1.cc: Fix b4_copyright invocations.
9714 If YYDEBUG is not defined, don't depend upon name_ being defined.
9715 (location.hh): Include string and iostream.
9716 (Position::filename): New member.
9717 (Position::Position ()): New.
9718 (operator<< (Position)): New.
9719 (operator- (Position, int)): New.
9720 (Location::first, Location::last): Rename as...
9721 (Location::begin, Location::end): these, to mock the conventional
9722 iterator names.
9723 (operator<< (Location)): New.
9724 * tests/atlocal.in (CXX): New.
9725 * tests/testsuite.at (AT_COMPILE_CXX): New.
9726 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9727 locations in a more synthetic way.
9728 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9729 lalr1.cc is used.
9730 Adjust the C locations to match those from Emacs: first column is
9731 column 0.
9732 Change all the expected results.
9733 Conform to the GCS: simplify the locations when applicable.
9734 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9735 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9736 these CPP macros with the m4 macros new defined by...
9737 (AT_CHECK_PUSHDEFS): this, i.e.:
9738 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 9739 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
9740 New macros.
9741 (AT_CHECK_POPDEFS): Undefine them.
9742 (AT_CHECK_CALC_LALR1_CC): New.
9743 Use it for the first lalr1.cc test.
9744
43a176ef
AD
97452003-02-04 Akim Demaille <akim@epita.fr>
9746
9747 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9748 Location as is defined.
9749
fc049e9c
AD
97502003-02-04 Akim Demaille <akim@epita.fr>
9751
9752 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9753 name_ being defined.
9754
a737b216
PE
97552003-02-03 Paul Eggert <eggert@twinsun.com>
9756
9757 * src/gram.h (start_symbol): Remove unused decl.
9758
9759 Use more-consistent naming conventions for local vars.
9760
9761 * src/derives.c (derives_compute): Change type of local var from
9762 int to rule_number.
9763 * src/gram.c (grammar_rules_partial_print): Likewise.
9764 * src/print.c (print_core): Likewise.
9765 * src/reduce.c (reduce_grammar_tables): Likewise.
9766
9767 * src/gram.c (grammar_dump): Change name of item_number *
9768 local var from r to rp.
9769 * src/nullable.c (nullable_compute): Likewise.
9770
9771 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9772
9773 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9774 for symbol or symbol_number var.
9775 * src/reader.c (grammar_start_symbol_set): Likewise.
9776 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9777 Likewise.
9778 * src/state.c (transitions_to): Likewise.
9779 * src/state.h: Likewise.
9780 * src/tables.c (symbol_number_to_vector_number): Likewise.
9781
9782 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9783 char * var.
9784
9785 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9786 var.
9787
9788 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9789 var.
9790
9791 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9792 Use str, not s, for char * var. Use ch, not c, for character var.
9793 Use size for size var.
9794
9795 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9796 char * var.
9797 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9798 uniqstr var.
9799 * src/uniqstr.h: Likewise.
9800
9801 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9802 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9803 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9804 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9805 param to have same name as that of enum, so that we don't use
9806 "s" to stand for a non-state.
9807
68e93ad5
AD
98082003-02-02 Akim Demaille <akim@epita.fr>
9809
9810 * src/scan-skel.l: Scan more than one inert character per yylex
9811 invocation.
9812
92898986
PE
98132003-02-01 Paul Eggert <eggert@twinsun.com>
9814
9815 Version 1.875a.
9816
1d9d5d71
PE
9817 * po/LINGUAS: Add ms.
9818
0435d061
AD
98192003-01-30 Akim Demaille <akim@epita.fr>
9820
9821 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9822
6029a57f
PH
98232003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9824
9825 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9826 of $1.
0435d061
AD
9827
9828 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 9829 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 9830 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 9831
6029a57f
PH
9832 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9833 (b4_rhs_location): Ditto.
0435d061 9834 (yyfill): New function to copy from stack tree into array
6029a57f 9835 incrementally.
0435d061
AD
9836 (yyuserAction): Modify to allow incremental move of semantic values
9837 to rhs array when in GLR mode.
9838 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
9839 as needed.
9840 Remove dummy use of yystack, as there is now a guaranteed use.
9841 (yydoAction): Modify to allow incremental move of semantic values
9842 to rhs array when in GLR mode.
9843 (yyresolveAction): Ditto.
9844 (yyglrShiftDefer): Update comment.
0435d061 9845 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
9846 (yyglrReduce): Ditto.
9847 (yydoAction): Ditto
0435d061 9848
6029a57f
PH
9849 * tests/glr-regr1.at: Rename to ...
9850 * tests/glr-regression.at: Add new regression test for the problems
9851 described above (adapted from S. Eken).
9852 Update copyright notice.
9853 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9854 * tests/Makefile.am: Ditto.
9855
6cee6297
PE
98562003-01-28 Paul Eggert <eggert@twinsun.com>
9857
9858 * data/lalr1.cc: Do not use @output_header_name@ unless
9859 b4_defines_flag is set. This fixes two bugs reported by
9860 Tim Van Holder in
161a71f3
PE
9861 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9862 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 9863
b2a836b5
PE
98642003-01-21 Paul Eggert <eggert@twinsun.com>
9865
9866 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9867 we don't need to worry about yyerrlab1 being reported as an
9868 "unused label" by non-GCC C compilers. The downside is that if
9869 locations are used then a couple of statements are duplicated each
9870 time YYERROR is invoked, but the upside is that the warnings
9871 should vanish.
9872 (yyerrlab1): Move code to YERROR.
9873 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9874 This reverts some of the 2002-12-27 change.
9875
4196b931
PE
98762003-01-17 Paul Eggert <eggert@twinsun.com>
9877
9878 * src/output.c (symbol_printers_output): Fix typo that led
9879 to core dump. Problem reported by Antonio Rus in
161a71f3 9880 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 9881
3ae831b4
AD
98822003-01-13 Akim Demaille <akim@epita.fr>,
9883 Quoc Peyrot <chojin@lrde.epita.fr>,
9884 Robert Anisko <anisko_r@lrde.epita.fr>
9885
9886 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9887 when the stacks contain one element, as the loop would otherwise
9888 free the last state, and then use the top state (the one we just
9889 popped). This means that the initial elements will not be freed
9890 explicitly, as is the case in yacc.c; it is not a problem, as
9891 these elements have fake values.
9892
e3aa65c5
PE
98932003-01-11 Paul Eggert <eggert@twinsun.com>
9894
9895 * NEWS: %expect-violations are now just warnings, reverting
9896 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9897 bootstrapping problem reported by Matthias Klose; see
161a71f3 9898 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
9899 * src/conflicts.c (conflicts_print): Likewise.
9900 * tests/conflicts.at (%expect not enough, %expect too much,
9901 %expect with reduce conflicts): Likewise.
9902 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9903 that the warning is enabled if the number of conflicts changes
9904 (not necessarily increases).
9905
9906 * src/getargs.c (version): Update copyright year.
9907
f0057011
AD
99082003-01-09 Akim Demaille <akim@epita.fr>
9909
9910 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9911
1ee6d2a0
PE
99122003-01-08 Paul Eggert <eggert@twinsun.com>
9913
9914 * Makefile.maint (WGETFLAGS):
9915 New macro, containing "-C off" to disable proxy caches.
9916 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9917 (rel-check): Use $(WGET) instead of wget.
9918
d4fd77c4
PE
99192003-01-06 Paul Eggert <eggert@twinsun.com>
9920
9921 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9922 the GLR paper of Scott, Johnstone and Hussain.
9923
464c6927
PE
99242003-01-04 Paul Eggert <eggert@twinsun.com>
9925
d600ee67
PE
9926 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9927 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9928 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9929 (EXTRA_LIBRARIES): New var, for liby.a.
9930 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9931 (EXTRA_SCRIPTS): New var, for yacc.
9932
464c6927
PE
9933 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9934 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9935 Problem reported by Nelson H. F. Beebe.
9936
99372003-01-03 Paul Eggert <eggert@twinsun.com>
9938
9939 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9940 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9941 when compiling Bison 1.875's `bitset bset = obstack_alloc
9942 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9943
9944 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9945 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9946 grow to a huge size with typical invocation.
d600ee67 9947
464c6927
PE
9948 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9949 Use the pattern recommended by Autoconf 2.57, except also protect
9950 against double-definition.
9951 * src/system.h: Likewise.
9952 Portability issues reported by Nelson H. F. Beebe.
d600ee67 9953
464c6927
PE
9954 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9955 All uses changed. Provide a definition in both C and C++.
9956 (yytrue, yyfalse): Define even if defined (__cplusplus).
9957
9958 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9959 Reported by Nelson H. F. Beebe.
d600ee67 9960
464c6927
PE
9961 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9962
0f42c7d5
PE
99632003-01-02 Paul Eggert <eggert@twinsun.com>
9964
9965 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9966 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9967 Bug reported by Nelson H. F. Beebe.
9968
dc546b0f
PE
99692003-01-01 Paul Eggert <eggert@twinsun.com>
9970
9971 * Version 1.875.
9972
2c09b6a7
PE
99732002-12-30 Paul Eggert <eggert@twinsun.com>
9974
9975 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9976 Moved here from...
9977 (<INITIAL>","): Here. This causes stray "," to be treated
9978 more uniformly.
9979
dc546b0f 9980 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
9981 last brace in braced code when not in Yacc mode, for compatibility
9982 with Bison 1.35. This resurrects the 2001-12-15 patch to
9983 src/reader.c.
9984
9985 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9986 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9987
535c0f63
PE
99882002-12-28 Paul Eggert <eggert@twinsun.com>
9989
9990 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9991 that of SYM's type. This fixes Debian bug 168069, reported by
9992 Thomas Olsson.
d600ee67 9993
963fcc17
PE
99942002-12-28 Paul Eggert <eggert@twinsun.com>
9995
9996 Version 1.75f.
9997
9998 Switch back to the Yacc style of conflict reports, undoing some
9999 of the 2002-07-30 change.
10000 * doc/bison.texinfo (Understanding): Use Yacc style for
10001 conflict reports. Also, use new way of locating rules.
10002 * src/conflicts.c (conflict_report):
10003 Renamed from conflict_report_yacc, removing the old
10004 'conflict_report'. Translate the entire conflict report at once,
10005 so that we don't assume that "," has the same interpretation in
10006 all languages.
10007 (conflicts_output): Use Yacc-style conflict report for each state,
10008 instead of our more-complicated style.
10009 (conflicts_print): Use Yacc-style conflict report, except print
10010 the input file name when not emulating Yacc.
10011 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
10012 Conflicted Reduction, %expect not enough, %expect too much,
10013 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
10014 * tests/existing.at (GNU Cim Grammar): Likewise.
10015 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
10016
10017 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
10018 fatal): Don't invoke fflush; it's not needed and it might even be
10019 harmful for stdout, as stdout might not be open.
10020 * src/reduce.c (reduce_print): Likewise.
10021
b1efe548
PE
100222002-12-27 Paul Eggert <eggert@twinsun.com>
10023
10024 Fix a bug where error locations were not being recorded correctly.
10025 This problem was originally reported by Paul Hilfinger in
161a71f3 10026 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
10027
10028 * data/yacc.c (yyparse): New local var yylerrsp, to record the
10029 top of the location stack's error locations.
10030 (yyerrlab): Set it. When discarding a token, push its location
10031 onto yylerrsp so that we don't lose track of the error's end.
10032 (yyerrlab1): Now is only the target of YYERROR, so that we can
10033 properly record the location of the action that failed. For GCC
10034 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10035 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10036 (yyerrlab2): New label, which yyerrlab now falls through to.
10037 Compute the error's location by applying YYLLOC_DEFAULT to
10038 the locations of all the symbols that went into the error.
10039 * doc/bison.texinfo (Location Default Action): Mention that
10040 YYLLOC_DEFAULT is also invoked for syntax errors.
10041 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10042 Error locations include the locations of all the tokens that were
10043 discarded, not just the last token.
d600ee67 10044
983c5c2c
PE
100452002-12-26 Paul Eggert <eggert@twinsun.com>
10046
b1efe548
PE
10047 * src/files.c: Include quote.h.
10048 (compute_output_file_names): Warn if we detect conflicting
10049 outputs to the same file. This should catch the misunderstanding
10050 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10051
10052 * src/conflicts.c (conflicts_print): If the user specifies
10053 "%expect N", report an error if there are any reduce/reduce
10054 conflicts. This is what the manual says should happen.
10055 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10056 * tests/conflicts.at (%expect with reduce conflicts): New test.
10057
983c5c2c
PE
10058 Don't use m4_include on relative file names, as it doesn't work as
10059 desired if there happens to be a file with that name under ".".
d600ee67 10060
983c5c2c
PE
10061 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10062 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10063 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10064 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10065 * src/output.c (output_skeleton): Use full path names when
10066 specifying a file to include; don't rely on include path, as
10067 it's unreliable when the working file contains a file with
10068 that name.
d600ee67 10069
983c5c2c
PE
100702002-12-25 Paul Eggert <eggert@twinsun.com>
10071
10072 Remove obsolete references to bison.simple and bison.hairy.
10073 Problem mentioned by Aubin Mahe in
161a71f3 10074 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
10075 * data/glr.c: Comment fix.
10076 * doc/bison.1: Remove references. Also, mention "yacc".
10077
10078 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10079 with -g option.
10080
10081 * src/parse-gram.y (declaration): Use enum "report_states" rather
10082 than its numeric value 1.
10083
10084 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10085 opening a new one. This fixes Debian bug 165349, reported by
10086 Bruce Stephens.
10087
23f2d9dc
PE
100882002-12-24 Paul Eggert <eggert@twinsun.com>
10089
10090 Version 1.75e.
10091
10092 * Makefile.maint (cvs-update): Don't assume that the shell
10093 supports $(...), as Solaris sh doesn't.
10094
10095 * src/parse-gram.y (lloc_default): Remove test for empty
10096 nonterminals at the end, since it didn't change the result.
10097
100982002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
10099
10100 If the user does not define YYSTYPE as a macro, Bison now declares it
10101 using typedef instead of defining it as a macro. POSIX requires this.
10102 For consistency, YYLTYPE is also declared instead of defined.
10103
10104 %union directives can now have a tag before the `{', e.g., the
10105 directive `%union foo {...}' now generates the C code
10106 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10107 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10108 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10109 instead of `yyltype'.
10110
10111 `yystype' and `yyltype' are now obsolescent macros instead of being
10112 typedefs or tags; they are no longer documented and will be
10113 withdrawn in a future release.
10114
10115 * data/glr.c (b4_location_type): Remove.
10116 (YYSTYPE): Renamed from yystype.
10117 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10118 (struct YYLTYPE): Renamed from struct yyltype.
10119 (YYLTYPE): Renamed from yyltype.
10120 (yyltype, yystype): New (and obsolescent) macros,
10121 for backward compatibility.
10122 * data/yacc.c: Likewise.
10123
10124 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10125 does not specify a union tag. This is for compatibility with
10126 Solaris 9 yacc.
10127
10128 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10129 const *, since it is now modified by stripping surrounding { }.
10130 (current_braced_code): Remove.
10131 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10132 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10133 trailing " {...}". Now of type <chars>.
10134 (grammar_declaration): Adjust to bundled tokens.
10135 (code_content): Remove; stripping is now done by add_param.
10136 (print_token_value): Print contents of bundled tokens.
10137 (token_name): New function.
10138
10139 * src/reader.h (braced_code, current_braced_code): Remove.
10140 (token_name): New decl.
10141
10142 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10143 token_type, not braced_code code_kind. All uses changed.
10144 (SC_PRE_CODE): New state, for scanning after a keyword that
10145 has (or usually has) an immediately-following braced code.
10146 (token_type): New local var, to keep track of which token type
10147 to return when scanning braced code.
10148 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 10149 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
10150 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10151 instead of returning a token type immediately.
10152 (<INITIAL>"{"): Set token type.
10153 (<SC_BRACED_CODE>"}"): Use it.
10154 (handle_action_dollar, handle_action_at): Now returns bool
10155 indicating success. Fail if ! current_rule; this prevents a core dump.
10156 (handle_symbol_code_dollar, handle_symbol_code_at):
10157 Remove; merge body into caller.
10158 (handle_dollar, handle_at): Complain in invalid contexts.
10159
10160 * NEWS, doc/bison.texinfo: Document the above.
10161 * NEWS: Fix years and program names in copyright notice.
10162
879ca4f8
PE
101632002-12-17 Paul Eggert <eggert@twinsun.com>
10164
10165 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10166 Reporting, Table of Symbols): Omit mentions of %lex-param and
10167 %parse-param from the documentation for now.
10168
1c5fe69d
PE
101692002-12-15 Paul Eggert <eggert@twinsun.com>
10170
10171 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10172 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10173 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
10174 disagreed with the Bison documentation. Bug
10175 reported by Andrew Walrond.
d600ee67 10176
1c5fe69d
PE
10177 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10178 as the caller now does that.
10179 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10180 (YYEMPTY): Parenthesize right hand side, since others use it.
10181 (yyparse): Don't assume that our generated code is the only code
10182 that sets yychar.
10183
d1de5372
PE
101842002-12-13 Paul Eggert <eggert@twinsun.com>
10185
10186 Version 1.75d.
10187
10188 POSIX requires a "yacc" command.
10189 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10190 (MOSTLYCLEANFILES): Add yacc.
10191 (yacc): New rule.
1c5fe69d 10192 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
10193 as an alias for bison y.
10194
10195 * po/LINGUAS: Add da.
d600ee67 10196
d1de5372
PE
10197 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10198 problem with latest <getopt.h>.
10199 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10200
10201 * doc/fdl.texi: Upgrade to 1.2.
10202 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10203 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10204 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10205 gnulib.
10206 * config/install-sh: Sync with autotools.
10207
10208 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 10209 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
10210 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10211 locations are requested.
10212 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10213 locations are requested.
10214
d0f3fe23
PE
102152002-12-12 Paul Eggert <eggert@twinsun.com>
10216
10217 Remove unportable casts and storage allocation tricks.
10218 While we're at it, remove almost all casts, since they
10219 usually aren't needed and are a sign of trouble.
10220
10221 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10222
10223 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10224 the pointer DSET returned by malloc; this isn't portable.
10225 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10226 Similarly for DERIVES.
10227 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10228 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10229 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10230
10231 * src/derives.c (derives_compute): Do not bother invoking
10232 int_of_rule_number, since rule numbers are integers.
10233
10234 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10235 rather than XMALLOC (char, N).
10236
10237 * src/files.c (filename_split): Rewrite to avoid cast.
10238
10239 * src/gram.h (symbol_number_as_item_number,
10240 item_number_as_symbol_number, rule_number_as_item_number,
10241 item_number_as_rule_number):
10242 Now inline functions rather than macros, to avoid casts.
10243 * src/state.h (state_number_as_int): Likewise.
10244 * src/tables.c (state_number_to_vector_number,
10245 symbol_number_to_vector_number): Likewise.
10246
10247 * src/gram.h (int_of_rule_number): Remove; no longer used.
10248
10249 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10250 since the resulting storage is always stored into.
10251
10252 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10253 where it's needed.
10254
10255 * src/muscle_tab.c (muscle_m4_output):
10256 Now inline. Return bool, not int.
10257 * src/state.c (state_compare): Likewise.
10258 * src/symtab.c (symbol_check_defined,
10259 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10260 hash_compare_symbol, hash_symbol):
10261 Likewise.
10262 * src/uniqstr.c (uniqstr_print): Likewise.
10263 * src/muscle_tab.c (muscle_m4_output_processor):
10264 New function, to avoid casts.
10265 * src/state.c (state_comparator, stage_hasher): Likewise.
10266 * src/symtab.c (symbol_check_defined_processor,
10267 symbol_check_alias_consistency_processor, symbol_pack_processor,
10268 symbol_translation_processor, hash_symbol_comparator,
10269 hash_symbol_hasher): Likewise.
10270 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10271 * src/muscle_tab.c (muscles_m4_output):
10272 Use new functions instead of casting old functions unportably.
10273 * src/state.c (state_hash_new): Likewise.
10274 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10275 symbols_token_translations_init):
10276 Likewise.
10277 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10278
10279 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10280 var instead of casting to long, to avoid casts.
10281 (prepare_states): Use MALLOC rather than alloca, so that we don't
10282 have to worry about alloca.
10283 * src/state.c (state_hash_lookup): Likewise.
10284
10285 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10286 local var instead of casting to unsigned char, to avoid casts.
10287
10288 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10289 STATE_ALLOC): Remove.
10290 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10291 rather than calloc, and use offsetof to avoid allocating slightly
10292 too much storage.
10293 (state_new): Initialize all members.
10294
10295 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10296
10297 * src/symtab.c (symbol_free): Remove; unused.
10298 (symbol_get): Remove cast in lhs of assignment.
10299 (symbols_do): Now static. Accept generic arguments, not
10300 hashing-related ones.
10301
10302 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10303 (symbol_processor): Remove.
10304 (symbols_do): Remove decl; now static.
10305
10306 * src/system.h (alloca): Remove; decl no longer needed.
10307 (<stddef.h>): Include, for offsetof.
10308 (<inttypes.>, <stdint.h>): Include if available.
10309 (uintptr_t): New type, if system lacks it.
10310 (CALLOC, MALLOC, REALLOC): New macros.
10311 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10312 new macros.
10313
10314 * src/tables.c (table_size): Now int, to pacify GCC.
10315 (table_grow, table_ninf_remap): Use signed table size.
10316 (save_row): Don't bother initializing locals when not needed.
10317 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10318 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10319
10320 * src/vcg.h: Correct misspellings.
10321
10322 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10323
10324
10325 * src/getargs.c (getargs): Don't assume EOF == -1.
10326
26b4a969
PE
103272002-12-09 Paul Eggert <eggert@twinsun.com>
10328
10329 Change identifier spellings to avoid collisions with names
10330 that are reserved by POSIX.
10331
10332 Don't use names ending in _t, since POSIX reserves them.
10333 For consistency, remove _e and _s endings -- they're weren't
10334 needed to remove ambiguity. All uses changed.
10335 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10336 turn was just renamed from struniq_t.
10337 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10338 which in turn was just renamed from struniq_processor_t.
10339 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10340 in turn was renamed from hash_compare_struniq_t.
10341 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10342 (state_list): Renamed from state_list_t.
10343 * src/assoc.h (assoc): Renamed from assoc_t.
10344 * src/conflicts.c (enum conflict_resolution): Renamed from
10345 enum conflict_resolution_e.
10346 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10347 (rule_list): Renamed from rule_list_t.
10348 * src/getargs.h (enum trace): Renamed from enum trace_e.
10349 (enum report): Renamed from enum report_e.
10350 * src/gram.h (item_number): Renamed from item_number_t.
10351 (rule_number): Renamed from rule_number_t.
10352 (struct rule_s): Remove the "rule_s" part; not used.
10353 (rule): Renamed from rule_t.
10354 (rule_filter): Renamed from rule_filter_t.
10355 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10356 (goto_list): Renamed from goto_list_t.
10357 * src/lalr.h (goto_number): Renamed from goto_number_t.
10358 * src/location.h (location): Renamed from location_t.
10359 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10360 and moved here from:
10361 * src/muscle_tab.h (muscle_entry_t): here.
10362 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10363 (rule_list): Renamed from rule_list_t.
10364 * src/print_graph.c (static_graph): Renamed from graph.
10365 * src/reader.h (braced_code): Renamed from braced_code_t.
10366 Remove brace_code_e tag.
10367 * src/relation.h (relation_node): Renamed from relation_node_t.
10368 (relation_nodes): Renamed from relation_nodes_t.
10369 (relation): Renamed from relation_t.
10370 * src/state.h (state_number): Renamed from state_number_t.
10371 (struct state): Renamed from struct state_s.
10372 (state): Renamed from state_t.
10373 (transitions): Renamed from transitions_t. Unused (and
10374 misspelled) transtion_s tag removed.
10375 (errs): Renamed from errs_t. Unused errs_s tag removed.
10376 (reductions): Renamed from reductions_t. Unused tag
10377 reductions_s removed.
10378 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10379 (struct symbol_list): Renamed from struct symbol_list_s.
10380 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10381 (struct symbol): Renamed from struct symbol_s.
10382 (symbol): Renamed from symbol_t.
10383 * src/tables.c (vector_number): Renamed from vector_number_t.
10384 (action_number): Renamed from action_t.
10385 * src/tables.h (base_number): Renamed from base_t.
10386 * src/vcg.h (enum color): Renamed from enum color_e.
10387 (enum textmode): Renamed from enum textmode_e.
10388 (enum shape): Renamed from enum shape_e.
10389 (struct colorentry): Renamed from struct colorentry_s.
10390 (struct classname): Renamed from struct classname_s.
10391 (struct infoname): Renamed from struct infoname_s.
10392 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10393 (enum decision): Renamed from enum decision_e.
10394 (enum orientation): Renamed from enum orientation_e.
10395 (enum alignment): Renamed from enum alignment_e.
10396 (enum arrow_mode): Renamed from enum arrow_mode_e.
10397 (enum crossing_type): Renamed from enum crossing_type_e.
10398 (enum view): Renamed from enum view_e.
10399 (struct node): Renamed from struct node_s.
10400 (node): Renamed from node_t.
10401 (enum linestyle): Renamed from enum linestyle_e.
10402 (enum arrowstyle): Renamed from enum arrowstyle_e.
10403 (struct edge): Renamed from struct edge.
10404 (edge): Renamed from edge_t.
10405 (struct graph): Renamed from struct graph_s.
10406 (graph): Renamed from graph_t.
10407 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10408 Rename value_t -> value.
10409 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10410 value_t_as_yystype -> value_as_yystype.
10411
10412 Don't include <errno.h> in the mainstream code, since it
10413 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10414 * lib/get-errno.c, lib/get-errno.h: New files.
10415 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10416 get-errno.c.
10417 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10418 * src/output.c (output_skeleton): Likewise.
10419 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10420 instead of errno.
10421 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10422 Likewise.
10423 (handle_action_dollar, handle_action_at): Likewise.
10424 * src/system.h: Do not include <errno.h>.
10425 (TAB_EXT): Renamed from EXT_TAB.
10426 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10427
10428 Avoid str[a-z]*, since <string.h> reserves that name space.
10429 Change all instances of "struniq" in names to "uniqstr", and
10430 likewise for "STRUNIQ" and "UNIQSTR".
10431 * src/uniqstr.c: Renamed from src/struniq.c.
10432 * src/uniqstr.h: Renamed from src/struniq.h.
10433 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10434 * src/files.c (strsuffix): Remove; unused.
10435 (concat2): Renamed from stringappend. Now static.
10436 * src/files.h (strsuffix, stringappend): Remove; unused.
10437 * src/parse-gram.y (<chars>): Renamed from <string>.
10438 (<uniqstr>): Renamed from <struniq>.
10439 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10440 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10441 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10442 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10443 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10444 (N_EXPAND): Renamed from N_STRETCH.
10445
10446 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10447 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10448 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10449 Remove; unused.
10450 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10451 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10452 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10453 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10454 (BASE_MAXIMUM): Renamed from BASE_MAX.
10455 (BASE_MINIMUM): Renamed from BASE_MIN.
10456 (ACTION_MAX): Remove; unused.
10457 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10458 Unnecessary casts removed from above defines.
10459
10460
10461 Fix misspelling in names.
10462 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10463 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10464 G_NODE_ALIGNEMENT.
10465
10466
10467 * lib/timevar.c (timevar_report): Renamed from time_report,
10468 for consistency with other names.
10469 * lib/timevar.h (timevar_report): New decl.
10470 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10471
10472
10473 Sort include-file uses.
10474
10475 Reorder all include files under src to be in the order "system.h".
10476 then the ../lib include files in angle brackets (alphabetized),
10477 then the . include files in double-quotes (alphabetized). Fix
10478 dependency breakages encountered in this process, as follows:
10479 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10480 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10481 * src/state.h: Include "symtab.h".
10482
996b1c7e
PE
104832002-12-08 Paul Eggert <eggert@twinsun.com>
10484
10485 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10486 since this causes problems when __file__ contains character
10487 sequences like "@" that are treated specially by src/scan-skel.l.
10488 Instead, just use the file's basename. This fixes the bug
10489 reported by Martin Mokrejs in
161a71f3 10490 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 10491
e19c4e5d
PE
104922002-12-06 Paul Eggert <eggert@twinsun.com>
10493
10494 Add support for rules that do not have trailing semicolons, as
10495 POSIX requires. Improve the quality of locations in Bison
10496 diagnostics.
26b4a969 10497
e19c4e5d
PE
10498 * src/location.c: Include <quotearg.h>.
10499 (empty_location): Now const.
10500 (location_print): New function. Follow the recommendation of the
10501 GNU Coding Standards for locations that span file boundaries.
10502 * src/location.h: Do not include <quotearg.h>; no longer needed.
10503 (boundary): New type.
10504 (location_t): Use it. This allows locations to span file boundaries.
10505 All member uses changed: file -> start.file or end.file (as needed),
10506 first_line -> start.line, first_column -> start.column,
10507 last_line -> end.line, last_column -> end.column.
10508 (equal_boundaries): New function.
10509 (LOCATION_RESET, LOCATION_STEP): Remove.
10510 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10511 (empty_location): Now const.
10512 (location_print): New decl.
10513 * src/parse-gram.y (lloc_default): New function, which handles
10514 empty locations more accurately.
10515 (YYLLOC_DEFAULT): Use it.
10516 (%token COLON): Remove.
10517 (%token ID_COLON): New token.
26b4a969 10518 (rules): Use it.
e19c4e5d
PE
10519 (declarations, rules): Remove trailing semicolon.
10520 (declaration, rules_or_grammar_declaration):
10521 Allow empty (";") declaration.
10522 (symbol_def): Remove empty actions; no longer needed.
10523 (rules_or_grammar_declaration): Remove trailing semicolon.
10524 (semi_colon.opt): Remove.
10525 * src/reader.h: Include location.h.
10526 (scanner_cursor): New decl.
10527 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10528 rolling our own.
10529 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10530 of *loc.
10531 (STEP): Remove. No longer needed, now that adjust_location does
10532 the work. All uses removed.
10533 (scanner_cursor): New var.
10534 (adjust_location): Renamed from extend_location. It now sets
10535 *loc and adjusts the scanner cursor. All uses changed.
10536 Don't bother testing for CR.
10537 (handle_syncline): Remove location arg; now updates scanner cursor.
10538 All callers changed.
10539 (unexpected_end_of_file): Now accepts start boundary of token or
10540 comment, not location. All callers changed. Update scanner cursor,
10541 not the location.
10542 (SC_AFTER_IDENTIFIER): New state.
10543 (context_state): Renamed from c_context. All uses changed.
10544 (id_loc, code_start, token_start): New local vars.
10545 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10546 processing of Yacc white space and equivalents here.
10547 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10548 instead of returning ID immediately, since we need to search for
10549 a subsequent colon.
10550 (<INITIAL>"'", "\""): Save token_start.
10551 (<INITIAL>"%{", "{", "%%"): Save code_start.
10552 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10553 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10554 BEGIN context_state at end, not INITIAL.
10555 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10556 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10557 Return correct token start.
10558 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10559 the start of a character, string or multiline comment is found.
10560 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10561 Reduction): Adjust reported locations to match the more-precise
10562 results now expected.
10563 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10564 * tests/reduce.at (Useless Rules, Reduced Automaton,
10565 Underivable Rules): Likewise.
10566 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10567 or "|"' now that so many other tokens are allowed by the new grammar.
10568
10569 * src/complain.h (current_file): Remove duplicate decl;
10570 current_file is now owned by files.h.
10571 * src/complain.c, src/scan-gram.l: Include files.h.
10572
105732002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 10574
e19c4e5d
PE
10575 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10576 promotes to int; it might be unsigned int.
10577 * data/yacc.c (yy_reduce_print): Likewise.
10578
10579 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10580 be #defined in the prologue, not in the Bison declarations.
10581 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 10582
b64755e3
PE
105832002-12-02 Paul Eggert <eggert@twinsun.com>
10584
10585 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10586 * lib/strtoul.c: New file, from gnulib.
10587 This fixes a porting bug reported by Peter Klein in
161a71f3 10588 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 10589
6e746484
PE
105902002-11-30 Paul Eggert <eggert@twinsun.com>
10591
b64755e3
PE
10592 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10593 and put only a forward declaration in the prologue. This is for
10594 consistency with the other scanner helper functions.
10595
6ba55592
PE
10596 Type clashes now generate warnings, not errors, since it
10597 appears that POSIX may allow some grammars with type clashes.
10598 * src/reader.c (grammar_current_rule_check): Warn about
10599 type clashes instead of complaining.
10600 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10601
6e746484
PE
10602 Add Yacc library, since POSIX requires it.
10603 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10604 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10605 * lib/main.c, lib/yyerror.c: New files.
10606
10607 gram_error can be static; it need not be extern.
10608 * src/reader.h (gram_error): Remove decl.
10609 * src/parse-gram.y (gram_error): Now static. Add static decl.
10610 (print_token_value): Omit parameter names from forward decl,
10611 for consistency.
10612
88510f9c
PE
106132002-11-29 Paul Eggert <eggert@twinsun.com>
10614
6e746484
PE
10615 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10616 be declared before being used. E.g., one should typically
10617 declare them in the prologue. Use GNU coding style in examples.
10618 Put "const" consistently after the type it modifies. Mention
10619 that C99 supports "inline". Mention that yyerror traditionally
10620 returns "int".
10621
88510f9c
PE
10622 %parse-param and %lex-param now take just one argument, the
10623 declaration; the argument name is deduced from the declaration.
10624
10625 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10626 Reporting, Table of Symbols): Document this.
10627 * src/parse-gram.y (add_param): New function.
10628 (COMMA): Remove.
10629 (declaration): Implement new rule for %parse-param and %lex-param.
10630 * src/scan-gram.l: "," now elicits a warning, rather than being
10631 a token; this is more compatible with byacc.
10632 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10633
bb92250c
PE
106342002-11-27 Paul Eggert <eggert@twinsun.com>
10635
10636 Rename identifiers to avoid real and potential collisions.
10637
10638 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10639 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 10640 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
10641 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10642 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10643 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10644 All uses changed.
10645 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10646 The name "yycontrol" violates the name space rules, and this stuff
10647 wasn't being used anyway.
10648 (input): Remove action; this stuff wasn't being used.
10649 (gram_error): Rename local variable yylloc -> loc.
10650 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10651 (YY_DECL): Don't use "yy" at start of local variables.
10652 All uses changed, e.g., yylloc -> loc.
10653 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10654 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10655 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10656 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10657
10658 * src/parse-gram.y (gram_error): loc is now const *.
10659 * src/reader.h (gram_error): Likewise.
10660
3af4feb2
PE
106612002-11-24 Paul Eggert <eggert@twinsun.com>
10662
10663 Version 1.75c.
10664
10665 * tests/actions.at (Actions after errors): Use an output format
10666 more similar to that of the Printers and Destructors test.
10667 Test the position of the ';' token too.
10668 (Printers and Destructors): Likewise.
10669 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10670 unnecessarily alarming people when the test fails.
10671
10672 * data/yacc.c (yyerrlab1): Move this label down, so that the
10673 parser does not discard the lookahead token if the user code
10674 invokes YYERROR. This change is required for POSIX conformance.
10675
10676 * lib/error.c: Sync with gnulib.
10677
106782002-11-22 Paul Eggert <eggert@twinsun.com>
10679
10680 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10681 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10682 * lib/xmalloc.c: Likewise.
26b4a969 10683
58004308
PE
106842002-11-20 Paul Eggert <eggert@twinsun.com>
10685
10686 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10687
106882002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 10689
58004308
PE
10690 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10691 should use `if (! x) abort ();' rather than `assert (x);', and
10692 anyway it's one less thing to worry about configuring.
10693
10694 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10695 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10696 and replace all instances of assert with abort.
10697 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10698 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10699
10700 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10701 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10702 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10703 hash_find_entry, hash_rehash, hash_insert): Likewise.
10704 * src/conflicts.c (resolve_sr_conflict): Likewise.
10705 * src/lalr.c (set_goto_map, map_goto): Likewise.
10706 * src/nullable.c (nullable_compute): Likewise.
10707 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10708 * src/reader.c (packgram, reader): Likewise.
10709 * src/state.c (state_new, state_free, state_transitions_set,
10710 state_reduction_find): Likewise.
10711 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10712 symbol_pack): Likewise.
10713 * src/tables.c (conflict_row, pack_vector): Likewise.
10714 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10715 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10716 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10717 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10718
10719 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10720 (ARGMATCH_CONSTRAINT): New macro.
10721 (ARGMATCH_ASSERT): Use it.
10722
10723 * src/system.h (verify): New macro.
10724 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10725 rather than assert.
10726 * src/tables.c (tables_generate): Likewise.
10727
10728 * src/struniq.c (struniq_assert): Now returns void, and aborts
10729 if the assertion is false.
10730 (struniq_assert_p): Remove.
10731 * src/struniq.h: Likewise.
10732
76ae8198
PE
107332002-11-18 Paul Eggert <eggert@twinsun.com>
10734
10735 * data/glr.c (yygetLRActions): Replace `yyindex' with
10736 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10737 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 10738 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 10739
d3c4e709
AD
107402002-11-18 Akim Demaille <akim@epita.fr>
10741
10742 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10743 space.
10744 From Tim Van Holder.
10745
8d8a7238
PE
107462002-11-17 Paul Eggert <eggert@twinsun.com>
10747
10748 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10749 to "SyntaxError" for consistency with my 2002-11-15 change.
10750
10751 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10752 not define to {}, since this breaks the common use of `YYDPRINTF
10753 ((...));' if a single statement is desired (e.g. before `else').
10754 Work around GCC warnings by surrounding corresponding calls with
10755 {} if needed.
10756 (yyhasResolvedValue): Remove unused function.
10757 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10758 loop body.
10759 (yyreportSyntaxError): Renamed from yyreportParseError.
10760 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10761 All uses changed.
10762 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10763 extern when possible. Remove unused initializations.
10764
b0937b22
AD
107652002-11-16 Akim Demaille <akim@epita.fr>
10766
10767 Augment the similarity between GLR and LALR traces.
10768
10769 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10770 (YY_REDUCE_PRINT): New.
10771 (yyparse): Use them.
10772 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10773 YYDPRINT here.
10774 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10775 state reached after the reduction/recovery, since...
10776 (yyparse, yyprocessOneStack): Report the state we are entering in.
10777
c5e3e510
AD
107782002-11-16 Akim Demaille <akim@epita.fr>
10779
10780 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10781 Add support for --trace=skeleton.
10782 * src/scan-skel.l: %option debug.
10783 Scan strings of non-@ or \n instead of character by character.
10784 (scan_skel): Handle trace_skeleton.
10785 (QPUTS): New.
10786 (@output_parser_name@, @output_header_name@): ``Restore'' their
10787 support (used to be M4 macros).
10788 * data/yacc.c: Quote larger chunks, a la glr.c.
10789 * data/lalr1.cc: Likewise.
10790 The header guards are no longer available, so use some other
10791 string than `YYLSP_NEEDED'.
10792
4c6cc1db
AD
107932002-11-16 Akim Demaille <akim@epita.fr>
10794
10795 Make the ``Printers and Destructors'' test more verbose, taking
10796 `yacc.c''s behavior as (possibly wrong) reference.
10797
10798 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10799 instead of fprint on stdout.
10800 Set and report the last_line of the symbols.
10801 Consistently display values and locations.
10802
6d9e8019
PE
108032002-11-16 Paul Eggert <eggert@twinsun.com>
10804
10805 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10806
6e649e65
PE
108072002-11-15 Paul Eggert <eggert@twinsun.com>
10808
b25d88f6
PE
10809 * tests/actions.at (Actions after errors): New test case.
10810
6e649e65
PE
10811 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10812 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10813 tests/action.at, tests/calc.at, tests/conflicts.at,
10814 tests/cxx-type.at, tests/regression.at:
10815 "parse error" -> "syntax error" for POSIX compatibility.
10816 "parsing stack overflow..." -> "parser stack overflow" so
10817 that code matches Bison documentation.
10818
0f39aab9
AD
108192002-11-15 Akim Demaille <akim@epita.fr>
10820
10821 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10822 take two BRACED_CODE, not two string_content.
10823 Free the scanner's obstack when we are done.
10824 (code_content): New.
10825 * tests/calc.at: Adjust.
10826 * doc/bison.texinfo: Adjust.
10827 Also, make sure to include the `,' for these declarations.
10828
761c1926
AD
108292002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10830
10831 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10832 definition; avoids potential autoreconf problems.
10833
b0f98b10
AD
108342002-11-15 Akim Demaille <akim@epita.fr>
10835
10836 Always check the value returned by yyparse.
10837
10838 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10839 returned by yyparse.
10840 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10841 Adjust calls.
10842 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10843 returned by yyparse.
10844
970785f1
PH
108452002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10846
10847 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10848 on input.at test.
10849
8fcc7db1
PE
108502002-11-14 Paul Eggert <eggert@twinsun.com>
10851
7ec1b48e
PE
10852 * src/output.c (output_skeleton): Call xfopen instead of
10853 duplicating xfopen's body.
10854
cfff7583 10855 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 10856 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 10857
8fcc7db1
PE
10858 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10859 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10860 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10861 file twice in the grammar, as an extra check.
10862
10863 * tests/input.at (Torturing the Scanner): Surround the
10864 backslash-newline tests with "#if 0", to make it less likely that
10865 we'll run into compiler bugs. Bring back solitary \ inside
10866 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 10867 test backslash-newline in C character constant.
8fcc7db1 10868
4e8d992c
AD
108692002-11-14 Akim Demaille <akim@epita.fr>
10870
10871 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10872 status of the compiler.
f32b346d 10873 Calling `exit 1' is no longer needed.
4e8d992c
AD
10874 Reported by Nelson H. F. Beebe.
10875
9501dc6e
AD
108762002-11-14 Akim Demaille <akim@epita.fr>
10877
10878 * tests/atlocal.in (CPPFLAGS): We have config.h.
10879 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10880 New.
10881 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10882 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10883 * tests/regression.at, tests/torture.at: Use them for all the
10884 grammars that are to be compiled.
10885 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10886 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10887 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10888
18b519c0
AD
108892002-11-14 Akim Demaille <akim@epita.fr>
10890
10891 * doc/bison.texinfo: Various formatting changes (alignments in
10892 samples, additional @group/@end group, GCS in samples.
10893 Use @deffn instead of simple @table to define the directives,
10894 macros, variables etc.
10895
9a86cdb9
PE
108962002-11-13 Paul Eggert <eggert@twinsun.com>
10897
daa33def 10898 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 10899 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 10900
daa33def 10901 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 10902 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
10903 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10904 * tests/headers.at (export YYLTYPE): Likewise.
10905
10906 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 10907 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 10908
9a86cdb9
PE
10909 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10910 comments, since they're not portable. Use GNU coding style.
10911
9c1e26bd
AD
109122002-11-13 Akim Demaille <akim@epita.fr>
10913
10914 * data/yacc.c: Leave bigger chunks of quoted text.
10915 (YYDSYMPRINTF): New.
10916 Use it to report symbol activities.
10917 * data/glr.c (YYDSYMPRINTF): New.
10918 Use it.
10919
87f721cc
PE
109202002-11-12 Paul Eggert <eggert@twinsun.com>
10921
10922 Version 1.75b.
10923
10924 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10925 (yyglrReduce): Return yyok, not 0.
10926 This should avoid the enumerated-type warnings reported
464c6927 10927 by Nelson H. F. Beebe in
161a71f3 10928 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
10929
10930 * lib/bbitset.h (BITSET_INLINE): Remove.
10931 * lib/bitset.h [! BITSET_INLINE]: Remove.
10932 (bitset_set, bitset_reset, bitset_test): Rename local vars
10933 to avoid shadowing warnings by GCC.
10934
10935 * data/glr.c (inline): Remove #define. It's the user's
10936 responsibility to #define it away, just like 'const'.
464c6927 10937 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 10938 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 10939
87f721cc
PE
10940 * Makefile.maint (po-check): Scan .l and .y files instead of the
10941 .c and the .h files that they generate. This fixes the bug
10942 reported by Tim Van Holder in:
161a71f3 10943 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
10944 Look for N_ as well as for _. Try to avoid matching #define for
10945 N_ and _.
10946 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10947 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10948 * src/scan-gram.l: Revamp regular expressions so that " and '
10949 do not confuse xgettext.
10950
10951 * src/struniq.h (struniq_new): Do not declare the return type
10952 to be 'const'; this violates the C standard.
10953 * src/struniq.c (struniq_new): Likewise.
10954
be14ade5
AD
109552002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10956
10957 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10958 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10959 linker.
10960
05291fbc
AD
109612002-11-12 Akim Demaille <akim@epita.fr>
10962
10963 * Makefile.maint: Sync with Autoconf:
10964 (local_updates): New.
10965
1f5fd52e
AD
109662002-11-12 Akim Demaille <akim@epita.fr>
10967
10968 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10969
283f1e64
AD
109702002-11-12 Akim Demaille <akim@epita.fr>
10971
10972 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10973 locations.
10974
886b69d1
AD
109752002-11-12 Akim Demaille <akim@epita.fr>
10976
10977 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10978 not yyvalue.
10979
3df37415
AD
109802002-11-12 Akim Demaille <akim@epita.fr>
10981
10982 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10983 Use it to test the GLR parser.
10984
7bd6c77e
AD
109852002-11-12 Akim Demaille <akim@epita.fr>
10986
10987 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10988 defines it.
10989 * data/glr.c (yystos): New.
10990 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10991 (YYDSYMPRINT): New.
10992 (yyval): Don't define it, it is handled via M4.
10993 (yyrecoverParseError): Free verbosely the discarded symbols.
10994 * data/yacc.c (yysymprint): Remove, rather...
10995 (b4_yysymprint_generate): invoke.
10996 * data/c.m4 (b4_yysymprint_generate): New.
10997 Accept pointers as arguments, as opposed to the version from
10998 yacc.c.
10999 (b4_yydestruct_generate): Likewise.
11000 * tests/cations.at (Printers and Destructors): Use Bison directives
11001 instead of CPP macros.
11002 Don't rely on internal details.
11003
b0400cc6
AD
110042002-11-12 Akim Demaille <akim@epita.fr>
11005
11006 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
11007 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
11008 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
11009 it against YYEMPTY and so forth), work on yytoken (i.e., set
11010 it to YYEMPTY etc.).
11011 (yydestruct): Replace with a b4_yydestruct_generate invocation.
11012 (b4_symbol_actions): Remove.
11013 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
11014 for 0, end-of-input.
11015
72f889cc
AD
110162002-11-12 Akim Demaille <akim@epita.fr>
11017
11018 * doc/bison.texinfo (Destructor Decl): New.
11019
b1ae9233
AD
110202002-11-12 Akim Demaille <akim@epita.fr>
11021
11022 * src/tables.c (tables_generate): Use free for pointers that
11023 cannot be NULL, not XFREE.
11024 (pack_vector): Use assert, not fatal, for bound violations.
11025 * src/state.c (state_new): Likewise.
11026 * src/reader.c (reader): Likewise.
11027 * src/lalr.c (set_goto_map): Likewise.
72f889cc 11028 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
11029 the file name.
11030
7ec2d4cd
AD
110312002-11-12 Akim Demaille <akim@epita.fr>
11032
11033 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11034 Restore.
11035 * src/scan-gram.l (last_string): Is global to the file, not to
11036 yylex.
11037 * src/parse-gram.y (input): Don't append the epilogue here,
11038 (epilogue.opt): do it here, and free the scanner's obstack.
11039 * src/reader.c (epilogue_set): Rename as...
11040 (epilogue_augment): this.
11041 * data/c.m4 (b4_epilogue): Defaults to empty.
11042
573a6cd3
AD
110432002-11-12 Akim Demaille <akim@epita.fr>
11044
11045 * src/getargs.c (long_options): Remove duplicates.
11046 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11047 Remove.
11048 * doc/bison.rnh: Remove.
11049 * doc/bison.texinfo (VMS Invocation): Remove.
11050
95612cfa
AD
110512002-11-12 Akim Demaille <akim@epita.fr>
11052
11053 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11054 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11055
11056 Use struniq for symbols.
11057
11058 * src/symtab.h (symbol_t): The tag member is a struniq.
11059 (symbol_type_set): Adjust.
11060 * src/symtab.c (symbol_new): Takes a struniq.
11061 (symbol_free): Don't free the tag member.
11062 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11063 (hash_compare_symbol, hash_symbol): these.
11064 Use the fact that tags as struniqs.
11065 (symbol_get): Use struniq_new.
11066 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11067 Returns a strniq.
11068 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11069 and type members are struniqs.
11070 * src/reader.c (get_merge_function)
11071 (grammar_current_rule_merge_set): Adjust.
11072 (TYPE, current_type): Are struniq.
11073
11074 Use struniq for file names.
11075
11076 * src/files.h, src/files.c (infile): Split into...
11077 (grammar_file, current_file): these.
11078 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11079 * src/reduce.c (reduce_print): Likewise.
11080 * src/getargs.c (getargs): Likewise.
11081 * src/complain.h, src/complain.c: Likewise.
11082 * src/main.c (main): Call struniqs_new early enough to use it for
11083 file names.
11084 Don't free the input file name.
11085
3e6656f9
AD
110862002-11-12 Akim Demaille <akim@epita.fr>
11087
11088 * src/symtab.c (symbol_free): Remove dead deactivated code:
11089 type_name are properly removed.
11090 Don't use XFREE to free items that cannot be NULL.
11091 * src/struniq.h, src/struniq.c: New.
11092 * src/main.c (main): Initialize/free struniqs.
11093 * src/parse-gram.y (%union): Add astruniq member.
11094 (yyprint): Adjust.
11095 * src/scan-gram.l (<{tag}>): Return a struniq.
11096 Free the obstack bit that used to store it.
11097 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11098
7672019c
PE
110992002-11-11 Paul Eggert <eggert@twinsun.com>
11100
11101 Revamp to fix many (but not all) of the C- and M4-related quoting
11102 problems. Among other things, this fixes the Bison bug reported
11103 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 11104 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
11105
11106 Use new @ escapes consistently. Represent brackets with @{ and @}
11107 rather than @<:@ and @:>@, since this works a bit better with dumb
11108 editors like vi. Represent @ with @@, since @ is now consistently
11109 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11110 __ofile__, to avoid unexpected expansions. Similarly, use @output
11111 rather than #output.
11112
11113 * data/c.m4 (b4_copyright): Omit file name from comment, since
11114 the file name could contain "*/".
11115 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11116 be quoted. All uses changed.
11117
11118 * data/glr.c: Use new @ escapes consistently.
11119 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11120 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11121 Remove, since they couldn't handle arbitrary characters in file
11122 names.
11123 * data/lalr1.cc: Likewise.
11124 * data/yacc.c: Likewise.
11125
11126 * src/files.c (output_infix): Remove; all uses removed.
11127 * src/files.h: Likewise.
11128
11129 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11130 mishandled funny characters in file names, and anyway it isn't
11131 needed any more.
11132 * data/yacc.c: Likewise.
11133 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11134
11135 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11136 * data/yacc.c: Likewise.
11137
11138 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11139 strings now.
11140 (muscle_init): Quote filename as a C string.
11141 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11142 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11143 * src/output.c (escaped_file_name_output): New function.
11144 (prepare_symbols): Quote tokens for M4.
11145 (prepare): Don't insert output_infix, output_prefix,
11146 output_parser_name, output_header_name; this is now down by scan-skel.
11147 Insert skeleton as a C string.
11148
11149 * src/output.c (user_actions_output, symbol_destructors_output,
11150 symbol_printers_output): Quote filenames for C and M4.
11151 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11152
11153 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11154 escapes other than \\ and \'; this simplifies the code.
11155 (<SC_STRING>): Likewise, for \\ and \".
11156 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11157 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11158 Use new escapes @{ and @} for [ and ].
11159
11160 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11161 them with auto vars.
11162 Switch to new escape scheme, where @ is the escape character uniformly.
11163 Abort if a stray escape character is found. Avoid unbounded input
11164 buffer when parsing non-escaped text.
11165
11166 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11167 __oline__, #output, $@, and @{ do not have unintended meanings.
11168
acea4f3b
PE
111692002-11-09 Paul Eggert <eggert@twinsun.com>
11170
11171 Fix the test failure due to GCC warnings described in
161a71f3 11172 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
11173 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11174 evaluate to 0 if it's impossible for NINF to be in the respective
11175 table.
11176 (yygetLRActions, yyrecoverParseError): Use them.
11177
11178 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11179 counted in the token inserted at end of file. Now takes
11180 location_t *, not location_t, so that the location can be
11181 adjusted. All uses changed.
11182
11183 * tests/regression.at (Invalid inputs): Adjust wording in
11184 diagnostic to match the new behavior.
11185
11186 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11187 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11188 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11189 abort ();'. This reduces the runtime of the "Many lookaheads"
11190 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11191 GCC 3.2.
11192
20ef1ad5
PE
111932002-11-07 Paul Eggert <eggert@twinsun.com>
11194
11195 * src/parse-gram.y (CHARACTER): Remove unused token.
11196 All uses removed.
11197
11198 * src/scan-gram.l: Remove stack option. We no longer use the
11199 stack, since the stack was never deeper than 1; instead, use the
11200 new auto var c_context to record the stacked value.
11201
11202 Remove nounput option. At an unexpected end of file, we now unput
11203 the minimal input necessary to end cleanly; this simplifies the
11204 code.
11205
11206 Avoid unbounded token sizes where this is easy.
11207
11208 (unexpected_end_of_file): New function.
11209 Use it to systematize the error message on unexpected EOF.
11210 (last-string): Now auto, not static.
11211 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11212 (scanner_last_string_free): Remove; not used.
11213 (percent_percent_count): Move decl to just before use.
11214 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11215 not the (never otherwised-used) CHARACTER.
11216
93724f13
AD
112172002-11-07 Akim Demaille <akim@epita.fr>
11218
11219 Let yyerror always receive the msg as last argument, so that
11220 yyerror can be variadic.
11221
11222 * data/yacc.c (b4_yyerror_args): New.
11223 Use it when calling yyerror.
11224 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11225 Use it when calling yyerror.
11226 * doc/bison.texinfo (Error Reporting): Adjust.
11227 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11228 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11229
6e40b4eb
AD
112302002-11-06 Akim Demaille <akim@epita.fr>
11231
11232 #line should have quoted strings.
11233 Ideally, this should be done by m4_quotearg.
11234
11235 * src/scan-skel.l: Include quotearg.h.
11236 Quote __ofile__.
11237 * src/output.c (symbol_printers_output)
11238 (symbol_destructors_output): Quote the file name.
11239
2dfbfc12
AD
112402002-11-06 Akim Demaille <akim@epita.fr>
11241
11242 * tests/regression.at (Invalid inputs): Adjust to the recent
11243 messages.
11244
437c2d80
AD
112452002-11-06 Akim Demaille <akim@epita.fr>
11246
11247 Restore --no-lines.
11248 Reported by Jim Kent.
11249
11250 * data/c.m4 (b4_syncline): New.
11251 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11252 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11253 * src/output.c (user_actions_output): Likewise.
11254 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 11255 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 11256
900c5db5
AD
112572002-11-06 Akim Demaille <akim@epita.fr>
11258
11259 * src/main.c (main): Free `infile'.
11260 * src/scan-gram.l (handle_syncline): New.
11261 Recognize `#line'.
11262 * src/output.c (user_actions_output, symbol_destructors_output)
11263 (symbol_printers_output): Use the location's file name, not
11264 infile.
11265 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11266
e183b123 112672002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 11268
e183b123 11269 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 11270 either has GLR conflict entries.
e183b123 11271
193eb6b7
PE
112722002-11-05 Paul Eggert <eggert@twinsun.com>
11273
e183b123
PE
11274 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11275 "integer out of range" rather than "invalid value".
11276 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11277 accordingly.
11278
193eb6b7
PE
11279 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11280 Also, remove one static variable in the scanner.
11281
11282 * src/scan-gram.l (braces_level): Now auto, not static.
11283 Initialize to zero if the compiler is being picky.
11284 (INITIAL): Clear braces_level instead of incrementing it.
11285 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11286 as POSIX 1003.1-2001 requires.
11287 * src/system.h (IF_LINT): New macro, taken from coreutils.
11288 * configure.ac: Define "lint" if --enable-gcc-warnings.
11289
29c01725
AD
112902002-11-05 Akim Demaille <akim@epita.fr>
11291
11292 * src/scan-gram.l: When it starts with `%', complain about the
11293 whole directive, not just that `invalid character: %'.
11294
8aeac3ca
AD
112952002-11-04 Akim Demaille <akim@epita.fr>
11296
11297 * Makefile.maint: Update from Autoconf.
11298 (update, cvs-update, po-update, do-po-update): New.
11299
793a58bb
AD
113002002-11-04 Akim Demaille <akim@epita.fr>
11301
11302 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11303 and yyerror.
11304 Have yyerror `use' its arguments.
11305 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11306 returns true when location & yacc & pure & parse-param.
11307 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11308
c4d720cd
AD
113092002-11-04 Akim Demaille <akim@epita.fr>
11310
11311 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11312 clashes.
11313 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11314 font-lock-mode.
11315 Use complain_at.
11316 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11317 slot 0.
11318
613a0dc5
PE
113192002-11-03 Paul Eggert <eggert@twinsun.com>
11320
11321 * src/reader.c (get_merge_function, grammar_current_rule_check):
11322 Use consistent diagnostics for reporting type name clashes.
11323 Quote the types with <>, for consistency with Yacc.
11324 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11325
2a8d363a
AD
113262002-11-03 Akim Demaille <akim@epita.fr>
11327
11328 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11329 New.
11330 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11331 (b4_parse_param): Remove.
11332 Use b4_identification.
11333 Propagate b4_pure_args where needed to pass them to yyerror.
11334 * data/glr.m4 (b4_parse_param): Remove.
11335 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11336 (b4_lpure_formals): New.
11337 Use b4_identification.
11338 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11339 b4_user_formals and b4_user_args.
11340 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11341 (yyreportAmbiguity): When using a pure parser, also need
11342 the location, and the parse-params.
11343 Adjust callers.
11344 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11345 When using a pure parser, also need the parse-params.
11346 Adjust callers.
11347 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11348 (%pure-parser + %parse-param) LALR and GLR parsers.
11349 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11350 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11351 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11352 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11353 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11354 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11355 * doc/bison.texinfo: Untabify the whole file.
11356 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11357 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11358 (Error Reporting): Adjust to these new directives.
11359 Document %error-verbose, deprecate YYERROR_VERBOSE.
11360
9e32add8
AD
113612002-11-03 Akim Demaille <akim@epita.fr>
11362
11363 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11364 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11365 command line options.
11366 * tests/cxx-type.at: Formatting changes.
11367
b02d90a5
PE
113682002-11-03 Paul Eggert <eggert@twinsun.com>
11369
11370 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11371 to count columns correctly, and to check for invalid inputs.
9e32add8 11372
b02d90a5
PE
11373 Use mbsnwidth to count columns correctly. Account for tabs, too.
11374 Include mbswidth.h.
11375 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11376 (extend_location): New function.
11377 (YY_LINES): Remove.
11378
11379 Handle CRLF in C code rather than in Lex code.
11380 (YY_INPUT): New macro.
11381 (no_cr_read): New function.
11382
11383 Scan UCNs, even though we don't fully handle them yet.
11384 (convert_ucn_to_byte): New function.
11385
11386 Handle backslash-newline correctly in C code.
11387 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11388 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11389 all uses changed.
11390 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11391 Use {splice} wherever C allows backslash-newline.
11392 YY_STEP after space, newline, vertical-tab.
11393 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 11394
b02d90a5
PE
11395 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11396
11397 ({int}, handle_action_dollar, handle_action_at): Check for integer
11398 overflow.
9e32add8 11399
b02d90a5
PE
11400 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11401
11402 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11403 as well as \000. Check for UCHAR_MAX, not 255.
11404 Allow \x with an arbitrary positive number of digits, as in C.
11405 Check for overflow here.
11406 Allow \? and UCNs, for compatibility with C.
11407
11408 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11409 with quote slot used by complain_at.
11410
11411 * tests/input.at: Add tests for backslash-newline, m4 quotes
11412 in symbols, long literals, and funny escapes in strings.
11413
11414 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11415 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11416 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11417 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11418 * m4/mbswidth.m4: New file, from GNU coreutils.
11419
11420 * doc/bison.texinfo (Grammar Outline): Document // comments.
11421 (Symbols): Document that trigraphs have no special meaning in Bison,
11422 nor is backslash-newline allowed.
11423 (Actions): Document that trigraphs have no special meaning.
11424
11425 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11426 no longer used.
11427
114282002-11-02 Paul Eggert <eggert@twinsun.com>
11429
11430 * src/reader.c: Don't include quote.h; not needed.
11431 (get_merge_function): Reword warning to be consistent with
11432 type clash diagnostic in grammar_current_rule_check.
11433
11434 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11435 bug in trigraph handling.
11436
11437 * src/output.c (prepare_symbols): When printing token names,
11438 escape "[" as "@<:@" and likewise for "]".
11439
11440 * src/system.h (errno): Remove declaration, as we are now
11441 assuming C89 or better, and C89 guarantees errno.
11442
762b212b
PE
114432002-10-30 Paul Eggert <eggert@twinsun.com>
11444
11445 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11446 Check for close failures.
11447 * src/files.h (xfclose): Return void, not int, since it always
11448 returned zero.
11449 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11450 indicates one.
11451 * src/output.c (output_skeleton): Use xfclose rather than fclose
11452 and ferror. xfclose now checks ferror.
11453
11454 * data/glr.c (YYLEFTMOST_STATE): Remove.
11455 (yyreportTree): Use a stack-based leftmost state. This avoids
11456 our continuing battles with bogus warnings about initializers.
11457
56100c60
AD
114582002-10-30 Akim Demaille <akim@epita.fr>
11459
11460 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11461 #if.
11462
51b4a04c
PH
114632002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11464
11465 * tests/glr-regr1.at: New test for reported regressions.
11466 * tests/testsuite.at: Add glr-regr1.at test.
11467 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 11468
bf1ebda2
PE
114692002-10-24 Paul Eggert <eggert@twinsun.com>
11470
5c16c6b1
PE
11471 Version 1.75a.
11472
bf1ebda2
PE
11473 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11474 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11475 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11476 Don't assume strdup exists; POSIX says its an XSI extension.
11477 Check for buffer overflow on input.
11478
b526ee61
AD
114792002-10-24 Akim Demaille <akim@epita.fr>
11480
11481 * src/output.c (output_skeleton): Don't disable M4sugar comments
11482 too soon: it results in comments being expanded.
11483 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11484 first output.
11485
f1886bb2
AD
114862002-10-24 Akim Demaille <akim@epita.fr>
11487
11488 * data/yacc.c (m4_int_type): New.
11489 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11490 char' as only yacc.c wants K&R portability.
11491 * data/glr.c (yysigned_char): Remove.
11492 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11493 Reported by Quoc Peyrot.
11494
c5576256
PE
114952002-10-23 Paul Eggert <eggert@twinsun.com>
11496
11497 * src/main.c (main): With --trace=time, report times even if a
11498 non-fatal error occurs. Formerly, the times were reported in some
11499 such cases but not in others.
11500 * src/reader.c (reader): Just return if a complaint has been issued,
11501 instead of exiting, so that 'main' can report times.
11502
27b0ffea
AD
115032002-10-22 Akim Demaille <akim@epita.fr>
11504
11505 * src/system.h: Include sys/types.
11506 Reported by Bert Deknuydt.
11507
223a7883
PE
115082002-10-23 Paul Eggert <eggert@twinsun.com>
11509
11510 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11511 Suggested by Art Haas.
11512
115132002-10-22 Paul Eggert <eggert@twinsun.com>
11514
11515 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11516 decl; not needed any more.
11517 * src/main.c (main): Use return to exit, undoing yesterday's change.
11518 The last OS that we could find where this wouldn't work is
11519 SunOS 3.5, and that's too old to worry about now.
11520
11521 * data/glr.c (struct yyltype): Define members even when not
11522 doing locations. This is more consistent with yacc.c, and it
11523 works around the following bug reports:
161a71f3
PE
11524 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11525 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 11526
223a7883
PE
11527 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11528 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11529 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11530
8b76775a
AD
115312002-10-22 Akim Demaille <akim@epita.fr>
11532
11533 * data/README: New.
11534
6db10d14
PE
115352002-10-21 Paul Eggert <eggert@twinsun.com>
11536
11537 Be consistent about 'bool'; the old code used an enum in one
11538 module and an int in another, and this violates the C standard.
11539 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11540 * configure.ac (AC_HEADER_STDBOOL): Add.
11541 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11542 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11543 * src/symtab.c (hash_compare_symbol_t): Likewise.
11544 * src/system.h (bool, false, true): Use a definition consistent
11545 with ../lib/hash.c. All uses changed.
11546
11547 * src/complain.c (warning_issued): Renamed from warn_message_count,
11548 so that we needn't worry about integer overflow (!).
11549 Now of type bool. All uses changed.
11550 (complaint_issued): Renamed from complain_message_count; likewise.
11551
11552 * src/main.c (main): Use exit to exit with failure.
27b0ffea 11553
6db10d14
PE
11554 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11555 rather than 1 and 0.
11556 * src/main.c (main): Likewise.
11557 * src/getargs.c (getargs): Likewise.
11558 * src/reader.c (reader): Likewise.
11559
11560 * src/getarg.c (getargs): Remove duplicate code for
11561 "Try `bison --help'".
11562
11563 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11564 What was that "2" for?
11565
11566 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11567 * src/getargs.c (usage): Likewise.
11568
11569 * src/getargs.c (getargs): When there are too few operands, report
11570 the last one. When there are too many, report the first extra
11571 one. This is how diffutils does it.
11572
92a060fd
PE
115732002-10-20 Paul Eggert <eggert@twinsun.com>
11574
11575 Remove K&R vestiges.
11576 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11577 * src/complain.c (VA_START): Remove. Assume prototypes.
11578 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11579 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11580 fatal): Assume prototypes.
11581 * src/complain.h: Assume prototypes.
11582 * src/system.h (PARAMS): Remove.
11583 Include <limits.h> unconditionally, since it's guaranteeed even
11584 for a freestanding C89 compiler.
11585 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11586 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 11587
e7cb57c0
AD
115882002-10-20 Akim Demaille <akim@epita.fr>
11589
11590 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11591 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11592 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11593 (yyresolveStates, yyresolveAction, yyresolveStack)
11594 (yyprocessOneStack): Use them.
11595 (yy_reduce_print): New.
11596 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11597
0245f82d
AD
115982002-10-20 Akim Demaille <akim@epita.fr>
11599
11600 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11601 arguments and output `void'.
11602 (b4_c_function): Rename as...
11603 (b4_c_function_def): this.
11604 (b4_c_function_decl, b4_c_ansi_function_def)
11605 (b4_c_ansi_function_decl): New.
11606 Change the interpretation of the arguments: before `int, foo', now
11607 `int foo, foo'.
11608 * data/yacc.c (yyparse): Prototype and define thanks to these.
11609 Adjust b4_c_function_def uses.
11610 * data/glr.c (yyparse): Likewise, but ANSI only.
11611
39912f52
AD
116122002-10-20 Akim Demaille <akim@epita.fr>
11613
11614 * src/output.c (prepare): Move the definition of `tokens_number',
11615 `nterms_number', `undef_token_number', `user_token_number_max'
11616 to...
11617 (prepare_tokens): Here.
11618 (prepare_tokens): Rename as...
11619 (prepare_symbols): this.
11620 (prepare): Move the definition of `rules_number' to...
11621 (prepare_rules): here.
11622 (prepare): Move the definition of `last', `final_state_number',
11623 `states_number' to...
11624 (prepare_states): here.
11625 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11626
20c1e2ad
AD
116272002-10-20 Akim Demaille <akim@epita.fr>
11628
11629 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11630
21964f43
AD
116312002-10-20 Akim Demaille <akim@epita.fr>
11632
11633 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11634 * data/c.m4: here.
11635
66d30cd4
AD
116362002-10-20 Akim Demaille <akim@epita.fr>
11637
11638 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11639 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11640 `pair'.
11641 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11642 `name' to...
11643 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11644 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11645 These.
11646
95f2c9fe
PE
116472002-10-19 Paul Eggert <eggert@twinsun.com>
11648
11649 Do not create a temporary file, as that involves security and
11650 cleanup headaches. Instead, use a pair of pipes.
11651 Derived from a suggestion by Florian Krohm.
11652 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11653 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11654 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11655 (BISON_PREREQ_SUBPIPE): Add.
11656 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11657 Add subpipe.h, subpipe.c.
11658 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11659 * po/POTFILES.in: Add lib/subpipe.c.
11660 * src/output.c: Include "subpipe.h".
11661 (m4_invoke): Remove decl.
11662 (scan_skel): New decl.
11663 (output_skeleton): Use pipe rather than temporary file for m4 input.
11664 Check that m4sugar.m4 is readable, to avoid deadlock.
11665 Check for pipe I/O error.
11666 * src/scan-skel.l (readpipe): Remove decl.
11667 (scan_skel): New function, to be used in place of m4_invoke.
11668 Read from stream rather than file.
66d30cd4 11669
95f2c9fe
PE
11670 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11671 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11672 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11673 this generates a more-accurate value anyway.
11674
11675 * lib/timevar.c (timervar_accumulate): Rename locals to
11676 avoid confusion with similarly-named more-global.
11677 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11678
11679 * src/output.c (prepare): Use xstrdup to convert char const *
11680 to char *, to avoid GCC warning.
11681
c19988b7
AD
116822002-10-19 Akim Demaille <akim@epita.fr>
11683
11684 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11685 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11686 Use them to have `calc.y' ready for %pure-parser.
11687 * data/yacc.c (YYLEX): Pass a yylex return type to
11688 b4_c_function_call.
11689
ae7453f2
AD
116902002-10-19 Akim Demaille <akim@epita.fr>
11691
11692 Prototype support of %lex-param and %parse-param.
11693
11694 * src/parse-gram.y: Add the definition of the %lex-param and
11695 %parse-param tokens, plus their rules.
11696 Drop the `_' version of %glr-parser.
11697 Add the "," token.
11698 * src/scan-gram.l (INITIAL): Scan them.
11699 * src/muscle_tab.c: Comment changes.
11700 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11701 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11702 (muscle_entry_s): The `value' member is no longer const.
11703 Adjust all dependencies.
11704 * src/muscle_tab.c (muscle_init): Adjust: use
11705 MUSCLE_INSERT_STRING.
11706 Initialize the obstack earlier.
11707 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11708 (muscle_pair_list_grow): New.
11709 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11710 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11711 * tests/calc.at: Use %locations, not --locations.
11712 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11713
0e575721
AD
117142002-10-19 Akim Demaille <akim@epita.fr>
11715
11716 * src/getargs.c (usage): Take status as argument and exit
11717 accordingly.
11718 Report the traditional `Try ... --help' message when status != 0.
11719 (usage, version): Don't take a FILE * as arg, it is pointless.
11720 (getargs): When there is an incorrect number of arguments, make it
11721 an error, and report it GNUlically thanks to `usage ()'.
11722
724ce7f5
PE
117232002-10-18 Paul Eggert <eggert@twinsun.com>
11724
3a781eb2
PE
11725 * data/glr.c (yyreportParseError): Don't assume that sprintf
11726 yields the length of the printed string, as this is not true
11727 on SunOS 4.1.4. Reported by Peter Klein.
11728
724ce7f5
PE
11729 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11730 * tests/conflicts.at (%nonassoc and eof): Likewise.
11731 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11732
473d0a75
AD
117332002-10-17 Akim Demaille <akim@epita.fr>
11734
11735 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11736 * src/getargs.c (trace_types, trace_args): Adjust.
11737 * src/reader.c (grammar_current_rule_prec_set)
11738 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11739 Standardize error messages.
11740 And s/@prec/%prec/!
11741 (reader): Use trace_flag to enable scanner/parser debugging,
11742 instead of an adhoc scheme.
11743 * src/scan-gram.l: Remove trailing debugging code.
11744
e76d2469
PE
117452002-10-16 Paul Eggert <eggert@twinsun.com>
11746
93e2236a
PE
11747 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11748 MUSCLE_TAB_H.
11749
e76d2469
PE
11750 * NEWS: Officially drop support for building Bison with K&R C,
11751 since it didn't work anyway and it's not worth worrying about.
11752 * Makefile.maint (wget_files): Remove ansi2knr.c.
11753 (ansi2knr.c-url_prefix): Remove.
11754 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11755 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11756 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11757
5bd1c419
PE
117582002-10-15 Paul Eggert <eggert@twinsun.com>
11759
11760 Stop using the "enum_" trick for K&R-style function definitions;
11761 it confused me, and I was the author! Instead, assume that people
11762 who want to use K&R C compilers (when using these modules in GCC,
11763 perhaps?) will run ansi2knr.
11764
11765 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11766 All uses of "enum_" changed to "enum ".
11767 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11768 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 11769
5bd1c419
PE
11770 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11771 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11772 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11773 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11774 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11775 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11776 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11777 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11778 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11779 Use function prototypes; this removes the need for declaring
11780 static functions simply to provide their prototypes.
11781 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11782 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11783 bitset_count_, bitset_create, bitset_dump, bitset_first,
11784 bitset_free, bitset_init, bitset_last, bitset_next,
11785 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11786 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11787 bitset_print, bitset_release_memory, bitset_toggle_,
11788 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11789 debug_bitset): Likewise.
11790 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11791 * lib/bitset_stats.c (bitset_log_histogram_print,
11792 bitset_percent_histogram_print, bitset_stats_and,
11793 bitset_stats_and_cmp, bitset_stats_and_or,
11794 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11795 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11796 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11797 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11798 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11799 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11800 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11801 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11802 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11803 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11804 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11805 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11806 bitset_stats_zero): Likewise.
11807 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11808 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11809 bitsetv_dump, debug_bitsetv): Likewise.
11810 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11811 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11812 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11813 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11814 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11815 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11816 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11817 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11818 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11819 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11820 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11821 Likewise.
11822 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11823 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11824 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11825 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11826 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11827 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11828 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11829 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11830 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11831 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11832 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 11833
ae26e1f0
AD
118342002-10-14 Akim Demaille <akim@epita.fr>
11835
11836 Version 1.75.
11837
d43baf71
AD
118382002-10-14 Akim Demaille <akim@epita.fr>
11839
11840 * tests/Makefile.am (maintainer-check-posix): New.
11841
7ebc83e3
AD
118422002-10-14 Akim Demaille <akim@epita.fr>
11843
11844 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11845 member.
11846
05846dae
AD
118472002-10-14 Akim Demaille <akim@epita.fr>
11848
11849 * src/tables.c (table_ninf_remap): base -> tab.
11850 Reported by Matt Rosing.
11851
1318e37d
PE
118522002-10-14 Paul Eggert <eggert@twinsun.com>
11853
447fbb17
PE
11854 * tests/action.at, tests/calc.at, tests/conflicts.at,
11855 tests/cxx-type.at, tests/headers.at, tests/input.at,
11856 tests/regression.at, tests/synclines.at, tests/torture.at:
11857 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11858 so that the tests still work even if POSIXLY_CORRECT is set.
11859 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 11860
1318e37d
PE
11861 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11862 for portability to K&R hosts. Fix typo: signed char is guaranteed
11863 only to 127, not to 128.
11864 * data/glr.c (yysigned_char): New type.
11865 * data/yacc.c (yysigned_char): Likewise.
11866 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11867
cc0f0794
PE
118682002-10-13 Paul Eggert <eggert@twinsun.com>
11869
5038f418
PE
11870 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11871 true due to limited range of data type" warning from GCC.
11872
cc0f0794
PE
11873 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11874 by wrapping enum yytokentype's definition inside #ifndef
11875 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11876
6fed0802
AD
118772002-10-13 Akim Demaille <akim@epita.fr>
11878
11879 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11880 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11881
32f0598d
AD
118822002-10-13 Akim Demaille <akim@epita.fr>
11883
11884 * Makefile.maint: Update from Autoconf 2.54.
11885 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11886
7ea9a33f
AD
118872002-10-13 Akim Demaille <akim@epita.fr>
11888
11889 * src/print.c (print_state): Separate the list of solved conflicts
11890 from the other items.
11891 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11892
ea99527d
AD
118932002-10-13 Akim Demaille <akim@epita.fr>
11894
11895 Let nondeterministic skeletons be usable with deterministic
11896 tables.
11897
11898 With the patch, GAWK compiled by GCC without -O2 passes its test
11899 suite using a GLR parser driven by LALR tables. It fails with -O2
11900 because `struct stat' gives two different answers on my machine:
11901 88 (definition of an auto var) and later 96 (memset on this var).
11902 Hence the stack is badly corrumpted. The headers inclusion is to
11903 blame: if I move the awk.h inclusion before GLR's system header
11904 inclusion, the two struct stat have the same size.
11905
11906 * src/tables.c (pack_table): Always create conflict_table.
11907 (token_actions): Always create conflict_list.
11908 * data/glr.c (YYFLAG): Remove, unused.
11909
f377f69f
AD
119102002-10-13 Akim Demaille <akim@epita.fr>
11911
11912 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11913 (O0FLAGS): New.
11914 (VALGRIND, GXX): New.
11915 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11916 * tests/bison.in: Run $PREBISON a pre-command.
11917 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11918 (maintainer-check-g++): New.
11919 * Makefile.am (maintainer-check): New.
11920
2a1fe6ed
AD
119212002-10-13 Akim Demaille <akim@epita.fr>
11922
11923 * data/glr.c: Formatting changes.
11924 Tweak some trace messages to match yacc.c's.
11925
f50adbbd
AD
119262002-10-13 Akim Demaille <akim@epita.fr>
11927
11928 GLR parsers sometimes raise parse errors instead of performing the
11929 default reduction.
11930 Reported by Charles-Henry de Boysson.
11931
11932 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 11933 check the length of the traces when %glr.
f50adbbd
AD
11934 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11935 GLR's traces.
11936 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11937 Test GLR parsers.
11938 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11939 (yyltype): Remove the yy prefix from the member names.
11940 (yytable): Complete its comment.
11941 (yygetLRActions): Map error action number from YYTABLE from
11942 YYTABLE_NINF to 0.
11943 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11944 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11945 not satisfying as we could compare an YYACTION computed from
11946 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11947 only value for error actions.
11948 (yyreportParseError): In verbose parse error messages, don't issue
11949 `error' in the list of expected tokens.
11950 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11951 next action to perform to match glr.c's decoding.
11952 (yytable): Complete its comment.
11953
bcbad5b9
PE
119542002-10-13 Paul Eggert <eggert@twinsun.com>
11955
11956 Fix problem reported by Henrik Grubbstroem in
161a71f3 11957 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
11958 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11959 because the Bison parser reads the second action before reducing
11960 the first one.
11961 * src/scan-gram.l (rule_length): New static var.
11962 Use it to keep track of the rule length in the scanner, since
11963 we can't expect the parser to be in lock-step sync with the scanner.
11964 (handle_action_dollar, handle_action_at): Use this var.
11965 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 11966
14904b89
PE
119672002-10-12 Paul Eggert <eggert@twinsun.com>
11968
1fe611e5
PE
11969 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11970 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11971 Include <sys/time.h> when checking for clock_t and struct tms.
11972 Use same include order as source.
11973 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 11974 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 11975
1fe611e5
PE
11976 * lib/timevar.c: Update copyright date and clarify comments.
11977 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 11978
1fe611e5
PE
11979 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11980 GCC version as of today, then merge Bison's changes.
11981 Change "GCC" to "Bison" in copyright notice. timevar.def's
11982 author is Akim, so change that too.
11983
98194095
PE
11984 * src/reader.c (grammar_current_rule_check):
11985 Don't worry about the default action if $$ is untyped.
11986 Prevents bogus warnings reported by Jim Gifford in
161a71f3 11987 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 11988
14904b89
PE
11989 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11990 * data/glr.c, data/lalr1.cc, data/yacc.c:
11991 Output token definitions before the first part of user declarations.
11992 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 11993 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 11994
ff6dca18
PE
119952002-10-11 Paul Eggert <eggert@twinsun.com>
11996
11997 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11998 (yyparse): here. This undoes some of the 2002-07-25 change.
11999 Compatibility problem reported by Ralf S. Engelschall with
12000 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
12001
eb714592
AD
120022002-10-11 Akim Demaille <akim@epita.fr>
12003
12004 * tests/regression.at Characters Escapes): New.
12005 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
12006 characters.
12007 Reported by Jan Nieuwenhuizen.
12008
b7195100
AD
120092002-10-11 Akim Demaille <akim@epita.fr>
12010
12011 * po/id.po: New.
12012
f28a0f2d
PE
120132002-10-10 Paul Eggert <eggert@twinsun.com>
12014
12015 Portability fixes for bitsets; this also avoids several GCC
12016 warnings.
12017
12018 * lib/abitset.c: Include <stddef.h>, for offsetof.
12019 * lib/lbitset.c: Likewise.
12020
12021 * lib/abitset.c (abitset_bytes): Return a size that is aligned
12022 properly for vectors of objects. Do not assume that adding a
12023 header size to a multiple of a word size yields a value that is
12024 properly aligned for the whole union.
12025 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12026
12027 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
12028 unique names for structures.
12029 * lib/ebitset.c (ebitset_bytes): Likewise.
12030 * lib/lbitset.c (lbitset_bytes): Likewise.
12031
12032 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12033 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12034 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12035 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12036 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12037 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12038 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12039 to improve the type-checking that GCC can do.
12040 * lib/bitset.c (bitset_op4_cmp): Likewise.
12041 * lib/bitset_stats.c (bitset_stats_count,
12042 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12043 bitset_stats_copy, bitset_stats_disjoint_p,
12044 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12045 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12046 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12047 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12048 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12049 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12050 bitset_stats_or_and_cmp): Likewise.
12051 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12052 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12053 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12054 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12055
12056 * lib/abitset.h: Include bitset.h, not bbitset.h.
12057 * lib/ebitset.h: Likewise.
12058 * lib/lbitset.h: Likewise.
12059
12060 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12061 All instances of parameters of type enum bitset_opts are now of
12062 type enum_bitset_opts, to conform to the C Standard, and similarly
12063 for enum_bitset_type.
12064 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12065 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12066
12067 Do not use "struct bitset_struct" to mean different things in
12068 different modules. Not only is this confusing, it violates
12069 the C Standard, which requires that structure types in different
12070 modules must be compatible if one is to be passed to the other.
12071 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12072 All instances of "struct bitset_struct *" replaced with "bitset".
12073 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12074 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12075 struct lbitset_struct, struct bitset_stats_struct): New types.
12076 All uses of struct bitset_struct changed to union bitset_union,
12077 etc.
ba0fe3c7 12078 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
12079 struct bitset_struct): Remove.
12080 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12081 struct bitset_struct): Remove.
12082 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12083 bitset_struct): Remove.
12084 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12085 Likewise.
12086
12087 Do not call a function of type T using a call that assumes the
12088 function is of a different type U. Standard C requires that a
12089 function must be called with a type that is compatible with its
12090 definition.
12091 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12092 New decls.
12093 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12094 New functions.
12095 * lib/ebitset.c (PFV): Remove.
12096 * lib/lbitset.c (PFV): Likewise.
12097 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12098 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12099 decls.
12100 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12101 (ebitset_vtable): Use them.
12102 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12103 lbitset_xor): New functions.
12104 (lbitset_vtable): Use them.
12105
12106 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12107 Declare.
12108
12109 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12110 GCC warning.
12111 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12112 Use offsetof, for simplicity.
12113
6fbe4984
PE
121142002-10-06 Paul Eggert <eggert@twinsun.com>
12115
12116 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12117 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 12118 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
12119 which was inadvertently undone by the 2002-09-30 patch.
12120 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12121 the same width as int.
12122
420f93c8
PE
121232002-10-04 Paul Eggert <eggert@twinsun.com>
12124
12125 Version 1.50.
12126
12127 * configure.ac (AC_INIT), NEWS: Increment version number.
12128
12129 * doc/bison.texinfo: Minor spelling, grammar, and white space
12130 fixes.
12131 (Symbols): Mention that any negative value returned from yylex
12132 signifies end-of-input. Warn about negative chars. Mention
12133 the portable Standard C character set.
12134
12135 The GNU coding standard says CFLAGS and YFLAGS are reserved
12136 for the installer to set.
12137 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12138 * src/Makefile.am (AM_CFLAGS): Likewise.
12139 (AM_YFLAGS): Renamed from YFLAGS.
12140
12141 Fix some MAX and MIN problems.
12142 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12143 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12144 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12145 * src/reader.c (reader): Use it.
12146
12147 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12148 POSIX 1003.1-2001 has removed fgrep.
12149
121502002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12151
12152 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12153 interpreted as signed.
12154 * lib/ebitset.c (ebitset_list): Fix bug.
12155
ff68026d
PE
121562002-10-01 Paul Eggert <eggert@twinsun.com>
12157
12158 More fixes for 64-bit hosts and large bitsets.
12159
12160 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12161 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12162 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12163 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12164 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12165 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12166 bitset_count_): Likewise.
12167 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12168 bitset_first, bitset_last): Likewise.
12169 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12170 bitset_stats_list_reverse, bitset_stats_size,
12171 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12172 Likewise.
12173 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12174 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12175 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12176 bitsetv_reflexive_transitive_closure): Likewise.
12177 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12178 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12179 Likewise.
12180 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12181 Likewise.
420f93c8 12182
ff68026d
PE
12183 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12184 Use size_t, not unsigned int, to count bytes.
12185 * lib/abitset.h (abitset_bytes): Likewise.
12186 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12187 Likewise.
12188 * lib/bitset.h (bitset_bytes): Likewise.
12189 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12190 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12191 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12192 * lib/ebitset.c (ebitset_bytes): Likewise.
12193 * lib/ebitset.h (ebitset_bytes): Likewise.
12194 * lib/lbitset.c (lbitset_bytes): Likewise.
12195 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 12196
ff68026d
PE
12197 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12198 abitset_subset_p, abitset_disjoint_p, abitset_and,
12199 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12200 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12201 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12202 abitset_or_and, abitset_or_and_cmp):
12203 Use bitset_windex instead of unsigned int.
12204 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12205 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12206 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12207 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12208 Likewise.
12209 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 12210
ff68026d
PE
12211 * lib/bitset.c (bitset_print):
12212 Use proper printf formats for widths of integer types.
12213 * lib/bitset_stats.c (bitset_percent_histogram_print,
12214 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12215 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12216 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12217 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 12218
ff68026d
PE
12219 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12220 BITSET_SIZE_MAX): New macros.
12221 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12222 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12223 to BITSET_WINDEX_MAX.
12224
12225 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12226 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12227 since we now return the bitset_bindex type (not int).
12228
12229 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12230 when computing sizes.
12231 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12232
12233 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12234 and avoid cast to unsigned.
12235
6aa452a6
AD
122362002-09-30 Akim Demaille <akim@epita.fr>
12237
12238 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12239 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12240 Updates from Michael Hayes.
12241
927f7817
AD
122422002-09-30 Art Haas <ahaas@neosoft.com>
12243
12244 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12245 invocations.
12246 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12247 defined.
12248
9738f41e
AD
122492002-09-27 Akim Demaille <akim@epita.fr>
12250
12251 Version 1.49c.
12252
a5c75d7f
AD
122532002-09-27 Akim Demaille <akim@epita.fr>
12254
12255 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12256 (Because of AC_LIBSOURCE).
12257
8280e179
AD
122582002-09-27 Akim Demaille <akim@epita.fr>
12259
12260 Playing with Autoscan.
12261
12262 * configure.ac: Remove the old LIBOBJ tweaks.
12263 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12264 * lib/strrchr.c: New.
12265 * lib/strtol.c: New, from the Coreutils 4.5.1.
12266
ae64af35
AD
122672002-09-27 Akim Demaille <akim@epita.fr>
12268
12269 Playing with Autoscan.
12270
12271 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12272 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12273 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12274 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12275 Coreutils 4.5.1.
12276
d1a1114f
AD
122772002-09-24 Akim Demaille <akim@epita.fr>
12278
12279 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12280 (Frequently Asked Questions, Parser Stack Overflow): New.
12281
b906441c
AD
122822002-09-13 Akim Demaille <akim@epita.fr>
12283
12284 Playing with autoscan.
12285
12286 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12287 * src/files.c (skeleton_find): Remove, unused.
12288 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12289 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12290
bd701811
AD
122912002-09-13 Akim Demaille <akim@epita.fr>
12292
12293 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12294 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12295
e0a13e7b
AD
122962002-09-13 Akim Demaille <akim@epita.fr>
12297
12298 * configure.ac: Require 2.54.
12299 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12300 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12301 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12302 Remove, provided by Autoconf macros.
12303
c97011bf
AD
123042002-09-12 Akim Demaille <akim@epita.fr>
12305
12306 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12307
d862b1be
AD
123082002-09-12 Akim Demaille <akim@epita.fr>
12309
12310 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12311 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12312 Reported by Martin Mokrejs.
12313
3d38c03a
AD
123142002-09-10 Akim Demaille <akim@epita.fr>
12315
12316 * src/parse-gram.y: Associate a human readable string to each
12317 token type.
12318 * tests/regression.at (Invalid inputs): Adjust.
12319
b6347355
AD
123202002-09-10 Gary V. Vaughan <gary@gnu.org>
12321
12322 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12323 with an Autoconf-2.5x style configure.ac.
12324
09ba4ab2
PE
123252002-09-06 Paul Eggert <eggert@twinsun.com>
12326
12327 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12328 exception applies only to yacc.c. This is a modification of a
12329 patch originally suggested by Akim Demaille.
12330
21846f69
AD
123312002-09-06 Akim Demaille <akim@epita.fr>
12332
09ba4ab2
PE
12333 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12334 here to...
12335 * data/yacc.c: here.
12336
21846f69
AD
12337 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12338 LocationType.
12339 (b4_ltype): Default to yy::Location from location.hh.
12340
c0ad8bf3
AD
123412002-09-04 Jim Meyering <jim@meyering.net>
12342
12343 * data/yacc.c: Guard the declaration of yytoknum also with
12344 `#ifdef YYPRINT', so it is declared only when used.
12345
3a93251e
AD
123462002-09-04 Akim Demaille <akim@epita.fr>
12347
12348 * configure.in: Rename as...
12349 * configure.ac: this.
12350 Bump to 1.49c.
12351
427c0dda
AD
123522002-09-04 Akim Demaille <akim@epita.fr>
12353
12354 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12355 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12356 translate maintainer only messages.
12357
6a254321
PE
123582002-08-12 Paul Eggert <eggert@twinsun.com>
12359
645e30d1
PE
12360 Version 1.49b.
12361
6a254321
PE
12362 * Makefile.am (SUBDIRS): Remove intl.
12363 (DISTCLEANFILES): Remove.
12364 * NEWS: Mention that GNU M4 is now required. Clarify what is
12365 meant by "larger grammars". Mention the pt_BR translation.
12366 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12367 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12368 Bump version from 0.11.2 to 0.11.5.
12369 (BISON_PREREQ_STAGE): Remove.
12370 (AM_GNU_GETTEXT): Use external gettext.
12371 (AC_OUTPUT): Remove intl/Makefile.
12372
12373 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12374
12375 * data/glr.c: Include string.h, for strlen.
12376 (yyreportParseError): Use size_t for yysize.
12377 (yy_yypstack): No longer nested inside yypstates, as nested
12378 functions are not portable. Do not assume size_t is the
12379 same width as int.
12380 (yypstates): Do not assume that ptrdiff_t is the same width
12381 as int, and similarly for yyposn and YYINDEX.
12382
12383 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12384
12385 * lib/Makefile.am (INCLUDES): Do not include from the intl
12386 directory, which has been removed.
12387 * src/Makefile.am (INCLUDES): Likewise.
12388
12389 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12390 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12391 New vars.
12392
12393 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12394 * tests/Makefile.am (EXTRA_DIST): Likewise.
12395
12396 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12397 Do not assume that bitset_windex is the same width as unsigned.
12398
12399 * lib/abitset.c (abitset_unused_clear): Do not assume that
12400 bitset_word is the same width as int.
12401 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12402 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12403 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12404 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12405 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12406
12407 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12408 portability to one's complement hosts!).
12409 * lib/ebitset.c (ebitset_op1): Likewise.
12410 * lib/lbitset.c (lbitset_op1): Likewise.
12411
12412 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12413 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12414 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12415 Sync with fileutils.
12416 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12417 lib/gettext.h: Sync with diffutils.
12418
12419 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12420 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12421
12422 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12423 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12424 check for void *.
12425
12426 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12427 size_t; the old version tried to do this but casted improperly.
12428 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12429 (bitset_test): Now returns int, not unsigned long.
12430
12431 * lib/bitset_stats.c: Include "gettext.h".
12432 (_): New macro.
12433 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12434 name locals "index", as it generates unnecessary warnings on some
12435 hosts that have an "index" function.
12436
12437 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12438 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12439 they need translation.
12440 * src/LR0.c (state_list_append, new_itemsets, get_state,
12441 append_states, generate_states): Likewise.
12442 * src/assoc.c (assoc_to_string): Likewise.
12443 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12444 * src/gram.c (grammar_dump): Likewise.
12445 * src/injections.c (injections_compute): Likewise.
12446 * src/lalr.c (lookaheads_print): Likewise.
12447 * src/relation.c (relation_transpose): Likewise.
12448 * src/scan-gram.l: Likewise.
12449 * src/tables.c (table_grow, pack_vector): Likewise.
12450
12451 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12452 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12453 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12454 * m4/mbstate_t.m4: Sync with fileutils.
12455 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12456
12457 * po/LINGUAS: Add pt_BR.
12458 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12459 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12460 lib/timevar.c.
12461 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12462 manual recommends.
12463 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12464
12465 * src/complain.c (strerror_r): Remove decl; not needed.
12466 (strerror): Use same pattern as ../lib/error.c.
12467
12468 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12469
12470 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12471
12472 * src/main.c (main): Cast result of bindtextdomain and textdomain
12473 to void, to avoid a GCC warning when --disable-nls is in effect.
12474
12475 * src/scan-gram.l: Use strings rather than escapes when possible,
12476 to minimize the number of warnings from xgettext.
12477 (handle_action_dollar, handle_action_at): Don't use isdigit,
12478 as it mishandles negative chars and it may not work as expected
12479 outside the C locale.
12480
12481 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12482 this is a GCC extension and is not portable to other compilers.
12483
12484 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12485 Do not include <ctype.h>; no longer needed.
12486 Do not include <malloc.h>; no longer needed (and generates
12487 warnings on OpenBSD 3.0).
12488
12489 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12490 it's not portable.
12491
12492 * tests/regression.at: Do not use 'cc -c input.c -o input';
12493 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12494
12495 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12496 exit status as failure, not just exit status 1. Sun C exits
12497 with status 2 sometimes.
12498
12499 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12500 Use it for the two large tests.
12501
c8f002c7
AD
125022002-08-02 Akim Demaille <akim@epita.fr>
12503
12504 * src/conflicts.c (conflicts_output): Don't output rules never
12505 reduced here, since anyway that computation doesn't work.
12506 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12507 (rule_useless_p, rule_never_reduced_p): New.
12508 (grammar_rules_partial_print): Use a filter instead of a range.
12509 Display the title only if needed.
12510 (grammar_rules_print): Adjust.
12511 (grammar_rules_never_reduced_report): New.
12512 * src/tables.c (action_row): Move the computation of rules never
12513 reduced to...
12514 (token_actions): here.
12515 * src/main.c (main): Make the parser before making the report, so
12516 that rules never reduced are computed.
12517 Call grammar_rules_never_reduced_report.
12518 * src/print.c (print_results): Report rules never reduced.
12519 * tests/conflicts.at, tests/reduce.at: Adjust.
12520
cd08e51e
AD
125212002-08-01 Akim Demaille <akim@epita.fr>
12522
12523 Instead of attaching lookaheads and duplicating the rules being
12524 reduced by a state, attach the lookaheads to the reductions.
12525
12526 * src/state.h (state_t): Remove the `lookaheads',
12527 `lookaheads_rule' member.
12528 (reductions_t): Add a `lookaheads' member.
12529 Use a regular array for the `rules'.
12530 * src/state.c (reductions_new): Initialize the lookaheads member
12531 to 0.
12532 (state_rule_lookaheads_print): Adjust.
12533 * src/state.h, src/state.c (state_reductions_find): New.
12534 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12535 (count_rr_conflicts): Adjust.
12536 * src/lalr.c (LArule): Remove.
12537 (add_lookback_edge): Adjust.
12538 (state_lookaheads_count): New.
12539 (states_lookaheads_initialize): Merge into...
12540 (initialize_LA): this.
12541 (lalr_free): Adjust.
12542 * src/main.c (main): Don't free nullable and derives too early: it
12543 is used by --verbose.
12544 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12545
bb0027a9
AD
125462002-08-01 Akim Demaille <akim@epita.fr>
12547
12548 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12549 `rule_number_t**'.
12550 (set_derives, free_derives): Rename as...
12551 (derives_compute, derives_free): this.
12552 Adjust all dependencies.
12553 * src/nullable.c (set_nullable, free_nullable): Rename as...
12554 (nullable_compute, nullable_free): these.
12555 (rule_list_t): Store rule_t *, not rule_number_t.
12556 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12557 pointers, instead of their numbers.
12558 * src/main.c (main): Call nullable_free, and derives_free earlier,
12559 as they were lo longer used.
12560
3325ddc4
AD
125612002-08-01 Akim Demaille <akim@epita.fr>
12562
12563 * lib/timevar.c (get_time): Include children time.
12564 * src/lalr.h (LA, LArule): Don't export them: used with the
12565 state_t.
12566 * src/lalr.c (LA, LArule): Static.
12567 * src/lalr.h, src/lalr.c (lalr_free): New.
12568 * src/main.c (main): Call it.
12569 * src/tables.c (pack_vector): Check whether loc is >= to the
12570 table_size, not >.
12571 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12572 (tables_generate): do it, since that's also it which allocates
12573 them.
12574 Don't free LA and LArule, main does.
12575
c6f1a33c
AD
125762002-07-31 Akim Demaille <akim@epita.fr>
12577
12578 Separate parser tables computation and output.
12579
12580 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12581 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12582 (yydefgoto, yydefact, high): Move to...
12583 * src/tables.h, src/tables.c: here.
12584 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12585 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12586 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12587 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12588 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12589 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12590 (action_row, save_row, token_actions, save_column, default_goto)
12591 (goto_actions, sort_actions, matching_state, pack_vector)
12592 (table_ninf_remap, pack_table, prepare_actions): Move to...
12593 * src/tables.c: here.
12594 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12595 * src/output.c (token_actions, output_base, output_conflicts)
12596 (output_check): Merge into...
12597 (prepare_actions): this.
12598 (actions_output): Rename as...
12599 (user_actions_output): this.
12600 * src/main.c (main): Call tables_generate and tables_free.
12601
1509d42f
AD
126022002-07-31 Akim Demaille <akim@epita.fr>
12603
12604 Steal GCC's --time-report support.
12605
12606 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12607 stolen/adjusted from GCC.
12608 * m4/stage.m4: Remove time related checks.
12609 * m4/timevar.m4: New.
12610 * configure.in: Adjust.
12611 * src/system.h: Adjust to using timevar.h.
12612 * src/getargs.h, src/getargs.c: Support trace_time for
12613 --trace=time.
12614 * src/main.c (stage): Remove.
12615 (main): Replace `stage' invocations with timevar calls.
12616 * src/output.c: Insert pertinent timevar calls.
12617
273a74fa
AD
126182002-07-31 Akim Demaille <akim@epita.fr>
12619
12620 Let --trace have arguments.
12621
12622 * src/getargs.h (enum trace_e): New.
12623 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12624 (long_options, short_options): --trace/-T takes an optional
12625 argument.
12626 Change all the uses of trace_flag to reflect the new flags.
12627 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12628
12629 Strengthen `stage' portability.
12630
12631 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12632 * configure.in: Use it.
12633 Don't check for malloc.h and sys/times.h.
12634 * src/system.h: Include them when appropriate.
12635 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12636 times and struct tms are available.
12637
217598da
AD
126382002-07-30 Akim Demaille <akim@epita.fr>
12639
12640 In verbose parse error message, don't report `error' as an
12641 expected token.
12642 * tests/actions.at (Printers and Destructors): Adjust.
12643 * tests/calc.at (Calculator $1): Adjust.
12644 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12645 error message, do not report the parser accepts the error token in
12646 that state.
12647
52489d44
AD
126482002-07-30 Akim Demaille <akim@epita.fr>
12649
12650 Normalize conflict related messages.
12651
12652 * src/complain.h, src/complain.c (warn, complain): New.
12653 * src/conflicts.c (conflicts_print): Use them.
12654 (conflict_report_yacc): New, extracted from...
12655 (conflicts_print): here.
12656 * tests/conflicts.at, tests/existing.at: Adjust.
12657
e8832397
AD
126582002-07-30 Akim Demaille <akim@epita.fr>
12659
12660 Report rules which are never reduced by the parser: those hidden
12661 by conflicts.
12662
12663 * src/LR0.c (save_reductions): Don't make the final state too
12664 different: save its reduction (accept) instead of having a state
12665 without any action (no shift or goto, no reduce).
12666 Note: the final state is now a ``regular'' state, i.e., the
12667 parsers now contain `reduce 0' as default reduction.
12668 Nevertheless, since they decide to `accept' when yystate =
12669 final_state, they still will not reduce rule 0.
12670 * src/print.c (print_actions, print_reduction): Adjust.
12671 * src/output.c (action_row): Track reduced rules.
12672 (token_actions): Report rules never reduced.
12673 * tests/conflicts.at, tests/regression.at: Adjust.
12674
caf23d24
AD
126752002-07-30 Akim Demaille <akim@epita.fr>
12676
12677 `stage' was accidently included in a previous patch.
12678 Initiate its autoconfiscation.
12679
12680 * configure.in: Look for malloc.h and sys/times.h.
12681 * src/main.c (stage): Adjust.
12682 Report only when trace_flag.
12683
640748ee
AD
126842002-07-29 Akim Demaille <akim@epita.fr>
12685
12686 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12687 state_number_t.
12688 (errs_t): symbol_t*, not symbol_number_t.
12689 (reductions_t): rule_t*, not rule_number_t.
12690 (FOR_EACH_SHIFT): New.
12691 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12692 * src/print.c, src/print_graph.c: Adjust.
12693
88bce5a2
AD
126942002-07-29 Akim Demaille <akim@epita.fr>
12695
12696 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12697
12698 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12699 (endtoken, accept): these.
12700 * src/reader.c (reader): Set endtoken's default tag to "$end".
12701 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12702 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12703 Adjust.
12704
1bfb97db
AD
127052002-07-29 Akim Demaille <akim@epita.fr>
12706
12707 * src/reduce.c (reduce_grammar): When the language is empty,
12708 complain about the start symbol, not the axiom.
12709 Use its location.
12710 * tests/reduce.at (Empty Language): New.
12711
fc5734fe
AD
127122002-07-26 Akim Demaille <akim@epita.fr>
12713
12714 * src/reader.h, src/reader.c (gram_error): ... can't get
12715 yycontrol without making too strong assumptions on the parser
12716 itself.
12717 * src/output.c (prepare_tokens): Use the real 0th value of
12718 token_translations instead of `0'.
12719 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12720 visible here.
12721 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12722 for the time being: %locations ought to provide it to yyerror.
12723
3650b4b8
AD
127242002-07-25 Akim Demaille <akim@epita.fr>
12725
12726 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12727 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12728 * tests/regression.at (Web2c Actions): Adjust.
12729
4b3d3a8e
AD
127302002-07-25 Akim Demaille <akim@epita.fr>
12731
12732 Stop storing rules from 1 to nrules + 1.
12733
12734 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12735 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12736 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12737 Iterate from 0 to nrules.
12738 Use rule_number_as_item_number and item_number_as_rule_number.
12739 Adjust to `derive' now containing possibly 0.
12740 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12741 Handle the `- 1' part in rule numbers from/to item numbers.
12742 * src/conflicts.c (log_resolution): Fix the message which reversed
12743 shift and reduce.
12744 * src/output.c (action_row): Initialize default_rule to -1.
12745 (token_actions): Adjust.
12746 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12747 expected output.
12748 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12749
4a2a22f4
AD
127502002-07-25 Akim Demaille <akim@epita.fr>
12751
12752 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12753 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12754 (b4_c_knr_arg_decl): New.
12755 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12756 yyreport_parse_error.
12757
b8df3223
AD
127582002-07-25 Akim Demaille <akim@epita.fr>
12759
12760 * data/yacc.c (yyreport_parse_error): New, extracted from...
12761 (yyparse): here.
12762 (yydestruct, yysymprint): Move above yyparse.
12763 Be K&R compliant.
12764
a762e609
AD
127652002-07-25 Akim Demaille <akim@epita.fr>
12766
12767 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12768 replace...
12769 (b4_sint_type, b4_uint_type): these.
12770 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12771 * tests/regression.at (Web2c Actions): Adjust.
12772
12b0043a
AD
127732002-07-25 Akim Demaille <akim@epita.fr>
12774
12775 * src/gram.h (TIEM_NUMBER_MAX): New.
12776 (item_number_of_rule_number, rule_number_of_item_number): Rename
12777 as...
12778 (rule_number_as_item_number, item_number_as_rule_number): these.
12779 Adjust dependencies.
12780 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12781 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12782 (symbol_number_to_vector_number): New.
12783 (order): Of vector_number_t* type.
12784 (base_t, BASE_MAX, BASE_MIN): New.
12785 (froms, tos, width, pos, check): Of base_t type.
12786 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12787 (actrow): Of action_number_t type.
12788 (conflrow): Of unsigned int type.
12789 (table_ninf, base_ninf): New.
12790 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12791 (muscle_insert_int_table, muscle_insert_base_table)
12792 (muscle_insert_rule_number_table): New.
12793 (prepare_tokens): Output `toknum' as int_table.
12794 (action_row): Returns a rule_number_t.
12795 Use ACTION_MIN, not SHRT_MIN.
12796 (token_actions): yydefact is rule_number_t*.
12797 (table_ninf_remap): New.
12798 (pack_table): Use it for `base' and `table'.
12799 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12800 replaced with...
12801 (YYPACT_NINF, YYTABLE_NINF): these.
12802 (yypact, yytable): Compute their types instead of hard-coded
12803 `short'.
12804 * tests/regression.at (Web2c Actions): Adjust.
12805
5dde258a
AD
128062002-07-19 Akim Demaille <akim@epita.fr>
12807
12808 * src/scan-gram.l (id): Can start with an underscore.
12809
a945ec39
AD
128102002-07-16 Akim Demaille <akim@epita.fr>
12811
12812 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12813 Adjust all former `associativity' dependencies.
12814 * src/symtab.c (symbol_new): Default associativity is `undef', not
12815 `right'.
12816 (symbol_check_alias_consistence): Adjust.
12817
fae437e8
AD
128182002-07-09 Akim Demaille <akim@epita.fr>
12819
12820 * doc/bison.texinfo: Properly set the ``header'' part.
12821 Use @dircategory ``GNU programming tools'' as per Texinfo's
12822 documentation.
12823 Use @copying.
12824
1a715ef2
AD
128252002-07-09 Akim Demaille <akim@epita.fr>
12826
12827 * lib/quotearg.h: Protect against multiple inclusions.
12828 * src/location.h (location_t): Add a `file' member.
12829 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12830 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12831 `error_one_per_line' support.
12832
a5d50994
AD
128332002-07-09 Akim Demaille <akim@epita.fr>
12834
12835 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12836 * src/reader.c (lineno): Remove.
12837 Adjust all dependencies.
12838 (get_merge_function): Take a location and use complain_at.
12839 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12840 * tests/regression.at (Invalid inputs, Mixing %token styles):
12841 Adjust.
12842
b275314e
AD
128432002-07-09 Akim Demaille <akim@epita.fr>
12844
12845 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12846 recovery rule, and forbid extensions when --yacc.
12847 (gram_error): Use complain_at.
12848 * src/reader.c (reader): Exit if there were parse errors.
12849
865b9df1
AD
128502002-07-09 Akim Demaille <akim@epita.fr>
12851
12852 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12853 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12854 Reported by R Blake <blakers@mac.com>.
12855
c76e14da
AD
128562002-07-09 Akim Demaille <akim@epita.fr>
12857
12858 * data/yacc.c: Output the copyright notive in the header.
12859
7db2ed2d
AD
128602002-07-03 Akim Demaille <akim@epita.fr>
12861
12862 * src/output.c (froms, tos): Are state_number_t.
12863 (save_column): sp, sp1, and sp2 are state_number_t.
12864 (prepare): Rename `final' as `final_state_number', `nnts' as
12865 `nterms_number', `nrules' as `rules_number', `nstates' as
12866 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12867 unused.
12868 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12869 * data/lalr1.cc (nsym_): Remove, unused.
12870
e68e0410
AD
128712002-07-03 Akim Demaille <akim@epita.fr>
12872
12873 * src/lalr.h, src/lalr.c (goto_number_t): New.
12874 * src/lalr.c (goto_list_t): New.
12875 Propagate them.
12876 * src/nullable.c (rule_list_t): New.
12877 Propagate.
12878 * src/types.h: Remove.
12879
e1a4f3a4
AD
128802002-07-03 Akim Demaille <akim@epita.fr>
12881
12882 * src/closure.c (print_fderives): Use rule_rhs_print.
12883 * src/derives.c (print_derives): Use rule_rhs_print.
12884 (rule_list_t): New, replaces `shorts'.
12885 (set_derives): Add comments.
12886 * tests/sets.at (Nullable, Firsts): Adjust.
12887
536545f3
AD
128882002-07-03 Akim Demaille <akim@epita.fr>
12889
12890 * src/output.c (prepare_actions): Free `tally' and `width'.
12891 (prepare_actions): Allocate and free `order'.
12892 * src/symtab.c (symbols_free): Free `symbols'.
12893 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12894 * src/output.c (m4_invoke): Move to...
12895 * src/scan-skel.l: here.
12896 (<<EOF>>): Close yyout, and free its name.
12897
8b752b00
AD
128982002-07-03 Akim Demaille <akim@epita.fr>
12899
12900 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12901
12902 * src/LR0.c (new_state): Merge into...
12903 (state_list_append): this.
12904 (new_states): Merge into...
12905 (generate_states): here.
12906 (set_states): Don't ensure a proper `errs' state member here, do it...
12907 * src/conflicts.c (conflicts_solve): here.
12908 * src/state.h, src/state.c: Comment changes.
12909 (state_t): Rename member `shifts' as `transitions'.
12910 Adjust all dependencies.
12911 (errs_new): For consistency, also take the values as argument.
12912 (errs_dup): Remove.
12913 (state_errs_set): New.
12914 (state_reductions_set, state_transitions_set): Assert that no
12915 previous value was assigned.
12916 (state_free): New.
12917 (states_free): Use it.
12918 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12919 temporary storage: use `errs' and `nerrs' as elsewhere.
12920 (set_conflicts): Allocate and free this `errs'.
12921
613f5e1a
AD
129222002-07-02 Akim Demaille <akim@epita.fr>
12923
12924 * lib/libiberty.h: New.
12925 * lib: Update the bitset implementation from upstream.
12926 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12927 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12928 * src/main.c: Adjust bitset stats calls.
12929
26e0cadc
PE
129302002-07-01 Paul Eggert <eggert@twinsun.com>
12931
12932 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12933 char, so that negative chars don't collide with $.
12934
1154cced
AD
129352002-06-30 Akim Demaille <akim@epita.fr>
12936
12937 Have the GLR tests be `warning' checked, and fix the warnings.
12938
12939 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12940 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12941 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12942 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12943 (yyaddDeferredAction): static.
12944 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12945 (yyreportParseError): yyprefix is const.
12946 yytokenp is used only when verbose.
12947 (yy__GNUC__): Replace with __GNUC__.
12948 (yypdumpstack): yyi is size_t.
12949 (yypreference): Un-yy local variables and arguments, to avoid
12950 clashes with `yyr1'. Anyway, we are not in the user name space.
12951 (yytname_size): be an int, as is compared with ints.
12952 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12953 Use them.
12954 * tests/cxx-gram.at: Use quotation to protect $1.
12955 Use AT_COMPILE to enable warnings hunts.
12956 Prototype yylex and yyerror.
12957 `Use' argc.
12958 Include `string.h', not `strings.h'.
12959 Produce and prototype stmtMerge only when used.
12960 yylex takes a location.
12961
97650f4e
AD
129622002-06-30 Akim Demaille <akim@epita.fr>
12963
12964 We spend a lot of time in quotearg, in particular when --verbose.
12965
12966 * src/symtab.c (symbol_get): Store a quoted version of the key.
12967 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12968 Adjust all callers.
12969
d2576365
AD
129702002-06-30 Akim Demaille <akim@epita.fr>
12971
12972 * src/state.h (reductions_t): Rename member `nreds' as num.
12973 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12974 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12975
ccaf65bc
AD
129762002-06-30 Akim Demaille <akim@epita.fr>
12977
12978 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12979 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12980 (shifts_to): Rename as...
12981 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12982 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12983 (TRANSITION_IS_DISABLED, transitions_to): these.
12984
87675353
AD
129852002-06-30 Akim Demaille <akim@epita.fr>
12986
12987 * src/print.c (print_shifts, print_gotos): Merge into...
12988 (print_transitions): this.
12989 (print_transitions, print_errs, print_reductions): Align the
12990 lookaheads columns.
12991 (print_core, print_transitions, print_errs, print_state,
12992 print_grammar): Output empty lines separator before, not after.
12993 (state_default_rule_compute): Rename as...
12994 (state_default_rule): this.
12995 * tests/conflicts.at (Defaulted Conflicted Reduction),
12996 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12997 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12998
ce4ccb4b
AD
129992002-06-30 Akim Demaille <akim@epita.fr>
13000
13001 Display items as we display rules.
13002
13003 * src/gram.h, src/gram.c (rule_lhs_print): New.
13004 * src/gram.c (grammar_rules_partial_print): Use it.
13005 * src/print.c (print_core): Likewise.
13006 * tests/conflicts.at (Defaulted Conflicted Reduction),
13007 (Unresolved SR Conflicts): Adjust.
13008 (Unresolved SR Conflicts): Adjust and rename as...
13009 (Resolved SR Conflicts): this, as was meant.
13010 * tests/regression.at (Web2c Report): Adjust.
13011
bc933ef1
AD
130122002-06-30 Akim Demaille <akim@epita.fr>
13013
13014 * src/print.c (state_default_rule_compute): New, extracted from...
13015 (print_reductions): here.
13016 Pessimize, but clarify the code.
13017 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
13018
53d4308d
AD
130192002-06-30 Akim Demaille <akim@epita.fr>
13020
13021 * src/output.c (action_row): Let default_rule be always a rule
13022 number.
13023
574fb2d5
AD
130242002-06-30 Akim Demaille <akim@epita.fr>
13025
13026 * src/closure.c (print_firsts, print_fderives, closure):
13027 Use BITSET_EXECUTE.
13028 * src/lalr.c (lookaheads_print): Likewise.
13029 * src/state.c (state_rule_lookaheads_print): Likewise.
13030 * src/print_graph.c (print_core): Likewise.
13031 * src/print.c (print_reductions): Likewise.
13032 * src/output.c (action_row): Likewise.
13033 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13034
05811fd7
AD
130352002-06-30 Akim Demaille <akim@epita.fr>
13036
13037 * src/print_graph.c: Use report_flag.
13038
0e4d5753
AD
130392002-06-30 Akim Demaille <akim@epita.fr>
13040
13041 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13042 to...
13043 * src/relation.h, src/relation.c (traverse, relation_digraph)
13044 (relation_print, relation_transpose): New.
13045
24c7d800
AD
130462002-06-30 Akim Demaille <akim@epita.fr>
13047
13048 * src/state.h, src/state.c (shifts_to): New.
13049 * src/lalr.c (build_relations): Use it.
13050
9222837b
AD
130512002-06-30 Akim Demaille <akim@epita.fr>
13052
13053 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13054 (item_number_of_rule_number, rule_number_of_item_number): New.
13055 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13056 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13057 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13058 Propagate their use.
13059 Much remains to be done, in particular wrt `shorts' from types.h.
13060
260008e5
AD
130612002-06-30 Akim Demaille <akim@epita.fr>
13062
13063 * src/symtab.c (symbol_new): Initialize the `printer' member.
13064
8a731ca8
AD
130652002-06-30 Akim Demaille <akim@epita.fr>
13066
13067 * src/LR0.c (save_reductions): Remove, replaced by...
13068 * src/state.h, src/state.c (state_reductions_set): New.
13069 (reductions, errs): Rename as...
13070 (reductions_t, errs_t): these.
13071 Adjust all dependencies.
13072
32e1e0a4
AD
130732002-06-30 Akim Demaille <akim@epita.fr>
13074
13075 * src/LR0.c (state_list_t, state_list_append): New.
13076 (first_state, last_state): Now symbol_list_t.
13077 (this_state): Remove.
13078 (new_itemsets, append_states, save_reductions): Take a state_t as
13079 argument.
13080 (set_states, generate_states): Adjust.
13081 (save_shifts): Remove, replaced by...
13082 * src/state.h, src/state.c (state_shifts_set): New.
13083 (shifts): Rename as...
13084 (shifts_t): this.
13085 Adjust all dependencies.
13086 * src/state.h (state_t): Remove the `next' member.
13087
e5fb6710
AD
130882002-06-30 Akim Demaille <akim@epita.fr>
13089
13090 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13091 escaped in slot 0.
13092
c7ca99d4
AD
130932002-06-30 Akim Demaille <akim@epita.fr>
13094
13095 Use hash.h for the state hash table.
13096
13097 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13098 (allocate_storage): Use state_hash_new.
13099 (free_storage): Use state_hash_free.
13100 (new_state, get_state): Adjust.
13101 * src/lalr.h, src/lalr.c (states): Move to...
13102 * src/states.h (state_t): Remove the `link' member, no longer
13103 used.
13104 * src/states.h, src/states.c: here.
13105 (state_hash_new, state_hash_free, state_hash_lookup)
13106 (state_hash_insert, states_free): New.
13107 * src/states.c (state_table, state_compare, state_hash): New.
13108 * src/output.c (output_actions): Do not free states now, since we
13109 still need to know the final_state number in `prepare', called
13110 afterwards. Do it...
13111 * src/main.c (main): here: call states_free after `output'.
13112
df0e7316
AD
131132002-06-30 Akim Demaille <akim@epita.fr>
13114
13115 * src/state.h, src/state.c (state_new): New, extracted from...
13116 * src/LR0.c (new_state): here.
13117 * src/state.h (STATE_ALLOC): Move to...
13118 * src/state.c: here.
13119 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13120 * src/state.h, src/state.c: here.
13121
39f41916
AD
131222002-06-30 Akim Demaille <akim@epita.fr>
13123
13124 * src/reader.c (gensym): Rename as...
13125 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13126 (getsym): Rename as...
13127 (symbol_get): this.
13128
d57650a5
AD
131292002-06-30 Akim Demaille <akim@epita.fr>
13130
13131 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13132 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13133 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13134 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13135
5a08f1ce
AD
131362002-06-30 Akim Demaille <akim@epita.fr>
13137
13138 Make the test suite pass with warnings checked.
13139
13140 * tests/actions.at (Printers and Destructors): Improve.
13141 Avoid unsigned vs. signed issues.
13142 * tests/calc.at: Don't exercise the scanner here, do it...
13143 * tests/input.at (Torturing the Scanner): here.
13144
720623af
PH
131452002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13146
88e7e941 13147 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
13148 reorganize first lines parallel to yacc.c.
13149
fb8135fa
AD
131502002-06-28 Akim Demaille <akim@epita.fr>
13151
13152 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13153 (b4_token_enum, b4_token_defines): New, factored from...
13154 * data/lalr1.cc, data/yacc.c, glr.c: here.
13155
41442480
AD
131562002-06-28 Akim Demaille <akim@epita.fr>
13157
13158 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13159 unused variables.
13160 * src/output.c (merger_output): static.
13161
e0e5bf84
AD
131622002-06-28 Akim Demaille <akim@epita.fr>
13163
ba0fe3c7 13164 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
13165 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13166 pacify GCC.
13167 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 13168
676385e2
PH
131692002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13170
13171 Accumulated changelog for new GLR parsing features.
13172
6a254321 13173 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
13174 conflicts_total_count.
13175 * src/conflicts.h: Ditto.
13176 * src/output.c (token_actions): Use the new name.
13177 (output_conflicts): Change conflp => conflict_list_heads, and
13178 confl => conflict_list for better readability.
13179 * data/glr.c: Use the new names.
13180 * NEWS: Add self to GLR announcement.
e0e5bf84 13181
676385e2
PH
13182 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13183
13184 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13185 Akim Demaille.
13186
13187 * data/bison.glr: Change name to glr.c
13188 * data/glr.c: Renamed from bison.glr.
13189 * data/Makefile.am: Add glr.c
e0e5bf84
AD
13190
13191 * src/getargs.c:
13192
676385e2 13193 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 13194 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 13195
676385e2
PH
13196 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13197
13198 * data/bison.glr: Be sure to restore the
13199 current #line when returning to the skeleton contents after having
13200 exposed the input file's #line.
13201
13202 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13203
13204 * data/bison.glr: Bring up to date with changes to bison.simple.
13205
13206 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13207
13208 * data/bison.glr: Correct definitions that use b4_prefix.
13209 Various reformatting.
13210 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13211 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13212 yytokenp argument; now part of stack.
13213 (yychar): Define to behave as documented.
13214 (yyclearin): Ditto.
e0e5bf84 13215
676385e2
PH
13216 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13217
13218 * src/reader.h: Add declaration for free_merger_functions.
13219
13220 * src/reader.c (merge_functions): New variable.
13221 (get_merge_function): New function.
13222 (free_merger_functions): New function.
13223 (readgram): Check for %prec that is not followed by a symbol.
13224 Handle %dprec and %merge declarations.
13225 (packgram): Initialize dprec and merger fields in rules array.
13226
13227 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13228 conflict_list_cnt, conflict_list_free): New variables.
13229 (table_grow): Also grow conflict_table.
e0e5bf84 13230 (prepare_rules): Output dprec and merger tables.
676385e2 13231 (conflict_row): New function.
e0e5bf84 13232 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
13233 default reduction in conflicted states for GLR parser so that there
13234 are spaces for the conflict lists.
13235 (save_row): Also save conflict information.
13236 (token_actions): Allocate conflict list.
13237 (merger_output): New function.
13238 (pack_vector): Pack conflict table, too.
13239 (output_conflicts): New function to output yyconflp and yyconfl.
13240 (output_check): Allocate conflict_tos.
13241 (output_actions): Output conflict tables, also.
13242 (output_skeleton): Output b4_mergers definition.
13243 (prepare): Output b4_max_rhs_length definition.
13244 Use 'bison.glr' as default skeleton for GLR parsers.
13245
13246 * src/gram.c (glr_parser): New flag.
13247 (grammar_free): Call free_merger_functions.
13248
13249 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13250 all pairs of conflicting reductions, rather than just all tokens
13251 causing conflicts. Needed to size conflict tables.
e0e5bf84 13252 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
13253 interface.
13254 (conflicts_print): Ditto.
13255 (count_total_conflicts): New function.
13256
13257 * src/reader.h (merger_list): New type.
13258 (merge_functions): New variable.
13259
13260 * src/lex.h (tok_dprec, tok_merge): New token types.
13261
13262 * src/gram.h (rule_s): Add dprec and merger fields.
13263 (glr_parser): New flag.
13264
13265 * src/conflicts.h (count_total_conflicts): New function.
13266
13267 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13268
13269 * doc/bison.texinfo (Generalized LR Parsing): New section.
13270 (GLR Parsers): New section.
13271 (Language and Grammar): Mention GLR parsing.
13272 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13273 Correct typo ("tge" -> "the").
13274
13275 * data/bison.glr: New skeleton for GLR parsing.
13276
13277 * tests/cxx-gram.at: New tests for GLR parsing.
13278
13279 * tests/testsuite.at: Include cxx-gram.at.
13280
13281 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 13282
676385e2
PH
13283 * src/parse-gram.y:
13284
13285 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13286
13287 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 13288
b5480d74 132892002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
13290
13291 * src/options.h, src/options.c: Remove.
13292 * src/getargs.c (short_options, long_options): New.
13293
60491a94
AD
132942002-06-27 Akim Demaille <akim@epita.fr>
13295
13296 * data/bison.simple, data/bison.c++: Rename as...
13297 * data/yacc.c, data/lalr1.cc: these.
13298 * doc/bison.texinfo (Environment Variables): Remove.
13299
9be0c25b
AD
133002002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13301
13302 * src/getargs.c (report_argmatch): Initialize strtok().
13303
1ae72863
AD
133042002-06-20 Akim Demaille <akim@epita.fr>
13305
13306 * data/bison.simple (b4_symbol_actions): New, replaces...
13307 (b4_symbol_destructor, b4_symbol_printer): these.
13308 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13309 user token numbers.
13310
87542d29
AD
133112002-06-20 Akim Demaille <akim@epita.fr>
13312
13313 * data/bison.simple (yydestructor): Rename as...
13314 (yydestruct): this.
13315
1a31ed21
AD
133162002-06-20 Akim Demaille <akim@epita.fr>
13317
13318 * src/symtab.h, src/symtab.c (symbol_type_set)
13319 (symbol_destructor_set, symbol_precedence_set): The location is
13320 the last argument.
13321 Adjust all callers.
13322
e776192e
AD
133232002-06-20 Akim Demaille <akim@epita.fr>
13324
13325 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13326 internals.
13327 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13328 Takes a location.
13329 * src/symtab.h, src/symtab.c (symbol_class_set)
13330 (symbol_user_token_number_set): Likewise.
13331 Adjust all callers.
13332 Promote complain_at.
13333 * tests/input.at (Type Clashes): Adjust.
13334
5c1180b3
AD
133352002-06-20 Akim Demaille <akim@epita.fr>
13336
13337 * data/bison.simple (YYLEX): Fix the declaration when
13338 %pure-parser.
13339
e3170060
AD
133402002-06-20 Akim Demaille <akim@epita.fr>
13341
13342 * data/bison.simple (yysymprint): Don't print the token number,
13343 just its name.
13344 * tests/actions.at (Destructors): Rename as...
13345 (Printers and Destructors): this.
13346 Also exercise %printer.
13347
253862fd
AD
133482002-06-20 Akim Demaille <akim@epita.fr>
13349
13350 * data/bison.simple (YYDSYMPRINT): New.
13351 Use it to remove many of the #if YYDEBUG/if (yydebug).
13352
366eea36
AD
133532002-06-20 Akim Demaille <akim@epita.fr>
13354
13355 * src/symtab.h, src/symtab.c (symbol_t): printer and
13356 printer_location are new members.
13357 (symbol_printer_set): New.
13358 * src/parse-gram.y (PERCENT_PRINTER): New token.
13359 Handle its associated rule.
13360 * src/scan-gram.l: Adjust.
13361 (handle_destructor_at, handle_destructor_dollar): Rename as...
13362 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13363 * src/output.c (symbol_printers_output): New.
13364 (output_skeleton): Call it.
13365 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13366 since there are already many grammar files with a user `yyprint'.
13367 Replace the calls to YYPRINT to calls to yysymprint.
13368 * tests/calc.at: Adjust.
13369 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13370 taking advantage of parser very internal details (stack size!).
13371
4f25ebb0
AD
133722002-06-20 Akim Demaille <akim@epita.fr>
13373
13374 * src/scan-gram.l: Complete the scanner with the missing patterns
13375 to pacify Flex.
13376 Use `quote' and `symbol_tag_get' where appropriate.
13377
93b68a0e
AD
133782002-06-19 Akim Demaille <akim@epita.fr>
13379
13380 * tests/actions.at (Destructors): Augment to test locations.
13381 * data/bison.simple (yydestructor): Pass it the current location
13382 if locations are enabled.
13383 Prototype only when __STDC__ or C++.
13384 Change the argument names to move into the yy name space: there is
13385 user code here.
13386
58612f1d
AD
133872002-06-19 Akim Demaille <akim@epita.fr>
13388
74310291
AD
13389 * data/bison.simple (b4_pure_if): New.
13390 Use it instead of #ifdef YYPURE.
13391
133922002-06-19 Akim Demaille <akim@epita.fr>
13393
13394 * data/bison.simple (b4_location_if): New.
58612f1d
AD
13395 Use it instead of #ifdef YYLSP_NEEDED.
13396
f25bfb75
AD
133972002-06-19 Akim Demaille <akim@epita.fr>
13398
13399 Prepare @$ in %destructor, but currently don't bind it in the
13400 skeleton, as %location use is not cleaned up yet.
13401
13402 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13403 (handle_action_at): New.
13404 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13405 a braced_code_t and a location as additional arguments.
13406 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13407 unquote one when outputting `b4_dollar_dollar'.
13408 Adjust callers.
13409 * data/bison.simple (b4_eval): Remove.
13410 (b4_symbol_destructor): Adjust.
13411 * tests/input.at (Invalid @n): Adjust.
13412
c732d2c6
AD
134132002-06-19 Zack Weinberg <zack@codesourcery.com>
13414
13415 * doc/bison.texinfo: Document ability to have multiple
13416 prologue sections.
13417
8c165d89
AD
134182002-06-18 Akim Demaille <akim@epita.fr>
13419
13420 * src/files.c (compute_base_names): When computing the output file
13421 names from the input file name, strip the directory part.
13422
ca98bf57
AD
134232002-06-18 Akim Demaille <akim@epita.fr>
13424
13425 * data/bison.simple.new: Comment changes.
13426 Reported by Andreas Schwab.
13427
0bfb02ff
AD
134282002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13429
13430 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13431 there are no `label `yyoverflowlab' defined but not used' warnings
13432 when yyoverflow is defined.
13433
24c0aad7
AD
134342002-06-18 Akim Demaille <akim@epita.fr>
13435
13436 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13437 new member.
13438 (symbol_destructor_set): Adjust.
13439 * src/output.c (symbol_destructors_output): Output the destructor
13440 locations.
13441 Output the symbol name.
13442 * data/bison.simple (b4_symbol_destructor): Adjust.
13443
5719c109
AD
134442002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13445 and Akim Demaille <akim@epita.fr>
13446
13447 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13448 what's left on the stack when the error recovery hits EOF.
13449 * tests/actions.at (Destructors): Complete to exercise this case.
13450
9280d3ef
AD
134512002-06-17 Akim Demaille <akim@epita.fr>
13452
13453 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13454 arguments is really empty, not only equal to `[]'.
13455 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13456 member.
13457 (symbol_destructor_set): New.
13458 * src/output.c (symbol_destructors_output): New.
13459 * src/reader.h (brace_code_t, current_braced_code): New.
13460 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13461 (handle_dollar): Rename as...
13462 (handle_action_dollar): this.
13463 (handle_destructor_dollar): New.
13464 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13465 (grammar_declaration): Use it.
13466 * data/bison.simple (yystos): Is always defined.
13467 (yydestructor): New.
13468 * tests/actions.at (Destructors): New.
13469 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13470
dafdc66f
AD
134712002-06-17 Akim Demaille <akim@epita.fr>
13472
13473 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13474 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13475 rule_length only when needed.
13476 * src/output.c (actions_output, token_definitions_output): Output
13477 the full M4 block.
13478 * src/symtab.c: Don't access directly to the symbol tag, use
13479 symbol_tag_get.
13480 * src/parse-gram.y: Use symbol_list_free.
13481
56c47203
AD
134822002-06-17 Akim Demaille <akim@epita.fr>
13483
13484 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13485 (symbol_list_prepend, get_type_name): Move to...
13486 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13487 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13488 Adjust all callers.
13489 (symbol_list_free): New.
13490 * src/scan-gram.l (handle_dollar): Takes a location.
13491 * tests/input.at (Invalid $n): Adjust.
13492
1e0bab92
AD
134932002-06-17 Akim Demaille <akim@epita.fr>
13494
13495 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13496 (symbol_list_prepend): New.
13497 * src/parse-gram.y (%union): `list' is a new member.
13498 (symbols.1): New, replaces...
13499 (terms_to_prec.1, nterms_to_type.1): these.
13500 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13501 Take a location as additional argument.
13502 Adjust all callers.
13503
04e60654
AD
135042002-06-15 Akim Demaille <akim@epita.fr>
13505
13506 * src/parse-gram.y: Move %token in the declaration section so that
13507 we don't depend upon CVS Bison.
13508
10e5b8bd
AD
135092002-06-15 Akim Demaille <akim@epita.fr>
13510
13511 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13512 * src/print.c (print_core): Use it.
13513
9801d40c
AD
135142002-06-15 Akim Demaille <akim@epita.fr>
13515
13516 * src/conflicts.c (log_resolution): Accept the rule involved in
13517 the sr conflicts instead of the lookahead number that points to
13518 that rule.
13519 (flush_reduce): Accept the current lookahead vector as argument,
13520 instead of the index in LA.
13521 (resolve_sr_conflict): Accept the current number of lookahead
13522 bitset to consider for the STATE, instead of the index in LA.
13523 (set_conflicts): Adjust.
13524 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13525
c0263492
AD
135262002-06-15 Akim Demaille <akim@epita.fr>
13527
13528 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13529 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13530 Adjust all dependencies.
13531 * src/lalr.c (initialize_lookaheads): Split into...
13532 (states_lookaheads_count, states_lookaheads_initialize): these.
13533 (lalr): Adjust.
13534
9757c359
AD
135352002-06-15 Akim Demaille <akim@epita.fr>
13536
13537 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13538 out of...
13539 (grammar_rules_print): here.
13540 * src/reduce.c (reduce_output): Use it.
13541 * tests/reduce.at (Useless Rules, Reduced Automaton)
13542 (Underivable Rules): Adjust.
13543
6b98e4b5
AD
135442002-06-15 Akim Demaille <akim@epita.fr>
13545
13546 Copy BYacc's nice way to report the grammar.
13547
13548 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13549 New.
13550 Don't print the rules' location, it is confusing and useless.
13551 (rule_print): Use grammar_rhs_print.
13552 * src/print.c (print_grammar): Use grammar_rules_print.
13553
6b98e4b5
AD
135542002-06-15 Akim Demaille <akim@epita.fr>
13555
13556 Complete and rationalize `useless thing' warnings.
13557
13558 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13559 (symbol_tag_print): New.
13560 Use them everywhere in place of accessing directly the tag member.
13561 * src/gram.h, src/gram.c (rule_print): New.
13562 Use it where a rule used to be printed `by hand'.
13563 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13564 (reduce_grammar_tables): Report the useless rules.
13565 (reduce_print): Useless things are a warning, not an error.
13566 Report it as such.
13567 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13568 (Reduced Automaton, Underivable Rules): Adjust.
13569 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13570 * tests/conflicts.at (Unresolved SR Conflicts)
13571 (Solved SR Conflicts): Adjust.
13572
ee000ba4
AD
135732002-06-15 Akim Demaille <akim@epita.fr>
13574
13575 Let symbols have a location.
13576
13577 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13578 (getsym): Adjust.
13579 Adjust all callers.
13580 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13581 Use location_t, not int.
13582 * src/symtab.c (symbol_check_defined): Take advantage of the
13583 location.
13584 * tests/regression.at (Invalid inputs): Adjust.
13585
8efe435c
AD
135862002-06-15 Akim Demaille <akim@epita.fr>
13587
13588 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13589 (input): Don't try to initialize yylloc here, do it in the
13590 scanner.
13591 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13592 * src/gram.h (rule_t): Change line and action_line into location
13593 and action_location, of location_t type.
13594 Adjust all dependencies.
13595 * src/location.h, src/location.c (empty_location): New.
13596 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13597 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13598 (grammar_current_rule_symbol_append)
13599 (grammar_current_rule_action_append): Expect a location as argument.
13600 * src/reader.c (grammar_midrule_action): Adjust to attach an
13601 action's location as dummy symbol location.
13602 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13603 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13604 the line numbers.
13605
1921f1d7
AD
136062002-06-14 Akim Demaille <akim@epita.fr>
13607
13608 Grammar declarations may be found in the grammar section.
13609
13610 * src/parse-gram.y (rules_or_grammar_declaration): New.
13611 (declarations): Each declaration may end with a semicolon, not
13612 just...
13613 (grammar_declaration): `"%union"'.
13614 (grammar): Branch to rules_or_grammar_declaration.
13615
4515534c
AD
136162002-06-14 Akim Demaille <akim@epita.fr>
13617
13618 * src/main.c (main): Invoke scanner_free.
13619
f958596b
AD
136202002-06-14 Akim Demaille <akim@epita.fr>
13621
13622 * src/output.c (m4_invoke): Extracted from...
13623 (output_skeleton): here.
13624 Free tempfile.
13625
2c569025
AD
136262002-06-14 Akim Demaille <akim@epita.fr>
13627
13628 * src/parse-gram.y (directives, directive, gram)
13629 (grammar_directives, precedence_directives, precedence_directive):
13630 Rename as...
13631 (declarations, declaration, grammar, grammar_declaration)
13632 (precedence_declaration, precedence_declarator): these.
13633 (symbol_declaration): New.
13634
592e8d4d
AD
136352002-06-14 Akim Demaille <akim@epita.fr>
13636
13637 * src/files.c (action_obstack): Remove, unused.
13638 (output_obstack): Remove it, and all its dependencies, as it is no
13639 longer needed.
13640 * src/reader.c (epilogue_set): Build the epilogue in the
13641 muscle_obstack.
13642 * src/output.h, src/output.c (muscle_obstack): Move to...
13643 * src/muscle_tab.h, src/muscle_tab.h: here.
13644 (muscle_init): Initialize muscle_obstack.
13645 (muscle_free): New.
13646 * src/main.c (main): Call it.
13647
0c15323d
AD
136482002-06-14 Akim Demaille <akim@epita.fr>
13649
13650 * src/location.h: New, extracted from...
13651 * src/reader.h: here.
13652 * src/Makefile.am (noinst_HEADERS): Merge into
13653 (bison_SOURCES): this.
13654 Add location.h.
13655 * src/parse-gram.y: Use location_t instead of Bison's.
13656 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13657 Use location_t instead of ints.
13658
e96c9728
AD
136592002-06-14 Akim Demaille <akim@epita.fr>
13660
13661 * data/bison.simple, data/bison.c++: Be sure to restore the
13662 current #line when returning to the skeleton contents after having
13663 exposed the input file's #line.
13664
75d1fe16
AD
136652002-06-12 Akim Demaille <akim@epita.fr>
13666
13667 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13668 eager.
13669 * tests/actions.at (Exotic Dollars): New.
13670
6c35d22c
AD
136712002-06-12 Akim Demaille <akim@epita.fr>
13672
13673 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13674 ['"/] too eagerly.
13675 * tests/input.at (Torturing the Scanner): New.
13676
1d6412ad
AD
136772002-06-11 Akim Demaille <akim@epita.fr>
13678
13679 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13680 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13681 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13682 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13683 * src/reader.c (reader): Use it.
13684
4cdb01db
AD
136852002-06-11 Akim Demaille <akim@epita.fr>
13686
13687 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13688 Adjust all callers.
13689 (scanner_last_string_free): New.
13690
44995b2e
AD
136912002-06-11 Akim Demaille <akim@epita.fr>
13692
13693 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13694 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13695 (last_string, YY_OBS_FREE): New.
13696 Use them when returning an ID.
13697
e9955c83
AD
136982002-06-11 Akim Demaille <akim@epita.fr>
13699
13700 Have Bison grammars parsed by a Bison grammar.
13701
13702 * src/reader.c, src/reader.h (prologue_augment): New.
13703 * src/reader.c (copy_definition): Remove.
13704
13705 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13706 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13707 (grammar_current_rule_prec_set, grammar_current_rule_check)
13708 (grammar_current_rule_symbol_append)
13709 (grammar_current_rule_action_append): Export.
13710 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13711 (symbol_list_action_append): Remove.
13712 Hook the routines from reader.
13713 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13714 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13715
13716 * src/reader.c (read_declarations): Remove, unused.
13717
13718 * src/parse-gram.y: Handle the epilogue.
13719 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13720 (grammar_start_symbol_set): this.
13721 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13722 * src/reader.c (readgram): Remove, unused.
13723 (reader): Adjust to insert eoftoken and axiom where appropriate.
13724
13725 * src/reader.c (copy_dollar): Replace with...
13726 * src/scan-gram.h (handle_dollar): this.
13727 * src/parse-gram.y: Remove `%thong'.
13728
13729 * src/reader.c (copy_at): Replace with...
13730 * src/scan-gram.h (handle_at): this.
13731
13732 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13733 New.
13734
13735 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13736 time being.
13737
13738 * src/reader.h, src/reader.c (grammar_rule_end): New.
13739
13740 * src/parse.y (current_type, current_class): New.
13741 Implement `%nterm', `%token' support.
13742 Merge `%term' into `%token'.
13743 (string_as_id): New.
13744 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13745 type name.
13746
13747 * src/parse-gram.y: Be sure to handle properly the beginning of
13748 rules.
13749
13750 * src/parse-gram.y: Handle %type.
13751 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13752
13753 * src/parse-gram.y: More directives support.
13754 * src/options.c: No longer handle source directives.
13755
13756 * src/parse-gram.y: Fix %output.
13757
13758 * src/parse-gram.y: Handle %union.
13759 Use the prologue locations.
13760 * src/reader.c (parse_union_decl): Remove.
13761
13762 * src/reader.h, src/reader.c (epilogue_set): New.
13763 * src/parse-gram.y: Use it.
13764
13765 * data/bison.simple, data/bison.c++: b4_stype is now either not
13766 defined, then default to int, or to the contents of %union,
13767 without `union' itself.
13768 Adjust.
13769 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13770
13771 * src/output.c (actions_output): Don't output braces, as they are
13772 already handled by the scanner.
13773
13774 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13775 characters to themselves.
13776
13777 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13778 that the epilogue has a proper #line.
13779
13780 * src/parse-gram.y: Handle precedence/associativity.
13781
13782 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13783 a terminal.
13784 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13785 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13786 at all to define terminals that cannot be emitted.
13787
13788 * src/scan-gram.l: Escape M4 characters.
13789
13790 * src/scan-gram.l: Working properly with escapes in user
13791 strings/characters.
13792
13793 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13794 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13795 grammar.
13796 Use more modest sizes, as for the time being the parser does not
13797 release memory, and therefore the process swallows a huge amount
13798 of memory.
13799
13800 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13801 stricter %token grammar.
13802
13803 * src/symtab.h (associativity): Add `undef_assoc'.
13804 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13805 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13806
13807 * tests/regression.at (Invalid %directive): Remove, as it is now
13808 meaningless.
13809 (Invalid inputs): Adjust to the new error messages.
13810 (Token definitions): The new grammar doesn't allow too many
13811 eccentricities.
13812
13813 * src/lex.h, src/lex.c: Remove.
13814 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13815 (copy_character, copy_string2, copy_string, copy_identifier)
13816 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13817 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13818 (parse_action): Remove.
13819 * po/POTFILES.in: Adjust.
13820
2e047461
AD
138212002-06-11 Akim Demaille <akim@epita.fr>
13822
cd05d13c 13823 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
13824 rule's action member: return the action as a string.
13825 Don't require `rule_length' as an argument: compute it.
13826 (grammar_current_rule_symbol_append)
13827 (grammar_current_rule_action_append): New, eved out from
13828 (readgram): here.
13829 Remove `action_flag', `rulelength', unused now.
13830
9af3fbce
AD
138312002-06-11 Akim Demaille <akim@epita.fr>
13832
13833 * src/reader.c (grammar_current_rule_prec_set).
13834 (grammar_current_rule_check): New, eved out from...
13835 (readgram): here.
13836 Remove `xaction', `first_rhs': useless.
13837 * tests/input.at (Type clashes): New.
13838 * tests/existing.at (GNU Cim Grammar): Adjust.
13839
1485e106
AD
138402002-06-11 Akim Demaille <akim@epita.fr>
13841
13842 * src/reader.c (grammar_midrule_action): New, Eved out from
13843 (readgram): here.
13844
da4160c3
AD
138452002-06-11 Akim Demaille <akim@epita.fr>
13846
13847 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13848 New.
13849 (readgram): Use them as replacement of inlined code, crule and
13850 crule1.
13851
f6d0f937
AD
138522002-06-11 Akim Demaille <akim@epita.fr>
13853
13854 * src/reader.c (grammar_end, grammar_symbol_append): New.
13855 (readgram): Use them.
13856 Make the use of `p' as local as possible.
13857
69078d4b
AD
138582002-06-10 Akim Demaille <akim@epita.fr>
13859
13860 GCJ's parser requires the tokens to be defined before the prologue.
13861
13862 * data/bison.simple: Output the token definition before the user's
13863 prologue.
13864 * tests/regression.at (Braces parsing, Duplicate string)
13865 (Mixing %token styles): Check the output from bison.
13866 (Early token definitions): New.
13867
5e424082
AD
138682002-06-10 Akim Demaille <akim@epita.fr>
13869
13870 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13871 assigning twice the same user number to a token, so that we can
13872 use it in...
13873 * src/lex.c (lex): here.
13874 Also use `symbol_class_set' instead of hand written code.
13875 * src/reader.c (parse_assoc_decl): Likewise.
13876
44536b35
AD
138772002-06-10 Akim Demaille <akim@epita.fr>
13878
13879 * src/symtab.c, src/symtab.c (symbol_class_set)
13880 (symbol_user_token_number_set): New.
13881 * src/reader.c (parse_token_decl): Use them.
13882 Use a switch instead of ifs.
13883 Use a single argument.
13884
8b9f2372
AD
138852002-06-10 Akim Demaille <akim@epita.fr>
13886
13887 Remove `%thong' support as it is undocumented, unused, duplicates
13888 `%token's job, and creates useless e-mail traffic with people who
13889 want to know what it is, why it is undocumented, unused, and
13890 duplicates `%token's job.
13891
13892 * src/reader.c (parse_thong_decl): Remove.
13893 * src/options.c (option_table): Remove "thong".
13894 * src/lex.h (tok_thong): Remove.
13895
3ae2b51f
AD
138962002-06-10 Akim Demaille <akim@epita.fr>
13897
13898 * src/symtab.c, src/symtab.c (symbol_type_set)
13899 (symbol_precedence_set): New.
13900 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13901 (value_components_used): Remove, unused.
13902
2f1afb73
AD
139032002-06-09 Akim Demaille <akim@epita.fr>
13904
13905 Move symbols handling code out of the reader.
13906
13907 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13908 (axiom): Move to...
13909 * src/symtab.h, src/symtab.c: here.
13910
13911 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13912 * src/reader.c (startval): Rename as...
13913 * src/symtab.h, src/symtab.c (startsymbol): this.
13914 * src/reader.c: Adjust.
13915
13916 * src/reader.c (symbol_check_defined, symbol_make_alias)
13917 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13918 (token_translations_init)
13919 Move to...
13920 * src/symtab.c: here.
13921 * src/reader.c (packsymbols): Move to...
13922 * src/symtab.h, src/symtab.c (symbols_pack): here.
13923 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13924 argument.
13925
e9bca3ad
AD
139262002-06-03 Akim Demaille <akim@epita.fr>
13927
13928 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13929 then statements.
13930
86eff183
AD
139312002-06-03 Akim Demaille <akim@epita.fr>
13932
13933 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13934 structs with non literals.
13935 * src/scan-skel.l: never-interactive.
13936 * src/conflicts.c (enum conflict_resolution_e): No trailing
13937 comma.
13938 * src/getargs.c (usage): Split long literal strings.
13939 Reported by Hans Aberg.
13940
717be197
AD
139412002-05-28 Akim Demaille <akim@epita.fr>
13942
13943 * data/bison.c++: Use C++ ostreams.
13944 (cdebug_): New member.
13945
670ddffd
AD
139462002-05-28 Akim Demaille <akim@epita.fr>
13947
13948 * src/output.c (output_skeleton): Be sure to allocate enough room
13949 for `/' _and_ for `\0' in full_skeleton.
13950
769b430f
AD
139512002-05-28 Akim Demaille <akim@epita.fr>
13952
13953 * data/bison.c++: Catch up with bison.simple:
13954 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13955 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13956 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13957 and popping traces.
13958
7067cb36
PH
139592002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13960
13961 * src/output.c (output_skeleton): Put an explicit path in front of
13962 the skeleton file name, rather than relying on the -I directory,
13963 to partially alleviate effects of having a skeleton file lying around
13964 in the current directory.
769b430f 13965
4a713ec2
PH
139662002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13967
769b430f 13968 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
13969 obstack_printf should be obstack_fgrow1.
13970
b408954b
AD
139712002-05-26 Akim Demaille <akim@epita.fr>
13972
13973 * src/state.h (state_t): `solved_conflicts' is a new member.
13974 * src/LR0.c (new_state): Set it to 0.
13975 * src/conflicts.h, src/conflicts.c (print_conflicts)
13976 (free_conflicts, solve_conflicts): Rename as...
13977 (conflicts_print, conflicts_free, conflicts_solve): these.
13978 Adjust callers.
13979 * src/conflicts.c (enum conflict_resolution_e)
13980 (solved_conflicts_obstack): New, used by...
13981 (log_resolution): this.
13982 Adjust to attach the conflict resolution to each state.
13983 Complete the description with the precedence/associativity
13984 information.
13985 (resolve_sr_conflict): Adjust.
13986 * src/print.c (print_state): Output its solved_conflicts.
13987 * tests/conflicts.at (Unresolved SR Conflicts)
13988 (Solved SR Conflicts): Exercise --report=all.
13989
a49aecd5
AD
139902002-05-26 Akim Demaille <akim@epita.fr>
13991
13992 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13993 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13994 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13995 (token_number_t, item_number_as_token_number)
13996 (token_number_as_item_number, muscle_insert_token_number_table):
13997 Rename as...
13998 (symbol_number_t, item_number_as_symbol_number)
13999 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
14000 these, since it is more appropriate.
14001
5504898e
AD
140022002-05-26 Akim Demaille <akim@epita.fr>
14003
14004 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
14005 `Error:' lines.
14006 * data/bison.simple (yystos) [YYDEBUG]: New.
14007 (yyparse) [YYDEBUG]: Display the symbols which are popped during
14008 error recovery.
14009 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
14010
ec3bc396
AD
140112002-05-25 Akim Demaille <akim@epita.fr>
14012
14013 * doc/bison.texinfo (Debugging): Split into...
14014 (Tracing): this new section, its former contents, and...
14015 (Understanding): this new section.
14016 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
14017 by...
14018 (report_flag): this.
14019 Adjust all dependencies.
14020 (report_args, report_types, report_argmatch): New.
14021 (usage, getargs): Report/support -r, --report.
14022 * src/options.h
14023 (struct option_table_struct): Rename as..,
14024 (struct option_table_s): this.
14025 Rename the `set_flag' member to `flag' to match with getopt_long's
14026 struct.
14027 * src/options.c (option_table): Split verbose into an entry for
14028 %verbose, and another for --verbose.
14029 Support --report/-r, so remove -r from the obsolete --raw.
14030 * src/print.c: Attach full item sets and lookaheads reports to
14031 report_flag instead of trace_flag.
14032 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14033
78df8250
PE
140342002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14035 and Paul Eggert <eggert@twinsun.com>
769b430f 14036
78df8250
PE
14037 * data/bison.simple (yyparse): Correct error handling to conform to
14038 POSIX and yacc. Specifically, after syntax error is discovered,
14039 do not reduce further before shifting the error token.
14040 Clean up the code a bit by removing the labels yyerrdefault,
14041 yyerrhandle, yyerrpop.
14042 * NEWS: Document the above.
14043
c0c9ea05
PH
140442002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14045
14046 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14047 type; it isn't always big enough, since it doesn't necessarily
14048 include non-terminals.
769b430f 14049 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
14050 the latter can be removed.
14051 (yy_token_number_type): Remove, only one use.
14052 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14053 don't use TokenNumberType as element type.
769b430f 14054
c0c9ea05
PH
14055 * tests/regression.at: Modify expected output to agree with change
14056 to yyr1 and yytranslate.
769b430f 14057
6390a83f
FK
140582002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14059
14060 * src/reader.c (parse_action): Use copy_character instead of
14061 obstack_1grow.
14062
db7c8e9a
AD
140632002-05-13 Akim Demaille <akim@epita.fr>
14064
14065 * tests/regression.at (Token definitions): Prototype yylex and
14066 yyerror.
14067
fcc61800
PH
140682002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14069
158c687b 14070 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
14071 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14072 32-bit arithmetic.
14073 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14074
5683e9b2
AD
140752002-05-07 Akim Demaille <akim@epita.fr>
14076
14077 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14078 avoid GCC warnings.
14079
0c2d3f4c
AD
140802002-05-07 Akim Demaille <akim@epita.fr>
14081
14082 Kill GCC warnings.
14083
14084 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14085 over the RHS of each rule.
14086 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14087 * src/state.h (state_t): Member `nitems' is unsigned short.
14088 * src/LR0.c (get_state): Adjust.
14089 * src/reader.c (packgram): Likewise.
14090 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14091 `Type'.
14092 (muscle_insert_int_table): Remove, unused.
14093 (prepare_rules): Remove `max'.
14094
1565b720
AD
140952002-05-06 Akim Demaille <akim@epita.fr>
14096
14097 * src/closure.c (print_firsts): Display of the symbol tags.
14098 (bitmatrix_print): Move to...
14099 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14100 here.
14101 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14102
cfaee611
AD
141032002-05-06 Akim Demaille <akim@epita.fr>
14104
14105 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14106 hash_do_for_each.
14107
458be8e0
AD
141082002-05-06 Akim Demaille <akim@epita.fr>
14109
14110 * src/LR0.c (new_state, get_state): Instead of using the global
14111 `kernel_size' and `kernel_base', have two new arguments:
14112 `core_size' and `core'.
14113 Adjust callers.
14114
a900a624
AD
141152002-05-06 Akim Demaille <akim@epita.fr>
14116
14117 * src/reader.c (packgram): No longer end `ritem' with a 0
14118 sentinel: it is not used.
14119
d4e7d3a1
AD
141202002-05-05 Akim Demaille <akim@epita.fr>
14121
14122 New experimental feature: display the lookaheads in the report and
14123 graph.
14124
14125 * src/print (print_core): When --trace-flag, display the rules
14126 lookaheads.
14127 * src/print_graph.c (print_core): Likewise.
14128 Swap the arguments.
14129 Adjust caller.
14130
39ceb25b
AD
141312002-05-05 Akim Demaille <akim@epita.fr>
14132
14133 * tests/torture.at (Many lookaheads): New test.
14134
5372019f
AD
141352002-05-05 Akim Demaille <akim@epita.fr>
14136
14137 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14138 (GENERATE_MUSCLE_INSERT_TABLE): this.
14139 (output_int_table, output_unsigned_int_table, output_short_table)
14140 (output_token_number_table, output_item_number_table): Replace with...
14141 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14142 (muscle_insert_short_table, muscle_insert_token_number_table)
14143 (muscle_insert_item_number_table): these.
14144 Adjust all callers.
14145 (prepare_tokens): Don't free `translations', since...
14146 * src/reader.h, src/reader.c (grammar_free): do it.
14147 Move to...
14148 * src/gram.h, src/gram.c (grammar_free): here.
14149 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14150 b4_translate_max.
14151
5df5f6d5
AD
141522002-05-05 Akim Demaille <akim@epita.fr>
14153
14154 * src/output.c (output_unsigned_int_table): New.
14155 (prepare_rules): `i' is unsigned.
14156 `prhs', `rline', `r2' are unsigned int.
14157 Rename muscle `rhs_number_max' as `rhs_max'.
14158 Output muscles `prhs_max', `rline_max', and `r2_max'.
14159 Free rline and r1.
14160 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14161 to compute types instead of constant types.
14162 * tests/regression.at (Web2c Actions): Adjust.
14163
b87f8b21
AD
141642002-05-04 Akim Demaille <akim@epita.fr>
14165
14166 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14167 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14168 Adjust dependencies.
14169 * src/output.c (token_definitions_output): Be sure not to output a
14170 `#define 'a'' when fed with `%token 'a' "a"'.
14171 * tests/regression.at (Token definitions): New.
14172
8bb936e4
PE
141732002-05-03 Paul Eggert <eggert@twinsun.com>
14174
14175 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14176 for K&R C.
14177
141782002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14179
14180 * Makefile.am (SUBDIRS): Remove intl.
14181 (EXTRA_DIST): Add config/config.rpath.
14182
53c71a12
AD
141832002-05-03 Akim Demaille <akim@epita.fr>
14184
14185 * data/bison.simple (m4_if): Don't output empty enums.
14186 And actually, output valid enum definitions :(.
14187
289dd0cf
AD
141882002-05-03 Akim Demaille <akim@epita.fr>
14189
14190 * configure.bat: Remove, completely obsolete.
14191 * Makefile.am (EXTRA_DIST): Adjust.
14192 Don't distribute config.rpath...
14193 * config/Makefile.am (EXTRA_DIST): Do it.
14194
db85e524
AD
141952002-05-03 Akim Demaille <akim@epita.fr>
14196
14197 * configure.in (GETTEXT_VERSION): New.
14198 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14199
83ccf991
AD
142002002-05-03 Akim Demaille <akim@epita.fr>
14201
14202 * data/bison.simple (b4_token_enum): New.
14203 (b4_token_defines): Use it to output tokens both as #define and
14204 enums.
14205 Suggested by Paul Eggert.
14206 * src/output.c (token_definitions_output): Don't output spurious
14207 white spaces.
14208
1f418995
AD
142092002-05-03 Akim Demaille <akim@epita.fr>
14210
14211 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14212
45119f04
RA
142132002-05-02 Robert Anisko <robert@lrde.epita.fr>
14214
14215 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14216 Update the stack class, give a try to deque as the default container.
14217
b2d52318
AD
142182002-05-02 Akim Demaille <akim@epita.fr>
14219
14220 * data/bison.simple (yyparse): Do not implement @$ = @1.
14221 (YYLLOC_DEFAULT): Adjust to do it.
14222 * doc/bison.texinfo (Location Default Action): Fix.
14223
3a8b4109
AD
142242002-05-02 Akim Demaille <akim@epita.fr>
14225
14226 * src/reader.c (parse_braces): Merge into...
14227 (parse_action): this.
14228
84614e13
AD
142292002-05-02 Akim Demaille <akim@epita.fr>
14230
14231 * configure.in (ALL_LINGUAS): Remove.
14232 * po/LINGUAS, hr.po: New.
14233
fdbcd8e2
AD
142342002-05-02 Akim Demaille <akim@epita.fr>
14235
14236 Remove the so called hairy (semantic) parsers.
14237
14238 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14239 * src/gram.h, src/gram.c (semantic_parser): Remove.
14240 (rule_t): Remove the guard and guard_line members.
14241 * src/lex.h (token_t): remove tok_guard.
14242 * src/options.c (option_table): Remove %guard and %semantic_parser
14243 support.
14244 * src/output.c, src/output.h (guards_output): Remove.
14245 (prepare): Adjust.
14246 (token_definitions_output): Don't output the `T'
14247 tokens (???).
14248 (output_skeleton): Don't output the guards.
14249 * src/files.c, src/files.c (attrsfile): Remove.
14250 * src/reader.c (symbol_list): Remove the guard and guard_line
14251 members.
14252 Adjust dependencies.
14253 (parse_guard): Remove.
14254 * data/bison.hairy: Remove.
14255 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14256 BISON_HAIRY.
14257
82b6cb3f
AD
142582002-05-02 Akim Demaille <akim@epita.fr>
14259
14260 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14261 (parse_guard): Rename the formal argument `stack_offset' as
14262 `rule_length', which is more readable.
14263 Adjust callers.
14264 (copy_at, copy_dollar): Instead of outputting the hard coded
14265 values of $$, $n and so forth, output invocation to b4_lhs_value,
14266 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
14267 Note: this patch partially drops `semantic-parser' support: it
14268 always does `rule_length - n', where semantic parsers ought to
14269 always use `-n'.
82b6cb3f
AD
14270 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14271 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14272
6cbfbcc5
AD
142732002-05-02 Akim Demaille <akim@epita.fr>
14274
14275 * configure.in (AC_INIT): Bump to 1.49b.
14276 (AM_INIT_AUTOMAKE): Short invocation.
14277
b8548114
AD
142782002-05-02 Akim Demaille <akim@epita.fr>
14279
14280 Version 1.49a.
14281
c20cd1fa
AD
142822002-05-01 Akim Demaille <akim@epita.fr>
14283
14284 * src/skeleton.h: Remove.
14285
8a9566d4
AD
142862002-05-01 Akim Demaille <akim@epita.fr>
14287
14288 * src/skeleton.h: Fix the #endif.
14289 Reported by Magnus Fromreide.
14290
8c6d399a
PE
142912002-04-26 Paul Eggert <eggert@twinsun.com>
14292
14293 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14294 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 14295 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 14296
2b7ed18a
RA
142972002-04-25 Robert Anisko <robert@lrde.epita.fr>
14298
14299 * src/scan-skel.l: Postprocess quadrigraphs.
14300
14301 * src/reader.c (copy_character): New function, used to output
14302 single characters while replacing `[' and `]' with quadrigraphs, to
14303 avoid troubles with M4 quotes.
14304 (copy_comment): Output characters with copy_character.
14305 (read_additionnal_code): Likewise.
14306 (copy_string2): Likewise.
14307 (copy_definition): Likewise.
14308
14309 * tests/calc.at: Exercise M4 quoting.
14310
34a89c50
AD
143112002-04-25 Akim Demaille <akim@epita.fr>
14312
14313 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14314 between `!' and the command.
14315 Reported by Paul Eggert.
14316
0dd1580a
RA
143172002-04-24 Robert Anisko <robert@lrde.epita.fr>
14318
14319 * tests/calc.at: Exercise prologue splitting.
14320
14321 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14322 `b4_post_prologue' instead of `b4_prologue'.
14323
14324 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14325 muscles.
14326 (output): Free pre_prologue_obstack and post_prologue_obstack.
14327 * src/files.h, src/files.c (attrs_obstack): Remove.
14328 (pre_prologue_obstack, post_prologue_obstack): New.
14329 * src/reader.c (copy_definition): Add a parameter to specify the
14330 obstack to fill, instead of using attrs_obstack unconditionally.
14331 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14332 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14333
83c1796f
PE
143342002-04-23 Paul Eggert <eggert@twinsun.com>
14335
14336 * data/bison.simple: Remove unnecessary commentary and white
14337 space differences from 1_29-branch.
14338 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14339
14340 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14341 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14342 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14343 constructors or destructors.
14344
14345 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14346
1207eeac
AD
143472002-04-23 Akim Demaille <akim@epita.fr>
14348
14349 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14350 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14351 location with columns.
14352 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14353 All reported by Paul Eggert.
14354
78ab8f67
AD
143552002-04-22 Akim Demaille <akim@epita.fr>
14356
14357 * src/reduce.c (dump_grammar): Move to...
14358 * src/gram.h, src/gram.c (grammar_dump): here.
14359 Be sure to separate long item numbers.
14360 Don't read the members of a rule's prec if its nil.
14361
133c20e2
AD
143622002-04-22 Akim Demaille <akim@epita.fr>
14363
14364 * src/output.c (table_size, table_grow): New.
14365 (MAXTABLE): Remove, replace uses with table_size.
14366 (pack_vector): Instead of dying when the table is too big, grow it.
14367
9515e8a7
AD
143682002-04-22 Akim Demaille <akim@epita.fr>
14369
14370 * data/bison.simple (yyr1): Its type is that of a token number.
14371 * data/bison.c++ (r1_): Likewise.
14372 * tests/regression.at (Web2c Actions): Adjust.
14373
23c5a174
AD
143742002-04-22 Akim Demaille <akim@epita.fr>
14375
14376 * src/reader.c (token_translations_init): 256 is now the default
14377 value for the error token, i.e., it will be assigned another
14378 number if the user assigned 256 to one of her tokens.
14379 (reader): Don't force 256 to error.
14380 * doc/bison.texinfo (Symbols): Adjust.
14381 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14382 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14383 etc. instead of 10, 20, 30 (which was used to `jump' over error
14384 (256) and undefined (2)).
14385
5fbb0954
AD
143862002-04-22 Akim Demaille <akim@epita.fr>
14387
14388 Propagate more token_number_t.
14389
14390 * src/gram.h (token_number_as_item_number)
14391 (item_number_as_token_number): New.
14392 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14393 Use it to create output_item_number_table and
14394 output_token_number_table.
14395 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14396 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14397 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14398 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14399
4f940944
AD
144002002-04-22 Akim Demaille <akim@epita.fr>
14401
14402 * src/output.h, src/output.c (get_lines_number): Remove.
14403
3ded9a63
AD
144042002-04-19 Akim Demaille <akim@epita.fr>
14405
14406 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14407 as Lex/Flex'.
14408 (Debugging): More details about enabling the debugging features.
14409 (Table of Symbols): Describe $$, $n, @$, and @n.
14410 Suggested by Tim Josling.
14411
e0c471a9
AD
144122002-04-19 Akim Demaille <akim@epita.fr>
14413
14414 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14415
fecc10cd
AD
144162002-04-10 Akim Demaille <akim@epita.fr>
14417
14418 * src/system.h: Rely on HAVE_LIMITS_H.
14419 Suggested by Paul Eggert.
14420
51dec47b
AD
144212002-04-09 Akim Demaille <akim@epita.fr>
14422
14423 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14424 full stderr, and strip it according to the bison options, instead
14425 of composing the error message from different bits.
14426 This makes it easier to check for several error messages.
14427 Adjust all the invocations.
14428 Add an invocation exercising the error token.
14429 Add an invocation demonstrating a stupid error message.
14430 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14431 Adjust the tests.
14432 Error message are for stderr, not stdout.
14433
007a50a4
AD
144342002-04-09 Akim Demaille <akim@epita.fr>
14435
14436 * src/gram.h, src/gram.c (error_token_number): Remove, use
14437 errtoken->number.
14438 * src/reader.c (reader): Don't specify the user token number (2)
14439 for $undefined, as it uselessly prevents using it.
14440 * src/gram.h (token_number_t): Move to...
14441 * src/symtab.h: here.
14442 (state_t.number): Is a token_number_t.
14443 * src/print.c, src/reader.c: Use undeftoken->number instead of
14444 hard coded 2.
14445 (Even though this 2 is not the same as above: the number of the
14446 undeftoken remains being 2, it is its user token number which
14447 might not be 2).
14448 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14449 `user_token_number_max'.
14450 Output `undef_token_number'.
14451 * data/bison.simple, data/bison.c++: Use them.
14452 Be sure to map invalid yylex return values to
14453 `undef_token_number'. This saves us from gratuitous SEGV.
14454
14455 * tests/conflicts.at (Solved SR Conflicts)
14456 (Unresolved SR Conflicts): Adjust.
14457 * tests/regression.at (Web2c Actions): Adjust.
14458
06446ccf
AD
144592002-04-08 Akim Demaille <akim@epita.fr>
14460
14461 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14462 Adding #line.
14463 Remove the duplicate `typedefs'.
14464 (RhsNumberType): Fix the declaration and various other typos.
14465 Use __ofile__.
14466 * data/bison.simple: Use __ofile__.
14467 * src/scan-skel.l: Handle __ofile__.
14468
62a3e4f0
AD
144692002-04-08 Akim Demaille <akim@epita.fr>
14470
14471 * src/gram.h (item_number_t): New, the type of item numbers in
14472 RITEM. Note that it must be able to code symbol numbers as
14473 positive number, and the negation of rule numbers as negative
14474 numbers.
14475 Adjust all dependencies (pretty many).
14476 * src/reduce.c (rule): Remove this `short *' pointer: use
14477 item_number_t.
14478 * src/system.h (MINSHORT, MAXSHORT): Remove.
14479 Include `limits.h'.
14480 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14481 (shortcpy): Remove.
14482 (MAXTABLE): Move to...
14483 * src/output.c (MAXTABLE): here.
14484 (prepare_rules): Use output_int_table to output rhs.
14485 * data/bison.simple, data/bison.c++: Adjust.
14486 * tests/torture.at (Big triangle): Move the limit from 254 to
14487 500.
14488 * tests/regression.at (Web2c Actions): Ajust.
14489
14490 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14491 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14492 passes, but produces negative #line number, once fixed, GCC is
14493 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14494 C), it passes.
14495 * src/state.h (state_h): Code input lines on ints, not shorts.
14496
bb88b0fc
AD
144972002-04-08 Akim Demaille <akim@epita.fr>
14498
14499 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14500 and then the grammar.
14501
9a636f47
AD
145022002-04-08 Akim Demaille <akim@epita.fr>
14503
14504 * src/system.h: No longer using strndup.
14505
680e8701
AD
145062002-04-07 Akim Demaille <akim@epita.fr>
14507
14508 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14509 * src/output.c (output_table_data): Return the longest number.
14510 (prepare_tokens): Output `token_number_max').
14511 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14512 New.
14513 Use them to define yy_token_number_type/TokenNumberType.
14514 Use this type for yytranslate.
14515 * tests/torture.at (Big triangle): Push the limit from 124 to
14516 253.
14517 * tests/regression.at (Web2c Actions): Adjust.
14518
817e9f41
AD
145192002-04-07 Akim Demaille <akim@epita.fr>
14520
14521 * tests/torture.at (Big triangle): New.
14522 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14523 * tests/existing.at: here.
14524
5123689b
AD
145252002-04-07 Akim Demaille <akim@epita.fr>
14526
14527 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14528 nritems.
14529 Adjust dependencies.
14530
f3849179
AD
145312002-04-07 Akim Demaille <akim@epita.fr>
14532
14533 * src/reader.c: Normalize increments to prefix form.
14534
bd02036a
AD
145352002-04-07 Akim Demaille <akim@epita.fr>
14536
14537 * src/reader.c, symtab.c: Remove debugging code.
14538
db8837cb
AD
145392002-04-07 Akim Demaille <akim@epita.fr>
14540
14541 Rename all the `bucket's as `symbol_t'.
14542
14543 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14544 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14545 * src/symtab.c, src/symtab.h (bucket): Rename as...
14546 (symbol_t): this.
14547 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14548 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14549 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14550 (buckets_new, buckets_free, buckets_do): Rename as...
14551 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14552 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14553 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14554 (symbols_new, symbols_free, symbols_do): these.
14555
72a23c97
AD
145562002-04-07 Akim Demaille <akim@epita.fr>
14557
14558 Use lib/hash for the symbol table.
14559
14560 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14561 EOF.
14562 * src/lex.c (lex): Set the `number' member of new terminals.
14563 * src/reader.c (bucket_check_defined, bucket_make_alias)
14564 (bucket_check_alias_consistence, bucket_translation): New.
14565 (reader, grammar_free, readgram, token_translations_init)
14566 (packsymbols): Adjust.
14567 (reader): Number the predefined tokens.
14568 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14569 for predefined tokens.
14570 * src/symtab.h (bucket): Remove all the hash table related
14571 members.
14572 * src/symtab.c (symtab): Replace by...
14573 (bucket_table): this.
14574 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14575 (buckets_new, buckets_do): New.
14576
280a38c3
AD
145772002-04-07 Akim Demaille <akim@epita.fr>
14578
14579 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14580 (start_symbol, max_user_token_number, semantic_parser)
14581 (error_token_number): Initialize.
14582 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14583 Initialize.
14584 (reader): Don't.
14585 (errtoken, eoftoken, undeftoken, axiom): Extern.
14586
03b31c0c
AD
145872002-04-07 Akim Demaille <akim@epita.fr>
14588
14589 * src/gram.h (rule_s): prec and precsym are now pointers
14590 to the bucket giving the priority/associativity.
14591 Member `associativity' removed: useless.
14592 * src/reduce.c, src/conflicts.c: Adjust.
14593
8b3df748
AD
145942002-04-07 Akim Demaille <akim@epita.fr>
14595
14596 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14597 Properly escape the symbols' TAG when outputting them.
14598
e601aa1d
AD
145992002-04-07 Akim Demaille <akim@epita.fr>
14600
14601 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14602
b0299a2e
AD
146032002-04-07 Akim Demaille <akim@epita.fr>
14604
14605 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14606 (LArule): this, which is an array to rule_t*.
14607 * src/print.c, src/conflicts.c: Adjust.
14608
d7e1f00c
AD
146092002-04-07 Akim Demaille <akim@epita.fr>
14610
14611 * src/gram.h (rule_t): Rename `number' as `user_number'.
14612 `number' is a new member.
14613 Adjust dependencies.
14614 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14615
cc9305dd
AD
146162002-04-07 Akim Demaille <akim@epita.fr>
14617
14618 As a result of the previous patch, it is no longer needed
14619 to reorder ritem itself.
14620
14621 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14622
b0940840
AD
146232002-04-07 Akim Demaille <akim@epita.fr>
14624
14625 Be sure never to walk through RITEMS, but use only data related to
14626 the rules themselves. RITEMS should be banished.
14627
14628 * src/output.c (output_token_translations): Rename as...
14629 (prepare_tokens): this.
14630 In addition to `translate', prepare the muscles `tname' and
14631 `toknum', which were handled by...
14632 (output_rule_data): this.
14633 Remove, and move the remainder of its outputs into...
14634 (prepare_rules): this new routines, which also merges content from
14635 (output_gram): this.
14636 (prepare_rules): Be sure never to walk through RITEMS.
14637 (output_stos): Rename as...
14638 (prepare_stos): this.
14639 (output): Always invoke prepare_states, after all, just don't use it
14640 in the output if you don't need it.
14641
643a5994
AD
146422002-04-07 Akim Demaille <akim@epita.fr>
14643
14644 * src/LR0.c (new_state): Display `nstates' as the name of the
14645 newly created state.
14646 Adjust to initialize first_state and last_state if needed.
14647 Be sure to distinguish the initial from the final state.
14648 (new_states): Create the itemset of the initial state, and use
14649 new_state.
14650 * src/closure.c (closure): Now that the initial state has its
14651 items properly set, there is no need for a special case when
14652 creating `ruleset'.
14653
14654 As a result, now the rule 0, reducing to $axiom, is visible in the
14655 outputs. Adjust the test suite.
14656
14657 * tests/conflicts.at (Solved SR Conflicts)
14658 (Unresolved SR Conflicts): Adjust.
14659 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14660 * tests/conflicts.at (S/R in initial): New.
14661
b4c4ccc2
AD
146622002-04-07 Akim Demaille <akim@epita.fr>
14663
14664 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14665 the RHS of the rules.
14666 * src/output.c (output_gram): Likewise.
14667
bba97eb2
AD
146682002-04-07 Akim Demaille <akim@epita.fr>
14669
14670 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14671 bucket.
14672 Adjust all dependencies.
14673 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14674 `number' of the buckets too.
14675 * src/gram.h: Include `symtab.h'.
14676 (associativity): Move to...
14677 * src/symtab.h: here.
14678 No longer include `gram.h'.
14679
c3b407f4
AD
146802002-04-07 Akim Demaille <akim@epita.fr>
14681
14682 * src/gram.h, src/gram.c (rules_rhs_length): New.
14683 (ritem_longest_rhs): Use it.
14684 * src/gram.h (rule_t): `number' is a new member.
14685 * src/reader.c (packgram): Set it.
14686 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14687 the end of `rules', and count them out of `nrules'.
14688 (reduce_output, dump_grammar): Adjust.
14689 * src/print.c (print_grammar): It is no longer needed to check for
14690 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14691 * tests/reduce.at (Reduced Automaton): New test.
14692
11652ab3
AD
146932002-04-07 Akim Demaille <akim@epita.fr>
14694
14695 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14696 lacking `+ 1' to nrules, Bison reported as useless a token if it
14697 was used solely to set the precedence of the last rule...
14698
26b23c1a
AD
146992002-04-07 Akim Demaille <akim@epita.fr>
14700
14701 * data/bison.c++, data/bison.simple: Don't output the current file
14702 name in #line, to avoid useless diffs between two identical
14703 outputs under different names.
14704
18bcecb0
AD
147052002-04-07 Akim Demaille <akim@epita.fr>
14706
14707 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14708 Normalize loops to using `< nrules + 1', not `<= nrules'.
14709
fa770c86
AD
147102002-04-07 Akim Demaille <akim@epita.fr>
14711
14712 * TODO: Update.
14713
d9b739c3
AD
147142002-04-07 Akim Demaille <akim@epita.fr>
14715
14716 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14717 bucket.value as bucket.number.
14718
99013900
AD
147192002-04-07 Akim Demaille <akim@epita.fr>
14720
14721 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14722 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14723 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14724 RHS, instead of being an index in RITEMS.
14725
e966383b
PE
147262002-04-04 Paul Eggert <eggert@twinsun.com>
14727
14728 * doc/bison.texinfo: Update copyright date.
14729 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14730 (Symbols): Warn about running Bison in one character set,
14731 but compiling and/or running in an incompatible one.
14732 Warn about character code 256, too.
14733
147342002-04-03 Paul Eggert <eggert@twinsun.com>
14735
14736 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14737 YYERROR_VERBOSE is nonzero, not whether it is defined.
14738
14739 Merge changes from bison-1_29-branch.
c307773e 14740
8d6c48b9
PE
147412002-03-20 Paul Eggert <eggert@twinsun.com>
14742
14743 Merge fixes from Debian bison_1.34-1.diff.
14744
14745 * configure.in (AC_PREREQ): 2.53.
14746
e53c6322
AD
147472002-03-20 Akim Demaille <akim@epita.fr>
14748
14749 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14750
9ffbeca7
PE
147512002-03-19 Paul Eggert <eggert@twinsun.com>
14752
21db0b2a
PE
14753 * src/bison.simple (YYCOPY): New macro.
14754 (YYSTACK_RELOCATE): Use it.
14755 Remove Type arg; no longer needed. All callers changed.
14756 (yymemcpy): Remove; no longer needed.
14757
9ffbeca7
PE
14758 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14759 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14760
642cb8f8
AD
147612002-03-19 Akim Demaille <akim@epita.fr>
14762
14763 Test and fix the #line outputs.
14764
14765 * tests/atlocal.at (GCC): New.
14766 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 14767 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
14768 (Action synch line, Epilogue synch line): New tests.
14769 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14770 * data/bison.simple, data/bison.c++: Use it.
14771
3c31a486
AD
147722002-03-19 Akim Demaille <akim@epita.fr>
14773
14774 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14775 (Solved SR Conflicts, %expect not enough, %expect right)
14776 (%expect too much): Move to...
14777 * tests/conflicts.at: this new file.
14778
0d8bed56
AD
147792002-03-19 Akim Demaille <akim@epita.fr>
14780
14781 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14782 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14783 that we can move to enums for instance.
14784 * src/output.c (token_definitions_output): Output a list of
14785 `token-name, token-number' instead of the #define.
14786 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14787
9208d17f
AD
147882002-03-14 Akim Demaille <akim@epita.fr>
14789
14790 Use Gettext 0.11.1.
14791
af27eacb
RA
147922002-03-09 Robert Anisko <robert@lrde.epita.fr>
14793
14794 * data/bison.c++: Make the user able to add members to the generated
14795 parser by subclassing.
14796
9101a310
RA
147972002-03-05 Robert Anisko <robert@lrde.epita.fr>
14798
14799 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14800 a character.
14801 Reported by Nicolas Tisserand and Nicolas Burrus.
14802
fff9bf0b
RA
148032002-03-04 Robert Anisko <robert@lrde.epita.fr>
14804
14805 * src/reader.c: Warn about lacking semi-colons, do not complain.
14806
64dba31e
RA
148072002-03-04 Robert Anisko <robert@lrde.epita.fr>
14808
14809 * data/bison.c++: Remove a debug line.
14810
374f5a14
RA
148112002-03-04 Robert Anisko <robert@lrde.epita.fr>
14812
14813 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14814 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14815 provide a default implementation.
14816
bfcf1f3a
AD
148172002-03-04 Akim Demaille <akim@epita.fr>
14818
14819 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14820 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14821 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14822 * tests/semantic.at (Parsing Guards): Similarly.
14823 * src/reader.at (readgram): Complain if the last rule is not ended
14824 with a semi-colon.
14825
65ccf9fc
AD
148262002-03-04 Akim Demaille <akim@epita.fr>
14827
14828 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14829 * src/closure.c: here.
14830 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14831 RTC.
14832 * src/warshall.h, src/warshall.c: Remove.
14833 * tests/sets.at (Broken Closure): Adjust.
14834
d0039cbc
AD
148352002-03-04 Akim Demaille <akim@epita.fr>
14836
14837 * src/output.c (output_skeleton): tempdir is const.
14838 bytes_read is unused.
14839
345cea78
AD
148402002-03-04 Akim Demaille <akim@epita.fr>
14841
14842 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14843 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14844 Update.
14845 From Michael Hayes.
14846
564801f7
AD
148472002-03-04 Akim Demaille <akim@epita.fr>
14848
14849 * src/closure.c (closure): `r' is unused.
14850
e5352bc7
AD
148512002-03-04 Akim Demaille <akim@epita.fr>
14852
14853 * tests/sets.at (Broken Closure): Add the ending `;'.
14854 * src/reader.at (readgram): Complain if a rule is not ended with a
14855 semi-colon.
14856
914feea9
AD
148572002-03-04 Akim Demaille <akim@epita.fr>
14858
14859 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14860 (count_sr_conflicts): Use bitset_count.
14861 * src/reduce.c (inaccessable_symbols): Ditto.
14862 (bits_size): Remove.
14863 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14864
f0250de6
AD
148652002-03-04 Akim Demaille <akim@epita.fr>
14866
14867 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14868 * src/reduce.c: Remove the `bitset_zero's following the
14869 `bitset_create's, as now it is performed by the latter.
14870
ef017502
AD
148712002-03-04 Akim Demaille <akim@epita.fr>
14872
14873 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14874 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14875 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14876 latest sources from Michael.
14877
76514394
AD
148782002-03-04 Akim Demaille <akim@epita.fr>
14879
14880 * src/output.c (output): Don't free the grammar.
14881 * src/reader.c (grammar_free): New.
14882 * src/main.c (main): Call it and don't free symtab here.
14883
55024580
AD
148842002-03-04 Akim Demaille <akim@epita.fr>
14885
14886 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14887 before returning.
14888 Reported by Benoit Perrot.
14889
f9abaa2c
AD
148902002-03-04 Akim Demaille <akim@epita.fr>
14891
14892 Use bitset operations when possible, not loops over bits.
14893
14894 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14895 bitset_or.
14896 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14897 * src/reduce.c (useless_nonterminals): Formatting changes.
14898 * src/warshall.c (TC): Use bitset_or.
14899
0e721e75
AD
149002002-03-04 Akim Demaille <akim@epita.fr>
14901
14902 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14903 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14904 Ditto.
14905
0fb1ffb1
AD
149062002-03-04 Akim Demaille <akim@epita.fr>
14907
14908 * src/lalr.c (F): Now a bitset*.
14909 Adjust all dependencies.
14910
b86796bf
AD
149112002-03-04 Akim Demaille <akim@epita.fr>
14912
14913 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14914 Adjust all dependencies.
14915
602bbf31
AD
149162002-03-04 Akim Demaille <akim@epita.fr>
14917
14918 * src/L0.c, src/LR0.h (nstates): Be size_t.
14919 Adjust comparisons (signed vs unsigned).
14920 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14921 bitset*.
14922 Adjust all dependencies.
14923
d8a0245c
AD
149242002-03-04 Akim Demaille <akim@epita.fr>
14925
14926 * src/closure.c (firsts): Now, also a bitset.
14927 Adjust all dependencies.
14928 (varsetsize): Remove, now unused.
14929 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14930
34ba9743
AD
149312002-03-04 Akim Demaille <akim@epita.fr>
14932
14933 * src/print.c: Convert to use bitset.h, not hand coded iterations
14934 over ints.
14935
ed86e78c
AD
149362002-03-04 Akim Demaille <akim@epita.fr>
14937
14938 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14939
dfdb1797
AD
149402002-03-04 Akim Demaille <akim@epita.fr>
14941
14942 * src/closure.c (ruleset): Be a bitset.
14943 (rulesetsize): Remove.
14944
7086e707
AD
149452002-03-04 Akim Demaille <akim@epita.fr>
14946
14947 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14948 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14949 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14950 * src/closure.c (fderives): Be an array of bitsets.
14951
98254360
RA
149522002-02-28 Robert Anisko <robert@lrde.epita.fr>
14953
14954 * data/bison.c++: Merge the two generated headers. Insert a copyright
14955 notice in each output file.
14956
a75c057f
AD
149572002-02-28 Akim Demaille <akim@epita.fr>
14958
14959 * data/bison.c++: Copy the prologue of bison.simple to fetch
14960 useful M4 definitions, such as b4_header_guard.
14961
06b00abc
AD
149622002-02-25 Akim Demaille <akim@epita.fr>
14963
14964 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
14965 translator friendly scheme for the bgr
14966 copyright notice.
06b00abc 14967
70e7d534
AD
149682002-02-25 Akim Demaille <akim@epita.fr>
14969
14970 * src/output.c (header_output): Remove, now handled completely via
14971 M4.
14972
abe017f6
AD
149732002-02-25 Akim Demaille <akim@epita.fr>
14974
14975 * m4/m4.m4: New, from CVS Autoconf.
14976 * configure.in: Invoke it.
14977 * src/output.c (output_skeleton): Use its result instead of the
14978 hard coded name.
14979
381fb12e
AD
149802002-02-25 Akim Demaille <akim@epita.fr>
14981
14982 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14983 Fileutils 4.1.5.
14984 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14985 * src/output.c (output_skeleton): Use mkstemp to create a real
14986 temporary file.
14987 Move the filling of `skeleton' and its muscle to...
14988 (prepare): here.
14989 (output): Move the definition of the prologue muscle to...
14990 (prepare): here.
14991 * src/system.h (DEFAULT_TMPDIR): New.
14992
6f38107f
PE
149932002-02-14 Paul Eggert <eggert@twinsun.com>
14994
14995 Remove the support for C++ namespace cleanliness; it was
14996 causing more problems than it was curing, since it didn't work
14997 properly on some nonstandard C++ compilers. This can wait
14998 for a proper C++ parser.
14999
15000 * NEWS: Document this.
15001 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
15002 of C++, as it's treated like C now.
15003 * src/bison.simple (YYSTD): Remove.
15004 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
15005 Treat C++ just like Standard C instead of trying to support
15006 namespace cleanliness.
15007
80cce3da
AD
150082002-02-14 Akim Demaille <akim@epita.fr>
15009
15010 * tests/regression.at (else): Adjust to Andreas' change.
15011
842e8679
AD
150122002-02-14 Akim Demaille <akim@epita.fr>
15013
15014 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
15015
4bda3f10
AD
150162002-02-13 Andreas Schwab <schwab@suse.de>
15017
15018 * src/output.c (output_rule_data): Don't output NULL, it might
15019 not be defined yet.
15020
4162fa07 150212002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 15022
4162fa07
RA
15023 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
15024 (Copyright notice): Update.
b418ecd8 15025
bd16a5dc
AD
150262002-02-11 Akim Demaille <akim@epita.fr>
15027
15028 * tests/regression.at (%nonassoc and eof): Don't include
15029 nonportable headers.
15030
8d69a1a3
RA
150312002-02-08 Robert Anisko <robert@lrde.epita.fr>
15032
15033 * data/bison.c++: Correct error recovery. Make the user able to
15034 initialize the starting location.
15035
9b2d0677
AD
150362002-02-07 Akim Demaille <akim@epita.fr>
15037
15038 * tests/input.at: New.
15039
69e2658b
RA
150402002-02-07 Robert Anisko <robert@lrde.epita.fr>
15041
15042 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 15043 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
15044 directives around tables only needed for debugging.
15045
4aacc3a7
RA
150462002-02-07 Robert Anisko <robert@lrde.epita.fr>
15047
15048 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15049 C++ parsers.
15050 (yy::b4_name::parse): Use print_.
15051
762a801e
RA
150522002-02-07 Robert Anisko <robert@lrde.epita.fr>
15053
15054 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15055
4bb2bc3f
RA
150562002-02-07 Robert Anisko <robert@lrde.epita.fr>
15057
15058 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15059 C++ parsers.
15060 (yy::b4_name::parse): Build verbose error messages, and use error_.
15061
6b45a3ca
RA
150622002-02-06 Robert Anisko <robert@lrde.epita.fr>
15063
15064 * data/bison.c++: Fix m4 quoting in comments.
15065
50997c6e
RA
150662002-02-06 Robert Anisko <robert@lrde.epita.fr>
15067
15068 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15069 not expanded by m4.
15070
3f3eed27
AD
150712002-02-05 Akim Demaille <akim@epita.fr>
15072
15073 * data/bison.c++: Adjust to the M4 back end.
15074 More is certainly needed.
15075
be2a1a68
AD
150762002-02-05 Akim Demaille <akim@epita.fr>
15077
15078 Give a try to M4 as a back end.
15079
15080 * lib/readpipe.c: New, from wdiff.
15081 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15082 BISON_HAIRY.
15083 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15084 specific values. Now it is m4 that performs the lookup.
15085 * src/parse-skel.y: Remove.
15086 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15087 * src/output.c (actions_output, guards_output)
15088 (token_definitions_output): No longer keeps track of the output
15089 line number, hence remove the second argument.
15090 (guards_output): Check against the guard member of a rule, not the
15091 action member.
15092 Adjust callers.
15093 (output_skeleton): Don't look for the skeleton location, let m4 do
15094 that.
15095 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15096 file will be used.
15097 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15098 (prepare): Given that for the time being changesyntax is not
15099 usable in M4, rename the muscles using `-' to `_'.
15100 Define `defines_flag', `output_parser_name' and `output_header_name'.
15101 * src/output.h (actions_output, guards_output)
15102 (token_definitions_output): Adjust prototypes.
15103 * src/scan-skel.l: Instead of scanning the skeletons, it now
15104 processes the output of m4: `__oline__' and `#output'.
15105 * data/bison.simple: Adjust to be used by M4(sugar).
15106 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15107 to date.
15108 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15109 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15110 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15111 shamelessly stolen from CVS Autoconf.
15112
beda758b
AD
151132002-02-05 Akim Demaille <akim@epita.fr>
15114
15115 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15116 * configure.in: Check for the declarations of free and malloc.
15117 * src/muscle_tab.c: Adjust.
15118
5ece6d43
AD
151192002-02-05 Akim Demaille <akim@epita.fr>
15120
15121 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15122 which have no values.
15123
5bb18f9a
AD
151242002-02-05 Akim Demaille <akim@epita.fr>
15125
15126 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15127 * data/: here.
15128
894dd62e
PE
151292002-01-29 Paul Eggert <eggert@twinsun.com>
15130
15131 * src/bison.simple (YYSIZE_T): Do not define merely because
15132 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15133 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15134
82841af7
AD
151352002-01-27 Akim Demaille <akim@epita.fr>
15136
15137 Fix `%nonassoc and eof'.
15138
15139 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15140 which were not properly copied! Replace
15141 memcpy (res->errs, src->errs, src->nerrs);
15142 with
15143 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15144 !!!
15145 * tests/regression.at (%nonassoc and eof): Adjust to newest
15146 Autotest: `.' is not in the PATH.
15147
318b76e9
AD
151482002-01-27 Akim Demaille <akim@epita.fr>
15149
15150 * tests/sets.at (AT_EXTRACT_SETS): New.
15151 (Nullable): Use it.
15152 (Firsts): New.
15153
30d2f3d5
AD
151542002-01-26 Akim Demaille <akim@epita.fr>
15155
15156 * tests/actions.at, tests/calc.at, tests/headers.at,
15157 * tests/torture.at: Adjust to the newest Autotest which no longer
15158 forces `.' in the PATH.
15159
30f8c395
AD
151602002-01-25 Akim Demaille <akim@epita.fr>
15161
15162 * tests/regression.at (%nonassoc and eof): New.
15163 Suggested by Robert Anisko.
15164
29ae55f1
AD
151652002-01-24 Akim Demaille <akim@epita.fr>
15166
15167 Bison dumps core when trying to complain about broken input files.
15168 Reported by Cris van Pelt.
15169
15170 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15171 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15172 into...
15173 (Invalid inputs): Strengthen: exercise parse_percent_token.
15174
2b548aa6
RA
151752002-01-24 Robert Anisko <robert.anisko@epita.fr>
15176
15177 * src/Makefile.am: Add bison.c++.
15178 * src/bison.c++: New skeleton.
15179
bb0146c2
AD
151802002-01-21 Paolo Bonzini <bonzini@gnu.org>
15181
15182 * po/it.po: New.
15183
bec30531
AD
151842002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15185
15186 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15187
fc6edc45
MA
151882002-01-20 Marc Autret <marc@gnu.org>
15189
15190 * src/files.c (compute_output_file_names): Fix
15191
5e5d5415
MA
151922002-01-20 Marc Autret <marc@gnu.org>
15193
15194 * tests/output.at: New test.
15195 * src/files.c (compute_base_names): Don't map extensions when
15196 the YACC flag is set, use defaults.
15197 Reported by Evgeny Stambulchik.
15198
44ea3fbd
MA
151992002-01-20 Marc Autret <marc@gnu.org>
15200
ba0fe3c7
PE
15201 * src/system.h: Need to define __attribute__ away for non-GCC
15202 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
15203 Suggested by Albert Chin-A-Young.
15204
338963d1
TVH
152052002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15206
15207 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15208 canonical definition.
15209 * src/system.h: Use the canonical definition for PARAMS (avoids
15210 a conflict with the macro from lib/hash.h).
15211
c57b2479
AD
152122002-01-11 Akim Demaille <akim@epita.fr>
15213
15214 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 15215 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 15216
b85810ae
AD
152172002-01-09 Akim Demaille <akim@epita.fr>
15218
15219 * src/files.c, src/files.h (output_infix): New.
15220 (tab_extension): Remove.
15221 (compute_base_names): Compute the former, drop the latter.
15222 * src/output.c (prepare): Insert the muscles `output-infix', and
15223 `output-suffix'.
15224 * src/parse-skel.y (string, string.1): New.
15225 (section.header): Use it.
15226 (section.yacc): Remove.
15227 (prefix): Remove too.
15228 * src/scan-skel.l: Adjust.
15229 * src/bison.simple, src/bison.hairy: Adjust.
15230
cae60122
AD
152312002-01-09 Akim Demaille <akim@epita.fr>
15232
15233 * configure.in (WERROR_CFLAGS): Compute it.
15234 * src/Makefile.am (CFLAGS): Pass it.
15235 * tests/atlocal.in (CFLAGS): Idem.
15236 * src/files.c: Fix a few warnings.
15237 (get_extension_index): Remove, unused.
15238
ae404801
AD
152392002-01-08 Akim Demaille <akim@epita.fr>
15240
15241 * src/getargs.c (AS_FILE_NAME): New.
15242 (getargs): Use it to convert DOSish file names.
15243 * src/files.c (base_name): Rename as full_base_name to avoid
15244 clashes with `base_name ()'.
15245 (filename_split): New.
15246 (compute_base_names): N-th rewrite, using filename_split.
15247
22312b71
AD
152482002-01-08 Akim Demaille <akim@epita.fr>
15249
15250 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15251 New, stolen from the Fileutils 4.1.
15252 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15253 * configure.in: Check for the presence of memrchr, and of its
15254 prototype.
15255
a67cef01
TVH
152562002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15257
15258 * lib/hash.h (__P): Added definition for this macro.
15259 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15260 BUILT_SOURCES, to ensure they are generated first.
15261 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15262 %error-verbose to allow bootstrapping with bison 1.30x.
15263
2b25d624
AD
152642002-01-06 Akim Demaille <akim@epita.fr>
15265
15266 * src/reader.c (parse_braces): Don't fetch the next char, the
15267 convention is to fetch on entry.
15268 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15269 'switch' without a following semicolon.
15270 * tests/regression.at (braces parsing): New.
15271
3460813b
AD
152722002-01-06 Akim Demaille <akim@epita.fr>
15273
15274 Bison is dead wrong in its RR conflict reports.
15275
15276 * tests/torture.at (GNU Cim Grammar): New.
15277 * src/conflicts.c (count_rr_conflicts): Fix.
15278
73784c64
AD
152792002-01-06 Akim Demaille <akim@epita.fr>
15280
15281 Creating package.m4 from configure.ac causes too many problems.
15282
15283 * tests/Makefile.am (package.m4): Create it by hand,
15284 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15285
25d81090
AD
152862002-01-06 Akim Demaille <akim@epita.fr>
15287
15288 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15289 skeleton.h.
15290
a9b8959e
PE
152912002-01-04 Paul Eggert <eggert@twinsun.com>
15292
15293 * doc/bison.texinfo (Debugging):
15294 Remove YYSTDERR; it's no longer defined or used.
15295 Also, s/cstdio.h/cstdio/.
15296
25d81090
AD
152972002-01-03 Akim Demaille <akim@epita.fr>
15298
15299 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15300
1109455c
AD
153012002-01-03 Akim Demaille <akim@epita.fr>
15302
15303 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15304 tracing code to --trace, wait for a better --trace option, with
15305 args.
15306
7ea5e977
AD
153072002-01-03 Akim Demaille <akim@epita.fr>
15308
15309 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15310 The ISO C++ standard is extremely clear about it: stderr is
15311 considered a macro, not a regular symbol (see table 94 `Header
15312 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15313 Therefore std:: does not apply to it. It still does with fprintf.
15314 Also, s/cstdio.h/cstdio/.
15315
fab5b110
AD
153162002-01-03 Akim Demaille <akim@epita.fr>
15317
15318 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15319 for non system headers.
15320
aed7fd9b
AD
153212002-01-02 Akim Demaille <akim@epita.fr>
15322
15323 Equip the skeleton chain with location tracking, runtime trace,
15324 pure parser and scanner.
15325
15326 * src/parse-skel.y: Request a pure parser, locations, and prefix
15327 renaming.
15328 (%union): Having several members with the same type does not help
15329 type mismatches, simplify.
15330 (YYPRINT, yyprint): New.
15331 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15332 (skel_error): this.
15333 Handle locations.
15334 * src/scan-skel.l: Adjust to these changes.
15335 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15336 (LOCATION_PRINT, skel_control_t): New.
15337
24fad99e
AD
153382001-12-30 Akim Demaille <akim@epita.fr>
15339
15340 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15341 replace `gb' with BLANKS.
15342 * src/scan-skel.l: Adjust.
15343
a4b36db4
AD
153442001-12-30 Akim Demaille <akim@epita.fr>
15345
15346 * src/system.h: We don't need nor want bcopy.
15347 Throw away MS-DOS crap: we don't need getpid.
15348 * configure.in: We don't need strndup. It was even causing
15349 problems: because Flex includes the headers *before* us,
15350 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15351 not visible.
15352 * lib/xstrndup.c: New.
15353 * src/scan-skel.l: Use it.
15354 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15355 * src/parse-skel.y: Use %directives instead of #defines.
15356
1239777d
AD
153572001-12-30 Akim Demaille <akim@epita.fr>
15358
15359 * src/skeleton.h: New.
15360 * src/output.c (output_parser, output_master_parser): Remove, dead
15361 code.
15362 * src/output.h (get_lines_number, actions_output, guards_output)
15363 (token_definitions_output): Prototype them.
15364 * src/parse-skel.y: Add the license notice.
15365 Include output.h and skeleton.h.
15366 (process_skeleton): Returns void, and takes a single parameter.
15367 * src/scan-skel.l: Add the license notice.
15368 Include skeleton.h.
15369 Don't use %option yylineno: it seems that then Flex imagines
15370 REJECT has been used, and therefore it won't reallocate its
15371 buffers (which makes no other sense to me than a bug). It results
15372 in warnings for `unused: yy_flex_realloc'.
15373
9b3add5b
RA
153742001-12-30 Robert Anisko <robert.anisko@epita.fr>
15375
15376 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15377 (MUSCLE_INSERT_PREFIX): ...to there.
15378 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15379 (MUSCLE_INSERT_PREFIX): Move from here...
15380
15381 * src/bison.hairy: Add a section directive. Put braces around muscle
15382 names. This parser skeleton is still broken, but Bison should not
15383 choke on a bad muscle 'syntax'.
15384 * src/bison.simple: Add a section directive. Put braces around muscle
15385 names.
15386
15387 * src/files.h (strsuffix, stringappend): Add declarations.
15388 (tab_extension): Add declaration.
15389 (short_base_name): Add declaration.
15390
15391 * src/files.c (strsuffix, stringappend): No longer static. These
15392 functions are used in the skeleton parser.
15393 (tab_extension): New.
15394 (compute_base_names): Use the computations done in this function
fab5b110 15395 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
15396 names.
15397 (short_base_name): No longer static.
15398
15399 * src/output.c (output_skeleton): New.
15400 (output): Disable call to output_master_parser, and give a try to
15401 a new skeleton handling system.
15402 (guards_output, actions_output): No longer static.
15403 (token_definitions_output, get_lines_number): No longer static.
15404
15405 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15406
fab5b110 15407 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
15408 parse-skel.y.
15409
15410 * src/parse-skel.y: New file.
15411 * src/scan-skel.l: New file.
15412
b5b61c61
AD
154132001-12-29 Akim Demaille <akim@epita.fr>
15414
15415 %name-prefix is broken.
15416
15417 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15418 Adjust all dependencies.
15419 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15420 %name-prefix.
15421
15422 Renaming yylval but not yylloc is not consistent. Now we do.
15423
15424 * src/bison.simple: Prefix yylloc if used.
15425 * doc/bison.texinfo (Decl Summary): Document that.
15426
8c9a50be
AD
154272001-12-29 Akim Demaille <akim@epita.fr>
15428
15429 * doc/bison.texinfo: Promote `%long-directive' over
15430 `%long_directive'.
15431 Remove all references to fixed-output-files, yacc is enough.
15432
d99361e6
AD
154332001-12-29 Akim Demaille <akim@epita.fr>
15434
15435 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15436 user prologue. These are defaults.
15437 * tests/actions.at (Mid-rule actions): Make sure the user can
15438 define YYDEBUG and YYERROR_VERBOSE.
15439
b9cecb91
AD
154402001-12-29 Akim Demaille <akim@epita.fr>
15441
15442 * src/output.c (header_output): Don't forget to export YYLTYPE and
15443 yylloc.
15444 * tests/headers.at (export YYLTYPE): New, make sure it does.
15445 * tests/regression.at (%union and --defines, Invalid CPP headers):
15446 Move to...
15447 * tests/headers.at: here.
15448
aea13e97
AD
154492001-12-29 Akim Demaille <akim@epita.fr>
15450
15451 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15452
931394cb
AD
154532001-12-29 Akim Demaille <akim@epita.fr>
15454
15455 * tests/actions.at (Mid-rule actions): Output on a single line
15456 instead of several.
15457
704a47c4
AD
154582001-12-29 Akim Demaille <akim@epita.fr>
15459
15460 * doc/bison.texinfo: Formatting changes.
15461
091e20bb
AD
154622001-12-29 Akim Demaille <akim@epita.fr>
15463
15464 Don't store the token defs in a muscle, just be ready to output it
15465 on command. Now possible via `symbols'. Fixes a memory leak.
15466
15467 * src/output.c (token_definitions_output): New.
15468 (output_parser, header_output): Use it.
15469 * src/reader.c (symbols_save): Remove.
15470
cce71710
AD
154712001-12-29 Akim Demaille <akim@epita.fr>
15472
15473 * src/bison.simple: Do not provide a default for YYSTYPE and
15474 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15475 default.
15476
82c035a8
AD
154772001-12-29 Akim Demaille <akim@epita.fr>
15478
15479 Mid-rule actions are simply... ignored!
15480
15481 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15482 the empty-rule associated to the dummy symbol, not to the host
15483 rule.
15484 * tests/actions.at (Mid-rule actions): New.
15485
8419d367
AD
154862001-12-29 Akim Demaille <akim@epita.fr>
15487
15488 Memory leak.
15489
15490 * src/reader.c (reader): Free grammar.
15491
375d5806
AD
154922001-12-29 Akim Demaille <akim@epita.fr>
15493
15494 Memory leak.
15495
15496 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15497 since it allocates it for each state, although only one is needed.
15498 (allocate_storage): Do it here.
15499
f51cb8ff
AD
155002001-12-29 Akim Demaille <akim@epita.fr>
15501
15502 * src/options.h, src/options.c (create_long_option_table): Rename
15503 as...
15504 (long_option_table_new): this, with a clearer prototype.
15505 (percent_table): Remove, unused,
15506 * src/getargs.c (getargs): Adjust.
15507
29e88316
AD
155082001-12-29 Akim Demaille <akim@epita.fr>
15509
15510 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15511 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15512 as states.
15513
b9f71f19
AD
155142001-12-29 Akim Demaille <akim@epita.fr>
15515
15516 * src/lalr.c (build_relations): Rename `states' as `states1'.
15517 Sorry, I don't understand exactly what it is, no better name...
15518
1a2b5d37
AD
155192001-12-29 Akim Demaille <akim@epita.fr>
15520
15521 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15522 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15523 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15524 as rules.
15525
1cca533e
AD
155262001-12-29 Akim Demaille <akim@epita.fr>
15527
15528 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15529 ago.
15530
c03ae966
AD
155312001-12-29 Akim Demaille <akim@epita.fr>
15532
15533 * src/reader.c, src/reader.h (user_toknums): Remove.
15534 Adjust all users to use symbols[i]->user_token_number.
15535
5a670b1e
AD
155362001-12-29 Akim Demaille <akim@epita.fr>
15537
15538 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15539 Adjust all users to use symbols[i]->prec or ->assoc.
15540
ad949da9
AD
155412001-12-29 Akim Demaille <akim@epita.fr>
15542
15543 * src/reader.c, src/reader.h (tags): Remove.
15544 Adjust all users to use symbols[i]->tag.
15545
0e78e603
AD
155462001-12-29 Akim Demaille <akim@epita.fr>
15547
15548 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15549 and rule_table.
15550 * src/reader.c (packsymbols): Fill this table.
15551 Drop sprec.
15552 * src/conflicts.c (resolve_sr_conflict): Adjust.
15553 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15554 single table.
15555 Use symbols[i]->tag instead of tags[i].
15556
213e640e
AD
155572001-12-29 Akim Demaille <akim@epita.fr>
15558
15559 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15560 In addition, put a comment in there, to replace...
15561 * tests/regression.at (%union and C comments): Remove.
15562
e7b8bef1
AD
155632001-12-29 Akim Demaille <akim@epita.fr>
15564
15565 * tests/regression.at (Web2c Actions): Blindly move the actual
15566 output as expected output. The contents *seem* right to me, but I
15567 can't pretend reading perfectly parser tables... Nonetheless, all
15568 the other tests pass correctly, the table look OK, even though the
15569 presence of `$axiom' is to be noted: AFAICS it is useless (but
15570 harmless).
15571
b68e7744
AD
155722001-12-29 Akim Demaille <akim@epita.fr>
15573
15574 * src/reader.c (readgram): Don't add the rule 0 if there were no
15575 rules read. In other words, add it _after_ having performed
15576 grammar sanity checks.
15577 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15578
78d5bae9
AD
155792001-12-29 Akim Demaille <akim@epita.fr>
15580
15581 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15582 visible, and some states have now a different number.
15583
ff442794
AD
155842001-12-29 Akim Demaille <akim@epita.fr>
15585
15586 * src/reader.c (readgram): Bind the initial rule's lineno to that
15587 of the first rule.
15588 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15589 (Solved SR Conflicts): Adjust rule 0's line number.
15590
610ab194
AD
155912001-12-29 Akim Demaille <akim@epita.fr>
15592
15593 Fix the `GAWK Grammar' failure.
15594
15595 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15596 the reductions of the first state which was mistakenly confused
15597 with the final state because precisely final_state was initialized
15598 to 0.
15599 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15600 now noticed by Bison.
15601 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15602 have a reduction on $default.
15603
29d29c8f
AD
156042001-12-29 Akim Demaille <akim@epita.fr>
15605
15606 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15607 rule line numbers.
15608 * src/closure.c (print_closure): Likewise.
15609 * src/derives.c (print_derives): Likewise.
15610 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15611 now.
15612
7c6b64d0
AD
156132001-12-29 Akim Demaille <akim@epita.fr>
15614
15615 * src/lalr.c (lookaheads_print): New.
15616 (lalr): Call it when --trace-flag.
15617 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15618 are dumped.
15619
3d4daee3
AD
156202001-12-29 Akim Demaille <akim@epita.fr>
15621
15622 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15623 when walking through ritem, even via rule->rhs.
15624 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15625 (useful_production, useless_nonterminals): Likewise.
15626 (reduce_grammar_tables): Likewise, plus update nritems.
15627 * src/nullable.c (set_nullable): Likewise.
15628 * src/lalr.c (build_relations): Likewise.
15629 * tests/sets.at (Nullable): Adjust.
15630 Fortunately, now, the $axiom is no longer nullable.
15631
9e7f6bbd
AD
156322001-12-29 Akim Demaille <akim@epita.fr>
15633
15634 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15635 the 0-sentinel.
15636 * src/gram.c (ritem_longest_rhs): Likewise.
15637 * src/reduce.c (nonterminals_reduce): Likewise.
15638 * src/print_graph.c (print_graph): Likewise.
15639 * src/output.c (output_rule_data): Likewise.
15640 * src/nullable.c (set_nullable): Likewise.
15641
255ef638
AD
156422001-12-29 Akim Demaille <akim@epita.fr>
15643
15644 * src/output.c: Comment changes.
15645
0d8a7363
AD
156462001-12-27 Paul Eggert <eggert@twinsun.com>
15647
15648 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15649 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15650 Sparc, as they were causing more porting problems than the
15651 (minor) performance improvement was worth.
15652
15653 Also, catch up with 1.31's YYSTD.
15654
3db472b9
AD
156552001-12-27 Akim Demaille <akim@epita.fr>
15656
15657 * src/output.c (output_gram): Rely on nritems, not the
15658 0-sentinel. See below.
15659 Use -1 as separator, not 0.
15660 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15661 Rely on -1 as separator in yyrhs, instead of 0.
15662 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15663 twice `Now at end of input', therefore there are two lines less to
15664 expect.
15665
b365aa05
AD
156662001-12-27 Akim Demaille <akim@epita.fr>
15667
15668 * tests/regression.at (Unresolved SR Conflicts):
15669 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15670 below.
15671
30171f79
AD
156722001-12-27 Akim Demaille <akim@epita.fr>
15673
15674 * src/LR0.c (new_state): Recognize the final state by the fact it
15675 is reached by eoftoken.
15676 (insert_start_shifting_state, insert_eof_shifting_state)
15677 (insert_accepting_state, augment_automaton): Remove, since now
15678 these states are automatically computed from the initial state.
15679 (generate_states): Adjust.
15680 * src/print.c: When reporting a rule number to the user, substract
15681 1, so that the axiom rule is rule 0, and the first user rule is 1.
15682 * src/reduce.c: Likewise.
15683 * src/print_graph.c (print_core): For the time being, just as for
15684 the report, depend upon --trace-flags to dump the full set of
15685 items.
15686 * src/reader.c (readgram): Once the grammar read, insert the rule
15687 0: `$axiom: START-SYMBOL $'.
15688 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15689 number of the states has changed (the final state is no longer
15690 necessarily the last), catch up.
15691
75142d45
AD
156922001-12-27 Akim Demaille <akim@epita.fr>
15693
15694 Try to make the use of the eoftoken valid. Given that its value
15695 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15696 is used instead of > 0 where appropriate, (ii), depend upon nritems
15697 instead of the 0-sentinel.
15698
15699 * src/gram.h, src/gram.c (nritems): New.
15700 Expected to be duplication of nitems, but for the time being...
15701 * src/reader.c (packgram): Assert nritems and nitems are equal.
15702 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15703 * src/closure.c (print_closure, print_fderives): Likewise.
15704 * src/gram.c (ritem_print): Likewise.
15705 * src/print.c (print_core, print_grammar): Likewise.
15706 * src/print_graph.c: Likewise.
15707
b7c49edf
AD
157082001-12-27 Akim Demaille <akim@epita.fr>
15709
15710 * src/main.c (main): If there are complains after grammar
15711 reductions, then output the report anyway if requested, then die.
15712 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15713 * src/reader.c (eoftoken): New.
15714 (parse_token_decl): If the token being defined has value `0', it
15715 is the eoftoken.
15716 (packsymbols): No longer hack `tags' to insert `$' by hand.
15717 Be sure to preserve the value of the eoftoken.
15718 (reader): Make sure eoftoken is defined.
15719 Initialize nsyms to 0: now eoftoken is created just like the others.
15720 * src/print.c (print_grammar): Don't special case the eof token.
15721 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15722 lie anyway, albeit pleasant.
15723 * tests/calc.at: Exercise error messages with eoftoken.
15724 Change the grammar so that empty input is invalid.
15725 Adjust expectations.
15726 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15727
ec2da99f
AD
157282001-12-27 Akim Demaille <akim@epita.fr>
15729
15730 * configure.in: Check the protos of strchr ans strspn.
15731 Replace strchr if needed.
15732 * src/system.h: Provide the protos of strchr, strspn and memchr if
15733 missing.
15734 * lib/strchr.c: New.
15735 * src/reader.c (symbols_save): Use strchr.
15736
8adfa272
AD
157372001-12-27 Akim Demaille <akim@epita.fr>
15738
15739 * src/print.c, src/print_graph.c (escape): New.
15740 Use it to quote the TAGS outputs.
15741 * src/print_graph.c (print_state): Now errors are in red, and
15742 reductions in green.
15743 Prefer high to wide: output the state number on a line of its own.
15744
80dac38c
AD
157452001-12-27 Akim Demaille <akim@epita.fr>
15746
15747 * src/state.h, src/state.c (reductions_new): New.
15748 * src/LR0.c (set_state_table): Let all the states have a
15749 `reductions', even if reduced to 0.
15750 (save_reductions): Adjust.
15751 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15752 * src/print.c (print_reductions, print_actions): Adjust.
15753 * src/output.c (action_row): Adjust.
15754
2cec70b9
AD
157552001-12-27 Akim Demaille <akim@epita.fr>
15756
15757 * src/state.h, src/state.c (errs_new, errs_dup): New.
15758 * src/LR0.c (set_state_table): Let all the states have an errs,
15759 even if reduced to 0.
15760 * src/print.c (print_errs, print_reductions): Adjust.
15761 * src/output.c (output_actions, action_row): Adjust.
15762 * src/conflicts.c (resolve_sr_conflict): Adjust.
15763
13ca549a
AD
157642001-12-27 Akim Demaille <akim@epita.fr>
15765
15766 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15767
5092aba5
AD
157682001-12-27 Akim Demaille <akim@epita.fr>
15769
15770 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15771 * src/print.c: here.
15772 (lookaheadset, shiftset): New, used as additional storage by
15773 print_reductions.
15774 (print_results): Adjust.
15775 (print_shifts, print_gotos, print_errs): New, extracted from...
15776 (print_actions): here.
15777 * src/print_graph.c (print_actions): Remove dead code.
15778
11e2beca
AD
157792001-12-27 Akim Demaille <akim@epita.fr>
15780
15781 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15782 `$n' and `@n'.
15783
dac3c910
AD
157842001-12-27 Akim Demaille <akim@epita.fr>
15785
15786 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15787 (build_relations): Adjust.
15788
d0b0fefa
AD
157892001-12-27 Akim Demaille <akim@epita.fr>
15790
15791 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15792 duplication.
15793
adc8c848
AD
157942001-12-27 Akim Demaille <akim@epita.fr>
15795
15796 * src/reader.c (packgram): Catch nitems overflows.
15797
14d293ac
AD
157982001-12-27 Akim Demaille <akim@epita.fr>
15799
15800 * src/files.c, src/files.h (guard_obstack): Remove.
15801 * src/output.c (output): Adjust.
15802 * src/reader.c (parse_braces): New, factoring...
15803 (copy_action, copy_guard): these two which are renamed as...
15804 (parse_action, parse_guard): these.
15805 As a voluntary consequence, using braces around guards is now
15806 mandatory.
15807
f499b062
AD
158082001-12-27 Akim Demaille <akim@epita.fr>
15809
15810 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15811 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15812 members.
15813 (symbol_list_new): Adjust.
15814 (copy_action): action_line is the first line, not the last.
15815 (copy_guard): Just as for actions, store the `action' only, not
15816 the switch/case/break flesh.
15817 Don't parse the user action that might follow the guard, let...
15818 (readgram): do it, i.e., now, there can be an action after a
15819 guard.
15820 In other words the guard is just explicitly optional.
15821 (packgram): Adjust.
15822 * src/output.c (guards_output): New.
15823 (output_parser): Call it when needed.
15824 (output): Also free the guard and attrs obstacks.
15825 * src/files.c, src/files.h (obstack_save): Remove.
15826 (output_files): Remove.
15827 As a result, if one needs the former `.act' file, using an
15828 appropriate skeleton which requires actions and guards is now
15829 required.
15830 * src/main.c (main): Adjust.
15831 * tests/semantic.at: New.
15832 * tests/regression.at: Use `input.y' as input file name.
15833 Avoid 8+3 problems by requiring input.c when the test needs the
15834 parser.
15835
d945f5cd
AD
158362001-12-27 Akim Demaille <akim@epita.fr>
15837
15838 * src/reader.c (symbol_list_new): Be sure to initialize all the
15839 fields.
15840
d200e455
AD
158412001-12-27 Akim Demaille <akim@epita.fr>
15842
15843 All the hacks using a final pseudo state are now useless.
15844
15845 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15846 * src/lalr.c (nLA): New.
15847 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15848 instead of lookaheadsp from the pseudo state (nstate + 1).
15849
f9507c28
AD
158502001-12-27 Akim Demaille <akim@epita.fr>
15851
15852 * src/output.c (action_row, token_actions): Use a state_t instead
15853 of a integer, and nlookaheads instead of the following state's
15854 lookaheadsp.
15855
065fbd27
AD
158562001-12-27 Akim Demaille <akim@epita.fr>
15857
15858 * src/conflicts.c (log_resolution, flush_shift)
15859 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15860 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15861 (conflicts_print, print_reductions): Use a state_t instead of an
15862 integer when referring to a state.
15863 As much as possible, depend upon nlookaheads, instead of the
15864 `lookaheadsp' member of the following state (since lookaheads of
15865 successive states are successive, the difference between state n + 1
15866 and n served as the number of lookaheads for state n).
15867 * src/lalr.c (add_lookback_edge): Likewise.
15868 * src/print.c (print_core, print_actions, print_state)
15869 (print_results): Likewise.
15870 * src/print_graph.c (print_core, print_actions, print_state)
15871 (print_graph): Likewise.
15872 * src/conflicts.h: Adjust.
15873
1b177bd7
AD
158742001-12-27 Akim Demaille <akim@epita.fr>
15875
15876 * src/bison.hairy: Formatting/comment changes.
15877 ANSIfy.
15878 Remove `register' indications.
15879 Add plenty of `static'.
15880
7742ddeb
AD
158812001-12-27 Akim Demaille <akim@epita.fr>
15882
15883 * src/output.c (prepare): Drop the muscle `ntbase' which
15884 duplicates ntokens.
15885 * src/bison.simple: Formatting/comment changes.
15886 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15887 is an undocumented synonym.
15888
1fa14068
AD
158892001-12-22 Akim Demaille <akim@epita.fr>
15890
15891 * src/output.c (output_table_data): Change the prototype to use
15892 `int' for array ranges: some invocations do pass an int, not a
15893 short.
15894 Reported by Wayne Green.
15895
b9752825
AD
158962001-12-22 Akim Demaille <akim@epita.fr>
15897
15898 Some actions of web2c.y are improperly triggered.
15899 Reported by Mike Castle.
15900
15901 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15902 * tests/regression.at (Web2c): Rename as...
15903 (Web2c Report): this.
15904 (Web2c Actions): New.
15905
776209d6
AD
159062001-12-22 Akim Demaille <akim@epita.fr>
15907
15908 Reductions in web2c.y are improperly reported.
15909 Reported by Mike Castle.
15910
15911 * src/conflicts.c (print_reductions): Fix.
15912 * tests/regression.at (Web2c): New.
15913
275fc3ad
AD
159142001-12-18 Akim Demaille <akim@epita.fr>
15915
15916 Some host fail on `assert (!"foo")', which expands to
15917 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15918 Reported by Nelson Beebee.
15919
15920 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15921 `#define it_succeeded 0' and `assert (it_succeeded)'.
15922
897668ee
MA
159232001-12-17 Marc Autret <autret_m@epita.fr>
15924
15925 * src/bison.simple: Don't hard code the skeleton line and filename.
15926 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15927 New line counter 'skeleton_line' (skeleton-line muscle).
15928
ab3399e0
PE
159292001-12-17 Paul Eggert <eggert@twinsun.com>
15930
15931 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15932 YYDEBUG must be defined to a nonzero value.
15933
15934 * src/bison.simple (yytname): Do not assume that the user defines
15935 YYDEBUG to a properly parenthesized expression.
15936
3877f72b
AD
159372001-12-17 Akim Demaille <akim@epita.fr>
15938
15939 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15940 nlookaheads is a new member.
15941 Adjust all users.
15942 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15943 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15944 state.
776209d6 15945
331dbc1b
AD
159462001-12-17 Akim Demaille <akim@epita.fr>
15947
15948 * src/files.h, src/files.c (open_files, close_files): Remove.
15949 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15950 let...
15951 * src/reader.c (reader): Do it.
776209d6 15952
be750e4c
AD
159532001-12-17 Akim Demaille <akim@epita.fr>
15954
15955 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 15956
709ae8c6
AD
159572001-12-17 Akim Demaille <akim@epita.fr>
15958
15959 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15960 (flush_reduce): New.
15961 (resolve_sr_conflict): Adjust.
776209d6 15962
f87685c3
AD
159632001-12-17 Akim Demaille <akim@epita.fr>
15964
15965 * src/output.c (output_obstack): Be static and rename as...
15966 (format_obstack): this, to avoid any confusion with files.c's
15967 output_obstack.
15968 * src/reader.h (muscle_obstack): Move to...
15969 * src/output.h: here, since it's defined in output.c.
15970
837491d8
AD
159712001-12-17 Akim Demaille <akim@epita.fr>
15972
15973 * src/output.c (action_row, save_column, default_goto)
15974 (sort_actions, matching_state, pack_vector): Better variable
15975 locality.
15976
796d61fb
AD
159772001-12-17 Akim Demaille <akim@epita.fr>
15978
15979 * src/output.c: Various formatting changes.
776209d6 15980
64d15509
AD
159812001-12-17 Akim Demaille <akim@epita.fr>
15982
15983 * src/files.c (output_files): Free the output_obstack.
15984 * src/main.c (main): Call print and print_graph conditionally.
15985 * src/print.c (print): Work unconditionally.
15986 * src/print_graph.c (print_graph): Work unconditionally.
15987 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15988
fbc8ecb7
MA
159892001-12-16 Marc Autret <autret_m@epita.fr>
15990
15991 * src/output.c (actions_output): Fix. When we use %no-lines,
15992 there is one less line per action.
15993
f0440388
MA
159942001-12-16 Marc Autret <autret_m@epita.fr>
15995
15996 * src/bison.simple: Remove a useless #line directive.
15997 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15998 * src/output.c (get_lines_number): New.
776209d6 15999 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
16000 output muscles.
16001 Fix line numbering.
16002 (actions_output): Computes the number of lines taken by actions.
16003 (output_master_parser): Insert new skeleton which is the name of
16004 the output parser file name.
16005
a79986b8
MA
160062001-12-15 Marc Autret <autret_m@epita.fr>
16007
16008 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
16009
4ec8e00f
MA
160102001-12-15 Marc Autret <autret_m@epita.fr>
16011
16012 * src/output.c (output_gram): Keep track of the hairy one.
16013
1a4648ff
AD
160142001-12-15 Akim Demaille <akim@epita.fr>
16015
16016 Make `make distcheck' work.
16017
16018 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
16019 system.h which uses libgettext.h.
16020
9c2c67e6
AD
160212001-12-15 Akim Demaille <akim@epita.fr>
16022
16023 * src/nullable.c (set_nullable): Useless rules must be skipped,
16024 otherwise, since we range over their symbols, we might look at a
16025 nonterminal which no longer ``exists'', i.e., it is not counted in
16026 `nvars', hence we overflow our arrays.
16027
93ede233
AD
160282001-12-15 Akim Demaille <akim@epita.fr>
16029
16030 The header can also be produced directly, without any obstack!
16031 Yahoo!
16032
16033 * src/files.c, src/files.h (defines_obstack): Remove.
16034 (compute_header_macro): Global.
16035 (defines_obstack_save): Remove.
16036 * src/reader.c (parse_union_decl): No longer output to
16037 defines_obstack: its content can be found in the `stype' muscle
16038 anyway.
16039 (output_token_translations): Merge into...
16040 (symbols_output): this.
16041 Rename as...
16042 (symbols_save): this.
16043 (reader): Adjust.
16044 * src/output.c (header_output): New.
16045 (output): Call it.
16046
2666f928
AD
160472001-12-15 Akim Demaille <akim@epita.fr>
16048
16049 * src/reader.c (parse_union_decl): Instead of handling two obstack
16050 simultaneously, use one to define the `stype' muscle, and use the
16051 value of the latter to fill defines_obstack.
16052 (copy_comment): Remove.
16053 (copy_comment2): Work for a single obstack.
16054 Rename as...
16055 (copy_comment): this.
16056
428046f8
AD
160572001-12-15 Akim Demaille <akim@epita.fr>
16058
16059 * src/lex.c, src/lex.h (xgetc): No longer static.
16060 * src/reader.c (parse_union_decl): Revamp.
16061
ea52d706
AD
160622001-12-15 Akim Demaille <akim@epita.fr>
16063
16064 Still making progress in separating Bison into (i) input, (ii)
16065 process, (iii) output: now we can directly output the parser file
16066 without using table_obstack at all.
16067
16068 * src/files.c, src/files.h (table_obstack): Bye bye.
16069 (parser_file_name): New.
16070 * src/files.c (compute_output_file_names): Compute it.
16071 * src/output.c (actions_output, output_parser)
16072 (output_master_parser): To a file instead of an obstack.
16073
3f96f4dc
AD
160742001-12-15 Akim Demaille <akim@epita.fr>
16075
16076 Attach actions to rules, instead of pre-outputting them to
16077 actions_obstack.
16078
16079 * src/gram.h (rule_t): action and action_line are new members.
16080 * src/reader.c (symbol_list): Likewise.
16081 (copy_action): Save the actions within the rule.
16082 (packgram): Save them in rule_table.
16083 * src/output.c (actions_output): New.
16084 (output_parser): Use it on `%%actions'.
16085 (output_rule_data): Don't free rule_table.
16086 (output): Do it.
16087 (prepare): Don't save the `action' muscle.
16088 * src/bison.simple: s/%%action/%%actions/.
16089
51576fb3
AD
160902001-12-15 Akim Demaille <akim@epita.fr>
16091
16092 * src/reader.c (copy_action): When --yacc, don't append a `;'
16093 to the user action: let it fail if lacking.
dee049eb 16094 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 16095
2648a72d
AD
160962001-12-14 Akim Demaille <akim@epita.fr>
16097
16098 * src/lex.c (literalchar): Simply return the char you decoded, non
16099 longer mess around with obstacks and int pointers.
16100 Adjust all callers.
16101
92790e5b
AD
161022001-12-14 Akim Demaille <akim@epita.fr>
16103
16104 * src/lex.c (literalchar): Don't escape the special characters,
16105 just decode them, and keep them as char (before, eol was output as
16106 the 2 char string `\n' etc.).
16107 * src/output.c (output_rule_data): Use quotearg to output the
16108 token strings.
16109
927c1557
PE
161102001-12-13 Paul Eggert <eggert@twinsun.com>
16111
16112 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16113 Do not infringe on the global user namespace when using C++.
16114 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16115 All uses of `fprintf' and `stderr' changed.
16116
16117 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16118
ed8e1f68
AD
161192001-12-13 Akim Demaille <akim@epita.fr>
16120
16121 The computation of nullable is broken: it doesn't handle empty
16122 RHS's properly.
16123
16124 * tests/torture.at (GNU AWK Grammar): New.
16125 * tests/sets.at (Nullable): New.
16126 * src/nullable.c (set_nullable): Instead of blindly looping over
16127 `ritems', loop over the rules, and then over their rhs's.
16128
16129 Work around Autotest bugs.
16130
16131 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16132 frame, because Autotest understand lines starting with a `+' as
16133 traces from the shell. Then, they are not processed properly.
16134 Admittedly an Autotest bug, but we don't have time to wait for
16135 Autotest to catch up.
16136 * tests/regression.at (Broken Closure): Adjust to the new table
16137 frames.
16138 Move to...
16139 * tests/sets.at: here.
16140
cb581495
AD
161412001-12-13 Akim Demaille <akim@epita.fr>
16142
16143 * src/closure.c (closure): Use nrules instead of playing tricks
16144 with BITS_PER_WORD.
16145
2e729273
AD
161462001-12-13 Akim Demaille <akim@epita.fr>
16147
16148 * src/print.c (print_actions): Output the handling of `$' as the
16149 traces do: shifting the token EOF. Before EOF was treated as a
16150 nonterminal.
16151 * tests/regression.at: Adjust some tests.
16152 * src/print_graph.c (print_core): Complete the set of items via
16153 closure. The next-to-final and final states are still unsatisfying,
16154 but that's to be addressed elsewhere.
16155 No longer output the rule numbers, but do output the state number.
16156 A single loop for the shifts + gotos is enough, but picked a
16157 distinct color for each.
16158 (print_graph): Initialize and finalize closure.
16159
107f7dfb
AD
161602001-12-13 Akim Demaille <akim@epita.fr>
16161
16162 * src/reader.c (readgram): Remove dead code, an strip useless
16163 braces.
16164 (get_type): Remove, unused.
16165
9b53a24f
AD
161662001-12-12 Akim Demaille <akim@epita.fr>
16167
16168 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16169 on that of lib/error.c.
16170
dbfb6dcd
AD
161712001-12-12 Akim Demaille <akim@epita.fr>
16172
16173 Some hosts don't like `/' in includes.
16174
16175 * src/system.h: Include libgettext.h without qualifying the path.
16176 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16177 $(top_srcdir).
16178
c25fb648
MA
161792001-12-11 Marc Autret <autret_m@epita.fr>
16180
16181 * src/output.c (output_parser): Remove useless muscle.
16182
710ddc4f
MA
161832001-12-11 Marc Autret <autret_m@epita.fr>
16184
16185 * src/bison.simple: Remove #line just before %%epilogue. It
16186 is now handled in ...
16187 * src/reader.c (read_additionnal_code): Add the output of a
16188 #line for the epilogue.
16189
e83d80b8
MA
161902001-12-10 Marc Autret <autret_m@epita.fr>
16191
927c1557 16192 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
16193 replace precedent remove.
16194 * src/bison.simple: Remove #line before %%prologue because
16195 %%input-line is wrong at this time.
16196
971d5158
MA
161972001-12-10 Marc Autret <autret_m@epita.fr>
16198
16199 * src/reader.c (symbols_output): Clean up.
927c1557 16200 * src/output.c (output_gram, output): Clean up.
971d5158 16201
5edafffd
AD
162022001-12-10 Akim Demaille <akim@epita.fr>
16203
16204 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16205 * src/LR0.c (set_state_table): here.
16206 * src/lalr.c (lalr): Call it.
16207
0279f8e9
AD
162082001-12-10 Akim Demaille <akim@epita.fr>
16209
16210 * src/state.h (shifts): Remove the `number' member: shifts are
16211 attached to state, hence no longer need to be labelled with a
16212 state number.
16213
190c4f5f
AD
162142001-12-10 Akim Demaille <akim@epita.fr>
16215
16216 Now that states have a complete set of members, the linked list of
16217 shifts is useless: just fill directly the state's shifts member.
16218
16219 * src/state.h (shifts): Remove the `next' member.
16220 * src/LR0.c (first_state, last_state): Remove.
16221 Adjust the callers.
16222 (augment_automaton): Don't look for the shifts that must be added
16223 a shift on EOF: it is those of the state we looked for! But now,
16224 since shifts are attached, it is no longer needed to looking
16225 merely by its id: its number.
16226
2a73b93d
AD
162272001-12-10 Akim Demaille <akim@epita.fr>
16228
16229 * src/LR0.c (augment_automaton): Better variable locality.
16230 Remove an impossible branch: if there is a state corresponding to
16231 the start symbol being shifted, then there is shift for the start
16232 symbol from the initial state.
16233
74392f6a
AD
162342001-12-10 Akim Demaille <akim@epita.fr>
16235
16236 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16237 only when appropriate: when insert_start_shifting_state' is not
16238 invoked.
16239 * tests/regression.at (Rule Line Numbers): Adjust.
16240
37c82725
AD
162412001-12-10 Akim Demaille <akim@epita.fr>
16242
16243 * src/LR0.c (augment_automaton): Now that all states have shifts,
16244 merge the two cases addition shifts to the initial state.
16245
6a164e0c
AD
162462001-12-10 Akim Demaille <akim@epita.fr>
16247
16248 * src/lalr.c (set_state_table): Move to...
16249 * src/LR0.c: here.
16250 * src/lalr.c (lalr): Don't call it...
16251 * src/LR0.c (generate_states): do it.
16252 * src/LR0.h (first_state): Remove, only the table is used.
16253
7215de24
AD
162542001-12-10 Akim Demaille <akim@epita.fr>
16255
16256 * src/LR0.h (first_shift, first_reduction): Remove.
16257 * src/lalr.c: Don't use first_shift: find shifts through the
16258 states.
16259
80e25d4d
AD
162602001-12-10 Akim Demaille <akim@epita.fr>
16261
16262 * src/LR0.c: Attach shifts to states as soon as they are
16263 computed.
16264 * src/lalr.c (set_state_table): Instead of assigning shifts to
16265 state, just assert that the mapping was properly done.
16266
0ab3728b
AD
162672001-12-10 Akim Demaille <akim@epita.fr>
16268
16269 * src/LR0.c (insert_start_shift): Rename as...
16270 (insert_start_shifting_state): this.
16271 (insert_eof_shifting_state, insert_accepting_state): New.
16272 (augment_automaton): Adjust.
16273 Better locality of the variables.
16274 When looking if the start_symbol is shifted from the initial
16275 state, using `while (... symbol != start_symbol ...)' sounds
16276 better than `while (... symbol < start_symbol ...)': If fail
16277 to see how the order between symbols could be relevant!
16278
78af9bbc
AD
162792001-12-10 Akim Demaille <akim@epita.fr>
16280
16281 * src/getargs.h: Don't declare `spec_name_prefix' and
16282 `spec_file_prefix', declared by src/files.h.
16283 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16284 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16285 * src/output.c (prepare): Adjust.
16286 * src/reader.c (symbols_output): Likewise.
16287 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16288
bdef2a41
AD
162892001-12-10 Akim Demaille <akim@epita.fr>
16290
16291 * src/muscle_tab.c (muscle_init): NULL is a better default than
16292 `"0"'.
16293
3735969c
AD
162942001-12-10 Akim Demaille <akim@epita.fr>
16295
16296 * src/reader.c (reader): Calling symbols_output once is enough.
16297
49701457
AD
162982001-12-10 Akim Demaille <akim@epita.fr>
16299
16300 Now that states have a complete set of members, the linked list of
16301 reductions is useless: just fill directly the state's reductions
16302 member.
16303
16304 * src/state.h (struct reductions): Remove member `number' and
16305 `next'.
16306 * src/LR0.c (first_reduction, last_reduction): Remove.
16307 (save_reductions): Don't link the new reductions, store them in
16308 this_state.
16309 * src/lalr.c (set_state_table): No need to attach reductions to
16310 states, it's already done.
16311 * src/output.c (output_actions): No longer free the shifts, then
16312 the reductions, then the states: free all the states and their
16313 members.
16314
0edad749
AD
163152001-12-10 Akim Demaille <akim@epita.fr>
16316
16317 * src/options.c (OPTN, DRTV, BOTH): New.
16318 (option_table): Use them.
16319
0edad749
AD
16320 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16321 the job of system.h.
16322 * src/options.c: Don't include stdio.h and xalloc.h for the same
16323 reasons.
16324
5449dd0f
AD
163252001-12-10 Akim Demaille <akim@epita.fr>
16326
16327 * src/output.c (output, prepare): Make sure the values of the
16328 muscles `action' and `prologue' are 0-terminated.
16329
a870c567
AD
163302001-12-10 Akim Demaille <akim@epita.fr>
16331
16332 Clean up GCC warnings.
16333
16334 * src/reader.c (copy_action): `buf' is not used.
16335 (parse_skel_decl): Be static.
16336 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16337 * src/options.h (create_long_option_table): Have a real prototype.
16338 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16339 (hash_delete_at): Return const void *.
16340 Adjust casts to preserve the const.
16341
80df8768
AD
163422001-12-10 Akim Demaille <akim@epita.fr>
16343
16344 * configure.in: Require 2.52g.
16345 M4 is not needed, but AUTOM4TE is.
16346 * m4/m4.m4: Remove.
16347 * tests/Makefile.am: Adjust.
16348
f693ad14
AD
163492001-12-10 Akim Demaille <akim@epita.fr>
16350
16351 One structure for states is enough, even though theoretically
16352 there are LR(0) states and LALR(1) states.
16353
16354 * src/lalr.h (state_t): Remove.
16355 (state_table): Be state_t **, not state_t *.
16356 * src/state.h (core, CORE_ALLOC): Rename as...
16357 (state_t, STATE_ALLOC): this.
16358 Add the LALR(1) members: shifts, reductions, errs.
16359 * src/LR0.c (state_table): Rename as...
16360 (state_hash): this, to avoid name clashes with the global
16361 `state_table'.
16362 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16363 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16364
74ffbcb6
AD
163652001-12-10 Akim Demaille <akim@epita.fr>
16366
16367 Bison dumps core on bash.y.
16368 Reported by Pascal Bart.
16369
16370 * src/warshall.c (bitmatrix_print): New.
16371 (TC): Use it.
ba0fe3c7 16372 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
16373 j must be the outer loop.
16374 * tests/regression.at (Broken Closure): New.
16375
07708e19
AD
163762001-12-05 Akim Demaille <akim@epita.fr>
16377
16378 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16379 its argument.
ba1ecc07 16380 Reported by Peter Hamorsky.
07708e19 16381
92b16366
AD
163822001-12-05 Akim Demaille <akim@epita.fr>
16383
16384 * src/conflicts.c (err_table): Remove.
16385 (resolve_sr_conflict): Adjust.
16386 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16387 Rename as...
16388 (state_t.reductions, state_t.shifts): this.
16389
076ab033
AD
163902001-12-05 Akim Demaille <akim@epita.fr>
16391
16392 * src/reduce.c (reduce_grammar_tables): No longer disable the
16393 removal of useless rules via CPP but via `if (0)', so that the
16394 compiler still check the code is valid.
16395 For instance, it should have noticed `rline' no longer exists: use
16396 the `line' member of rule_t.
16397 * src/gram.c (dummy, rline): Remove, unused.
16398
3843c413
AD
163992001-12-05 Akim Demaille <akim@epita.fr>
16400
16401 * src/output.c (pack_vector): Use assert, not berror.
16402 * src/main.c (berror): Remove, unused.
16403
43168960
AD
164042001-12-05 Akim Demaille <akim@epita.fr>
16405
16406 New experimental feature: if --verbose --trace output all the
16407 items of a state, not only its kernel.
16408
16409 * src/print.c (print_core): If `trace_flag', then invoke closure
16410 before outputting the items of the state (print_core is no longer
16411 a correct name them).
16412 (print_results): Invoke new_closure/free_closure if needed.
16413
b2872512
AD
164142001-12-05 Akim Demaille <akim@epita.fr>
16415
16416 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16417 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16418 (nitemset): for consistency with the rest of the project.
16419
23cbcc6c
AD
164202001-12-05 Akim Demaille <akim@epita.fr>
16421
16422 * src/closure.c (print_closure): Improve.
16423 (closure): Use it for printing input and output.
16424
03ec521c
AD
164252001-12-05 Akim Demaille <akim@epita.fr>
16426
16427 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16428 indexed by nonterminals.
16429
3a7456dd
AD
164302001-12-05 Akim Demaille <akim@epita.fr>
16431
16432 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16433 what it was!).
16434 * src/warshall.h: Remove accidental duplication of the content.
16435
1cbcf2e7
AD
164362001-12-05 Akim Demaille <akim@epita.fr>
16437
16438 * src/closure.c (set_fderives): De-obfuscate.
16439
84182270
AD
164402001-12-05 Akim Demaille <akim@epita.fr>
16441
16442 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16443
3f6f053c
AD
164442001-12-05 Akim Demaille <akim@epita.fr>
16445
16446 * src/closure.c (set_firsts): De-obfuscate.
16447
7a5350ba
AD
164482001-12-05 Akim Demaille <akim@epita.fr>
16449
16450 * src/output.c (action_row): De-obfuscate
16451 using the good o' techniques: arrays not pointers, variable
16452 locality, BITISSET, RESETBIT etc.
16453
d954473d
AD
164542001-12-05 Akim Demaille <akim@epita.fr>
16455
16456 Pessimize the code to simplify it: from now on, all the states
16457 have a valid SHIFTS, which NSHIFTS is possibly 0.
16458
16459 * src/LR0.c (shifts_new): Be global and move to..
16460 * src/state.c, src/state.h: here.
16461 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16462 * src/print_graph: Adjust.
16463
9839bbe5
AD
164642001-12-05 Akim Demaille <akim@epita.fr>
16465
16466 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16467 * src/conflicts.c: Use it.
16468 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16469 incorrectly ``simplified''.
16470
9f136c07
AD
164712001-12-05 Akim Demaille <akim@epita.fr>
16472
16473 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16474 using the good o' techniques: arrays not pointers, variable
16475 locality, BITISSET, RESETBIT etc.
16476
b608206e
AD
164772001-12-05 Akim Demaille <akim@epita.fr>
16478
16479 * src/state.h (SHIFT_SYMBOL): New.
16480 * src/conflicts.c: Use it to deobfuscate.
16481
52afa962
AD
164822001-12-05 Akim Demaille <akim@epita.fr>
16483
16484 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16485 (print_reductions): De-obfuscate using the good o' techniques:
16486 arrays not pointers, variable locality, BITISSET.
16487
e74dc321
AD
164882001-12-05 Akim Demaille <akim@epita.fr>
16489
16490 * src/conflicts.c (print_reductions): Arrays, not pointers.
16491 Use BITISSET.
16492
768fca83
AD
164932001-12-05 Akim Demaille <akim@epita.fr>
16494
16495 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16496
a17e599f
AD
164972001-12-05 Akim Demaille <akim@epita.fr>
16498
16499 * src/conflicts.c (print_reductions): Improve variable locality.
16500
a04bc341
AD
165012001-12-05 Akim Demaille <akim@epita.fr>
16502
16503 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16504
c8ea038e
AD
165052001-12-05 Akim Demaille <akim@epita.fr>
16506
16507 * src/conflicts.c (print_reductions): Improve variable locality.
16508
aa2aab3c
AD
165092001-12-05 Akim Demaille <akim@epita.fr>
16510
16511 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16512 * src/lalr.c: Use them.
16513
b178c8cc
AD
165142001-12-05 Akim Demaille <akim@epita.fr>
16515
16516 * src/LR0.c (augment_automaton): Formatting changes.
16517 Better variable locality.
16518
f67d13aa
AD
165192001-12-05 Akim Demaille <akim@epita.fr>
16520
16521 * src/lalr.c (matrix_print): New.
16522 (transpose): Use it.
16523 Use arrays instead of pointers.
16524
c2713865
AD
165252001-12-05 Akim Demaille <akim@epita.fr>
16526
16527 * src/lalr.c (maxrhs): Move to...
16528 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16529 * src/lalr.c (build_relations): Adjust.
16530
9887c18a
AD
165312001-12-05 Akim Demaille <akim@epita.fr>
16532
16533 * src/lalr.c (transpose): Free the memory allocated to the
16534 argument, as it is replaced by the results by the unique caller.
16535 (build_relations): Merely invoke transpose: it handles the memory
16536 deallocation.
16537 Improve variable locality.
16538 Avoid variables used as mere abbreviations.
16539 (compute_lookaheads): Use arrays instead of pointers.
16540
4d4f699c
AD
165412001-12-05 Akim Demaille <akim@epita.fr>
16542
16543 * src/lalr.c (initialize_F): Improve variable locality.
16544 Avoid variables used as mere abbreviations.
16545
80a69750
AD
165462001-12-05 Akim Demaille <akim@epita.fr>
16547
16548 * src/derives.c (print_derives): Display the ruleno.
16549 * src/lalr.c (initialize_F, transpose): Better variable locality
16550 to improve readability.
16551 Avoid variables used as mere abbreviations.
16552
fe961097
AD
165532001-12-05 Akim Demaille <akim@epita.fr>
16554
16555 * src/lalr.c (traverse): Use arrays instead of pointers.
16556
e3e4e814
AD
165572001-12-05 Akim Demaille <akim@epita.fr>
16558
16559 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16560 the handling of squeue.
16561 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16562
630e182b
AD
165632001-12-05 Akim Demaille <akim@epita.fr>
16564
16565 Because useless nonterminals are now kept alive (instead of being
16566 `destroyed'), we now sometimes examine them, and store information
16567 related to them. Hence we need to know their number, and adjust
16568 memory allocations.
16569
16570 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16571 static.
16572 * src/LR0.c (allocate_itemsets): The memory allocated to
16573 `symbol_count' was used for two different purpose: once to count
16574 the number of occurrences of each symbol, and later reassigned to
16575 `shift_symbol', containing the symbol that can be shifted from a
16576 given state.
16577 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16578 only, and...
16579 (new_itemsets): Allocate `shift_symbol' here.
16580 (allocate_itemsets): symbol_count includes useless nonterminals.
16581 Make room for them.
16582 (free_storage): Use `free', not `XFREE', for pointers that cannot
16583 be null.
16584
81b51460
AD
165852001-12-05 Akim Demaille <akim@epita.fr>
16586
16587 * src/nullable.c (set_nullable): Deobfuscate the handling of
16588 ritem.
16589 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16590
3067fbef
AD
165912001-12-05 Akim Demaille <akim@epita.fr>
16592
16593 * src/gram.c, src/gram.h (ritem_print): New.
16594 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16595 (This useless function was defined only to work around VMS linkers
16596 that can't handle compilation units with variables only).
16597 * src/reduce.c (dump_grammar): Use it to trace the construction of
16598 ritem.
16599
c2bea5f9
PE
166002001-12-04 Paul Eggert <eggert@twinsun.com>
16601
7d27c823
PE
16602 * src/bison.simple (union yyalloc): Change member names
16603 to be the same as the stack names.
16604 (yyparse): yyptr is now union yyalloc *, not char *.
16605 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16606 and may generate better code on some machines.
c2bea5f9
PE
16607 (yystpcpy): Use prototype if __STDC__ is defined, not just
16608 if __cplusplus is defined.
35687a9d 16609
2c8a9dfa
AD
166102001-11-30 Akim Demaille <akim@epita.fr>
16611
16612 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16613 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16614 Gettext doesn't compile cleanly, and dies with -Werror.
16615 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16616 Include WARNING_CFLAGS here.
16617 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16618 before being defined.
16619
f4e421e6
AD
166202001-11-27 Paul Eggert <eggert@twinsun.com>
16621
16622 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16623 First arg is int, not unsigned.
16624 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16625 (SIZE_MAX, UINT_MAX): New macros.
16626 (quotearg_n_options): Abort if N is negative.
16627 Avoid overflow check on hosts where size_t is 64 bits and int
16628 is 32 bits, as overflow is impossible there.
16629 Fix off-by-one typo that caused unnecessary reallocation.
16630
7093d0f5
AD
166312001-11-29 Paul Eggert <eggert@twinsun.com>
16632
16633 Name space cleanup in generated parser.
16634
16635 * doc/bison.texinfo (Bison Parser): Discuss system headers
16636 and their effect on the user name space.
16637
16638 * src/bison.simple:
16639 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16640 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16641 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16642
16643 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16644 on user names when possible.
16645
16646 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16647 Simplify test for whather <alloca.h> exists.
16648
16649 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16650
16651 (<stdio.h>): Include if YYDEBUG.
16652
16653 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16654 ! defined (yyoverflow) && ! defined (yymemcpy).
16655
16656 (yymemcpy, yyparse): Rename local variables as needed so that
16657 they all begin with 'yy'.
16658
16659 (yystrlen, yystpcpy): New functions.
16660
16661 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16662 All uses changed.
16663
16664 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16665 instead of relying on string.h functions. Use YYSTACK_ALLOC
16666 and YYSTACK_FREE instead of malloc and free.
16667
fd51e5ff
AD
166682001-11-30 Akim Demaille <akim@epita.fr>
16669
16670 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16671 before their first uses.
16672 (YYBISON, YYPURE): Move to the top of the output.
16673
7d13ff5f
AD
166742001-11-30 Akim Demaille <akim@epita.fr>
16675
16676 * tests/reduce.at (Useless Nonterminals): Fix.
16677
892a3995
AD
166782001-11-30 Akim Demaille <akim@epita.fr>
16679
16680 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16681 if body instead of `;' to pacify GCC's warnings.
16682
68f1e3ed
AD
166832001-11-30 Akim Demaille <akim@epita.fr>
16684
16685 Instead of mapping the LHS of unused rules to -1, keep the LHS
16686 valid, but flag the rules as invalid.
16687
16688 * src/gram.h (rule_t): `useful' is a new member.
16689 * src/print.c (print_grammar): Adjust.
16690 * src/derives.c (set_derives): Likewise.
16691 * src/reader.c (packgram, reduce_output): Likewise.
16692 * src/reduce.c (reduce_grammar_tables): Likewise.
16693 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16694
d2d1b42b
AD
166952001-11-30 Akim Demaille <akim@epita.fr>
16696
16697 * src/reduce.c (reduce_output): Formatting changes.
16698 * src/print.c (print_results, print_grammar): Likewise.
16699 * tests/regression.at (Rule Line Numbers)
16700 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16701
760b53a8
AD
167022001-11-30 Akim Demaille <akim@epita.fr>
16703
16704 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16705 useless nonterminals, move them at the end of the symbol arrays.
16706 (reduce_output): Adjust.
16707 * tests/reduce.at (Useless Nonterminals): Adjust.
16708
00238958
AD
167092001-11-30 Akim Demaille <akim@epita.fr>
16710
16711 * src/reduce.c: Various comment/formatting changes.
16712 (nonterminals_reduce): New, extracted from...
16713 (reduce_grammar_tables): here.
16714 (reduce_grammar): Call nonterminals_reduce.
16715
396452de
PE
167162001-11-29 Paul Eggert <eggert@twinsun.com>
16717
16718 * src/bison.simple (YYSTACK_REALLOC): Remove.
16719 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16720 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16721 New macros.
16722 (union yyalloc): New type.
16723 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16724 an arbitrary restriction on hosts where size_t is wider than int.
16725
16726 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16727 a parser stack overflow. Allocate just one block of memory for all
16728 three stacks, instead of allocating three blocks; this typically is
16729 faster and reduces fragmentation.
16730
16731 Do not limit the number of items in the stack to a value that fits
16732 in 'int', as this is an arbitrary limit on hosts with 64-bit
16733 size_t and 32-bit int.
16734
147e184c
MA
167352001-11-29 Marc Autret <autret_m@epita.fr>
16736
16737 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16738 of defining YYERROR_VERBOSE.
16739 [AT_DATA]: $4 is now out of C declarations in the prologue.
16740
426cf563
MA
167412001-11-28 Marc Autret <autret_m@epita.fr>
16742
16743 * src/reader.c (parse_dquoted_param): New.
16744 (parse_skel_decl): Use it.
16745 * src/lex.h: Add its prototype.
16746 * src/lex.c (literalchar): Become not static.
16747
c7925b99
MA
167482001-11-28 Marc Autret <autret_m@epita.fr>
16749
16750 * src/output.h: And put its extern declaration here.
16751 * src/output.c (error_verbose): Define here.
16752 (prepare): Echo name modification.
16753 * src/getargs.h: Clean its extern declaration.
16754 * src/getargs.c (error_verbose_flag): Remove.
16755 (getargs): Remove case 'e'.
16756 * src/options.c (option_table): 'error-verbose' is now seen as simple
16757 percent option.
16758 Include output.h.
16759
16760 * src/reader.c (read_declarations): Remove case tok_include.
16761 (parse_include_decl): Remove.
16762 * src/lex.h (token_t): Remove tok_include.
16763 * src/options.c (option_table): 'include' is now a simple command line
16764 option.
16765
5b5d1929
MA
167662001-11-28 Marc Autret <autret_m@epita.fr>
16767
16768 * src/bison.simple: Adjust muscle names.
16769 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16770 * src/output.c (prepare): s/_/-/ for the muscles names.
16771 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16772
8850be4b
MA
167732001-11-28 Marc Autret <autret_m@epita.fr>
16774
16775 * src/bison.simple: Fix debug.
16776 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16777
4a38e613
AD
167782001-11-28 Akim Demaille <akim@epita.fr>
16779
16780 * src/LR0.c (shifts_new): New.
16781 (save_shifts, insert_start_shift, augment_automaton): Use it.
16782
4b35e1c1
AD
167832001-11-28 Akim Demaille <akim@epita.fr>
16784
16785 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16786 keep ruleno only.
16787
d2b04478
AD
167882001-11-28 Akim Demaille <akim@epita.fr>
16789
16790 * src/closure.c (closure): Instead of looping over word in array
16791 then bits in words, loop over bits in array.
16792
2c4c30aa
AD
167932001-11-28 Akim Demaille <akim@epita.fr>
16794
16795 * src/closure.c (closure): No longer optimize the special case
16796 where all the bits of `ruleset[r]' are set to 0, to make the code
16797 clearer.
16798
576890b7
AD
167992001-11-28 Akim Demaille <akim@epita.fr>
16800
16801 * src/closure.c (closure): `r' and `c' are new variables, used to
16802 de-obfuscate accesses to RULESET and CORE.
16803
cb487d7d
AD
168042001-11-28 Akim Demaille <akim@epita.fr>
16805
16806 * src/reduce.c (reduce_print): Use ngettext.
16807 (dump_grammar): Improve the trace accuracy.
16808
6013d43f
AD
168092001-11-28 Akim Demaille <akim@epita.fr>
16810
16811 * src/reduce.c (dump_grammar): Don't translate trace messages.
16812
cb4956ee
AD
168132001-11-28 Akim Demaille <akim@epita.fr>
16814
16815 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16816 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16817 as all tags are free'ed afterwards.
16818 From Enrico Scholz.
16819
648185ab
PE
168202001-11-27 Paul Eggert <eggert@twinsun.com>
16821
16822 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16823 use alloca when we didn't want to, and vice versa.
16824
68254a03
MA
168252001-11-27 Marc Autret <autret_m@epita.fr>
16826
9113b58f
AD
16827 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16828 initialization.
68254a03
MA
16829 * src/output.c (prepare): Remove its update.
16830
04d843a2
MA
168312001-11-27 Marc Autret <autret_m@epita.fr>
16832
16833 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16834 Use %error-verbose.
16835
d2079671 168362001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
16837
16838 * src/bison.simple: Remove YYERROR_VERBOSE using.
16839 Use %%error_verbose.
16840 (yyparse): Likewise.
16841 * src/output.c (prepare): Give its final value.
16842 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16843 * src/getargs.h: Add its extern declaration.
16844 * src/getargs.c (error_verbose_flag): New int.
16845 (getargs): Update to catch new case.
16846 * src/options.c (option_table): 'error-verbose' is a new option.
16847 (shortopts): Update.
16848
e0327bc8
AD
168492001-11-27 Akim Demaille <akim@epita.fr>
16850
16851 * src/system.h: Use intl/libgettext.h.
16852 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16853
000f1a3c
AD
168542001-11-27 Akim Demaille <akim@epita.fr>
16855
16856 * tests/torture.at (Exploding the Stack Size with Malloc):
16857 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16858
26cfe0be
AD
168592001-11-27 Akim Demaille <akim@epita.fr>
16860
16861 * src/files.c: Include error.h.
16862 Reported by Hans Aberg.
16863
f6bd5427
MA
168642001-11-26 Marc Autret <autret_m@epita.fr>
16865
d2079671 16866 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
16867 (read_declarations): Add case tok_include.
16868 * src/getargs.h (include): Add its extern definition.
16869 * src/getargs.c (include): New const char *.
16870 (getargs): Add case '-I'.
16871 * src/options.c (option_table): Add include as command line and
16872 percent option.
16873 * src/lex.h (token_t): Add tok_include.
16874
2ca209c1
AD
168752001-11-26 Akim Demaille <akim@epita.fr>
16876
16877 * src/reader.c (readgram): Make sure rules for mid-rule actions
16878 have a lineno equal to that of their host rule.
16879 Reported by Hans Aberg.
16880 * tests/regression.at (Rule Line Numbers): New.
16881
0e41b407
AD
168822001-11-26 Akim Demaille <akim@epita.fr>
16883
16884 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16885 size_ts.
16886
168872001-11-26 Akim Demaille <akim@epita.fr>
16888
16889 * src/complain.c, src/complain.h (error): Remove, provided by
16890 lib/error.[ch].
16891
e0c40012
AD
168922001-11-26 Akim Demaille <akim@epita.fr>
16893
16894 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16895 issue an error message.
16896 * tests/regression.at (Invalid %directive): New.
16897 Reported by Hans Aberg.
16898
5e147124
AD
168992001-11-26 Akim Demaille <akim@epita.fr>
16900
16901 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16902 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16903
a034c8b8
AD
169042001-11-26 Akim Demaille <akim@epita.fr>
16905
16906 * src/conflicts.c (conflicts_print): Don't complain at all when
16907 there are no reduce/reduce conflicts, and as many shift/reduce
16908 conflicts as expected.
16909 * tests/regression.at (%expect right): Adjust.
16910
c64a20f3
AD
169112001-11-23 Akim Demaille <akim@epita.fr>
16912
16913 * lib/alloca.c: Update, from fileutils.
16914
5b0d29bb
AD
169152001-11-23 Akim Demaille <akim@epita.fr>
16916
16917 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16918
722c4bfe
AD
169192001-11-23 Akim Demaille <akim@epita.fr>
16920
16921 * src/system.h: Include alloca.h.
16922 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16923
6255b435
AD
169242001-11-23 Akim Demaille <akim@epita.fr>
16925
16926 * src/print_graph.c (print_actions): Remove `rule', unused.
16927 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16928 pacify GCC's signed < unsigned warnings.
16929 * src/closure.c (itemsetsize): Likewise.
16930 * src/reader.c (symbol_list_new): Static.
16931
b29b2ed5
AD
169322001-11-23 Akim Demaille <akim@epita.fr>
16933
16934 Attaching lineno to buckets is stupid, since only one copy of each
16935 symbol is kept, only the line of the first occurrence is kept too.
16936
16937 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16938 * src/reader.c (rline_allocated): Remove, unused.
16939 (symbol_list): Have a `line' member.
16940 (symbol_list_new): New.
16941 (readgram): Use it.
16942 * src/print.c (print_grammar): Output the rule line numbers.
16943 * tests/regression.at (Solved SR Conflicts)
16944 (Unresolved SR Conflicts): Adjust.
16945 Reported by Hans Aberg.
16946
a81b1d4a
MA
169472001-11-22 Marc Autret <autret_m@epita.fr>
16948
16949 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16950
c1ecb3c1
MA
169512001-11-22 Marc Autret <autret_m@epita.fr>
16952
16953 * src/muscle_tab.c (muscle_init): Remove initialization of
16954 skeleton muscle.
16955 * src/output.c (output_master_parser): Do it here.
16956
fbe01355
AD
169572001-11-20 Akim Demaille <akim@epita.fr>
16958
16959 * po/sv.po: New.
16960 * configure.in (ALL_LINGUAS): Adjust.
16961 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16962 longer contains strings to translate.
16963
81e895c0
AD
169642001-11-19 Akim Demaille <akim@epita.fr>
16965
16966 * src/conflicts.c (conflicts_print): Add a missing \n.
16967
6bb1878b
AD
169682001-11-19 Akim Demaille <akim@epita.fr>
16969
16970 * src/nullable.c (nullable_print): New.
16971 (set_nullable): Call it when tracing.
16972 Better locality of variables.
16973
d9ec2d07
AD
169742001-11-19 Akim Demaille <akim@epita.fr>
16975
16976 * src/print.c (print_actions): Better locality of variables.
16977
720e5c1b
AD
169782001-11-19 Akim Demaille <akim@epita.fr>
16979
16980 * src/derives.c (print_derives): Fix and enrich.
16981 * src/closure.c (print_fderives): Likewise.
16982
fb908786
AD
169832001-11-19 Akim Demaille <akim@epita.fr>
16984
16985 * src/closure.c (itemsetend): Remove, replaced with...
16986 (itemsetsize): new.
16987
125ecb56
AD
169882001-11-19 Akim Demaille <akim@epita.fr>
16989
16990 * src/LR0.c (kernel_end): Remove, replaced with...
16991 (kernel_size): new.
16992
d8cf039f
AD
169932001-11-19 Akim Demaille <akim@epita.fr>
16994
16995 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16996 to clarify.
16997
7bec0760
AD
169982001-11-19 Akim Demaille <akim@epita.fr>
16999
17000 * src/closure.c (closure): Use arrays instead of pointers to clarify.
17001
c87d4863
AD
170022001-11-19 Akim Demaille <akim@epita.fr>
17003
17004 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
17005 trace messages.
17006 * src/LR0.c: Likewise.
17007 (allocate_itemsets): Use arrays instead of pointers to clarify.
17008
9bfe901c
AD
170092001-11-19 Akim Demaille <akim@epita.fr>
17010
17011 * src/getargs.c (statistics_flag): Replace with...
17012 (trace_flag): New.
17013 (longopts): Accept --trace instead of --statistics.
17014 * src/getargs.h, src/options.c: Adjust.
17015 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
17016 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
17017
97db7bd4
AD
170182001-11-19 Akim Demaille <akim@epita.fr>
17019
cc72668c 17020 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
17021 pointers to clarify the code.
17022 (save_reductions, save_shifts): Factor common parts of alternatives.
17023
2c5f66ed
AD
170242001-11-19 Akim Demaille <akim@epita.fr>
17025
17026 * src/LR0.c (new_state, get_state): Complete TRACE code.
17027 * src/closure.c: Include `reader.h' to get `tags', needed by the
17028 trace code.
17029 Rename the conditional DEBUG as TRACE.
17030 Output consistently TRACEs to stderr, not stdout.
17031 * src/derives.c: Likewise.
17032 * src/reduce.c: (inaccessable_symbols): Using if is better style
17033 than goto.
17034 Use `#if TRACE' instead of `#if 0' for tracing code.
17035
300f275f
AD
170362001-11-19 Akim Demaille <akim@epita.fr>
17037
17038 * src/system.h (LIST_FREE, shortcpy): New.
17039 * src/LR0.c: Use them.
17040 * src/output.c (free_itemsets, free_reductions, free_shifts):
17041 Remove, replaced by LIST_FREE.
17042
f59c437a
AD
170432001-11-19 Akim Demaille <akim@epita.fr>
17044
17045 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17046 (REDUCTIONS_ALLOC): New.
17047 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17048 allocation.
17049
6986fd9e
AD
170502001-11-19 Akim Demaille <akim@epita.fr>
17051
17052 * src/LR0.c (new_state): Complete trace code.
17053 * src/nullable.c (set_nullable): Don't translate traces.
17054
4bc30f78
AD
170552001-11-19 Akim Demaille <akim@epita.fr>
17056
17057 * src/print_graph.c (print_core): Better locality of variables.
17058 * src/print.c (print_core): Likewise.
17059
08a946e0
AD
170602001-11-19 Akim Demaille <akim@epita.fr>
17061
17062 * src/vcg.c: You do the output, so you are responsible of the
17063 handling of VCG syntax, in particular: use quotearg.
17064 * src/print_graph.c: Don't.
17065 (print_actions): Don't output the actions as part of the nodes,
17066 since that's the job of the edges.
17067 (print_state): Don't output by hand: fill the node description,
9bfe901c 17068 and ask for its output.
08a946e0 17069
f0473484
AD
170702001-11-19 Akim Demaille <akim@epita.fr>
17071
cc72668c
AD
17072 * src/bison.simple (yyparse): When verbosely reporting an error,
17073 no longer put additional quotes around token names.
f0473484
AD
17074 * tests/calc.at: Adjust.
17075
e41dc700
AD
170762001-11-19 Akim Demaille <akim@epita.fr>
17077
17078 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17079 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17080 * src/output.c: Adjust.
17081
652a871c
AD
170822001-11-19 Akim Demaille <akim@epita.fr>
17083
17084 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17085 (rule_t): this.
17086 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17087
b2ed6e58
AD
170882001-11-19 Akim Demaille <akim@epita.fr>
17089
17090 * src/gram.h (rule_t): New.
17091 (rule_table): New.
17092 (rrhs, rlhs): Remove, part of state_t.
17093 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17094 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17095 * src/reader.c, src/reduce.c: Adjust.
17096
edad7067
AD
170972001-11-19 Akim Demaille <akim@epita.fr>
17098
17099 * src/reader.c (symbols_output): New, extracted from...
17100 (packsymbols): Here.
17101 (reader): Call it.
17102
3feec034
AD
171032001-11-19 Akim Demaille <akim@epita.fr>
17104
17105 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17106 (maxrhs): this new function.
17107
ddcd5fdf
AD
171082001-11-19 Akim Demaille <akim@epita.fr>
17109
cc72668c 17110 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
17111 Adjust.
17112
bb527fc2
AD
171132001-11-19 Akim Demaille <akim@epita.fr>
17114
cc72668c 17115 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
17116 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17117 * src/lalr.c: Adjust.
17118
a845a697
AD
171192001-11-19 Akim Demaille <akim@epita.fr>
17120
17121 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17122 (set_state_table): handle the `lookaheads' members.
17123
f004bf6a
AD
171242001-11-19 Akim Demaille <akim@epita.fr>
17125
cc72668c
AD
17126 * src/lalr.h (lookaheads): Removed array, whose contents is now
17127 a member of...
f004bf6a
AD
17128 (state_t): this structure.
17129 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17130 Adjust.
17131
de326cc0
AD
171322001-11-19 Akim Demaille <akim@epita.fr>
17133
cc72668c
AD
17134 * src/lalr.h (consistent): Removed array, whose contents is now
17135 a member of...
de326cc0
AD
17136 (state_t): this structure.
17137 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17138 Adjust.
17139
90b4416b
AD
171402001-11-19 Akim Demaille <akim@epita.fr>
17141
cc72668c
AD
17142 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17143 contents are now members of...
90b4416b
AD
17144 (state_t): this structure.
17145 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17146 Adjust.
17147
9703cc49
AD
171482001-11-19 Akim Demaille <akim@epita.fr>
17149
17150 * src/lalr.h (state_t): New.
17151 (state_table): Be a state_t * instead of a core **.
17152 (accessing_symbol): Remove, part of state_t.
17153 * src/lalr.c: Adjust.
17154 (set_accessing_symbol): Merge into...
17155 (set_state_table): this.
17156 * src/print_graph.c, src/conflicts.c: Adjust.
17157
d803322e
AD
171582001-11-14 Akim Demaille <akim@epita.fr>
17159
17160 * tests/calc.at, tests/output.at, tests/regression.at,
17161 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17162 now the tests are run in private dirs, therefore AC_CLEANUP and
17163 family can be simplified to 0-ary.
17164 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17165 use abs. path to find config.h.
17166 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17167 stderr, there can be way too much random noise.
17168 Instead pass -Werror to GCC and rely on the exit status.
17169 Reported by Wolfram Wagner.
17170
3d76b07d
AD
171712001-11-14 Akim Demaille <akim@epita.fr>
17172
17173 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17174 defined only if yyoverflow is defined, to avoid `warning: unused
17175 variable `yyvs1''.
17176 Reported by The Test Suite.
17177
09b503c8
AD
171782001-11-14 Akim Demaille <akim@epita.fr>
17179
17180 * src/print.c: Include reduce.h.
17181 Reported by Hans Aberg.
17182
171832001-11-14 Akim Demaille <akim@epita.fr>
17184
17185 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17186 Revert a previous patch: these are really const.
17187 * src/conflicts.c (conflict_report): Additional useless pair of
17188 braces to pacify GCC's warnings for `if () if () {} else {}'.
17189 * src/lex.c (parse_percent_token): Replace equal_offset with
17190 arg_offset.
17191 arg is const.
17192 Be sure to strdup `arg' when used, since there is no reason for
17193 token_buffer not to change.
17194
0f37a994
AD
171952001-11-14 Akim Demaille <akim@epita.fr>
17196
17197 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17198 definition.
17199 * src/main.c (main): Use them.
17200 Suggested by Hans Aberg.
17201
d39d93b8
AD
172022001-11-12 Akim Demaille <akim@epita.fr>
17203
17204 * src/system.h (ngettext): Now that we use ngettext, be sure to
17205 provide a default definition when NLS are not used.
17206
9edcd895
AD
172072001-11-12 Akim Demaille <akim@epita.fr>
17208
17209 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17210 Use @kbd to denote user input.
17211 (Language and Grammar): ANSIfy the example.
17212 Adjust its layout for info/notinfo.
17213 (Location Tracking Calc): Output error messages to stderr.
17214 Output locations in a more GNUtically correct way.
17215 Fix a couple of Englishos.
17216 Adjust @group/@end group pairs.
17217
7da99ede
AD
172182001-11-12 Akim Demaille <akim@epita.fr>
17219
e3aa65c5 17220 %expect was not functioning at all.
7da99ede
AD
17221
17222 * src/conflicts.c (expected_conflicts): Set to -1.
17223 (conflict_report): Use ngettext.
17224 (conflicts_print): Check %expect and make its violation an error.
17225 * doc/bison.texinfo (Expect Decl): Adjust.
17226 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17227 * tests/regression.at (%expect not enough, %expect right)
17228 (%expect too much): New.
17229
ba9dda1a
AD
172302001-11-12 Akim Demaille <akim@epita.fr>
17231
17232 * tests/regression.at (Conflicts): Rename as...
17233 (Unresolved SR Conflicts): this.
17234 (Solved SR Conflicts): New.
17235
337c5bd1
AD
172362001-11-12 Akim Demaille <akim@epita.fr>
17237
17238 * src/reduce.c (print_results): Rename as...
17239 (reduce_output): This.
17240 Output to OUT, passed as argument, instead of output_obstack.
17241 (dump_grammar): Likewise.
17242 (reduce_free): New.
17243 Also free V1.
17244 (reduce_grammar): No longer call reduce_output, since...
17245 * src/print.c (print_results): do it.
17246 * src/main.c (main): Call reduce_free;
17247
c73a41af
AD
172482001-11-12 Akim Demaille <akim@epita.fr>
17249
17250 * src/conflicts.c (print_reductions): Accept OUT as argument.
17251 Output to it, not to output_obstack.
17252 * src/print.c (print_actions): Adjust.
17253
0df87bb6
AD
172542001-11-12 Akim Demaille <akim@epita.fr>
17255
17256 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17257 the result instead of using...
17258 (src_total, rrc_total, src_count, rrc_count): Remove.
17259 (any_conflicts): Remove.
17260 (print_conflicts): Split into...
17261 (conflicts_print, conflicts_output): New.
17262 * src/conflicts.h: Adjust.
17263 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 17264 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
17265 * tests/regression.at (Conflicts): New.
17266 Reported by Tom Lane.
17267
e4d3d4de
AD
172682001-11-12 Akim Demaille <akim@epita.fr>
17269
17270 * tests/regression.at (Invalid input): Remove, duplicate with
17271 ``Invalid input: 1''.
17272
6d7d248e
AD
172732001-11-12 Akim Demaille <akim@epita.fr>
17274
17275 * tests/torture.at (AT_DATA_STACK_TORTURE)
17276 (Exploding the Stack Size with Alloca)
17277 (Exploding the Stack Size with Malloc): New.
17278
e9e4c321
AD
172792001-11-12 Akim Demaille <akim@epita.fr>
17280
17281 * src/bison.simple (YYSTACK_REALLOC): New.
17282 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 17283 Reported by Per Allansson.
e9e4c321 17284
5f7e0832
AD
172852001-11-12 Pascal Bart <pascal.bart@epita.fr>
17286
17287 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17288 define CPP macro, which substitute YYSTYPE by yystype.
17289 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17290 with yyltype/YYLTYPE. This allows inclusion of the generated
17291 header within the parser if the compiler, such as GGC, accepts
17292 multiple equivalent #defines.
17293 From Akim.
17294
e3f1699f
AD
172952001-11-05 Akim Demaille <akim@epita.fr>
17296
17297 * src/reader.c (symbols_output): New, extracted from...
17298 (packsymbols): here.
17299 (reader): Adjust.
17300
65be0866
AD
173012001-11-05 Akim Demaille <akim@epita.fr>
17302
17303 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17304
e4d910bf
AD
173052001-11-05 Akim Demaille <akim@epita.fr>
17306
17307 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17308 pattern.
17309
951366c1
AD
173102001-11-05 Akim Demaille <akim@epita.fr>
17311
17312 * src/options.h (struct option_table_struct): set_flags is void*.
17313 * src/options.c (longopts): Support `--output' and `%output'.
17314 (usage): Adjust.
17315 * src/lex.h (tok_setopt): Remove, replaced with...
17316 (tok_intopt, tok_stropt): these new guys.
17317 * src/lex.c (getopt.h): Not needed.
17318 (token_buffer, unlexed_token_buffer): Not const.
17319 (percent_table): Promote `-' over `_' in directive names.
17320 Active `%name-prefix', `file-prefix', and `output'.
17321 (parse_percent_token): Accept possible arguments to directives.
17322 Promote `-' over `_' in directive names.
17323
d8988b2f
AD
173242001-11-04 Akim Demaille <akim@epita.fr>
17325
17326 * doc/bison.texinfo (Decl Summary): Split the list into
17327 `directives for grammars' and `directives for bison'.
17328 Sort'em.
17329 Add description of `%name-prefix', `file-prefix', and `output'.
17330 Promote `-' over `_' in directive names.
17331 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17332 Simplify the description of `--name-prefix'.
17333 Promote `-' over `_' in directive names.
17334 Promote `--output' over `--output-file'.
17335 Fix the description of `--defines'.
17336 * tests/output.at: Exercise %file-prefix and %output.
17337
6468d18e
AD
173382001-11-02 Akim Demaille <akim@epita.fr>
17339
17340 * doc/refcard.tex: Update.
17341
6b7e85b9
AD
173422001-11-02 Akim Demaille <akim@epita.fr>
17343
17344 * src/symtab.h (SUNDEF): New.
17345 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17346 stand for `uninitialized', instead of 0.
17347 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17348 * src/lex.c (lex): Adjust.
17349
17350 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17351 Number it 0.
17352 Let yylex return it instead of a plain 0.
17353 Reported by Dick Streefland.
17354
cd5aafcf
AD
173552001-11-02 Akim Demaille <akim@epita.fr>
17356
17357 * tests/regression.at (Mixing %token styles): New test.
17358
037ca2f1
AD
173592001-11-02 Akim Demaille <akim@epita.fr>
17360
17361 * src/reader.c (parse_thong_decl): Formatting changes.
17362 (token_translations_init): New, extracted from...
17363 (packsymbols): Here.
17364 Adjust.
17365
270a173c
AD
173662001-11-01 Akim Demaille <akim@epita.fr>
17367
17368 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17369 Check that `9foo.y' produces correct cpp guards.
17370 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17371 guards.
17372 Reported by Wwp.
17373
561f9a30
AD
173742001-11-01 Akim Demaille <akim@epita.fr>
17375
17376 * tests/regression.at (Invalid input: 2): New.
17377 * src/lex.c (unlexed_token_buffer): New.
17378 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17379 too.
17380 Reported by Wwp.
17381
f987e9d2
AD
173822001-11-01 Akim Demaille <akim@epita.fr>
17383
17384 * tests/calc.at: Catch up with 1.30.
17385 * configure.in: Bump to 1.49a.
17386 Adjust to newer Autotest.
17387
0846f581
PB
173882001-10-19 Pascal Bart <pascal.bart@epita.fr>
17389
17390 * src/conflicts.c: Move global variables rrc_total and src_total ...
17391 (print_conflicts): here.
17392 * src/output.c (output): Free global variable user_toknums.
17393 * src/lex.c (token_obstack): Become static.
17394
3c1a79b3
AD
173952001-10-18 Akim Demaille <akim@epita.fr>
17396
17397 * tests/atlocal.in (GCC): Add.
17398 * tests/calc.at: s/m4_match/m4_bmatch/.
17399 s/m4_patsubst/m4_bpatsubst/.
17400 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17401 * configure.in: AC_SUBST(GCC).
17402
5d52e7d0
MA
174032001-10-14 Marc Autret <autret_m@epita.fr>
17404
17405 * src/options.c (create_long_option_table): Fix.
17406
631aa1d3
AD
174072001-10-10 Akim Demaille <akim@epita.fr>
17408
17409 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17410
f6ec6d13
AD
174112001-10-04 Akim Demaille <akim@epita.fr>
17412
17413 * src/reader.c (parse_union_decl): Push the caracters in
17414 union_obstack, not attrs_obstack.
17415
342b8b6e
AD
174162001-10-04 Akim Demaille <akim@epita.fr>
17417
17418 Merge in the branch 1.29.
17419
17420 * src/reader.c (packsymbols): Use a temporary obstack for
17421 `%%tokendef', since output_stack is already used elsewhere.
17422
17423 2001-10-02 Akim Demaille <akim@epita.fr>
17424
17425 Bump 1.29d.
17426
17427 2001-10-02 Akim Demaille <akim@epita.fr>
17428
17429 Version 1.29c.
17430
17431 2001-10-02 Akim Demaille <akim@epita.fr>
17432
17433 * tests/regression.at (Invalid CPP headers): New.
17434 From Alexander Belopolsky.
17435 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17436
17437 2001-10-02 Akim Demaille <akim@epita.fr>
17438
17439 * tests/regression.at (Invalid input): New.
17440 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17441 Reported by Shura.
17442
17443 2001-10-02 Akim Demaille <akim@epita.fr>
17444
17445 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17446
17447 2001-10-02 Akim Demaille <akim@epita.fr>
17448
17449 * src/output.c (output_parser): Assert `skeleton'.
17450 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17451 systems.
17452 From Shura.
17453
17454 2001-10-01 Marc Autret <autret_m@epita.fr>
17455
17456 * src/lex.h: Echo modifications.
17457 * src/lex.c (unlex): Parameter is now token_t.
17458 From Hans Aberg.
17459
17460 2001-10-01 Marc Autret <autret_m@epita.fr>
17461
17462 * src/main.c: Include lex.h.
17463 From Hans Aberg.
17464
17465 2001-09-29 Akim Demaille <akim@epita.fr>
17466
17467 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17468
17469 2001-09-28 Akim Demaille <akim@epita.fr>
17470
17471 * tests/testsuite.at: Update to newer Autotest.
17472 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17473
17474 2001-09-27 Akim Demaille <akim@epita.fr>
17475
17476 Position independent wrapper.
17477
17478 * tests/bison: Remove.
17479 * tests/bison.in: New.
17480 * configure.in: Adjust.
17481
17482 2001-09-27 Paul Eggert <eggert@twinsun.com>
17483
17484 Port quotearg fixes from tar 1.13.24.
17485
17486 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17487 tm to be declared.
17488 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17489 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17490
17491 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17492 * m4/mbrtowc.m4: New file.
17493 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17494 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17495
17496 2001-09-27 Akim Demaille <akim@epita.fr>
17497
17498 Bump to 1.29c.
17499
17500 2001-09-27 Akim Demaille <akim@epita.fr>
17501
17502 Version 1.29b.
17503
17504 2001-09-25 Akim Demaille <akim@epita.fr>
17505
17506 * src/system.h: Include `xalloc.h'.
17507 Remove it from the C files.
17508 * src/files.c (output_files): Free the obstacks.
17509 * src/lex.c (init_lex): Rename as...
17510 (lex_init): this.
17511 (lex_free): New.
17512 * src/main.c (main): Use it.
17513
17514 2001-09-24 Marc Autret <autret_m@epita.fr>
17515
17516 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17517 to output informations in fout (FILE*).
17518 (open_graph, close_graph): Likewise.
17519 (output_graph, output_edge, output_node): Likewise.
17520 * src/vcg.h: Update function prototypes.
17521 * src/print_graph.c (print_graph): Open output graph file.
17522 (print_actions): Adjust.
17523 * src/files.h: Remove extern declaration.
17524 * src/files.c: Remove graph_obstack declaration.
17525 (open_files): Remove graph_obstack initialization.
17526 (output_files): Remove graph_obstack saving.
17527
17528 2001-09-24 Marc Autret <autret_m@epita.fr>
17529
17530 * src/files.c (compute_output_file_names): Fix.
17531
17532 2001-09-24 Marc Autret <autret_m@epita.fr>,
17533 Akim Demaille <akim@epita.fr>
17534
17535 * src/reader.c (reader): Remove call to free_symtab ().
17536 * src/main.c (main): Call it here.
17537 Include symtab.h.
17538 * src/conflicts.c (initialize_conflicts): Rename as...
17539 (solve_conflicts): this.
17540 * src/print.c (print_core, print_actions, print_state)
17541 (print_grammar): Dump to a file instead a `output_obstack'.
17542 (print_results): Dump `output_obstack', and then proceed with the
17543 FILE *.
17544 * src/files.c (compute_output_file_names, close_files): New.
17545 (output_files): Adjust.
17546 * src/main.c (main): Adjust.
17547
17548 2001-09-23 Marc Autret <autret_m@epita.fr>
17549
17550 * src/files.c (compute_header_macro): Computes header macro name
17551 from spec_defines_file when given.
17552
17553 2001-09-23 Marc Autret <autret_m@epita.fr>
17554
17555 * src/files.c (output_files): Add default extensions.
17556
17557 2001-09-22 Akim Demaille <akim@epita.fr>
17558
17559 * src/conflicts.c (finalize_conflicts): Rename as...
17560 (free_conflicts): this.
17561
17562 2001-09-22 Akim Demaille <akim@epita.fr>
17563
17564 * src/gram.c (gram_free): Rename back as...
17565 (dummy): this.
17566 (output_token_translations): Free `token_translations'.
17567 * src/symtab.c (free_symtab): Free the tag field.
17568
17569 2001-09-22 Akim Demaille <akim@epita.fr>
17570
17571 Remove `translations' as it is always set to true.
17572
17573 * src/gram.h: Adjust.
17574 * src/reader.c (packsymbols, parse_token_decl): Adjust
17575 * src/print.c (print_grammar): Adjust.
17576 * src/output.c (output_token_translations): Adjust.
17577 * src/lex.c (lex): Adjust.
17578 * src/gram.c: Be sure the set pointers to NULL.
17579 (dummy): Rename as...
17580 (gram_free): this.
17581
17582 2001-09-22 Akim Demaille <akim@epita.fr>
17583
17584 * configure.in: Invoke AM_LIB_DMALLOC.
17585 * src/system.h: Use dmalloc.
17586 * src/LR0.c: Be sure to have pointers initialized to NULL.
17587 (allocate_itemsets): Allocate kernel_items only if needed.
17588
17589 2001-09-22 Akim Demaille <akim@epita.fr>
17590
17591 * configure.in: Bump to 1.29b.
17592 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17593 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17594 need xmalloc.c in calc.y.
17595 From Pascal Bart.
17596
17597 2001-09-21 Akim Demaille <akim@epita.fr>
17598
17599 Version 1.29a.
17600 * Makefile.maint, config/config.guess, config/config.sub,
17601 * config/missing: Update from masters.
17602 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17603 upon package.m4.
17604 * configure.in (ALL_LINGUAS): Add `tr'.
17605
17606 2001-09-21 Akim Demaille <akim@epita.fr>
17607
17608 * tests/Makefile.am (package.m4): Move to...
17609 ($(srcdir)/$(TESTSUITE)): here.
17610
17611 2001-09-20 Akim Demaille <akim@epita.fr>
17612
17613 * src/complain.c: No longer try to be standalone: use system.h.
17614 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17615 * src/complain.h: Likewise.
17616 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17617 Remove the unused variable `n'.
17618 From Albert Chin-A-Young.
17619
17620 2001-09-18 Marc Autret <autret_m@epita.fr>
17621
17622 * doc/bison.1: Update.
17623 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17624 descriptions.
17625 (Option Cross Key): Update.
17626 Add --graph.
17627
17628 2001-09-18 Marc Autret <autret_m@epita.fr>
17629
17630 * tests/regression.at: New test (comment in %union).
17631
17632 2001-09-18 Marc Autret <autret_m@epita.fr>
17633
17634 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17635 do that.
17636 Reported by Keith Browne.
17637
17638 2001-09-18 Marc Autret <autret_m@epita.fr>
17639
17640 * tests/output.at: Add tests for --defines and --graph.
17641
17642 2001-09-18 Marc Autret <autret_m@epita.fr>
17643
17644 * tests/output.at: Removes tests of %{header,src}_extension features.
17645
17646 2001-09-18 Akim Demaille <akim@epita.fr>
17647
17648 * tests/Makefile.am (package.m4): New.
17649 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17650 (_AT_CHECK_CALC_ERROR): Likewise.
17651 Factor the `, ' part of verbose error messages.
17652
17653 2001-09-18 Marc Autret <autret_m@epita.fr>
17654
17655 * src/getargs.c (longopts): Declare --defines and --graph as options
17656 with optional arguments.
17657 * src/files.h: Add extern declarations.
17658 * src/files.c (spec_graph_file, spec_defines_file): New.
17659 (output_files): Update.
17660 Remove CPP-outed code.
17661
17662 2001-09-18 Marc Autret <autret_m@epita.fr>
17663
17664 Turn off %{source,header}_extension feature.
17665
17666 * src/files.c (compute_exts_from_gf): Update.
17667 (compute_exts_from_src): Update.
17668 (output_files): CPP-out useless code.
17669 * src/files.h: Remove {header,source}_extension extern declarations.
17670 * src/reader.c (parse_dquoted_param): CPP-out.
17671 (parse_header_extension_decl): Remove.
17672 (parse_source_extension_decl): Remove.
17673 (read_declarations): Remove cases tok_{hdrext,srcext}.
17674 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17675 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17676
17677 2001-09-10 Akim Demaille <akim@epita.fr>
17678
17679 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17680 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17681 (AT_CHECK_OUTPUT): this.
17682 Merely check ls' exit status, its output is useless.
17683
17684 2001-09-10 Akim Demaille <akim@epita.fr>
17685
17686 * tests/calc.at: Use m4_match.
17687 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17688
17689 2001-09-10 Marc Autret <autret_m@epita.fr>,
17690 Akim Demaille <akim@epita.fr>
17691
17692 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17693 enum color_e.
17694 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17695 to `normal'.
17696 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17697 * src/lex.h: Adjust prototype.
17698 (token_t): Add `tok_undef'.
17699 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17700 (parse_percent_token): Now returns token_t.
17701 Add default statement in switch.
17702 (lex): Separate `c' as an input variable, from the token_t result
17703 part.
17704 (unlexed): Is a token_t.
17705
17706 2001-09-10 Akim Demaille <akim@epita.fr>
17707
17708 * configure.in: Bump to 1.29a.
17709
17710 2001-09-07 Akim Demaille <akim@epita.fr>
17711
17712 Version 1.29.
17713
17714 2001-08-30 Akim Demaille <akim@epita.fr>
17715
17716 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17717 * m4/atconfig.m4: Remove.
17718 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17719 * tests/bison: New.
17720 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17721 m4_if, m4_patsubst, and m4_regexp.
17722 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17723 `input' file instead of echo.
17724
17725 2001-08-29 Akim Demaille <akim@epita.fr>
17726
17727 Bump to 1.28e.
17728
17729 2001-08-29 Akim Demaille <akim@epita.fr>
17730
17731 Version 1.28d.
17732
17733 2001-08-29 Paul Eggert <eggert@twinsun.com>
17734
17735 * src/bison.simple (yyparse): Don't take the address of an
17736 item before the start of an array, as that doesn't conform to
17737 the C Standard.
17738
17739 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17740
17741 * doc/bison.texinfo (Location Tracking Calc): New node.
17742
17743 2001-08-29 Paul Eggert <eggert@twinsun.com>
17744
17745 * src/output.c (output): Do not define const, as this now
17746 causes more problems than it cures.
17747
17748 2001-08-29 Akim Demaille <akim@epita.fr>
17749
17750 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17751 the nodes.
17752 Be sure to tag the `detailmenu'.
17753
17754 2001-08-29 Akim Demaille <akim@epita.fr>
17755
17756 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17757 download in a tmp dir.
17758
17759 2001-08-28 Marc Autret <autret_m@epita.fr>
17760
17761 * config/depcomp: New file.
17762
17763 2001-08-28 Marc Autret <autret_m@epita.fr>
17764
17765 * doc/bison.1 (mandoc): Adjust.
17766 From Juan Manuel Guerrero.
17767
17768 2001-08-28 Marc Autret <autret_m@epita.fr>
17769
17770 * src/print_graph.c (print_state): Fix.
17771
17772 2001-08-27 Marc Autret <autret_m@epita.fr>
17773
17774 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17775 char * members.
17776 Echo modifications to the functions prototypes.
17777 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17778
17779 2001-08-27 Marc Autret <autret_m@epita.fr>
17780
17781 * src/vcg.c: Include `xalloc.h'.
17782 (add_colorentry): New.
17783 (add_classname): New.
17784 (add_infoname): New.
17785 * src/vcg.h: Add new prototypes.
17786
17787 2001-08-27 Akim Demaille <akim@epita.fr>
17788
17789 * Makefile.maint: Sync. again with CVS Autoconf.
17790
17791 2001-08-27 Akim Demaille <akim@epita.fr>
17792
17793 * Makefile.maint: Formatting changes.
17794 (po-update, cvs-update, update): New targets.
17795 (AMTAR): Remove.
17796
17797 2001-08-27 Akim Demaille <akim@epita.fr>
17798
17799 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17800 * Makefile.maint: Sync. with CVS Autoconf.
17801
17802 2001-08-27 Marc Autret <autret_m@epita.fr>
17803
17804 * src/vcg.h (struct infoname_s): New.
17805 (struct colorentry_s): New.
17806 (graph_s): New fields {vertical,horizontal}_order in structure.
17807 Add `infoname' field.
17808 Add `colorentry' field;
17809 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17810 (G_HORIZONTAL_ORDER): New.
17811 (G_INFONAME): New.
17812 (G_COLORENTRY): New.
17813 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17814 Add output of `infoname'.
17815 Add output of `colorentry'.
17816
17817 2001-08-27 Marc Autret <autret_m@epita.fr>
17818
17819 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17820 This one shadowed a global parameter.
17821
17822 2001-08-24 Marc Autret <autret_m@epita.fr>
17823
17824 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17825 instead of `unsigned'.
17826 (print_state): Do not call obstack_object_size () in obstack_grow ()
17827 to avoid macro variables shadowing.
17828
17829 2001-08-23 Marc Autret <autret_m@epita.fr>
17830
17831 * src/lex.c (percent_table): Typo: s/naem/name/.
17832 Add graph option.
17833 Normalize new options declarations.
17834
17835 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17836
17837 * tests/suite.at: Exercise %header_extension and %source_extension.
17838
17839 2001-08-16 Marc Autret <autret_m@epita.fr>
17840
17841 * src/reader.c (parse_dquoted_param): New.
17842 (parse_header_extension_decl): Use it.
17843 (parse_source_extension_decl): Likewise.
17844
17845 2001-08-16 Marc Autret <autret_m@epita.fr>
17846
17847 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17848 (get_xxxx_str): Use assert () instead of complain ().
17849 Remove return invokations in default cases.
17850 (get_decision_str): Modify default behaviour. Remove second argument.
17851 Echo modifications on calls.
17852 (output_graph): Fix.
17853
17854 2001-08-16 Marc Autret <autret_m@epita.fr>
17855
17856 * src/getargs.c (usage): Update with ``-g, --graph''.
17857
17858 2001-08-16 Marc Autret <autret_m@epita.fr>
17859
17860 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17861 (Option Cross Key): Likewise.
17862 * doc/bison.1: Update.
17863
1c8c2190
PB
178642001-09-25 Pascal Bart <pascal.bart@epita.fr>
17865
17866 * src/output.c (output_master_parser): Don't finish action_obstack.
17867 (output_parser): Don't care about the muscle action, here.
17868 (prepare): Copy the action_obstack in the action muscle.
17869 (output): Free action_obstack.
17870
180d45ba
PB
178712001-09-23 Pascal Bart <pascal.bart@epita.fr>
17872
17873 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17874 will contain `%union' declaration.
17875 (parse_union_decl): Delete #line directive output.
17876 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17877 informations about %union.
17878 (parse_union_decl): Copy the union_obstack in the muscle stype.
17879 * src/bison.simple: Add new #line directive.
17880 Add typdef %%stype YYSTYPE.
17881
c51d1a19
PB
178822001-09-23 Pascal Bart <pascal.bart@epita.fr>
17883
17884 * src/bison.simple: Add new `#line' directive.
17885
6f9344da
PB
178862001-09-22 Pascal Bart <pascal.bart@epita.fr>
17887
17888 * src/bison.simple: New `#line' directive.
17889 * src/output.c (output_parser): Support new dynamic muscle input_line.
17890
652def80
MA
178912001-09-22 Marc Autret <autret_m@epita.fr>
17892
17893 * src/output.c (output_master_parser): New.
17894 (output_parser): Be more re-entrant.
17895
25b222fa
MA
178962001-09-21 Marc Autret <autret_m@epita.fr>
17897
17898 * src/reader.c (copy_definition, parse_union_decl): Update and use
17899 `linef' muscle.
17900 (copy_action): Likewise.
17901 Use obstack_1grow ().
17902 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17903
6bc35ae5
MA
179042001-09-21 Marc Autret <autret_m@epita.fr>
17905
17906 * src/options.c (option_table): Adjust.
17907 * src/lex.c (parse_percent_token): Fix.
17908
c0629aa1
PB
179092001-09-20 Pascal Bart <pascal.bart@epita.fr>
17910
17911 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 17912
82b6d266
PB
179132001-09-20 Pascal Bart <pascal.bart@epita.fr>
17914
17915 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17916 is now an option_table_struct*.
17917 (option_strcmp): New function option_strcmp.
17918 (parse_percent_token): Call option_strcmp.
17919 * src/getargs.c (xalloc.h, options.h): Include it.
17920 (getargs): Call create_long_option_table.
17921 (getargs): Free longopts at the end of the function.
17922 (shortopts): Move in options.c.
17923 * src/options.c (create_long_option_table): New function. Convert
17924 information from option_table to option structure.
17925 * src/reader.c (options.h): Include it.
17926
17927 * src/Makefile.am: Adjust.
17928 * src/options.c (option_table): Create from longopts and percent_table.
17929 * src/getargs.c (longopts): Delete.
17930 * src/lex.c (struct percent_table_struct): Delete.
17931 (percent_table): Delete.
17932 (options.h): Include it.
17933 * src/options.c: Create.
17934 * src/options.h: Create.
17935 Declare enum opt_access_e.
17936 Define struct option_table_struct.
17937
75f5aaea
MA
179382001-09-20 Marc Autret <autret_m@epita.fr>
17939
17940 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17941 sections of Bison.
17942
f508cb0a
PB
179432001-09-19 Pascal Bart <pascal.bart@epita.fr>
17944
17945 * src/bison.simple: s/%%filename/%%skeleton.
17946 * src/muscle_tab.c (getargs.h): Include it.
17947 (muscle_init): Insert new muscle skeleton.
17948
13105fc1
PB
179492001-09-18 Pascal Bart <pascal.bart@epita.fr>
17950
17951 * src/output.c (output_parser): Delete unused variable actions_dumped.
17952
b0c4483e
PB
179532001-09-07 Pascal Bart <pascal.bart@epita.fr>
17954
17955 * src/output.c (output): Delete call to reader_output_yylsp.
17956 * src/reader.c (reader): Likewise.
ba0fe3c7 17957 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 17958
11d82f03
MA
179592001-09-02 Marc Autret <autret_m@epita.fr>
17960
17961 * src/reader.c: Include muscle_tab.h.
17962 (parse_union_decl): Update.
17963 (parse_macro_decl): Rename parse_muscle_decl.
17964 Update to use renamed functions and variable.
17965 (read_declarations, copy_action, read_additionnal_code, : Updated
17966 with correct variables and functions names.
17967 (packsymbols, reader): Likewise.
342b8b6e 17968
11d82f03 17969 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 17970
11d82f03
MA
17971 * src/output.c: Include muscle_tab.h
17972 In all functions using macro_insert, change by using muscle_insert ().
17973 (macro_obstack): Rename muscle_obstack.
17974 Echo modifications in the whole file.
17975 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17976 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17977 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17978
17979 * src/muscle_tab.h: Update double inclusion macros.
17980 (macro_entry_s): Rename muscle_entry_s.
17981 Update prototypes.
342b8b6e 17982
11d82f03
MA
17983 * src/muscle_tab.c: Include muscle_tab.h.
17984 Rename macro_tabble to muscle_table.
17985 (mhash1, mhash2, mcmp): Use muscle_entry.
17986 (macro_init): Rename muscle_init. Update.
17987 (macro_insert): Rename muscle_insert. Update.
17988 (macro_find): Rename muscle_find. Update.
17989
17990 * src/main.c: Include muscle_tab.h.
17991 (main): Call muscle_init ().
17992 * src/Makefile.am (bison_SOURCES): Echo modifications.
17993
93a37297
MA
179942001-09-02 Marc Autret <autret_m@epita.fr>
17995
f753cd62 17996 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 17997
f753cd62
MA
17998 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17999
180002001-09-02 Marc Autret <autret_m@epita.fr>
18001
18002 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 18003
682d48cd
PB
180042001-09-01 Pascal Bart <pascal.bart@epita.fr>
18005
342b8b6e 18006 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
18007 filename.
18008
087c8fda
MA
180092001-09-01 Marc Autret <autret_m@epita.fr>
18010
18011 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
18012 to an explicit value to activate the feature. We do it here.
18013
dda680cb
PB
180142001-08-31 Pascal Bart <pascal.bart@epita.fr>
18015
18016 * src/output.c (prepare): Delete the `filename' muscule insertion.
18017 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
18018 (parse_union_decl): Likewise.
18019 * src/macrotab.c (macro_init): Initialize filename by infile.
18020
9e644e64
MA
180212001-08-31 Marc Autret <autret_m@epita.fr>
18022
18023 * src/bison.simple (YYLSP_NEEDED): New definition.
18024 * src/output.c (prepare): Add macro insertion of `locations_flag'
18025
17da6427
PB
180262001-08-31 Pascal Bart <pascal.bart@epita.fr>
18027
18028 * src/output.c (prepare): Delete insertion of previous muscles,
18029 and insert the `prefix' muscles.
18030 * src/macrotab.c (macro_init): Likewise.
18031 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 18032 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
18033 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18034 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 18035 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
18036 name_prefix.
18037
e8cb70b9
PB
180382001-08-31 Pascal Bart <pascal.bart@epita.fr>
18039
18040 * src/main.c (main): Standardize.
18041 * src/output.c (output_table_data, output_parser): Likewise.
18042 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18043
63c2d5de
MA
180442001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18045
342b8b6e 18046 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
18047 %%epilogue.
18048 * src/output.c (output): Rename %%declarations to %%prologue.
18049 * src/bison.simple: Echo modifications.
342b8b6e 18050
d8cb5183
MA
180512001-08-31 Marc Autret <autret_m@epita.fr>
18052
18053 * src/reader.c (readgram): CleanUp.
18054 (output_token_defines): Likewise.
18055 (packsymbols): Likewise.
18056 (reader): Likewise.
18057 * src/output.c (output): CPP-out useless code.
18058
6c686258
PB
180592001-08-31 Pascal Bart <pascal.bart@epita.fr>
18060
342b8b6e 18061 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
18062 output_trailers and output_headers.
18063 * src/output.h: Remove obsolete functions prototypes of output_headers
18064 and output_trailers.
18065
8f451ef7
PB
180662001-08-30 Pascal Bart <pascal.bart@epita.fr>
18067
18068 * src/main.c: Include macrotab.h.
342b8b6e 18069 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
18070 Adjust functions prototypes.
18071 * src/macrotab.c (macro_insert): Constify key and value.
18072 (macro_find): Constify key.
18073 (macro_insert): Include 'xalloc.h'
18074 (macro_insert): Use XMALLOC.
18075 (macro_find): Constify return value.
18076 * src/output.c (output_table_data): Rename table to table_data.
18077 (output_parser): Constify macro_key, macro_value.
18078
997b6fd0 180792001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
18080
18081 * src/reader.c (parse_skel_decl): New.
342b8b6e 18082 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
18083 * src/lex.h (token_t): New token `tok_skel'.
18084 * src/lex.c (percent_table): Add skeleton option entry.
18085 Standardize.
18086
ff48177d
MA
180872001-08-29 Marc Autret <autret_m@epita.fr>
18088
18089 * src/bison.simple: Add %%user_code directive at the end.
18090 * src/reader.c (read_additionnal_code): New.
18091 (reader): Use it.
18092 * src/output.c (output_program): Remove.
18093 (output): Update.
18094
b33160bf
MA
180952001-08-28 Marc Autret <autret_m@epita.fr>
18096
18097 * src/output.c (output_actions): Clean up.
4e5caae2 18098 (output_gram): CPP-out useless code.
b33160bf
MA
18099 * src/reader.c (reader): Clean up, CPP-out useless code.
18100
d1a2daf7
PB
181012001-08-28 Pascal Bart <pascal.bart@epita.fr>
18102
342b8b6e 18103 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 18104 directive.
d1a2daf7
PB
18105 * src/bison.simple: Add `%%definitions'.
18106
2b763dfe
MA
181072001-08-28 Marc Autret <autret_m@epita.fr>
18108
18109 * config/depcomp: New file.
18110
f1a87ef6
PE
181112001-08-27 Paul Eggert <eggert@twinsun.com>
18112
18113 * src/bison.simple (yyparse): Don't take the address of an
18114 item before the start of an array, as that doesn't conform to
18115 the C Standard.
18116
82e236e2
RA
181172001-08-27 Robert Anisko <robert.anisko@epita.fr>
18118
f1a87ef6 18119 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
18120 obstack. It was done too late here.
18121
18122 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18123 completely wrong.
18124 (reader): Initialize the macro obstack here, since we need it to grow
18125 '%define' directives.
18126
18127 * src/reader.h: Declare the macro obstack as extern.
18128
b0cfa28a
RA
181292001-08-27 Robert Anisko <robert.anisko@epita.fr>
18130
18131 * src/output.c (output_parser): Fix. Store single '%' characters in
18132 the output obstack instead of throwing them away.
18133
6fc74234
AD
181342001-08-27 Akim Demaille <akim@epita.fr>
18135
18136 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18137
9c76d118
RA
181382001-08-25 Robert Anisko <robert.anisko@epita.fr>
18139
18140 * lib/Makefile.am: Adjust.
18141
a8289c62
RA
181422001-08-25 Robert Anisko <robert.anisko@epita.fr>
18143
18144 * src/bison.simple: Update and add '%%' directives.
18145
b6610515
RA
181462001-08-25 Robert Anisko <robert.anisko@epita.fr>
18147
18148 * src/reader.c (reader): Remove calls to 'output_headers' and
18149 'output_trailers'. Remove some C output.
18150 (readgram): Disable a piece of code that was writing a default
18151 definition for 'YYSTYPE'.
18152 (reader_output_yylsp): Remove.
18153 (packsymbols): Output token defintions to a macro.
18154 (copy_definition): Disable C output.
6fc74234 18155
b6610515
RA
18156 * src/reader.c (parse_macro_decl): New function used to parse macro
18157 declarations.
18158 (copy_string2): Put the body of copy_string into this new function.
18159 Add a parameter to let the caller choose whether he wants to copy the
18160 string delimiters or not.
18161 (copy_string): Be a simple call to copy_string2 with the last argument
18162 bound to true.
18163 (read_declarations): Add case for macro definition.
18164 (copy_identifier): New.
6fc74234 18165 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
18166 rather than lex.
18167
26f609ff
RA
181682001-08-25 Robert Anisko <robert.anisko@epita.fr>
18169
18170 * src/output.c (prepare): Add prefixed names.
18171 (output_parser): Output semantic actions.
18172 (output_parser): Fix bug on '%%line' directives.
6fc74234 18173
26f609ff
RA
18174 * src/output.c (output_headers): Remove. The C code printed by this
18175 function should now be in the skeletons.
18176 (output_trailers): Remove.
18177 (output): Disable call to 'reader_output_yylsp'.
18178 (output_rule_data): Do not output tables to the table obstack.
18179
18180 * src/output.c: Remove some C dedicated output.
18181 Improve the use of macro and output obstacks.
18182 (output_defines): Remove.
6fc74234 18183
26f609ff
RA
18184 * src/output.c (output_token_translations): Associate 'translate'
18185 table with a macro. No output to the table obstack.
18186 (output_gram): Same for 'rhs' and 'prhs'.
18187 (output_stos): Same for 'stos'.
18188 (output_rule_data): Same for 'r1' and 'r2'.
18189 (token_actions): Same for 'defact'.
18190 (goto_actions): Same for 'defgoto'.
18191 (output_base): Same for 'pact' and 'pgoto'.
18192 (output_table): Same for 'table'.
18193 (output_check): Same for 'check'.
6fc74234 18194
26f609ff
RA
18195 * src/output.c (output_table_data): New function.
18196 (output_short_table): Remove.
18197 (output_short_or_char_table): Remove.
6fc74234 18198
26f609ff
RA
18199 * src/output.c (output_parser): Replace most of the skeleton copy code
18200 with something new. Skeletons are now processed character by character
18201 rather than line by line, and Bison looks for '%%' macros. This is the
18202 first step in making Bison's output process (a lot) more flexible.
18203 (output_parser): Use the macro table.
18204
6f43b113
RA
182052001-08-25 Robert Anisko <robert.anisko@epita.fr>
18206
18207 * src/main.c (main): Initialize the macro table.
18208
dd3127cf
RA
182092001-08-25 Robert Anisko <robert.anisko@epita.fr>
18210
18211 * src/lex.c (percent_table): Add tok_define.
18212 * src/lex.h: Add tok_define.
18213
aa321494
RA
182142001-08-25 Robert Anisko <robert.anisko@epita.fr>
18215
18216 * src/macrotab.c: New file.
18217 * src/macrotab.h: New file.
18218 * src/Makefile.am: Update.
18219
68bd3b6b
RA
182202001-08-25 Robert Anisko <robert.anisko@epita.fr>
18221
18222 * lib/hash.c: New file.
18223 * lib/hash.h: New file.
18224 * lib/Makefile.am: Update.
18225
45f8dd1e
AD
182262001-08-15 Akim Demaille <akim@epita.fr>
18227
18228 Version 1.28c.
18229
40a64a7a 182302001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
18231
18232 * src/reader.c (readgram): Indent output macro YYSTYPE.
18233 (packsymbols): Likewise.
18234 (output_token_defines): Likewise.
18235 * src/files.c: Standardize.
18236 (compute_header_macro): New.
18237 (defines_obstack_save): New. Use compute_header_macro.
18238 (output_files): Update. Use defines_obstack_save.
18239
f9a8293a
AD
182402001-08-15 Akim Demaille <akim@epita.fr>
18241
18242 * doc/bison.texinfo (Table of Symbols): Document
18243 YYSTACK_USE_ALLOCA.
18244
150ca7a7
AD
182452001-08-15 Akim Demaille <akim@epita.fr>
18246
18247 * missing: Update from CVS Automake.
18248 * config/config.guess, config/config.sub, config/texinfo.tex:
18249 Update from gnu.org.
18250
69b5cec4
AD
182512001-08-15 Akim Demaille <akim@epita.fr>
18252
18253 * Makefile.maint: Sync with CVS Autoconf.
18254
f2b5126e
PB
182552001-08-14 Pascal Bart <pascal.bart@epita.fr>
18256
69b5cec4 18257 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
18258 `fdl.texi'.
18259 * doc/fdl.texi: Add to package.
18260
4ecbf796
MA
182612001-08-14 Marc Autret <autret_m@epita.fr>
18262
18263 Turn on %{source,header}_extension features.
18264
69b5cec4 18265 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
18266 source_extension.
18267 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 18268 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
18269 between options.
18270
95fb5662
MA
182712001-08-14 Marc Autret <autret_m@epita.fr>
18272
18273 * src/files.c (compute_base_names): Add extensions computing when
18274 `--file-prefix' used.
18275 Standardize function calls.
18276
78d09da9
MA
182772001-08-13 Marc Autret <autret_m@epita.fr>
18278
69b5cec4 18279 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
18280 defining it (defined but null disables alloca).
18281
5a009f2c
MA
182822001-08-13 Marc Autret <autret_m@epita.fr>
18283
18284 * src/bison.simple (_yy_memcpy): CPP reformat.
18285
1e41465a
PB
182862001-08-13 Pascal Bart <pascal.bart@epita.fr>
18287
18288 * tests/atconfig.in (CPPFLAGS): Fix.
18289
c67a198d
PB
182902001-08-10 Pascal Bart <pascal.bart@epita.fr>
18291
79282c6c 18292 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
18293 `gpl.texi'.
18294 * doc/gpl.texi: Add to package.
18295
09a6de7e
MA
182962001-08-10 Marc Autret <autret_m@epita.fr>
18297
18298 * src/print_graph.h: Fix.
18299 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18300
b77b9ee0
AD
183012001-08-10 Akim Demaille <akim@epita.fr>
18302
18303 * src/system.h: Provide default declarations for stpcpy, strndup,
18304 and strnlen.
18305
3e259915
MA
183062001-08-10 Robert Anisko <anisko_r@epita.fr>
18307
18308 * doc/bison.texinfo (Locations): Update @$ stuff.
18309
ca96bc2d
MA
183102001-08-09 Robert Anisko <anisko_r@epita.fr>
18311
18312 * src/bison.simple (YYLLOC_DEFAULT): Update.
18313 (yyparse): Adjust.
18314
fdc6758b
MA
183152001-08-08 Marc Autret <autret_m@epita.fr>
18316
b77b9ee0 18317 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
18318 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18319 Reported by Fabrice Bauzac.
957d4dbf 18320
600cad3b
MA
183212001-08-08 Marc Autret <autret_m@epita.fr>
18322
18323 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18324 * src/vcg.c (output_node): Fix.
18325 * src/vcg.h: Cleanup.
18326 * src/print_graph.c: Add comments.
b77b9ee0 18327 (node_output_size): New global variable. Simplify the formatting of
600cad3b 18328 the VCG graph output.
b77b9ee0 18329 (print_actions): Unused code is now used. It notifies the final state
600cad3b 18330 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 18331 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
18332 blue.
18333 Get the current node name and node_obstack by argument.
18334 (node_obstack): New variable.
18335 (print_state): Manage node_obstack.
18336 (print_core): Use node_obstack given by argument.
18337 A node is not only computed here but in print_actions also.
18338 (print_graph): CPP out useless code instead of commenting it.
18339
976e528f
AD
183402001-08-07 Pascal Bart <pascal.bart@epita.fr>
18341
18342 * tests/atconfig.in (CPPFLAGS): Fix.
18343
20e8e5ca
AD
183442001-08-07 Akim Demaille <akim@epita.fr>
18345
18346 * src/print_graph.c (quote): New.
18347 (print_core): Use it.
18348
957d4dbf 183492001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 18350
3e3da797
AD
18351 * src/vcg.c (complain.h): Include it.
18352 Unepitaize `return' invocations.
c4b66126 18353 [NDEBUG] (main): Remove.
79282c6c 18354 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
18355 * src/files.c (open_files): Initialize graph_obstack.
18356 * src/print_graph.c (print_actions): CPP out useless code.
18357 (print_core): Don't output the last `\n' in labels.
18358 Use `quote'.
18359 * src/files.c (output_files): Output the VCG file.
18360 * src/main.c (main): Invoke print_graph ();
3e3da797 18361
957d4dbf 183622001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
18363
18364 Automaton VCG graph output.
18365 Using option ``-g'' or long option ``--graph'', you can generate
18366 a gram_filename.vcg file containing a VCG description of the LALR (1)
18367 automaton of your grammar.
18368
18369 * src/main.c: Call to print_graph() function.
18370 * src/getargs.h: Update.
18371 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18372 (graph_flag): New flag.
18373 (longopts): Update.
18374 (getargs): Add case `g'.
18375 * src/files.c (graph_obstack): New obstack struct.
18376 (open_files): Initialize new obstack.
18377 (output_files): Saves graph_obstack if required.
18378 * src/files.h (graph_obstack): New extern declaration.
18379 * src/Makefile.am: Add new source files.
18380
927c1557 183812001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
18382
18383 * src/print_graph.c, src/print_graph.h (graph): New.
18384 * src/vcg.h: New file.
18385 * src/vcg.c: New file, VCG graph handling.
18386
7333d403
AD
183872001-08-06 Marc Autret <autret_m@epita.fr>
18388
18389 Add of %source_extension and %header_extension which specify
18390 the source or/and the header output file extension.
18391
18392 * src/files.c (compute_base_names): Remove initialisation of
18393 src_extension and header_extension.
18394 (compute_exts_from_gf): Update.
18395 (compute_exts_from_src): Update.
18396 (output_files): Update.
18397 * src/reader.c (parse_header_extension_decl): New.
18398 (parse_source_extension_decl): New.
18399 (read_declarations): New case statements for the new tokens.
18400 * src/lex.c (percent_table): Add entries for %source_extension
18401 and %header_extension.
18402 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18403
84163231
AD
184042001-08-06 Marc Autret <autret_m@epita.fr>
18405
18406 * configure.in: Bump to 1.28c.
18407 * doc/bison.texinfo: Texinfo thingies.
18408
8303fc42
AD
184092001-08-04 Pascal Bart <pascal.bart@epita.fr>
18410
18411 * tests/atconfig.in (CPPFLAGS): Add.
18412 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18413
70a84437
AD
184142001-08-03 Akim Demaille <akim@epita.fr>
18415
18416 Version 1.28b.
18417
2ce10144
AD
184182001-08-03 Akim Demaille <akim@epita.fr>
18419
18420 * tests/Makefile.am (check-local): Ship testsuite.
18421 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18422 Include `string.h'.
18423
1e3e4bc1
AD
184242001-08-03 Akim Demaille <akim@epita.fr>
18425
18426 * configure.in: Try using -Wformat when compiling.
18427
42b45b7f
AD
184282001-08-03 Akim Demaille <akim@epita.fr>
18429
18430 * configure.in: Bump to 1.28b.
18431
8f13fe33
AD
184322001-08-03 Akim Demaille <akim@epita.fr>
18433
18434 * src/complain.c: Adjust strerror_r portability issues.
18435
b37ba92c
AD
184362001-08-03 Akim Demaille <akim@epita.fr>
18437
18438 Version 1.28a.
18439
b0ce6046
AD
184402001-08-03 Akim Demaille <akim@epita.fr>
18441
18442 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18443 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18444 * src/getargs.c: Include complain.h.
18445 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18446 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18447
d01c415b
AD
184482001-08-03 Akim Demaille <akim@epita.fr>
18449
18450 * src/reader.c (readgram): Display hidden chars in error messages.
18451
459dd1a6
AD
184522001-08-03 Akim Demaille <akim@epita.fr>
18453
18454 Update to gettext 0.10.39.
18455
53b74c0c
AD
184562001-08-03 Akim Demaille <akim@epita.fr>
18457
18458 * lib/strspn.c: New.
18459
234a3be3
AD
184602001-08-01 Marc Autret <autret_m@epita.fr>
18461
18462 * doc/bison.texinfo: Update.
18463 * doc/bison.1 (mandoc): Update.
18464 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18465 * src/files.c: Support output files extensions computing.
18466 (src_extension): New static variable.
18467 (header_extension): New static variable.
18468 (tr): New function.
18469 (get_extension_index): New function, gets the index of an extension
18470 filename in a string.
18471 (compute_exts_from_gf): New function, computes extensions from the
18472 grammar file extension.
18473 (compute_exts_from_src): New functions, computes extensions from the
18474 C source file extension, file given by ``-o'' option.
18475 (compute_base_names): Update.
18476 (output_files): Update.
18477
847bf1f5
AD
184782001-08-01 Robert Anisko <anisko_r@epita.fr>
18479
d995fee7 18480 * doc/bison.texi: Document @$.
847bf1f5
AD
18481 (Locations): New section.
18482
d074a105
AD
184832001-07-18 Akim Demaille <akim@epita.fr>
18484
18485 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18486 * config/prev-version.txt, config/move-if-change: New.
18487 * Makefile.am: Adjust.
18488
3419715d
AD
184892001-07-08 Pascal Bart <pascal.bart@epita.fr>
18490
18491 * src/bison.simple (yyparse): Suppress warning `comparaison
18492 between signed and unsigned'.
18493
62ab6972
AD
184942001-07-05 Pascal Bart <pascal.bart@epita.fr>
18495
18496 * src/getargs.h (raw_flag): Remove.
18497 * src/getargs.c: Die on `-r'/`--raw'.
18498 * src/lex.c (parse_percent_token): Die on `%raw'.
18499 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18500 * tests/calc.at: Suppress test with option `--raw'.
18501
1e24cc5b
AD
185022001-07-14 Akim Demaille <akim@epita.fr>
18503
18504 * config/: New.
18505 * configure.in: Require Autoconf 2.50.
18506 Update to gettext 0.10.38.
18507
32dfccf8
AD
185082001-03-16 Akim Demaille <akim@epita.fr>
18509
18510 * doc/bison.texinfo: ANSIfy the examples.
18511
cd5bd6ac
AD
185122001-03-16 Akim Demaille <akim@epita.fr>
18513
18514 * getargs.c (skeleton): New variable.
18515 (longopts): --skeleton is a new option.
18516 (shortopts, getargs): -S is a new option.
18517 * getargs.h: Declare skeleton.
18518 * output.c (output_parser): Use it.
18519
5141b016
AD
185202001-03-16 Akim Demaille <akim@epita.fr>
18521
18522 * m4/strerror_r.m4: New.
18523 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18524 * lib/error.h, lib/error.c: Update.
18525
447992b9
AD
185262001-03-16 Akim Demaille <akim@epita.fr>
18527
18528 * src/getargs.c (longopts): Clean up.
18529
274d42ce
AD
185302001-02-21 Akim Demaille <akim@epita.fr>
18531
18532 * src/reader.c (gensym): `gensym_count' is your own.
18533 Use a static buf to create the symbol name, as token_buffer is no
18534 longer a buffer.
18535
22c821f3
AD
185362001-02-08 Akim Demaille <akim@epita.fr>
18537
18538 * src/conflicts.c (conflict_report): Be sure not to append to res
18539 between two calls, which could happen if both first sprintf were
18540 skipped, but not the first cp += strlen.
18541
18569462
AD
185422001-02-08 Akim Demaille <akim@epita.fr>
18543
18544 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18545 New, from fileutils 4.0.37.
18546 * configure.in: Require Autoconf 2.49c. I took some time before
18547 making this decision. This is the only way out for portability
18548 issues in Bison, it would mean way too much duplicate effort to
18549 import in Bison features implemented in 2.49c since 2.13.
18550 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18551
0d8f3c8a
AD
185522001-02-02 Akim Demaille <akim@epita.fr>
18553
18554 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 18555 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 18556
f17bcd1f
AD
185572001-01-19 Akim Demaille <akim@epita.fr>
18558
18559 Get rid of the ad hoc handling of token_buffer in the scanner: use
18560 the obstacks.
18561
18562 * src/lex.c (token_obstack): New.
18563 (init_lex): Initialize it. No longer call...
18564 (grow_token_buffer): this. Remove it.
18565 Adjust all the places which used it to use the obstack.
18566
511e79b3
AD
185672001-01-19 Akim Demaille <akim@epita.fr>
18568
18569 * src/lex.h: Rename all the tokens:
18570 s/\bENDFILE\b/tok_eof/g;
18571 s/\bIDENTIFIER\b/tok_identifier/g;
18572 etc.
18573 Let them be enums, not #define, to ease debugging.
18574 Adjust all the code.
18575
0d6508ef
AD
185762001-01-18 Akim Demaille <akim@epita.fr>
18577
18578 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18579 * src/lex.c (maxtoken, grow_token_buffer): Static.
18580
6deb4447
AD
185812001-01-18 Akim Demaille <akim@epita.fr>
18582
18583 Since we now use obstacks, more % directives can be enabled.
18584
18585 * src/lex.c (percent_table): Also accept `%yacc',
18586 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18587 `%debug'.
18588 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18589 instead of returning a token.
18590 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18591 * src/reader.c (read_declarations): Adjust.
18592 * src/files.c (open_files): Don't call `compute_base_names', don't
18593 compute `attrsfile' since they depend upon data which might be
18594 *in* the input file now.
18595 (output_files): Do it here.
18596 * src/output.c (output_headers): Document the fact that this patch
18597 introduces a guaranteed SEGV for semantic parsers.
18598 * doc/bison.texinfo: Document them.
18599 * tests/suite.at: Exercise these %options.
18600
ff4423cc
AD
186012000-12-20 Akim Demaille <akim@epita.fr>
18602
18603 Also handle the output file (--verbose) with obstacks.
18604
18605 * files.c (foutput): Remove.
18606 (output_obstack): New.
18607 Adjust all dependencies.
18608 * src/conflicts.c: Return a string.
18609 * src/system.h (obstack_grow_string): Rename as...
18610 (obstack_sgrow): this. Be ready to work with non literals.
18611 (obstack_fgrow4): New.
18612
956dba3a
AD
186132000-12-20 Akim Demaille <akim@epita.fr>
18614
18615 * src/files.c (open_files): Fix the computation of short_base_name
18616 in the case of `-o foo.tab.c'.
18617
337bab46
AD
186182000-12-20 Akim Demaille <akim@epita.fr>
18619
18620 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18621 (copy_dollar): Now that everything uses obstacks, get rid of the
18622 FILE * parameters.
18623
5d3214b8
AD
186242000-12-20 Akim Demaille <akim@epita.fr>
18625
18626 * src/files.c (open_files): Actually the `.output' file is based
18627 on the short_base_name, not base_name.
18628 * tests/suite.at (Checking output file names): Adjust.
18629
29092a57
AD
186302000-12-20 Akim Demaille <akim@epita.fr>
18631
18632 * src/bison.s1: Remove, we now use directly...
18633 * src/bison.simple: this.
18634 * src/Makefile.am: Use pkgdata instead of data.
18635
ea5607fd
AD
186362000-12-20 Akim Demaille <akim@epita.fr>
18637
18638 * src/files.c (guard_obstack): New.
18639 (open_files): Initialize it.
18640 (output_files): Dump it...
18641 * src/files.h: Export it.
18642 * src/reader.c (copy_guard): Use it.
18643
27110317
AD
186442000-12-19 Akim Demaille <akim@epita.fr>
18645
18646 * src/files.c (outfile, defsfile, actfile): Removed as global
18647 vars.
18648 (open_files): Don't compute them.
18649 (output_files): Adjust.
18650 (base_name, short_base_name): Be global.
18651 Adjust dependencies.
18652
19c50364
AD
186532000-12-19 Akim Demaille <akim@epita.fr>
18654
18655 * src/files.c (strsuffix): New.
18656 (stringappend): Be just like strcat but allocate.
18657 (base_names): Eve out from open_files.
18658 Try to simplify the rather hairy computation of base_name and
18659 short_base_name.
18660 (open_files): Use it.
18661 * tests/suite.at (Checking output file names): New test.
18662
573c1d9f
AD
186632000-12-19 Akim Demaille <akim@epita.fr>
18664
18665 * src/system.h (obstack_grow_literal_string): Rename as...
18666 (obstack_grow_string): this.
18667 * src/output.c (output_parser): Recognize `%% actions' instead of
18668 `$'.
18669 * src/bison.s1: s/$/%% actions/.
18670 * src/bison.hairy: Likewise.
18671
ef7ddedd
AD
186722000-12-19 Akim Demaille <akim@epita.fr>
18673
18674 * src/output.c (output_parser): Compute the `#line' lines when
18675 there are.
18676 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18677 Suggested by Hans Aberg.
18678
ff61dabd
AD
186792000-12-19 Akim Demaille <akim@epita.fr>
18680
18681 Let the handling of the skeleton files be local to the procedures
18682 that use it.
18683
18684 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18685 longer static.
18686 (fparser, open_extra_files): Remove.
18687 (open_files, output_files): Don't take care of fparser.
18688 * src/files.h: Adjust.
18689 * src/output.c (output_parser): Open and close the file to the
18690 skeleton.
18691 * src/reader.c (read_declarations): When %semantic_parser, open
18692 fguard.
18693
55b96341
AD
186942000-12-19 Akim Demaille <akim@epita.fr>
18695
18696 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18697 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18698
358c15b7
AD
186992000-12-19 Akim Demaille <akim@epita.fr>
18700
18701 * src/files.c (open_files): Yipee! We no longer need all the code
18702 looking for `/tmp' since we have no tmp file.
18703
7de3329e
AD
187042000-12-19 Akim Demaille <akim@epita.fr>
18705
18706 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18707 New macros.
18708 * src/files.c (open_files): Less dependency on MSDOS etc.
18709
3abcd459
AD
187102000-12-14 Akim Demaille <akim@epita.fr>
18711
18712 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18713 Provide a default definition.
18714 Use it when executing the default @ action.
18715 * src/reader.c (reader_output_yylsp): No longer include
18716 `timestamp' and `text' in the default YYLTYPE.
18717
2a91a95e
AD
187182000-12-12 Akim Demaille <akim@epita.fr>
18719
18720 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18721 (copy_guard): Quote the file names.
18722 Reported by Laurent Mascherpa.
18723
14d3eb9b
AD
187242000-12-12 Akim Demaille <akim@epita.fr>
18725
18726 * src/output.c (output_headers, output_program, output): Be sure
18727 to escape special characters when outputting filenames.
18728 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18729 (output_headers): Don't depend on them, Use ACTSTR.
18730
d7045ec6
AD
187312000-11-17 Akim Demaille <akim@epita.fr>
18732
18733 * lib/obstack.h: Formatting changes.
18734 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18735 prevents type checking.
18736 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18737 cast the value to (void *): assigning a `foo *' to a `void *'
18738 variable is valid.
18739 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18740 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18741 append characters.
18742
6fd54b73
AD
187432000-11-17 Akim Demaille <akim@epita.fr>
18744
18745 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18746 as...
18747 (suite.m4, regression.m4, calc.m4): these.
18748 * tests/atgeneral.m4: Update from CVS Autoconf.
18749
4c50eae6
AD
187502000-11-17 Akim Demaille <akim@epita.fr>
18751
18752 * tests/regression.m4 (%union and --defines): New test,
18753 demonstrating a current bug in the obstack implementation.
18754
a35f64ea
AD
187552000-11-17 Akim Demaille <akim@epita.fr>
18756
18757 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18758 macros.
18759 Use them to declare the variables which are global or local to
18760 `yyparse'.
18761
7de23534
AD
187622000-11-17 Akim Demaille <akim@epita.fr>
18763
18764 * acconfig.h: Remove, no longer used.
18765
aa7815f5
AD
187662000-11-07 Akim Demaille <akim@epita.fr>
18767
18768 * src: s/Copyright (C)/Copyright/g.
18769
5af1f549
AD
187702000-11-07 Akim Demaille <akim@epita.fr>
18771
18772 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18773 defining.
18774 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18775
553e2b22
AD
187762000-11-07 Akim Demaille <akim@epita.fr>
18777
18778 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18779 Merge in a single CPP if/else.
18780
8a4f41d6
AD
187812000-11-07 Akim Demaille <akim@epita.fr>
18782
18783 * src/output.c (output): Remove useless variables.
18784 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18785 argument `data' for consistency with the prototypes.
18786 Qualify it `const'.
18787 (obstack_copy, obstack_copy0): Rename the second argument as
18788 `address' for consistency. Qualify it `const'.
18789 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18790 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18791 `const' their input argument (`data' or `address').
18792 Adjust the corresponding macros to include `const' in casts.
18793
095a3fb5
AD
187942000-11-03 Akim Demaille <akim@epita.fr>
18795
18796 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18797 s/PFILE1/BISON_HAIRY/.
18798 Adjust dependencies.
18799
d1cdce7c
AD
188002000-11-03 Akim Demaille <akim@epita.fr>
18801
090c5ebf 18802 For some reason, this was not applied.
d1cdce7c
AD
18803
18804 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18805 `unlink': it's no longer used.
18806
9311529b
AD
188072000-11-03 Akim Demaille <akim@epita.fr>
18808
18809 * src/files.c (skeleton_find): New function, eved out of...
18810 (open_files, open_extra_files): here.
18811
d8880f69
AD
188122000-11-03 Akim Demaille <akim@epita.fr>
18813
18814 Don't use `atexit'.
18815
18816 * src/files.c (obstack_save): New function.
18817 (done): Rename as...
18818 (output_files): this.
18819 Use `obstack_save'.
18820 * src/main.c (main): Don't use `atexit' to register `done', since
18821 it no longer has to remove tmp files, just call `output_files'
18822 when there are no errors.
18823
0dbb648e
AD
188242000-11-02 Akim Demaille <akim@epita.fr>
18825
18826 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18827 `unlink': it's no longer used.
18828 * src/files.h: Formatting changes.
18829
896fe5c1
AD
188302000-11-02 Akim Demaille <akim@epita.fr>
18831
18832 Remove the last uses of mktemp and unlink/delete.
18833
18834 * src/files.c (fdefines, ftable): Removed.
18835 (defines_ostack, table_obstack): New.
18836 Adjust dependencies of the former into uses of the latter.
18837 * src/output.c (output_short_or_char_table, output_short_table):
18838 Convert to using obstacks.
18839 * src/reader.c (copy_comment2): Accept one FILE * and two
18840 obstacks.
18841 (output_token_defines, reader_output_yylsp): Use obstacks.
18842 * src/system.h (obstack_fgrow3): New.
1f65350a 18843 * po/POTFILES.in: Adjust.
896fe5c1 18844
dd60faec
AD
188452000-11-01 Akim Demaille <akim@epita.fr>
18846
18847 Change each use of `fattrs' into a use of `attrs_obstack'.
18848
18849 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18850 * src/files.c (fattrs): Remove.
18851 (attrs_obstack): New.
18852 Adjust all dependencies.
18853 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18854
8c7ebe49
AD
188552000-11-01 Akim Demaille <akim@epita.fr>
18856
18857 Introduce obstacks.
18858 Change each use of `faction' into a use of `action_obstack'.
18859
18860 * lib/obstack.h, lib/obstack.c: New files.
18861 * src/files.c (faction): Remove.
18862 (action_obstack): New.
18863 Adjust all dependencies.
18864
77aee789
AD
188652000-10-20 Akim Demaille <akim@epita.fr>
18866
18867 * lib/quote.h (PARAMS): New macro. Use it.
18868
43591cec
AD
188692000-10-16 Akim Demaille <akim@epita.fr>
18870
18871 * src/output.c (output_short_or_char_table): New function.
18872 (output_short_table, output_token_translations): Use it.
18873 (goto_actions): Use output_short_table.
18874
1e9798d5
AD
188752000-10-16 Akim Demaille <akim@epita.fr>
18876
18877 * src/symtab.c (bucket_new): New function.
18878 (getsym): Use it.
18879
18880 * src/output.c (output_short_table): New argument to display the
18881 comment associated with the table.
18882 Adjust dependencies.
18883 (output_gram): Use it.
18884 (output_rule_data): Nicer output layout for YYTNAME.
18885
f282676b
AD
188862000-10-16 Akim Demaille <akim@epita.fr>
18887
18888 * src/lex.c (read_typename): New function.
18889 (lex): Use it.
18890 * src/reader.c (copy_dollar): Likewise.
18891
550a72a3
AD
188922000-10-16 Akim Demaille <akim@epita.fr>
18893
18894 * src/reader.c (copy_comment2): Expect the input stream to be on
18895 the `/' which is suspected to open a comment, instead of being
18896 called after `//' or `/*' was read.
18897 (copy_comment, copy_definition, parse_union_decl, copy_action)
18898 (copy_guard): Adjust.
18899
131e2fef
AD
189002000-10-16 Akim Demaille <akim@epita.fr>
18901
18902 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18903 `read_signed_integer'.
18904
79282c5a
AD
189052000-10-16 Akim Demaille <akim@epita.fr>
18906
18907 * src/reader.c (copy_dollar): New function.
18908 (copy_guard, copy_action): Use it.
18909
ff4a34be
AD
189102000-10-16 Akim Demaille <akim@epita.fr>
18911
18912 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18913 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18914 New files, from Fileutils 4.0.27.
18915 * src/main.c (printable_version): Remove.
18916 * src/lex.c, src/reader.c: Use `quote'.
18917
189182000-10-04 Akim Demaille <akim@epita.fr>
18919
18920 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18921
14ded682
AD
189222000-10-04 Akim Demaille <akim@epita.fr>
18923
18924 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18925
8e03724b
AD
189262000-10-04 Akim Demaille <akim@epita.fr>
18927
18928 When a literal string is used to define two different tokens,
18929 `bison -v' segfaults.
18930 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18931
18932 * tests/regression.m4: New file.
18933 Include the core of the sample provided by Piotr Gackiewicz.
18934 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18935 properly.
18936
a9e64249
AD
189372000-10-04 Akim Demaille <akim@epita.fr>
18938
18939 * src/reader.c (parse_expect_decl): Keep `count' within the size
18940 of `buffer'.
18941 From Neil Booth.
18942
da9abf43
AD
189432000-10-02 Paul Eggert <eggert@twinsun.com>
18944
18945 * bison.s1 (yyparse): Assign the default value
18946 unconditionally, to avoid a GCC warning and make the parser a
18947 tad smaller.
18948
c33638bb
AD
189492000-10-02 Akim Demaille <akim@epita.fr>
18950
18951 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18952 options.
18953
444c570a
AD
189542000-10-02 Akim Demaille <akim@epita.fr>
18955
18956 * src/derives.c, src/print.c, src/reduce.c: To ease the
18957 translation, move some `\n' out of the translated strings.
18958
89cab50d
AD
189592000-10-02 Akim Demaille <akim@epita.fr>
18960
18961 The location tracking mechanism is precious for parse error
18962 messages. Nevertheless, it is enabled only when `@n' is used in
18963 the grammar, which is a different issue (you can use it in error
18964 message, but not in the grammar per se). Therefore, there should
18965 be another means to enable it.
18966
18967 * src/getargs.c (getargs): Support `--locations'.
18968 (usage): Report it.
18969 * src/getargs.h (locationsflag): Export it.
18970 * src/lex.c (percent_table): Support `%locations'.
18971 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18972 with `locationsflag'.
18973 * doc/bison.texinfo: Document `--locations' and `%locations'.
18974 Sort the options.
18975 * tests/calc.m4: Test it.
18976
18977 For regularity of the names, replace each
18978 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18979 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18980 In addition replace each `flag' with `_flag'.
18981
d6c2cba0
AD
189822000-10-02 Akim Demaille <akim@epita.fr>
18983
18984 Also test parse error messages, including with YYERROR_VERBOSE.
18985
18986 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18987 associative).
18988 Use it to check the computations.
18989 Use it to check `nonassoc' is honored.
18990 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18991 `--yyerror-verbose'.
18992 (_AT_CHECK_CALC): Adjust to this option.
18993 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18994
5a35a6cb
AD
189952000-10-02 Akim Demaille <akim@epita.fr>
18996
18997 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18998 the latter demonstrates a flaw in the handling of non debugging
18999 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
19000 was used in order to simplify:
19001
19002 #if YYDEBUG
19003 if (yydebug)
19004 {
19005 ...
19006 }
19007 #endif
19008
19009 into
19010
19011 if (yydebug)
19012 {
19013 ...
19014 }
19015
19016 unfortunately this leads to a CPP conflict when
19017 `--name-prefix=foo' is used since it produces `#define yydebug
19018 foodebug'.
19019
19020 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
19021 (YYDPRINTF): New macro.
19022 Spread its use.
19023 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
19024 the bison options.
19025 Also test `--verbose', `--defines' and `--name-prefix'.
19026
71da9eea
AD
190272000-10-02 Akim Demaille <akim@epita.fr>
19028
19029 Improve the readability of the produced parsers.
19030
19031 * src/bison.s1: Formatting changes.
19032 Improve the comment related to the `$' mark.
19033 (yydefault): Don't fall through to `yyresume': `goto' there.
19034 * src/output.c (output_parser): When the `$' is met, skip the end
19035 of its line.
19036 New variable, `number_of_dollar_signs', to check there's exactly
19037 one `$' in the parser skeleton.
19038
95e36146
AD
190392000-10-02 Akim Demaille <akim@epita.fr>
19040
19041 * lib/xstrdup.c: New file, from the fileutils.
19042 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19043 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19044 instead of strlen + xmalloc + strcpy.
19045 * src/symtab.c (copys): Remove, use xstrdup instead.
19046
d7020c20
AD
190472000-10-02 Akim Demaille <akim@epita.fr>
19048
19049 * src/gram.h (associativity): New enum type which replaces the
19050 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19051 `right_assoc', `left_assoc' and `non_assoc'.
19052 Adjust all dependencies.
19053 * src/reader.c: Formatting changes.
19054 (LTYPESTR): Don't define it, use it as a literal in
19055 `reader_output_yylsp'.
19056 * src/symtab.h (symbol_class): New enum type which replaces the
19057 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19058 `sunknown', `stoken and `snterm'.
19059
1916f98e
AD
190602000-10-02 Akim Demaille <akim@epita.fr>
19061
19062 * src/getargs.c (fixed_outfiles): Rename as...
19063 (yaccflag): for consistency and accuracy.
19064 Adjust dependencies.
19065
d7913476
AD
190662000-10-02 Akim Demaille <akim@epita.fr>
19067
19068 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19069 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19070 difficult and introduced a lot of core dump. It turns out that
19071 Bison used an implementation of `xmalloc' based on `calloc', and
19072 at various places it does depend upon the initialization to 0. I
19073 have not tried to isolate the pertinent places, and all the former
19074 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19075 someone should address this issue.
19076
19077 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19078 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19079 files.
19080 Adjust dependencies.
19081 * src/warshall.h: New file.
19082 Propagate.
19083
340ef489
AD
190842000-10-02 Akim Demaille <akim@epita.fr>
19085
19086 Various anti-`extern in *.c' changes.
19087
19088 * src/system.h: Include `assert.h'.
19089
b2ca4022
AD
190902000-10-02 Akim Demaille <akim@epita.fr>
19091
19092 * src/state.h (nstates, final_state, first_state, first_shift)
19093 (first_reduction): Move their exportation from here...
19094 * src/LR0.h: to here.
19095 Adjust dependencies.
19096 * src/getargs.c (statisticsflag): New variable.
19097 Add support for `--statistics'.
19098 Adjust dependencies.
19099
19100 Remove a lot of now useless `extern' statements in most files.
19101
403b315b
AD
191022000-10-02 Akim Demaille <akim@epita.fr>
19103
19104 * src/LR0.h: New file.
19105 Propagate its use.
19106
07a58c13
AD
191072000-10-02 Akim Demaille <akim@epita.fr>
19108
19109 * src/print.h: New file.
19110 Propagate its use.
19111 * src/print.c: Formatting and ordering changes.
19112 (verbose, terse): Replace with...
19113 (print_results): this new function.
19114 Adjust dependencies.
19115
0619caf0
AD
191162000-10-02 Akim Demaille <akim@epita.fr>
19117
19118 * src/conflicts.c (conflict_report): New function.
19119 (conflict_log, verbose_conflict_log): Replace with...
19120 (print_conflicts): this function.
19121 Adjust dependencies.
19122 * src/conflicts.h: New file.
19123 Propagate its inclusion.
19124
3519ec76
AD
191252000-10-02 Akim Demaille <akim@epita.fr>
19126
19127 * src/nullable.h: New file.
19128 Propagate its inclusion.
19129 * src/nullable.c: Formatting changes.
19130
015acc48
AD
191312000-10-02 Akim Demaille <akim@epita.fr>
19132
19133 * src/reduce.h: New file.
19134 Propagate its inclusion.
19135 * src/reduce.c: Topological sort and other formatting changes.
19136 (bool, TRUE, FALSE): Move their definition to...
19137 * src/system.h: here.
19138
8963a27b
AD
191392000-10-02 Akim Demaille <akim@epita.fr>
19140
19141 * src/files.c: Formatting changes.
19142 (tryopen, tryclose, openfiles): Rename as...
19143 (xfopen, xfclose, open_files): this.
19144 (stringappend): static.
19145 * src/files.h: Complete the list of exported symbols.
19146 Propagate its use.
19147
a70083a3
AD
191482000-10-02 Akim Demaille <akim@epita.fr>
19149
19150 * src/reader.h: New file.
19151 Propagate its use instead of tedious list of `extern' and
19152 prototypes.
19153 * src/reader.c: Formatting changes, topological sort,
19154 s/register//.
19155
abadc117
AD
191562000-10-02 Akim Demaille <akim@epita.fr>
19157
19158 * src/lex.h: Prototype `lex.c' exported functions.
19159 * src/reader.c: Adjust.
19160 * src/lex.c: Formatting changes.
19161 (safegetc): Rename as...
19162 (xgetc): this.
19163
720d742f
AD
191642000-10-02 Akim Demaille <akim@epita.fr>
19165
19166 * src/lalr.h: New file.
19167 Propagate its inclusion instead of prototypes and `extern'.
19168 * src/lalr.c: Formatting changes, topological sorting etc.
19169
f2acea59
AD
191702000-10-02 Akim Demaille <akim@epita.fr>
19171
19172 * src/output.c (token_actions): Introduce a temporary array,
19173 YYDEFACT, that makes it possible for this function to use
19174 output_short_table.
19175
d019d655
AD
191762000-10-02 Akim Demaille <akim@epita.fr>
19177
19178 `user_toknums' is output as a `short[]' in `output.c', while it is
19179 defined as a `int[]' in `reader.c'. For consistency with the
19180 other output tables, `user_toknums' is now defined as a table of
19181 shorts.
19182
19183 * src/reader.c (user_toknums): Be a short table instead of an int
19184 table.
19185 Adjust dependencies.
19186
19187 Factor the short table outputs.
19188
19189 * src/output.c (output_short_table): New function.
19190 * src/output.c (output_gram, output_stos, output_rule_data)
19191 (output_base, output_table, output_check): Use it.
19192
6c89f1c1
AD
191932000-10-02 Akim Demaille <akim@epita.fr>
19194
19195 * src/output.c (output): Topological sort of the functions, in
19196 order to get rid of the `static' prototypes.
19197 No longer use `register'.
19198 * src/output.h: New file.
19199 Propagate its inclusion in files explicitly prototyping functions
19200 from output.c.
19201
d9efd181
AD
192022000-09-21 Akim Demaille <akim@epita.fr>
19203
19204 * src/atgeneral.m4: Update from Autoconf.
19205
c29240e7 192062000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
19207
19208 * src/closure.h: New file.
19209 * src/closure.c: Formatting changes, topological sort over the
19210 functions, use of closure.h.
19211 (initialize_closure, finalize_closure): Rename as...
19212 (new_closure, free_closure): these. Adjust dependencies.
19213 * src/LR0.c: Formatting changes, topological sort, use of
19214 cloture.h.
19215 (initialize_states): Rename as...
19216 (new_states): this.
19217 * src/Makefile.am (noinst_HEADERS): Adjust.
19218
499daa50
AD
192192000-09-20 Akim Demaille <akim@epita.fr>
19220
19221 * src/acconfig.h: Don't protect config.h against multiple
19222 inclusion.
19223 Don't define PARAMS.
19224 * src/system.h: Define PARAMS.
19225 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19226 purpose of config.h. system.h must not try to fix wrong
19227 definitions in config.h.
19228
cc84fd5d
AD
192292000-09-20 Akim Demaille <akim@epita.fr>
19230
19231 * src/derives.h: New file.
19232 * src/main.c, src/derives.h: Use it.
19233 Formatting changes.
19234 * src/Makefile.am (noinst_HEADERS): Adjust.
19235
db5b3a89
AD
192362000-09-20 Akim Demaille <akim@epita.fr>
19237
19238 * tests/atgeneral.m4: Update from Autoconf.
19239 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19240 (AT_CHECK_CALC): New macros.
19241 Use these macros to test bison with options `', `--raw',
19242 `--debug', `--yacc', `--yacc --debug'.
19243
ceed8467
AD
192442000-09-19 Akim Demaille <akim@epita.fr>
19245
19246 * src/output.c: Formatting changes.
19247 * src/machine.h: Remove, leaving its contents in...
19248 * src/system.h: here.
19249 Include stdio.h.
19250 Adjust all dependencies on stdio.h and machine.h.
19251 * src/getargs.h: New file.
19252 Let all `extern' declarations about getargs.c be replaced with
19253 inclusion of `getargs.h'.
19254 * src/Makefile.am (noinst_HEADERS): Adjust.
19255
19256 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19257 scope.
19258 (yyerror): Returns void, not int.
19259 * doc/bison.texinfo: Formatting changes.
19260
05a1d24b
AD
192612000-09-19 Akim Demaille <akim@epita.fr>
19262
19263 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19264 portable.
19265
cbd25751
AD
192662000-09-18 Akim Demaille <akim@epita.fr>
19267
19268 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19269 * src/Makefile.am (INCLUDES): Don't.
19270 Be ready to fetch headers in lib/.
19271
13863333
AD
192722000-09-18 Akim Demaille <akim@epita.fr>
19273
19274 * doc/bison.texinfo: Update the copyright.
19275 ANSIfy and GNUify the examples.
19276 Remove the old menu.
19277
0d533154
AD
192782000-09-18 Akim Demaille <akim@epita.fr>
19279
19280 First set of tests: use the `calc' example from the documentation.
19281
19282 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19283 is defined only when YYDEBUG is.
19284 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19285 * src/files.c (tryopen, tryclose): Formatting changes.
19286 Move to the top and be static.
19287 * src/reader.c (read_signed_integer): Likewise.
19288 * tests/calc.m4: New file.
19289 * Makefile.am, suite.m4: Adjust.
19290 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19291
e79137ac
AD
192922000-09-18 Akim Demaille <akim@epita.fr>
19293
19294 Add support for an Autotest test suite for Bison.
19295
19296 * m4/m4.m4, m4/atconfig.m4: New files.
19297 * m4/Makefile.am (EXTRA_DIST): Adjust.
19298 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19299 files.
19300 * src/getargs.c: Display a more standard --version message.
19301 * src/reader.c (reader): Formatting changes.
19302 No longer depend upon VERSION_STRING.
19303 * configure.in: No longer use `dnl'.
19304 Set up the test suite and the new directory `tests/.
19305 (VERSION_STRING): Remove.
19306
27821bff
AD
193072000-04-14 Akim Demaille <akim@epita.fr>
19308
19309 * src/reader.c (copy_comment2): New function, same as former
19310 `copy_comment', but outputs into two FILE *.
19311 (copy_comment): Use it.
19312 (parse_union_decl): Use it.
19313 (get_type, parse_start_decl): Use the same `invalid' message.
19314 (parse_start_decl, parse_union_decl): Use the same `multiple'
19315 message.
19316 (parse_union_decl, copy_guard, copy_action): Use the same
19317 `unmatched' message.
19318 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19319
cfe5fbc0
AD
193202000-03-31 Akim Demaille <akim@epita.fr>
19321
19322 * src/files.c (tryopen, tryclose): Move to the top.
19323 Be static.
19324
cb7db13e
AD
193252000-03-31 Akim Demaille <akim@epita.fr>
19326
19327 * src/main.c (main): Don't call `done', exit does it.
19328
a0f6b076
AD
193292000-03-31 Akim Demaille <akim@epita.fr>
19330
36281465
AD
19331 * allocate.c: s/return (foo)/return foo/.
19332 * lalr.c: Likewise.
19333 * LR0.c: Likewise.
19334 * output.c: Likewise.
19335 * reader.c: Likewise.
19336 * symtab.c: Likewise.
19337 * vmsgetargs.c: Likewise.
19338
193392000-03-31 Akim Demaille <akim@epita.fr>
19340
19341 Clean up the error reporting functions.
a0f6b076
AD
19342
19343 * src/report.c: New file.
19344 * src/report.h: Likewise.
19345 * src/Makefile.am: Adjust.
19346 * m4/error.m4: New file.
19347 * m4/Makefile.am: Adjust.
19348 * configure.in (jm_PREREQ_ERROR): Call it.
19349 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19350 Remove.
19351 (fatal, fatals): Remove. All callers use complain.c::fatal.
19352 (warn, warni, warns, warnss, warnss): Remove. All callers use
19353 complain.c::complain.
19354 (toomany): Remove, use fatal instead.
19355 * src/files.c (done): No argument, use complain_message_count.
19356 * src/main.c (main): Register `done' to `atexit'.
19357
19358 * src/getargs.c (usage): More `fputs', less `fprintf'.
19359
18539825
AD
193602000-03-28 Akim Demaille <akim@epita.fr>
19361
19362 * lib/: New directory.
19363 * Makefile.am (SUBDIRS): Adjust.
19364 * configure.in: Adjust.
19365 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19366 useless.
19367 * src/alloca.c: Moved to lib/.
19368 * src/getopt.c: Likewise.
19369 * src/getopt1.c: Likewise.
19370 * src/getopt.h: Likewise.
19371 * src/ansi2knr.c: Likewise.
19372 * src/ansi2knr.1: Likewise.
19373 * src/Makefile.am: Adjust.
19374 * lib/Makefile.am: New file.
19375
9f306f2a
AD
193762000-03-28 Akim Demaille <akim@epita.fr>
19377
19378 * src/getargs.c (usage): Refresh the help message.
19379
0ba347b6
AD
193802000-03-17 Akim Demaille <akim@epita.fr>
19381
19382 * src/getopt1.c: Updated from textutils 2.0e
19383 * src/getopt.c: Likewise.
19384 * src/getopt.h: Likewise.
19385
dbe7f271
AD
193862000-03-17 Akim Demaille <akim@epita.fr>
19387
19388 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19389 the file name, not the whole `#line LINE FILE'.
19390
75bbe78d
AD
193912000-03-17 Akim Demaille <akim@epita.fr>
19392
19393 On syntax errors, report the token on which we choked.
19394
aa5fd0ee
AD
19395 * src/bison.s1 (yyparse): In the label yyerrlab, when
19396 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 19397
7b306f52
AD
193982000-03-17 Akim Demaille <akim@epita.fr>
19399
aa5fd0ee 19400 * src/reader.c (copy_at): New function.
7b306f52
AD
19401 (copy_guard): Use it.
19402 (copy_action): Use it.
19403
e87b5700
AD
194042000-03-17 Akim Demaille <akim@epita.fr>
19405
19406 Be kind to translators, save some useless translations.
19407
aa5fd0ee 19408 * src/main.c (banner): New function.
e87b5700
AD
19409 (fatal_banner): Use it.
19410 (warn_banner): Use it.
19411
ae3c3164
AD
194122000-03-17 Akim Demaille <akim@epita.fr>
19413
aa5fd0ee
AD
19414 * src/reader.c (copy_definition): Use copy_string and
19415 copy_comment. Removed now unused `match', `ended',
19416 `cplus_comment'.
ae3c3164
AD
19417 (copy_comment, copy_string): Moved, to be visible from
19418 copy_definition.
19419
4dc58e7c
AD
194202000-03-17 Akim Demaille <akim@epita.fr>
19421
aa5fd0ee
AD
19422 * src/reader.c (copy_string): Declare `static inline'. No
19423 problems with inline, since it is checked by configure.
4dc58e7c
AD
19424 (copy_comment): Likewise.
19425
0a6384c4
AD
194262000-03-17 Akim Demaille <akim@epita.fr>
19427
aa5fd0ee 19428 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 19429
3cef001a
AD
194302000-03-17 Akim Demaille <akim@epita.fr>
19431
aa5fd0ee 19432 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
19433 (copy_action): Use it. Removed now unused `match', `ended',
19434 `cplus_comment'.
19435 (copy_guard): Likewise.
19436
ca36d2ef
AD
194372000-03-17 Akim Demaille <akim@epita.fr>
19438
aa5fd0ee 19439 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
19440 (copy_action): Use it.
19441 (copy_guard): Likewise.
19442
6666f98f
AD
194432000-03-17 Akim Demaille <akim@epita.fr>
19444
19445 Change the handling of @s so that they behave exactly like $s.
19446 There is now a pseudo variable @$ (readble and writable), location
19447 of the lhs of the rule (by default ranging from the location of
19448 the first symbol of the rhs, to the location of the last symbol,
19449 or, if the rhs is empty, YYLLOC).
19450
19451 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19452 yyval.
19453 (yyparse): When providing a default semantic action, provide a
19454 default location action.
19455 (after the $): No longer change `*YYLSP', just stack YYLOC the
19456 same way you stack YYVAL.
19457 * src/reader.c (read_declarations): Use warns.
19458 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19459 (copy_action, case '@'): Likewise.
19460 Use a standard error message, to save useless work from
19461 translators.
19462
41aca2e0
AD
194632000-03-17 Akim Demaille <akim@epita.fr>
19464
aa5fd0ee
AD
19465 * src/bison.s1: Formatting and cosmetics changes.
19466 * src/reader.c: Likewise.
41aca2e0
AD
19467 Update the Copyright notice.
19468
dc08c1d5
AD
194692000-03-17 Akim Demaille <akim@epita.fr>
19470
aa5fd0ee
AD
19471 * src/bison.s1 (#line): All set to `#line' only, since the
19472 Makefile now handles them.
dc08c1d5 19473
9ee3c97b
AD
194742000-03-16 Akim Demaille <akim@epita.fr>
19475
19476 * src/output.c (output_rule_data): Output the documentation of
19477 some of the tables.
19478 (Copyright notice): Update.
19479 Formatting changes.
19480
0de741ca
AD
194812000-03-16 Akim Demaille <akim@epita.fr>
19482
19483 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19484 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19485 One `#if YYDEBUG' remains, since it uses variables which are
19486 defined only if `YYDEBUG != 0'.
19487
bb10be54
AD
194882000-03-16 Akim Demaille <akim@epita.fr>
19489
19490 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19491 and related variables so that the similarities are highlighted.
19492
b07b484a
AD
194932000-03-16 Akim Demaille <akim@epita.fr>
19494
19495 * src/bison.s1: Properly indent CPP directives.
19496
361f60b3
AD
194972000-03-16 Akim Demaille <akim@epita.fr>
19498
19499 * src/bison.s1: Properly indent the `alloca' CPP section.
19500
8c44d3ec
AD
195012000-03-16 Akim Demaille <akim@epita.fr>
19502
19503 Do not hard code values of directories in `configure.in'.
19504 Update the `configure' tool chain.
19505
19506 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19507 src/makefile.am.
19508 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19509 (AC_OUTPUT): Add m4/Makefile.
19510 Bump to bison 1.28a, 1.29 has never been released.
19511 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19512 handled via src/Makefile.am.
19513 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19514 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19515 autoheader.
19516 * Makefile.am (SUBDIRS): Add m4.
19517 (ACLOCAL_AM_FLAGS): New variable.
19518 (AUTOMAKE_OPTIONS): Add check-news.
19519 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19520 the proper line number and file name.
19521 (DEFS): Propagate the location of bison library files and of the
19522 locale files.
19523 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19524 builddir.
19525 * acinclude.m4: Remove, replaced by the directory m4.
19526 * m4/Makefile.am (EXTRA_DIST): New variable.
19527 * m4/gettext.m4: New file, from the fileutils.
19528 * m4/lcmessage.m4: Likewise
19529 * m4/progtest.m4: Likewise.
19530 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19531
f95997e7
AD
195322000-03-10 Akim Demaille <akim@epita.fr>
19533
19534 * src/closure.c:
19535 Formatting changes of various comments.
19536 Respect the GNU coding standards at various places.
19537 Don't use `_()' when no translation is needed.
19538
195391999-12-13 Jesse Thilo <jthilo@gnu.org>
19540
19541 * src/files.c:
19542 OS/2 honors TMPDIR environment variable.
19543
195441999-12-13 Jesse Thilo <jthilo@gnu.org>
19545
19546 * doc/bison.texinfo: Tweaked spelling and grammar.
19547 Updated ISBN.
19548 Removed reference to price of printed copy.
19549 Mention BISON_SIMPLE and BISON_HAIRY.
19550
195511999-12-13 Jesse Thilo <jthilo@gnu.org>
19552
19553 * configure.in, NEWS:
19554 Bison 1.29 released.
19555
195561999-10-27 Jesse Thilo <jthilo@gnu.org>
19557
19558 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19559 Added reference card.
19560
195611999-07-26 Jesse Thilo <jthilo@gnu.org>
19562
19563 * po/ru.po: Added Russian translation.
19564
195651999-07-26 Jesse Thilo <jthilo@gnu.org>
19566
19567 * configure.in: Added Russian translation.
19568
195691999-07-06 Jesse Thilo <jthilo@gnu.org>
19570
19571 * configure.in, NEWS, README:
19572 Released version 1.28.
19573
195741999-06-14 Jesse Thilo <jthilo@gnu.org>
19575
19576 * src/system.h:
19577 Squashed redefinition warning on some systems.
19578
19579 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19580 Have configure build version string instead of relying on ANSI string
19581 concatentation.
19582
195831999-06-14 Jesse Thilo <jthilo@gnu.org>
19584
19585 * po/POTFILES.in: Got rid of version.c.
19586
195871999-06-14 Jesse Thilo <jthilo@gnu.org>
19588
19589 * acconfig.h, configure.in:
19590 Have configure build version string instead of relying on ANSI string
19591 concatentation.
19592
195931999-06-08 Jesse Thilo <jthilo@gnu.org>
19594
19595 * doc/bison.1:
19596 Dropped mention of `+' for long-named options.
19597
195981999-05-30 Jesse Thilo <jthilo@gnu.org>
19599
19600 * src/files.c: Added <unistd.h> for unlink().
19601
19602 * src/Makefile.am, src/system.h:
19603 I18n fixes.
19604
196051999-05-30 Jesse Thilo <jthilo@gnu.org>
19606
19607 * README: Added a FAQ list.
19608
19609 * configure.in, acconfig.h:
19610 I18n fixes.
19611
196121999-05-30 Jesse Thilo <jthilo@gnu.org>
19613
19614 * doc/FAQ, doc/Makefile.am:
19615 Added a FAQ list.
19616
196171999-05-19 Jesse Thilo <jthilo@gnu.org>
19618
19619 * src/alloc.h, src/symtab.h, src/version.c:
19620 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19621
196221999-04-18 Jesse Thilo <jthilo@gnu.org>
19623
19624 * src/.cvsignore, src/Makefile.am:
19625 Reorganized: sources in `src', documentation in `doc'.
19626
19627 * src/lex.c (literalchar):
19628 fixed the code for escaping double quotes (thanks
19629 Jonathan Czisny.)
19630
196311999-04-18 Jesse Thilo <jthilo@gnu.org>
19632
19633 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19634 Adjusted paths to reflect directory reorganization.
19635
196361999-04-18 Jesse Thilo <jthilo@gnu.org>
19637
19638 * doc/.cvsignore, doc/Makefile.am:
19639 Reorganized: sources in `src', documentation in `doc'.
19640
196411999-04-18 Jesse Thilo <jthilo@gnu.org>
19642
19643 * configure.in:
19644 Updated AC_INIT file to reflect directory reorganization.
19645
19646 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19647 Reorganized: sources in `src', documentation in `doc'.
19648
196491999-04-13 Jesse Thilo <jthilo@gnu.org>
19650
19651 * src/allocate.c:
19652 Don't declare calloc() and realloc() if not necessary.
19653
196541999-04-13 Jesse Thilo <jthilo@gnu.org>
19655
19656 * configure.in, acconfig.h, acinclude.m4:
19657 Don't declare calloc() and realloc() if not necessary.
19658
196591999-03-23 Jesse Thilo <jthilo@gnu.org>
19660
19661 * po/.cvsignore: Added i18n support.
19662
196631999-03-23 Jesse Thilo <jthilo@gnu.org>
19664
19665 * acconfig.h, configure.in, Makefile.am:
19666 Added i18n support.
19667
196681999-03-22 Jesse Thilo <jthilo@gnu.org>
19669
19670 * src/bison.s1: Fixed #line numbers.
19671
196721999-03-15 Jesse Thilo <jthilo@gnu.org>
19673
19674 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19675 Added PO files from Translation Project.
19676
196771999-03-03 Jesse Thilo <jthilo@gnu.org>
19678
19679 * Makefile.am:
19680 Added support for non-ANSI compilers (ansi2knr).
19681
196821999-02-16 Jesse Thilo <jthilo@gnu.org>
19683
19684 * configure.in: Bumped version number to 1.27.
19685
19686 * Makefile.am:
19687 Added `bison.simple' to list of files removed by `make distclean'.
19688
196891999-02-12 Jesse Thilo <jthilo@gnu.org>
19690
19691 * src/files.c, src/files.h:
19692 Defined locations of parser files in config.h instead of Makefile.
19693
196941999-02-12 Jesse Thilo <jthilo@gnu.org>
19695
19696 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19697 Defined locations of parser files in config.h instead of Makefile.
19698
196991999-02-09 Jesse Thilo <jthilo@gnu.org>
19700
19701 * Makefile.am:
19702 Removed inappropriate use of $< macro.
19703
197041999-02-05 Jesse Thilo <jthilo@gnu.org>
19705
19706 * po/Makefile.in.in, po/POTFILES.in:
19707 Add `po' directory skeleton.
19708
197091999-01-27 Jesse Thilo <jthilo@gnu.org>
19710
19711 * README: Document help-bison list.
19712
19713 * configure.in: Add check for mkstemp().
19714
197151999-01-20 Jesse Thilo <jthilo@gnu.org>
19716
19717 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19718 Hush a few compiler warnings.
19719
19720 * src/files.c:
19721 Add tryclose(), which verifies that fclose was successful.
19722 Hush a couple of compiler warnings.
19723
197241999-01-20 Jesse Thilo <jthilo@gnu.org>
19725
19726 * Makefile.am, OChangeLog:
19727 ChangeLog is now automatically generated. Include the old version as
19728 OChangeLog.
19729
197301999-01-14 Jesse Thilo <jthilo@gnu.org>
19731
19732 * 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:
19733 Update FSF address.
19734
197351999-01-14 Jesse Thilo <jthilo@gnu.org>
19736
19737 * doc/bison.texinfo: Fix formatting glitch.
19738
19739 * doc/bison.texinfo: Update FSF address.
19740
197411999-01-14 Jesse Thilo <jthilo@gnu.org>
19742
19743 * acconfig.h: Update FSF address.
19744
197451999-01-08 Jesse Thilo <jthilo@gnu.org>
19746
19747 * src/system.h:
19748 Don't define PACKAGE here, since config.h defines it.
19749
197501998-12-30 Jesse Thilo <jthilo@gnu.org>
19751
19752 * src/reader.c: Update copyright date.
19753
19754 * src/main.c:
19755 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19756 favor of output directly to stderr (avoids buffer overruns).
19757
19758 * src/reader.c: Some checks for premature EOF.
19759
19760 * 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:
19761 Use prototypes if the compiler understands them.
19762
19763 * src/files.c: Honor TMPDIR on Unix hosts.
19764 Use prototypes if the compiler understands them.
19765
19766 * src/reader.c:
19767 Fix a couple of buffer overrun bugs.
19768 Use prototypes if the compiler understands them.
19769
19770 * src/system.h: Include unistd.h and ctype.h.
19771 Use #ifdef instead of #if for NLS symbols.
19772
197731998-12-30 Jesse Thilo <jthilo@gnu.org>
19774
19775 * doc/bison.texinfo:
19776 Delete comment "consider using @set for edition number, etc..." since
19777 we now are doing so.
19778
197791998-12-30 Jesse Thilo <jthilo@gnu.org>
19780
19781 * configure.in:
19782 Use prototypes if the compiler understands them.
19783
19784 * NEWS: Document 1.26 highlights.
19785
19786 * Makefile.am: Require Automake 1.3 or later.
19787
19788 * acconfig.h:
19789 Use prototypes if the compiler understands them.
19790
197911998-12-29 Jesse Thilo <jthilo@gnu.org>
19792
19793 * src/version.c:
19794 Use VERSION symbol from automake for version number.
19795
197961998-12-29 Jesse Thilo <jthilo@gnu.org>
19797
19798 * acconfig.h, configure.in, version.cin:
19799 Use VERSION symbol from automake for version number.
19800
198011998-11-28 Jesse Thilo <jthilo@gnu.org>
19802
19803 * Makefile.am:
19804 Distribute original version of simple parser (bison.s1), not built
19805 version (bison.simple).
19806
198071998-11-28 Jesse Thilo <jthilo@gnu.org>
19808
19809 * doc/bison.texinfo: Add info dir entry.
19810
19811 * doc/bison.texinfo:
19812 Let automake put version number into documentation.
19813
198141998-11-26 Jesse Thilo <jthilo@gnu.org>
19815
19816 * src/bison.cld, src/build.com, src/vmshlp.mar:
19817 Add non-RCS files from /gd/gnu/bison.
19818
198191998-11-26 Jesse Thilo <jthilo@gnu.org>
19820
19821 * doc/bison.1:
19822 Document the BISON_HAIRY and BISON_SIMPLE variables.
19823
198241998-11-25 Jesse Thilo <jthilo@gnu.org>
19825
19826 * src/version.c: Build version.c automatically.
19827
19828 * src/reader.c:
19829 Fix token numbering (used to start at 258, not 257).
19830
19831 * src/system.h: Include config.h.
19832
19833 * src/getargs.c: Update bug report address.
19834
19835 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19836 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19837
198381998-11-25 Jesse Thilo <jthilo@gnu.org>
19839
19840 * Makefile.am:
19841 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19842
19843 * configure.in, version.cin:
19844 Build version.c automatically.
19845
19846 * AUTHORS: Add AUTHORS file.
19847
19848 * README: Update bug report address.
19849
19850 * bison.simple:
19851 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19852
19853 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19854 Add automake stuff.
19855
198561998-11-25 Jesse Thilo <jthilo@gnu.org>
19857
19858 * doc/bison.texinfo: Clean up some formatting.
19859
198601998-05-05 Richard Stallman <rms@gnu.org>
19861
19862 * doc/bison.texinfo:
19863 Explain better why to make a pure parser.
19864
198651998-01-05 Richard Stallman <rms@gnu.org>
19866
19867 * src/files.c (openfiles):
19868 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19869 find a temporary directory, if possible. Do not unlink files while
19870 they are open.
19871
198721997-08-25 Richard Stallman <rms@gnu.org>
19873
19874 * src/reader.c (stack_offset;):
19875 Change some warni to warns.
19876
19877 * src/lex.c (literalchar): Use warns, not warni.
19878
198791997-06-28 Richard Stallman <rms@gnu.org>
19880
19881 * src/bison.s1: Add a Bison version comment.
19882
19883 * src/main.c (fatal, warn, berror):
19884 Use program_name.
19885
198861997-06-28 Richard Stallman <rms@gnu.org>
19887
19888 * Makefile.in (bison_version): New variable.
19889 (dist): Use that variable.
19890 (bison.s1): Substitute the Bison version into bison.simple.
19891
19892 * bison.simple: Add a Bison version comment.
19893
198941997-06-18 Richard Stallman <rms@gnu.org>
19895
19896 * src/main.c (fatal, warn, berror):
19897 Make error messages standard.
19898 (toomany): Improve error message text.
19899
19900 * 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:
19901 new.h renamed to alloc.h.
19902
199031997-06-18 Richard Stallman <rms@gnu.org>
19904
19905 * Makefile.in: new.h renamed to alloc.h.
19906
199071997-05-24 Richard Stallman <rms@gnu.org>
19908
19909 * src/lex.c (literalchar):
19910 Fix the code for escaping \, " and '.
19911
19912 (lex): Avoid trouble when there are many chars
19913 to discard in a char literal with just several chars in it.
19914
199151997-05-17 Richard Stallman <rms@gnu.org>
19916
19917 * src/bison.s1:
19918 Use malloc, if using alloca is troublesome.
19919 (YYSTACK_USE_ALLOCA): New flag macro.
19920 Define it for some systems and compilers.
19921 (YYSTACK_ALLOC): New macro.
19922 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19923 If it was malloc'd, free it.
19924
199251997-05-17 Richard Stallman <rms@gnu.org>
19926
19927 * bison.simple:
19928 Use malloc, if using alloca is troublesome.
19929 (YYSTACK_USE_ALLOCA): New flag macro.
19930 Define it for some systems and compilers.
19931 (YYSTACK_ALLOC): New macro.
19932 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19933 If it was malloc'd, free it.
19934
199351997-04-23 Richard Stallman <rms@gnu.org>
19936
19937 * src/bison.s1:
19938 (alloca) [__hpux]: Always define as __builtin_alloca.
19939
199401997-04-23 Richard Stallman <rms@gnu.org>
19941
19942 * bison.simple:
19943 (alloca) [__hpux]: Always define as __builtin_alloca.
19944
199451997-04-22 Richard Stallman <rms@gnu.org>
19946
19947 * src/bison.s1:
19948 [__hpux]: Include alloca.h (right for HPUX 10)
19949 instead of declaring alloca (right for HPUX 9).
19950
19951 * src/bison.s1 (__yy_memcpy):
19952 Declare arg `count' as unsigned int.
19953 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19954
199551997-04-22 Richard Stallman <rms@gnu.org>
19956
19957 * bison.simple:
19958 [__hpux]: Include alloca.h (right for HPUX 10)
19959 instead of declaring alloca (right for HPUX 9).
19960
19961 * bison.simple (__yy_memcpy):
19962 Declare arg `count' as unsigned int.
19963 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19964
199651997-01-03 Richard Stallman <rms@gnu.org>
19966
19967 * src/allocate.c: [__STDC__ or _MSC_VER]:
19968 Declare calloc and realloc to return void *.
19969
199701997-01-02 Richard Stallman <rms@gnu.org>
19971
19972 * src/system.h:
19973 [_MSC_VER]: Include stdlib.h and process.h.
19974 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19975
19976 * src/main.c (main): Return FAILURE as a value.
19977 (printable_version): Declare arg as int, not char.
19978
199791997-01-02 Richard Stallman <rms@gnu.org>
19980
19981 * Makefile.in (dist):
19982 Explicitly check for symlinks, and copy them.
19983
199841996-12-19 Richard Stallman <rms@gnu.org>
19985
19986 * src/files.c:
19987 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19988
199891996-12-18 Paul Eggert <eggert@gnu.org>
19990
19991 * src/bison.s1 (yyparse):
19992 If __GNUC__ and YYPARSE_PARAM are both defined,
19993 declare yyparse to have a void * argument.
19994
199951996-12-18 Paul Eggert <eggert@gnu.org>
19996
19997 * bison.simple (yyparse):
19998 If __GNUC__ and YYPARSE_PARAM are both defined,
19999 declare yyparse to have a void * argument.
20000
200011996-12-17 Richard Stallman <rms@gnu.org>
20002
20003 * src/reduce.c (nbits): Add some casts.
20004
200051996-08-12 Richard Stallman <rms@gnu.org>
20006
20007 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
20008
200091996-08-12 Richard Stallman <rms@gnu.org>
20010
20011 * bison.simple: Test _MSDOS as well as _MSDOS_.
20012
200131996-07-31 Richard Stallman <rms@gnu.org>
20014
20015 * src/bison.s1:
20016 [__sun && __i386]: Include alloca.h.
20017
200181996-07-31 Richard Stallman <rms@gnu.org>
20019
20020 * bison.simple:
20021 [__sun && __i386]: Include alloca.h.
20022
200231996-07-30 Richard Stallman <rms@gnu.org>
20024
20025 * src/bison.s1: Comment change.
20026
20027 * src/bison.s1: Test _MSDOS_, not MSDOS.
20028
200291996-07-30 Richard Stallman <rms@gnu.org>
20030
20031 * bison.simple: Comment change.
20032
20033 * bison.simple: Test _MSDOS_, not MSDOS.
20034
200351996-06-01 Richard Stallman <rms@gnu.org>
20036
20037 * 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:
20038 Insert `_' macro around many string constants.
20039
20040 * src/main.c:
20041 Insert `_' macro around many string constants.
20042
20043 (main): Call setlocale, bindtextdomain and textdomain.
20044
20045 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20046 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20047 [ENABLE_NLS]: Include libintl.h.
20048 [ENABLE_NLS] (gettext): Define.
20049 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20050 (N_, PACKAGE, LOCALEDIR): New macros.
20051
200521996-06-01 Richard Stallman <rms@gnu.org>
20053
20054 * POTFILES.in: New file.
20055
20056 * Makefile.in (allocate.o):
20057 Define target explicitly.
20058
20059 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20060 (LDFLAGS): Set to @LDFLAGS@.
20061 (configure): Run autoconf only if preceding `cd' succeeds.
20062 (bison.s1): Redirect output to temporary file then move the
20063 temporary to the target, rather than redirecting directly to bison.s1.
20064 (clean): Remove config.status and config.log.
20065 (distclean): Don't remove config.status here.
20066
200671996-05-12 Richard Stallman <rms@gnu.org>
20068
20069 * src/bison.s1:
20070 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20071
200721996-05-12 Richard Stallman <rms@gnu.org>
20073
20074 * bison.simple:
20075 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20076
200771996-05-11 Richard Stallman <rms@gnu.org>
20078
20079 * src/bison.s1 (__yy_memcpy):
20080 Really reorder the args, as was supposedly done on Feb 14 1995.
20081 (yyparse): Calls changed accordingly.
20082
200831996-05-11 Richard Stallman <rms@gnu.org>
20084
20085 * Makefile.in (dist): Don't use $(srcdir).
20086
20087 * bison.simple (__yy_memcpy):
20088 Really reorder the args, as was supposedly done on Feb 14 1995.
20089 (yyparse): Calls changed accordingly.
20090
200911996-01-27 Richard Stallman <rms@gnu.org>
20092
20093 * src/output.c (output_rule_data):
20094 Test YYERROR_VERBOSE in the conditional
20095 around the definition of ttyname.
20096
200971995-12-29 Richard Stallman <rms@gnu.org>
20098
20099 * src/bison.s1:
20100 Fix line numbers in #line commands.
20101
201021995-12-29 Richard Stallman <rms@gnu.org>
20103
20104 * bison.simple:
20105 Fix line numbers in #line commands.
20106
201071995-12-27 Richard Stallman <rms@gnu.org>
20108
20109 * src/bison.s1 (YYPARSE_PARAM_DECL):
20110 In C++, make it always null.
20111 (YYPARSE_PARAM_ARG): New macro.
20112 (yyparse): Use YYPARSE_PARAM_ARG.
20113
201141995-12-27 Richard Stallman <rms@gnu.org>
20115
20116 * bison.simple (YYPARSE_PARAM_DECL):
20117 In C++, make it always null.
20118 (YYPARSE_PARAM_ARG): New macro.
20119 (yyparse): Use YYPARSE_PARAM_ARG.
20120
201211995-11-29 Richard Stallman <rms@gnu.org>
20122
20123 * doc/bison.texinfo:
20124 Describe literal string tokens, %raw, %no_lines, %token_table.
20125
201261995-11-29 Daniel Hagerty <hag@gnu.org>
20127
20128 * doc/bison.texinfo: Fixed update date
20129
201301995-10-16 Richard Stallman <rms@gnu.org>
20131
20132 * src/version.c: Version 1.25.
20133
201341995-10-16 Richard Stallman <rms@gnu.org>
20135
20136 * NEWS: *** empty log message ***
20137
201381995-10-16 Richard Stallman <rms@gnu.org>
20139
20140 * doc/bison.1, doc/bison.rnh:
20141 Add new options.
20142
201431995-10-15 Richard Stallman <rms@gnu.org>
20144
20145 * src/vmsgetargs.c, src/getargs.c:
20146 Added -n, -k, and -raw switches.
20147 (noparserflag, toknumflag, rawtoknumflag): New variables.
20148
20149 * src/symtab.h (SALIAS):
20150 New #define for adding aliases to %token.
20151 (struct bucket): Added `alias' field.
20152
20153 * src/reduce.c (reduce_grammar):
20154 Revise error message.
20155 (print_notices): Remove final `.' from error message.
20156
20157 * src/reader.c (reader_output_yylsp):
20158 New function.
20159 (readgram): Use `#if 0' around code that accepted %command
20160 inside grammar rules: The documentation doesn't allow it,
20161 and it will fail since the %command processors scan for the next %.
20162 (parse_token_decl): Extended the %token
20163 declaration to allow a multi-character symbol as an alias.
20164 (parse_thong_decl): New function.
20165 (read_declarations): Added %thong declarations.
20166 (read_declarations): Handle NOOP to deal with allowing
20167 % declarations as another means to specify the flags.
20168 (readgram): Allow %prec prior to semantics embedded in a rule.
20169 (skip_to_char, read_declarations, copy_definition)
20170 (parse_token_decl, parse_start_decl, parse_type_decl)
20171 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20172 (get_type_name, copy_guard, copy_action, readgram)
20173 (get_type, packsymbols): Revised most error messages.
20174 Changed `fatal' to `warnxxx' to avoid aborting for error.
20175 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20176 (read_declarations): Improve the error message for
20177 an invalid character. Do not abort.
20178 (read_declarations, copy_guard, copy_action): Use
20179 printable_version to avoid unprintable characters in printed output.
20180 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20181 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20182 Allow the type of a non-terminal can be given
20183 more than once, as long as all specifications give the same type.
20184
20185 * src/output.c:
20186 (output_headers, output_trailers, output, output_gram)
20187 (output_rule_data): Implement noparserflag variable.
20188 Implement toknumflag variable.
20189 (output): Call reader_output_yylsp to output LTYPESTR.
20190
20191 * src/main.c (main):
20192 If reader sees an error, don't process the grammar.
20193 (fatals): Updated to not use VARARGS1.
20194 (printable_version, int_to_string, warn, warni, warns, warnss)
20195 (warnsss): New error reporting functions. Avoid abort for error.
20196
20197 * src/lex.h:
20198 Added THONG and NOOP for alias processing.
20199 Added SETOPT for the new code that allows setting options with %flags.
20200
20201 * src/lex.c:
20202 Include getopt.h. Add some extern decls.
20203 (safegetc): New function to deal with EOF gracefully.
20204 (literalchar); new function to deal with reading \ escapes.
20205 (lex): Use literalchar.
20206 (lex): Implemented "..." tokens.
20207 (literalchar, lex, parse_percent_token): Made tokenbuffer
20208 always contain the token. This includes growing the token
20209 buffer while reading an integer.
20210 (parse_percent_token): Replaced if-else statement with percent_table.
20211 (parse_percent_token): Added % declarations as another
20212 way to specify the flags -n, -l, and -r. Also added hooks for
20213 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20214 major changes to files.c.
20215 (lex) Retain in the incoming stream a character following
20216 an incorrect '/'.
20217 (skip_white_space, lex): Revised most error messages
20218 and changed fatal to warn to avoid aborting.
20219 (percent_table): Added %thong declarations.
20220
20221 * src/gram.h: Comment changes.
20222
20223 * src/files.c (openfiles, open_extra_files, done):
20224 Add faction flag
20225 and actfile file. Handle noparserflag. Both for -n switch.
20226
20227 * src/conflicts.c (resolve_sr_conflict):
20228 Remove use of alloca.
20229
202301995-06-01 Jim Meyering <meyering@gnu.org>
20231
20232 * doc/bison.texinfo: *** empty log message ***
20233
202341995-05-06 Richard Stallman <rms@gnu.org>
20235
20236 * src/bison.s1: Comment change.
20237
202381995-05-06 Richard Stallman <rms@gnu.org>
20239
20240 * bison.simple: Comment change.
20241
202421995-05-03 Richard Stallman <rms@gnu.org>
20243
20244 * src/version.c: Version now 1.24.
20245
20246 * src/bison.s1: Change distribution terms.
20247
20248 * src/version.c: Version now 1.23.
20249
202501995-05-03 Richard Stallman <rms@gnu.org>
20251
20252 * doc/bison.texinfo:
20253 Rewrite "Conditions for Using Bison".
20254 Update version to 1.24.
20255
202561995-05-03 Richard Stallman <rms@gnu.org>
20257
20258 * bison.simple: Change distribution terms.
20259
202601995-02-23 Richard Stallman <rms@gnu.org>
20261
20262 * src/files.c: Test __VMS_POSIX as well as VMS.
20263
202641995-02-14 Jim Meyering <meyering@gnu.org>
20265
20266 * src/bison.s1 (__yy_memcpy):
20267 Renamed from __yy_bcopy to avoid
20268 confusion. Reverse FROM and TO arguments to be consistent with
20269 those of memcpy.
20270
202711995-02-14 Jim Meyering <meyering@gnu.org>
20272
20273 * bison.simple (__yy_memcpy):
20274 Renamed from __yy_bcopy to avoid
20275 confusion. Reverse FROM and TO arguments to be consistent with
20276 those of memcpy.
20277
202781994-11-10 David J. MacKenzie <djm@gnu.org>
20279
20280 * NEWS: reformat
20281
20282 * NEWS: New file.
20283
20284 * Makefile.in (DISTFILES): Include NEWS.
20285
20286 * Makefile.in (DISTFILES):
20287 Include install-sh, not install.sh.
20288
20289 * configure.in: Update to Autoconf v2 macro names.
20290
202911994-10-05 David J. MacKenzie <djm@gnu.org>
20292
20293 * Makefile.in: fix typo
20294
20295 * Makefile.in (prefix, exec_prefix):
20296 Let configure set them.
20297
202981994-09-28 David J. MacKenzie <djm@gnu.org>
20299
20300 * Makefile.in: Set datadir to $(prefix)/share.
20301
203021994-09-15 Richard Stallman <rms@gnu.org>
20303
20304 * src/bison.s1:
20305 Update copyright notice and GPL version.
20306
203071994-09-15 Richard Stallman <rms@gnu.org>
20308
20309 * bison.simple:
20310 Update copyright notice and GPL version.
20311
203121994-07-12 Richard Stallman <rms@gnu.org>
20313
20314 * src/reduce.c, src/reader.c:
20315 entered into RCS
20316
203171994-05-05 David J. MacKenzie <djm@gnu.org>
20318
20319 * Makefile.in: entered into RCS
20320
203211994-03-26 Richard Stallman <rms@gnu.org>
20322
20323 * src/bison.s1: entered into RCS
20324
203251994-03-26 Richard Stallman <rms@gnu.org>
20326
20327 * bison.simple: entered into RCS
20328
203291994-03-25 Richard Stallman <rms@gnu.org>
20330
20331 * src/main.c: entered into RCS
20332
203331994-03-24 Richard Stallman <rms@gnu.org>
20334
20335 * src/conflicts.c: entered into RCS
20336
203371994-01-02 Richard Stallman <rms@gnu.org>
20338
20339 * Makefile.in: *** empty log message ***
20340
203411993-11-21 Richard Stallman <rms@gnu.org>
20342
20343 * src/bison.s1: *** empty log message ***
20344
203451993-11-21 Richard Stallman <rms@gnu.org>
20346
20347 * doc/bison.texinfo: entered into RCS
20348
20349 * doc/bison.texinfo: *** empty log message ***
20350
203511993-11-21 Richard Stallman <rms@gnu.org>
20352
20353 * bison.simple: *** empty log message ***
20354
203551993-10-25 David J. MacKenzie <djm@gnu.org>
20356
20357 * doc/bison.texinfo: *** empty log message ***
20358
203591993-10-19 Richard Stallman <rms@gnu.org>
20360
20361 * src/bison.s1: *** empty log message ***
20362
203631993-10-19 Richard Stallman <rms@gnu.org>
20364
20365 * bison.simple: *** empty log message ***
20366
203671993-10-14 Richard Stallman <rms@gnu.org>
20368
20369 * src/bison.s1: *** empty log message ***
20370
203711993-10-14 Richard Stallman <rms@gnu.org>
20372
20373 * bison.simple: *** empty log message ***
20374
203751993-09-14 David J. MacKenzie <djm@gnu.org>
20376
20377 * doc/bison.texinfo: *** empty log message ***
20378
203791993-09-13 Noah Friedman <friedman@gnu.org>
20380
20381 * Makefile.in: *** empty log message ***
20382
203831993-09-10 Richard Stallman <rms@gnu.org>
20384
20385 * src/conflicts.c: *** empty log message ***
20386
20387 * src/system.h: entered into RCS
20388
203891993-09-10 Richard Stallman <rms@gnu.org>
20390
20391 * doc/bison.1: entered into RCS
20392
203931993-09-06 Noah Friedman <friedman@gnu.org>
20394
20395 * src/version.c: entered into RCS
20396
203971993-09-06 Noah Friedman <friedman@gnu.org>
20398
20399 * Makefile.in: *** empty log message ***
20400
204011993-07-30 David J. MacKenzie <djm@gnu.org>
20402
20403 * Makefile.in: *** empty log message ***
20404
204051993-07-24 Richard Stallman <rms@gnu.org>
20406
20407 * src/bison.s1: *** empty log message ***
20408
204091993-07-24 Richard Stallman <rms@gnu.org>
20410
20411 * bison.simple: *** empty log message ***
20412
204131993-07-08 David J. MacKenzie <djm@gnu.org>
20414
20415 * Makefile.in: *** empty log message ***
20416
204171993-07-04 Richard Stallman <rms@gnu.org>
20418
20419 * src/bison.s1: *** empty log message ***
20420
204211993-07-04 Richard Stallman <rms@gnu.org>
20422
20423 * bison.simple: *** empty log message ***
20424
204251993-06-26 David J. MacKenzie <djm@gnu.org>
20426
20427 * src/getargs.c: entered into RCS
20428
204291993-06-26 David J. MacKenzie <djm@gnu.org>
20430
20431 * doc/bison.texinfo: *** empty log message ***
20432
20433 * doc/bison.1: New file.
20434
204351993-06-25 Richard Stallman <rms@gnu.org>
20436
20437 * src/getargs.c: New file.
20438
204391993-06-16 Richard Stallman <rms@gnu.org>
20440
20441 * src/bison.s1: *** empty log message ***
20442
204431993-06-16 Richard Stallman <rms@gnu.org>
20444
20445 * bison.simple: *** empty log message ***
20446
204471993-06-03 Richard Stallman <rms@gnu.org>
20448
20449 * src/bison.s1: New file.
20450
204511993-06-03 Richard Stallman <rms@gnu.org>
20452
20453 * doc/bison.texinfo: *** empty log message ***
20454
204551993-06-03 Richard Stallman <rms@gnu.org>
20456
20457 * bison.simple: New file.
20458
204591993-05-19 Richard Stallman <rms@gnu.org>
20460
20461 * doc/bison.texinfo: New file.
20462
204631993-05-07 Noah Friedman <friedman@gnu.org>
20464
20465 * Makefile.in: *** empty log message ***
20466
204671993-04-28 Noah Friedman <friedman@gnu.org>
20468
20469 * src/reader.c: *** empty log message ***
20470
204711993-04-23 Noah Friedman <friedman@gnu.org>
20472
20473 * src/alloc.h: entered into RCS
20474
204751993-04-20 David J. MacKenzie <djm@gnu.org>
20476
20477 * src/version.c: *** empty log message ***
20478
20479 * src/files.c, src/allocate.c:
20480 entered into RCS
20481
20482 * src/reader.c: *** empty log message ***
20483
20484 * src/lex.c: entered into RCS
20485
20486 * src/conflicts.c: New file.
20487
20488 * src/symtab.c: entered into RCS
20489
20490 * src/alloc.h: New file.
20491
20492 * src/LR0.c: entered into RCS
20493
204941993-04-18 Noah Friedman <friedman@gnu.org>
20495
20496 * src/reader.c: New file.
20497
20498 * src/version.c: *** empty log message ***
20499
205001993-04-18 Noah Friedman <friedman@gnu.org>
20501
20502 * Makefile.in: *** empty log message ***
20503
205041993-04-17 Noah Friedman <friedman@gnu.org>
20505
20506 * Makefile.in: *** empty log message ***
20507
205081993-04-15 Richard Stallman <rms@gnu.org>
20509
20510 * src/main.c, src/files.c:
20511 New file.
20512
205131993-04-15 Noah Friedman <friedman@gnu.org>
20514
20515 * configure.in: entered into RCS
20516
20517 * configure.in: *** empty log message ***
20518
20519 * configure.in: New file.
20520
205211993-04-14 Richard Stallman <rms@gnu.org>
20522
20523 * Makefile.in: New file.
20524
205251993-04-13 Richard Stallman <rms@gnu.org>
20526
20527 * src/version.c: New file.
20528
205291993-03-25 Richard Stallman <rms@gnu.org>
20530
20531 * src/output.c: entered into RCS
20532
205331992-09-25 Richard Stallman <rms@gnu.org>
20534
20535 * configure.bat: entered into RCS
20536
205371992-06-22 Richard Stallman <rms@gnu.org>
20538
20539 * src/vmsgetargs.c: entered into RCS
20540
205411992-06-22 Richard Stallman <rms@gnu.org>
20542
20543 * doc/bison.rnh: entered into RCS
20544
205451992-04-20 David J. MacKenzie <djm@gnu.org>
20546
20547 * README: entered into RCS
20548
205491992-01-22 Richard Stallman <rms@gnu.org>
20550
20551 * src/machine.h: entered into RCS
20552
205531991-12-21 Richard Stallman <rms@gnu.org>
20554
20555 * src/lalr.c, src/closure.c:
20556 entered into RCS
20557
205581991-12-20 Richard Stallman <rms@gnu.org>
20559
20560 * src/state.h: entered into RCS
20561
205621991-12-18 Richard Stallman <rms@gnu.org>
20563
20564 * src/print.c, src/nullable.c, src/derives.c:
20565 entered into RCS
20566
205671991-11-03 David J. MacKenzie <djm@gnu.org>
20568
20569 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20570 entered into RCS
20571
205721988-09-09 Richard Stallman <rms@gnu.org>
20573
20574 * src/bison.hairy: entered into RCS
20575
205761987-12-16 Richard Stallman <rms@gnu.org>
20577
20578 * REFERENCES: entered into RCS
dc546b0f 20579
f294a2c2 20580
04098407 20581 -----
f294a2c2 20582
04098407 20583 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
9126263e 20584 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
95021767 20585 Free Software Foundation, Inc.
f294a2c2 20586
04098407
PE
20587 Copying and distribution of this file, with or without
20588 modification, are permitted provided the copyright notice and this
20589 notice are preserved.
e9071366
AD
20590
20591$Id$