]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Java parser improvements
[bison.git] / ChangeLog
... / ...
CommitLineData
12008-11-01 Di-an Jan <dianj@freeshell.org>
2 Paolo Bonzini <bonzini@gnu.org>
3
4 Support all Java parser class modifiers.
5 * data/java.m4 (b4_percent_define_get3): New.
6 (b4_final_if, b4_strictfp_if): New.
7 * data/lalr1.java (final, strictfp, extends, implements): Support.
8 * doc/bison.texinfo (final, strictfp, extends, implements): Add
9 documentation.
10 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
11 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
12 (AT_CHECK_JAVA_GREP): New.
13 (Java parser class modifiers): New test.
14 (Java parser class extends and implements): New test.
15
16 Model exception propagation better with throws and lex_throws.
17 * data/java.m4 (b4_list2): New.
18 (throws): Change default.
19 * data/lalr1.java (yyaction): Add throws.
20 (parse): Add lex_throws in addition to throws.
21 * doc/bison.texinfo (throws, lex_throws): Add documentation.
22 * tests/java.at (Java throws specifications): New test.
23
24 Improve documentation for Java parsers.
25 * doc/bison.texinfo (Java Parsers): Add subsections.
26 Don't quote first argument of %define.
27 (Java Bison Interface): Document output files. Move documentation
28 of parser class and merge into Java Parser Interface. Document
29 features that error out. Document directives with no effect.
30 Move note about Javadoc higher.
31 (Java Semantic Values): Explicitly mention stype.
32 Document that generic types cannot be used.
33 (Java Location Values): Use @deftypeivar. Document constructors.
34 Correct return value for toString.
35 (Java Parser Interface): List undocumented constants/fields.
36 Move documentation of fields added by %parse-param closer to list
37 of members. Document that token names are added as fields.
38 Document constructors accurately. Remove error method.
39 (Java Scanner Interface): Move note on %pure-parser to Java Bison
40 Interface. Describe %code lexer and yylex accutately.
41 Remove documentation that does not match the code.
42 (Java Action Features): New.
43 (Java Differences): Add reference. Add item on semantic values.
44 Add note about @{ ... @}. Clarify %% epilogue placement.
45 (Java Declarations Summary): New.
46
47 Fix Java skeleton.
48 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
49 (b4_remove_comma): Quote test argument.
50 (b4_identification): Remove "bison" field.
51 * tests/java.at (Java parser class and package names): New test.
52 (Java %parse-param and %lex-param): New test.
53 (Java stype, position_class and location_class): New test.
54
552008-10-31 Di-an Jan <dianj@freeshell.org>
56
57 * data/lalr1.jave: Update copyright years.
58 (YYParser): Correct name of "generated from" file in Javadoc:
59 use b4_file_name instead of @ofile@.
60 (Location constructor): Correct Javadoc parameter name.
61 (yylloc): Add missing opening m4 quote after b4_location_if.
62 This removes a stray [ in the Javadoc of Lexer.getStartPos.
63 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
64 (YYParser constructor): Correct Javadoc parameter name.
65
662008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
67
68 Always put auxiliary code files in the same dir as other output files.
69 * src/files.c (compute_file_name_parts): When the user specifies
70 --output but not --file-prefix, extract the directory prefix from the
71 file prefix not from the grammar file name. This affects the location
72 of files like location.hh generated by the C++ skeleton. The includes
73 in the other output files require this fix.
74 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
75 for expected output files.
76 (Output files): Add a test for the above.
77
782008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
79
80 * gnulib: Update submodule to HEAD.
81
822008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
83
84 Update copyright year.
85 * src/files.c: Here.
86
872008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
88
89 Don't overwrite the input file.
90 * src/files.c (output_file_name_check): Fatal error if using input file
91 for output.
92 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
93 argument.
94 (Conflicting output files): Add test.
95
962008-10-28 Akim Demaille <demaille@gostai.com>
97
98 Space changes.
99 * data/lalr1.cc: Formatting changes.
100
1012008-10-28 Akim Demaille <demaille@gostai.com>
102
103 Don't define debugging functions when !YYDEBUG.
104 * data/lalr1.cc (debug_stream, set_debug_stream)
105 (debug_level_type, debug_level, set_debug_level): Don't
106 declare them when YYDEBUG is not defined.
107 The implementation are already YYDEBUG-aware.
108
1092008-10-28 Akim Demaille <demaille@gostai.com>
110
111 Prefer "continue" for empty loop bodies.
112 * etc/bench.pl.in: Use "continue" instead of {}.
113
1142008-10-28 Akim Demaille <demaille@gostai.com>
115
116 Space and comments changes.
117 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
118 * data/c.m4, data/lalr1.cc: Space changes.
119
1202008-10-28 Akim Demaille <demaille@gostai.com>
121
122 Make gnulib a submodule.
123 * gnulib: New.
124 * .gitmodules (gnulib): New.
125
1262008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
127
128 Fix yyerror_range for user-defined location type in C++. Reported by
129 Georg Sauthoff at
130 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
131 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
132 * THANKS (Georg Sauthoff): Add.
133
1342008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
135
136 Update several administrative files mainly to facilitate releasing.
137 * HACKING (Administrivia): Make the git-merge-changelog notes more
138 helpful.
139 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
140 (Release Procedure): Update for git and add numerous details that were
141 previously missing.
142 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
143 * maint.mk (announcement): Don't list bison as a bootstrap tool so
144 that announcements don't claim we bootstrapped with whatever bison
145 happened to be in PATH. Add flex as a bootstrap tool.
146 * Makefile.maint: Remove, previously replaced by maint.mk.
147 * Makefile.cfg: Remove, and migrate settings to...
148 * cfg.mk: ... here for the sake of `make announcement'.
149 * bootstrap.conf (gnulib_modules): Add announce-gen.
150 * README: Say GNU Bison instead of just Bison. Suggested by Karl
151 Berry.
152
1532008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
154
155 Small but important bugfixes for the Java skeleton.
156 * data/lalr1.java (yyerror): Change Location to b4_location_type.
157 (yy_symbol_print): Call toString on yyvaluep.
158
1592008-08-29 Akim Demaille <demaille@gostai.com>
160
161 Clarify UPDATED use.
162 * doc/bison.texinfo: It refers to the last edition of this file,
163 not to the release date of Bison.
164 Reported by Joel E. Denny.
165
1662008-08-29 Akim Demaille <demaille@gostai.com>
167
168 * README: Update FAQ pointer.
169 Reported by Joel E. Denny.
170
1712008-08-27 Eric Blake <ebb9@byu.net>
172
173 Resync m4sugar from autoconf.
174 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
175 (m4_init): Adjust to latest m4.git changes.
176 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
177 effects.
178 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
179 (_m4_list_cmp): Reduce side effects.
180
1812008-08-27 Akim Demaille <demaille@gostai.com>
182
183 Check yyerrok in calc.at.
184 * tests/calc.at (calc.y): Use yyerrok on "( error )".
185 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
186 expected.
187
1882008-08-27 Akim Demaille <demaille@gostai.com>
189
190 Support yyerrok in lalr1.cc.
191 YYBACKUP is still to import back into lalr1.cc.
192 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
193
1942008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
195
196 For maintainer-check*, don't recompile for a $(VERSION) update.
197 * cfg.mk: New file.
198 (_is-dist-target): Override the one in GNUmakefile.
199 * Makefile.am (EXTRA_DIST): Add cfg.mk.
200
2012008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
202
203 Update for recent change to gnulib.
204 * src/parse-gram.y: Don't include strverscmp.h. It comes from
205 string.h now.
206
2072008-08-15 Eric Blake <ebb9@byu.net>
208
209 Remaining m4sugar merge from autoconf.
210 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
211 * data/m4sugar/foreach.m4: New file, copied from autoconf.
212 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
213 * src/output.c (output_skeleton): Tell m4 how to find it.
214
215 Partial m4sugar merge from autoconf: m4_map.
216 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
217 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
218 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
219 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
220 for empty list.
221 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
222 Likewise.
223 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
224 declares it.
225
2262008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
227
228 Keep .version and PACKAGE_VERSION in sync.
229 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
230 dependency, and add comments justifying this in more detail. Discussed
231 starting at
232 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
233
2342008-08-06 Eric Blake <ebb9@byu.net>
235
236 Partial m4sugar merge from autoconf: m4_shiftn.
237 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
238 (m4_shift2, m4_shift3): New macros.
239 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
240 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
241 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
242 * data/java.m4 (b4_remove_comma): Likewise.
243
244 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
245 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
246 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
247 (m4_init): Consolidate wrapped text into single m4_wrap.
248 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
249 in wrapped text.
250
2512008-08-05 Eric Blake <ebb9@byu.net>
252
253 Partial m4sugar merge from autoconf: builtins, version.m4.
254 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
255 (m4_prepend): Remove, as it is unused and inherently quadratic,
256 whereas m4_append is linear in newer m4.
257 (m4_mkstemp): New builtin.
258 (m4_symbols): Make rename conditional.
259 (m4_version_prereq): Ensure fatal error if used in bison, which
260 intentionally lacks version.m4.
261
262 Fix comments in m4sugar.
263 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
264
2652008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
266
267 Update for recent .gitignore fix in Gnulib.
268 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
269 anchored .gitignore entries.
270
2712008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
272
273 Set gnu or gnits strictness.
274 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
275 development and gnits strictness for releases. Based on Eric Blake's
276 suggestion at
277 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
278
2792008-07-31 Paolo Bonzini <bonzini@gnu.org>
280
281 * NEWS: Clarify documentation of %language.
282
2832008-07-31 Paolo Bonzini <bonzini@gnu.org>
284
285 Support usage of git-merge-changelog.
286 * .gitattributes: New.
287 * HACKING: Document usage of git-merge-changelog.
288 * bootstrap: Install git-merge-changelog entries in .git/config
289 if appropriate.
290
2912008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
292
293 Remove remaining dependence on CVS Id keyword.
294 * ChangeLog: For the sake of people still using CVS, don't use dollars
295 when mentioning Id.
296 * data/xslt/bison.xsl: Remove Id from header comments, where it was
297 unusual anyway.
298 * data/xslt/xml2dot.xsl: Likewise.
299 * data/xslt/xml2text.xsl: Likewise.
300 * data/xslt/xml2xhtml.xsl: Likewise.
301 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
302 * doc/Makefile.am (neutralize): Remove, no longer needed.
303 (.x.1): Don't use neutralize.
304 (edit): Don't substitute for ID.
305 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
306
3072008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
308
309 Fix dependence on computed configure variables.
310 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
311 $(top_srcdir)/configure.ac so that changes to computed variables, such
312 as PACKAGE_VERSION, are seen.
313 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
314
3152008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
316
317 Update copyright dates for recent changes.
318 * Makefile.am: Here.
319 * src/Makefile.am: Here.
320 * src/reduce.c: Here.
321 * tests/reduce.at: Here.
322
3232008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
324
325 Use git-version-gen for version names between releases.
326 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
327 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
328 * .prev-version: New.
329 * .version.in: Remove.
330 * ChangeLog: Remove the Id previously used for capturing the CVS
331 revision.
332 * GNUmakefile: Remove, now copied from Gnulib.
333 * Makefile.am: Add code suggested by comments in
334 build-aux/git-version-gen.
335 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
336 .prev-version, and .version.
337 * NEWS (2.3b+): Rename to...
338 (?.?): ... this because we're dropping the "+" version naming scheme,
339 but, in general, we still can't be sure of our next release name.
340 * bootstrap: Add a quick hack to remove from .gitignore the
341 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
342 entry. This should really be fixed in gnulib instead.
343 * bootstrap.conf (gnulib_modules): Add gnumakefile.
344 * configure.ac (AC_INIT): Set version name by invoking
345 build-aux/git-version-gen.
346 (AC_CONFIG_FILES): Remove .version, now generated by
347 build-aux/git-version-gen.
348 * maint.mk: New, copied from coreutils.
349 * doc/.cvsignore (bison.1): Add.
350 * doc/.gitignore (/bison.1): Add.
351 * doc/bison.1: Remove, generated.
352 * src/.cvsignore (revision.c): Remove.
353 * src/.gitignore (/revision.c): Remove.
354 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
355 (BUILT_SOURCES): Remove revision.c.
356 (revision.c): Remove.
357 * src/getargs.c (version): Don't print revision after the VERSION.
358 * src/revision.h: Remove.
359
3602008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
361
362 Fix untranslatable composition of sentences. Reported by Goran
363 Uddeborg at
364 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
365 * THANKS (Goran Uddeborg): Add.
366 * src/reduce.c (reduce_print): Report the number of nonterminals and
367 rules useless in the grammar in separate sentences.
368 * tests/reduce.at (Useless Rules): Update output.
369 (Reduced Automaton): Likewise.
370 (Underivable Rules): Likewise.
371 (Empty Language): Likewise.
372
3732008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
374
375 Fix some .gitignore and .cvsignore problems.
376 * bootstrap (insert_sorted_if_absent): Replace all uses with...
377 (insert_vc_ignore): ... this new function, which prepends `/' to all
378 .gitignore entries before passing them to insert_sorted_if_absent.
379 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
380 .cvsignore files are maintained even though Bison developers run
381 bootstrap while using Git.
382 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
383 unneeded by Bison.
384 (gnulib): Add.
385 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
386 unneeded. Reported by Eric Blake.
387 * lib/.gitignore (/*~): Add.
388 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
389 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
390 Blake.
391 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
392
3932008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
394
395 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
396 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
397 * bootstrap.conf (gnulib_modules): Add unsetenv.
398 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
399 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
400 (/setenv.m4): Add.
401 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
402 the first argument because it may become position-dependent, and unset
403 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
404 Add comments explaining these issues in more detail.
405
4062008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
407
408 Add .gitignore everywhere based on .cvsignore.
409 * .gitignore: New.
410 * build-aux/.gitignore: New.
411 * data/.gitignore: New.
412 * doc/.gitignore: New.
413 * etc/.gitignore: New.
414 * examples/.gitignore: New.
415 * examples/calc++/.gitignore: New.
416 * lib/.gitignore: New.
417 * m4/.gitignore: New.
418 * po/.gitignore: New.
419 * runtime-po/.gitignore: New.
420 * src/.gitignore: New.
421 * tests/.gitignore: New.
422
4232008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
424
425 * NEWS (2.3b+): New section, empty for now.
426 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
427
4282008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
429
430 * NEWS (2.3b): Update release date since there has been a delay in
431 getting the announcements and tarballs out.
432
4332008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
434
435 * NEWS: Version 2.3b.
436 * configure.ac (AC_INIT): Likewise.
437 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
438
4392008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
440
441 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
442 been doing it for years.
443 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
444 (Release Procedure): Add FIXME about make alpha being unmaintained.
445
4462008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
447
448 * data/yacc.c: Reformat m4 a little for readability.
449 * src/lalr.c (build_relations): Correct comment.
450
4512008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
452
453 DJGPP specific issue.
454 * djgpp/config.sed: Fixes required to run configure scripts generated
455 by autoconf 2.62.
456
4572008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
458
459 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
460 coordinator@translationproject.org.
461
4622008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
463
464 * THANKS: Add Eric Blake.
465
4662008-04-23 Eric Blake <ebb9@byu.net>
467
468 Revert prior patch, by working around autoconf regression.
469 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
470 ("Output file name: ("): Uncomment test.
471 ("Output file name: )"): Likewise.
472 Based on an idea from Noah Misch.
473
4742008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
475
476 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
477 2.61. Reported by Juan Manuel Guerrero at
478 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
479 * tests/output.at ("Output file name: ("): Comment out test case for
480 now.
481 ("Output file name: )"): Likewise.
482
4832008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
484
485 * GNUmakefile: Update git-version-gen invocation so make dist
486 succeeds.
487
4882008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
489
490 Update to the current gnulib CVS repository, and fix trigraph handling
491 in Bison.
492 * bootstrap: Update gnulib CVS repository URL.
493 (symlink_to_dir): Encapsulate the code that guarantees the destination
494 directory exists into...
495 (check_dst_dir): ... this new function, and...
496 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
497 fail when copying files into lib/uniwidth/.
498 * src/output.c (prepare_symbols): When writing yytname muscles, where
499 symbol names will be encoded in C-string literals, tell quotearg to
500 escape trigraphs. This used to be the default in gnulib.
501 * tests/regression.at (Token definitions): Because of the change in
502 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
503 escapes trigraphs in symbol names. Thus, yytname no longer has
504 trigraphs unnecessarily doubly escaped. Update test case output.
505 Extend test case to be sure Bison's own error messages will no longer
506 have trigraphs in symbol names unnecessarily escaped once.
507
5082008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
509
510 Fix make dist infinite loop reported by Juan Manuel Guerrero at
511 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
512 * .cvsignore: Add .version.
513 * .version.in: New.
514 * bootstrap.conf (gnulib_modules): Add git-version-gen.
515 * configure.ac (AC_CONFIG_FILES): Add .version.
516 * build-aux/.cvsignore: Add git-version-gen.
517
5182008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
519
520 * NEWS (2.3a+): Mention that -g now takes an argument.
521 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
522 consistency. Update the -g and -x entries now that they take
523 arguments. Use brackets to indicate optional arguments.
524 * src/getargs.c (usage): Explain the relationship between arguments of
525 long and short options more completely. Document --defines and -d
526 separately since the former takes an argument but, for POSIX Yacc, the
527 latter does not.
528 (short_options): Let -W take an optional argument like --warnings.
529 (getargs): Sort cases.
530
5312008-02-28 Akim Demaille <demaille@gostai.com>
532
533 * doc/bison.texinfo: Fix a few typos.
534
5352008-02-28 Akim Demaille <akim@epita.fr>
536
537 * doc/bison.texinfo (Bison Options): Document -W.
538 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
539
5402008-02-28 Akim Demaille <akim@epita.fr>
541
542 * src/getargs.c (short_options): Split and sort for readability.
543 -g and -x take optional arguments, just like their long options.
544 * build-aux/cross-options.pl: Use /x to make the regexp easier to
545 understand.
546 Fix the handling of $opt which resulted in all the argument to be
547 considered as optional.
548
5492008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
550
551 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
552 say its interface is experimental.
553 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
554 Java.
555 (Bison Options): In the -L and --language entry, mention Java.
556 (Java Bison Interface): Say the interface is experimental.
557 * src/getargs.c (usage): Mention -L and --language.
558
559 * NEWS (2.3a+): Say the push parsing interface is experimental.
560 * doc/bison.texinfo (Push Decl): Likewise.
561 (Decl Summary): Likewise in the "%define api.push_pull" entry.
562 (Push Parser Function): Likewise.
563 (Pull Parser Function): Likewise.
564 (Parser Create Function): Likewise.
565 (Parser Delete Function): Likewise.
566 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
567 yypull_parse, and yypush_parse entries.
568
569 * NEWS (2.3a+): Mention XML support, and say the schema is
570 experimental.
571 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
572 * src/getargs.c (usage): Say the XML schema is experimental.
573
574 * NEWS (2.3a+): Say option instead of flag.
575
5762008-02-21 Wojciech Polak <polak@gnu.org>
577
578 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
579 text.
580
5812008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
582
583 Fix impure push parser compile error reported by Bob Rossi at
584 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
585 * data/yacc.c: Clean up whitespace in the output a little.
586 (yypstate_allocated): Define for impure push parsers regardless of
587 whether the pull interface is also requested.
588 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
589 check impure push parsers without the pull interface.
590
591 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
592 yyerror takes arguments specified by %parse-param while yypstate_new
593 does not.
594 * doc/bison.texinfo (Parser Create Function): Document that
595 yypstate_new returns 0 for multiple impure parser instances.
596 * tests/push.at (Push Parsing: Multiple impure instances): Update
597 expected stderr output.
598
5992008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
600
601 * runtime-po/POTFILES.in (push.c): Remove.
602
6032008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
604
605 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
606 * data/push.c: Rename to...
607 * data/yacc.c: ... this, overwriting it.
608 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
609 `%push-pull-parser' -> `%define api.push_pull "both"'.
610 Remove old yacc.c tests, and update push.c tests to yacc.c.
611
6122008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
613
614 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
615 `"%code top" blocks' instead of `%code "top" blocks'.
616 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
617 Clean up whitespace in the output a little.
618
6192008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
620
621 Fix documentation problems reported by Tim Josling at
622 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
623 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
624 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
625 integers. Explain the effect of literal string aliases on error
626 messages. Copy token 0 documentation from the C++ skeleton
627 documentation.
628
6292008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
630
631 Accept a token number in a %left, %right, or %nonassoc for POSIX
632 conformance. Reported by Tim Josling at
633 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
634 * NEWS (2.3a+): Mention.
635 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
636 and code numbers are treated by precedence declarations.
637 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
638 of symbols.1.
639 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
640 of symbol.
641 (symbol.prec): New, just like symbol but allows INT.
642 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
643 longer holds.
644 * tests/regression.at (Token number in precedence declaration): New
645 test case.
646
6472008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
648
649 DJGPP specific issues.
650 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
651 be changed. Copyright timestamp adjusted.
652 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
653 be changed. Copyright timestamp adjusted.
654 * djgpp/config.site: Copyright timestamp adjusted.
655 * djgpp/config_h.sed: Copyright timestamp adjusted.
656 * djgpp/djunpack.bat: Copyright timestamp adjusted.
657 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
658 filename translation list.
659 * djgpp/subpipe.c (init_subpipe): Check the environment variables
660 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
661 files shall be created. Before trying to use the temp dir where the
662 environment variable points to check that the dir really exists. If
663 not default to the cwd as temp dir. Copyright timestamp adjusted.
664 * djgpp/subpipe.h: Copyright timestamp adjusted.
665 * djgpp/testsuite.sed: Copyright timestamp adjusted.
666
6672008-01-30 Paul Eggert <eggert@cs.ucla.edu>
668
669 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
670
6712008-01-09 Paul Eggert <eggert@cs.ucla.edu>
672
673 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
674 Problem reported by Claudio Saavedra in
675 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
676
6772008-01-05 Wojciech Polak <polak@gnu.org>
678
679 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
680 document's title with the input grammar file name.
681
6822007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
683
684 Automate regression testing of the XML/XSLT implementation. Discussed
685 starting at
686 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
687 * configure.ac (XSLTPROC): New substitution.
688 * Makefile.am (maintainer-xml-check): New phony target invoking...
689 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
690 invoking make maintainer-check with BISON_TEST_XML=1.
691 * tests/atlocal.in (XSLTPROC): New.
692 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
693 not to report reachable memory when Bison is expected to have a
694 non-zero exit status and (2) to compare XML/XSLT output with --graph
695 and --report=all output for every working grammar when
696 BISON_TEST_XML=1.
697 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
698 (AT_BISON_CHECK_XML): New.
699 (AT_QUELL_VALGRIND): New.
700 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
701 (AT_CHECK): ... don't redefine this since this was the old way to
702 quell Valgrind.
703 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
704 AT_BISON_CHECK invocations.
705 * tests/c++.at: Likewise.
706 * tests/calc.at: Likewise.
707 * tests/conflicts.at: Likewise.
708 * tests/cxx-type.at: Likewise.
709 * tests/existing.at: Likewise.
710 * tests/glr-regression.at: Likewise.
711 * tests/headers.at: Likewise.
712 * tests/input.at: Likewise.
713 * tests/java.at: Likewise.
714 * tests/output.at: Likewise.
715 * tests/push.at: Likewise.
716 * tests/reduce.at: Likewise.
717 * tests/regression.at: Likewise.
718 * tests/sets.at: Likewise.
719 * tests/skeletons.at: Likewise.
720 * tests/synclines.at: Likewise.
721 * tests/torture.at: Likewise.
722 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
723 tends to hang xsltproc.
724 (Big horizontal): Likewise.
725
7262007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
727
728 In XML output, remove redundant class attribute on symbol element.
729 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
730 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
731 look up a symbol to determine whether it's a nonterminal or terminal.
732 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
733 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
734
735 Add prec/assoc information to XML output.
736 * src/gram.c (grammar_rules_print_xml): For each rule that has a
737 %prec, add a percent_prec attribute.
738 * src/print-xml.c (print_grammar): For each terminal that has a
739 precedence or associativity, add a prec or assoc attribute.
740 (xml_indent): New.
741 (xml_puts): Use xml_indent.
742 (xml_printf): Use xml_indent.
743 * src/print-xml.h (xml_indent): Prototype.
744
745 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
746 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
747
7482007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
749
750 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
751 (bison:ruleByNumber): ... this for clarity.
752 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
753 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
754 (xsl:template match="reduction"): Update.
755 (xsl:template match="item"): Update.
756 (xsl:template match="reduction"): Update.
757
758 In the XML output, don't print the list of rules where symbols appear.
759 Compute it in XSLT instead. Discussed at
760 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
761 * data/xslt/bison.xsl (bison:ruleByLhs): New.
762 (bison:ruleByRhs): New.
763 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
764 bison:ruleByRhs.
765 (xsl:template match="terminal/rule"): Remove.
766 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
767 bison:ruleByRhs.
768 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
769 Remove.
770 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
771 bison:ruleByRhs and mode="number-link" for rule template.
772 (xsl:template match="terminal/rule"): Remove.
773 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
774 bison:ruleByRhs and mode="number-link" for rule template.
775 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
776 Rewrite as...
777 (xsl:template match="rule" mode="number-link"): ... this.
778 * src/print-xml.c (print_grammar): Don't print the list of rules.
779
7802007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
781
782 Don't let --report affect XML output; always print all information.
783 Discussed at
784 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
785 * src/conflicts.c (log_resolution): Implement.
786 * src/print-xml.c (print_core): Implement.
787 (print_state): Implement.
788 (print_xml): Implement.
789
790 * NEWS (2.3a+): Fix quotes.
791 * src/parse-gram.y (prologue_declaration): For consistency with -v,
792 don't let %verbose clear the list specified by --report.
793
7942007-11-26 Akim Demaille <akim@epita.fr>
795
796 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
797
7982007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
799
800 In the XML output, list useless and unused symbols and rules with the
801 useful ones and add a "usefulness" attribute. Discussed starting at
802 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
803 * src/gram.c (grammar_rules_partial_print_xml): Remove.
804 (grammar_rules_print_xml): Print all rules instead of just those
805 useful in the grammar, and add a "usefulness" attribute.
806 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
807 * src/print-xml.c (print_rules_useless_in_parser): Remove.
808 (print_grammar): Print all nonterminals instead of just useful ones,
809 and add a "usefulness" attribute to nonterminals and terminals.
810 (print_xml): Don't print a separate "reductions" or
811 "rules-useless-in-parser" element.
812 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
813 (reduce_xml): Remove.
814 (reduce_token_unused_in_grammar): New.
815 (reduce_nonterminal_useless_in_grammar): New.
816 * src/reduce.h (reduce_xml): Remove prototype.
817 (reduce_token_unused_in_grammar): Add prototype.
818 (reduce_nonterminal_useless_in_grammar): Add prototype.
819 * data/xslt/xml2text.xsl: Update for XML changes.
820 * data/xslt/xml2xhtml.xsl: Update for XML changes.
821 * tests/reduce.at (Useless Terminals): Update output.
822 (Useless Rules): Update output.
823 (Reduced Automaton): Update output.
824
825 Say "Terminals unused in grammar" instead of "Unused terminals".
826 * NEWS (2.3a+): Update.
827 * doc/bison.texinfo (Understanding): Update example output.
828 * src/reduce.c (reduce_output): Implement.
829 * data/xslt/xml2text.xsl: Implement.
830 * data/xslt/xml2xhtml.xsl: Implement.
831
8322007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
833
834 Accept --report-file=FILE to override the default `.output' filename.
835 * NEWS (2.3a+): Mention.
836 * doc/bison.texinfo (Bison Options): Add an entry.
837 * src/files.c (compute_output_file_names): Don't override
838 spec_verbose_file if already set.
839 * src/getargs.c (usage): Document --report-file.
840 (REPORT_FILE_OPTION): New anonymous enum member.
841 (long_options): Add entry for it.
842 (getargs): Add case for it setting spec_verbose_file.
843
844 * build-aux/cross-options.pl: Don't record a short option just because
845 there's an arg.
846 * doc/.cvsignore: Add yacc.1.
847
8482007-11-14 Akim Demaille <akim@epita.fr>
849
850 * doc/yacc.1.in: New.
851 * configure.ac, doc/Makefile.am: Adjust.
852 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
853 config.h symbol.
854 Use AC_SUBST for assignments too.
855 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
856
8572007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
858
859 * src/gram.c: Remove comments that duplicate comments in gram.h.
860
861 When reporting useless rules and nonterminals, say "useless in grammar"
862 instead of "useless", and say "useless in parser" instead of "never
863 reduced". Discussed starting at
864 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
865 * NEWS (2.3a+): Mention this change.
866 * data/xslt/xml2text.xsl: Update output text and expected input XML
867 element names to match changes below.
868 * data/xslt/xml2xhtml.xsl: Likewise.
869 (xsl:template match="bison-xml-report"): Add missing entry in Table of
870 Contents: "Rules useless in parser due to conflicts".
871 * doc/bison.texinfo (Decl Summary): Reword a little.
872 (Understanding): Update example output for changes below.
873 * src/gram.c: (rule_useful_p): Rename to...
874 (rule_useful_in_grammar_p): ... this.
875 (rule_useless_p): Rename to...
876 (rule_useless_in_grammar_p): ... this.
877 (rule_never_reduced_p): Rename to...
878 (rule_useless_in_parser_p): ... this.
879 (grammar_rules_print): Update for renames.
880 (grammar_rules_print_xml): Update for renames.
881 (grammar_rules_never_reduced_report): Rename to...
882 (grammar_rules_useless_report): ... this since it is used for either
883 kind of useless rule.
884 * src/gram.h: Reword comments and update function names in prototypes.
885 * src/main.c (main): Say "rule useless in parser due to conflicts".
886 * src/print-xml.c (print_rules_never_reduced): Rename to...
887 (print_rules_useless_in_parser): ... this, and rename output XML
888 element "rules-never-reduced" to "rules-useless-in-parser".
889 (print_xml): Update for rename.
890 * src/print.c (print_results): Say "Rules useless in parser due to
891 conflicts".
892 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
893 (nonterminals_reduce): Say "nonterminal useless in grammar".
894 (reduce_output): Say "Nonterminals useless in grammar".
895 Say "Rules useless in grammar".
896 (reduce_xml): Rename output XML element "useless" to
897 "useless-in-grammar".
898 (reduce_print): Don't report the count of grammatically useless rules
899 as "rules never reduced" just because %yacc is specified.
900 In the correct report of this count, say nonterminal(s) and rule(s)
901 "useless in grammar".
902 * tests/conflicts.at (S/R in initial): Update expected output.
903 (Defaulted Conflicted Reduction): Likewise.
904 (Unreachable States After Conflict Resolution): Likewise.
905 * tests/existing.at (GNU pic Grammar): Likewise.
906 * tests/reduce.at (Useless Nonterminals): Likewise.
907 (Useless Rules): Likewise.
908 (Reduced Automaton): Likewise.
909 (Underivable Rules): Likewise.
910 (Empty Language): Likewise.
911
9122007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
913
914 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
915 here document and before the EOF so that BSD's implementation of Bourne
916 shell doesn't parse the delimiter as part of the here document.
917 * doc/.cvsignore: Add cross-options.texi.
918 * src/getargs.c (usage): Add a blank line after the warning categories.
919
9202007-11-08 Paolo Bonzini <bonzini@gnu.org>
921
922 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
923
9242007-11-05 Akim Demaille <akim@epita.fr>
925
926 Remove Id: from bison.1.
927 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
928 (perl -0777 -pi -e 's/\.PP\nId): New.
929 (.x.1): Use it to ignore the version control revision.
930
9312007-11-05 Akim Demaille <demaille@gostai.com>
932
933 * build-aux/Makefile.am: Ship cross-options.pl.
934 * doc/Makefile.am: Always refer to cross-options.texi with
935 $(srcdir).
936 (MAINTAINERCLEANFILES): Add it.
937
9382007-11-04 Akim Demaille <demaille@gostai.com>
939
940 Generate the long/short option cross-table.
941 * build-aux/cross-options.pl: New.
942 * doc/Makefile.am (cross-options.texi): New.
943 * doc/bison.texinfo: Use it.
944
9452007-11-04 Akim Demaille <demaille@gostai.com>
946
947 Generate bison.1 using help2man.
948 * doc/common.x, doc/bison.x: New.
949 * doc/Makefile.am (bison.1, .x.1): New.
950 The code is taken from autoconf-2.61/man/Makefile.am.
951 * configure.ac: Look for help2man.
952
9532007-11-04 Akim Demaille <demaille@gostai.com>
954
955 Complete --help.
956 * src/getargs.c (usage): Document -W, make it clear that -d,
957 -g and -x have optional arguments.
958
9592007-11-04 Akim Demaille <demaille@gostai.com>
960
961 Find sha1sum when named gsha1sum.
962 * bootstrap (find_tool): New.
963 ($SHA1SUM): New.
964
9652007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
966
967 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
968 at
969 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
970 * NEWS (2.3a+): Mention.
971 * data/bison.m4 (b4_pure_if): Don't define it here.
972 * data/c.m4 (b4_identification): Depend on individual skeletons to
973 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
974 values of the %define variables api.pure or api.push_pull. Define
975 YYPURE, YYPUSH, and YYPULL accordingly.
976 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
977 glr.cc has already defined b4_pure_flag.
978 * data/push.c: Define b4_pure_if based on `%define api.pure'.
979 Remove YYPUSH and YYPULL since they're back in b4_identification again.
980 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
981 * doc/bison.texinfo (Pure Decl): Update.
982 (Push Decl): Update.
983 (Decl Summary): Add api.pure to %define entry.
984 In %pure-parser entry, say it's deprecated and reference %define.
985 (Pure Calling): Update.
986 (Error Reporting): Update.
987 (C++ Scanner Interface): Update.
988 (How Can I Reset the Parser): Update.
989 (Table of Symbols): In %pure-parser entry, say it's deprecated and
990 reference %define.
991 * src/getargs.c (pure_parser): Remove global variable.
992 * src/getargs.h (pure_parser): Remove extern.
993 * src/output.c (prepare): Don't define pure_flag muscle.
994 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
995 wrapper around `%define api.pure'.
996 * tests/calc.at (Simple LALR Calculator): Update.
997 (Simple GLR Calculator): Update.
998 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
999 Update.
1000 (GLR: Resolve ambiguity, pure, locations): Update.
1001 (GLR: Merge conflicting parses, pure, no locations): Update.
1002 (GLR: Merge conflicting parses, pure, locations): Update.
1003 * tests/glr-regression.at (Uninitialized location when reporting
1004 ambiguity): Update
1005 * tests/input.at (Unused %define api.pure): New test case.
1006 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
1007 AT_PURE_IF and AT_PURE_AND_LOC_IF.
1008 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1009
10102007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1011
1012 %define push_pull -> %define api.push_pull. Discussed starting at
1013 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
1014 * data/push.c: Expect the new name.
1015 * data/yacc.c: Likewise.
1016 * doc/bison.texinfo (Push Decl): Update.
1017 (Decl Summary): Update %define entry.
1018 (Push Parser Function): Update.
1019 (Pull Parser Function): Update.
1020 (Parser Create Function): Update.
1021 (Parser Delete Function): Update.
1022 * tests/calc.at (Simple LALR Calculator): Update.
1023 * tests/input.at (%define enum variables): Update.
1024 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1025 (Push Parsing: Multiple impure instances): Update.
1026 (Push Parsing: Unsupported Skeletons): Update.
1027 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
1028 (Exploding the Stack Size with Malloc): Update.
1029
1030 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
1031 other entries some.
1032
10332007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
1034
1035 For the XML output's terminal element, rename @number to @token-number,
1036 and add @symbol-number. In the nonterminal element, rename @number to
1037 @symbol-number. Discussed starting at
1038 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
1039 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
1040 renames.
1041 (xsl:template match="nonterminal"): Likewise.
1042 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
1043 (xsl:template match="nonterminal"): Likewise.
1044 * src/print-xml.c (print_grammar): Implement.
1045
10462007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1047
1048 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
1049 2007-10-11 change, the child elements here are items not rules.
1050 (xsl:template match="item"): New.
1051 (xsl:template match="rule"): Update for new reduced itemset.
1052 (xsl:template match="point"): Remove.
1053 (xsl:template match="empty"): For consistency with --graph, don't
1054 output "/* empty */".
1055 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
1056 line-wrap, don't pass a negative value as first-line-length since this
1057 won't work with the following changes.
1058 (xsl:template name="line-wrap"): Simplify slightly.
1059 (xsl:template name="ws-search"): Eliminate recursion.
1060 * src/print_graph.c (print_core): Don't print a reduction's lookahead
1061 set next to an item whose dot is not at the end of the RHS even if it
1062 happens to be associated with the same rule.
1063
10642007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1065
1066 Add %define lr.keep_unreachable_states.
1067 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
1068 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
1069 * src/main.c (main): Implement it.
1070 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1071 Extend to test it, and fix a typo.
1072
10732007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1074
1075 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
1076 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
1077 the example .output text.
1078 * tests/regression.at (Extra lookahead sets in report): Improve wording
1079 of comments.
1080
10812007-10-17 Wojciech Polak <polak@gnu.org>
1082
1083 * src/print-xml.c (print_grammar): Renamed
1084 <terminal> and <nonterminal> attributes:
1085 "type" to "number" and "symbol" to "name".
1086 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
1087 Use new attribute names.
1088 (xsl:template match="nonterminal"): Likewise.
1089 * data/xslt/xml2xhtml.xsl: Likewise.
1090
10912007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
1092
1093 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
1094 (Option Cross Key): Likewise.
1095
1096 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
1097 next to an item whose dot is not at the end of the RHS even if it
1098 happens to be associated with the same rule.
1099 * src/print.c (print_core): Likewise.
1100 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
1101 (Resolved SR Conflicts): Update output.
1102 * tests/regression.at (Extra lookahead sets in report): New test case.
1103
11042007-10-11 Wojciech Polak <polak@gnu.org>
1105
1106 * src/print-xml.c (print_core): Remove item set
1107 redundancy.
1108 * data/xslt/bison.xsl (bison:ruleNumber): New key.
1109 Improve processing time. Suggested by Joel E. Denny.
1110 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
1111 Write xsl:param "required" attribute as comment.
1112 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
1113 (xsl:template match="rule"): Support new reduced itemset.
1114 (xsl:template match="point"): Remove.
1115 * data/xslt/xml2xhtml.xsl: Likewise.
1116
11172007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1118
1119 * src/getargs.c (version): Update copyright year.
1120
11212007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1122
1123 Make xml2dot.xsl and --graph produce the same output.
1124 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
1125 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
1126 escaped later.
1127 (xsl:template name="output-node"): Use the new escape template instead
1128 of the string-replace template directly.
1129 (xsl:template name="output-edge"): Likewise.
1130 (xsl:template name="escape"): New, escapes backslashes and newlines in
1131 addition to quotation marks.
1132 * src/graphviz.c (start_graph, output_node, output_edge): Add
1133 whitespace to output for legibility.
1134
1135 Make xml2text.xsl and --report produce the same output, and remove the
1136 XML "conflicts" element since a conflict summary is easily extracted
1137 from the automaton.
1138 * data/xslt/bison.xsl: New.
1139 (xsl:template match="state" mode="bison:count-conflicts): New.
1140 * data/xslt/xml2text.xsl: Import bison.xsl.
1141 (xsl:template match="bison-xml-report"): Instead of styling the
1142 "conflicts" element, style the "automaton" element with mode
1143 "conflicts". Unlike the former, the latter lists S/R and R/R
1144 conflicts for a state on the same line.
1145 (xsl:template match="conflicts"): Remove.
1146 (xsl:template match="conflict"): Remove.
1147 (xsl:template match="terminal"): Line-wrap the list of rules in which
1148 the terminal is used.
1149 (xsl:template match="nonterminal"): Likewise for nonterminals.
1150 (xsl:template match="automaton" mode="conflicts"): New.
1151 (xsl:template match="state" mode="conflicts"): New.
1152 (xsl:template name="line-wrap"): New.
1153 (xsl:template name="ws-search"): New.
1154 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
1155 (xsl:template match="bison-xml-report"): Instead of styling the
1156 "conflicts" element, style the "automaton" element with mode
1157 "conflicts."
1158 (xsl:template match="conflicts"): Remove.
1159 (xsl:template match="conflict"): Remove.
1160 (xsl:template match="automaton" mode="conflicts"): New.
1161 (xsl:template match="state" mode="conflicts): New.
1162 * src/conflicts.c (conflicts_output_xml): Remove.
1163 * src/conflicts.h (conflicts_output_xml): Remove prototype.
1164 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
1165 * src/print.c (print_grammar): Consistently wrap at the 66th column so
1166 the corresponding XSLT is easier. Also, never wrap between a word and
1167 the comma that follows it.
1168
11692007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1170
1171 Improve C++ namespace support. Discussed starting at
1172 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
1173 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
1174 b4_namespace_close): New macros that interpret the %define variable
1175 "namespace" so its value can contain "::" to indicate nested
1176 namespaces.
1177 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
1178 the above macros.
1179 * data/lalr1.cc (b4_namespace): Likewise.
1180 * data/location.cc (b4_namespace): Likewise.
1181 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
1182 inside a new table in the general %define entry. Document `%define
1183 namespace' there as well. Point the %name-prefix entry to it since it
1184 explains it more completely in the case of C++.
1185 (C++ Bison Interface): Mention `%define namespace' instead of
1186 %name-prefix.
1187 (Table of Symbols): Remove the `%define push_pull' entry. The %define
1188 entry suffices.
1189 * tests/c++.at (Relative namespace references): New test case.
1190 (Absolute namespace references): New test case.
1191 (Syntactically invalid namespace references): New test case.
1192 * tests/input.at (C++ namespace reference errors): New test case.
1193
11942007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1195
1196 Add syncline support and location accessor to internal %define
1197 interfaces.
1198 * data/bison.m4 (b4_percent_define_get_loc): New.
1199 (b4_percent_define_get_syncline): New.
1200 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
1201 (b4_percent_define_default): Record defining location as line 1 rather
1202 than 0 for the sake of synchronizing #line's, and define
1203 b4_percent_define_syncline(VARIABLE).
1204 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
1205 * src/muscle_tab.c (muscle_syncline_grow): New.
1206 (muscle_code_grow): Use muscle_syncline_grow.
1207 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
1208 define b4_percent_define_syncline(VARIABLE).
1209 (muscle_percent_define_get_loc): New.
1210 (muscle_percent_define_get_syncline): New.
1211 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
1212 remove some unused variables.
1213 (muscle_percent_define_default): Record defining location as line 1
1214 rather than 0 for the sake of synchronizing #line's, and define
1215 b4_percent_define_syncline(VARIABLE).
1216 (muscle_percent_define_check_values): Use
1217 muscle_percent_define_get_loc.
1218 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
1219 (muscle_percent_define_get_syncline): Prototype.
1220 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1221 defaults): Update output for location change.
1222 (Complaining during macro argument expansion): Extend to test
1223 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
1224
12252007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
1226
1227 Fix some error-reporting macro bugs.
1228 * data/bison.m4 (b4_cat): New.
1229 (b4_error, b4_error_at): Use b4_cat to send error directives directly
1230 to stdout so they don't become arguments to other macros. Update
1231 comments and add examples.
1232 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
1233 add examples.
1234 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
1235 after printing the error directive so that M4 doesn't report subsequent
1236 problems that are induced by this problem.
1237 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
1238 instead of just in them. Recognize @\n in both places. Both expand to
1239 the empty string. Needed by b4_cat.
1240 * tests/skeletons.at (Complaining during macro argument expansion):
1241 New test case.
1242 (Fatal errors make M4 exit immediately): New test case.
1243
12442007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
1245
1246 Implement --print-datadir.
1247 * src/getargs.c (usage): Mention.
1248 (PRINT_DATADIR_OPTION): New anonymous enum member.
1249 (long_options): Add entry for it.
1250 (getargs): Add case for it calling compute_pkgdatadir.
1251 * src/output.c (output_skeleton): Encapsulate data directory
1252 computation from here...
1253 (prepare): ... and from here...
1254 (compute_pkgdatadir): ... into this new function.
1255 * src/output.h (compute_pkgdatadir): Prototype.
1256
12572007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
1258
1259 * src/print-xml.c (escape_bufs): New static global variable
1260 replacing...
1261 (xml_escape_n): ... the static local variable buf here.
1262 (print_xml): Free memory for escape_bufs.
1263 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
1264
12652007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
1266
1267 Replace `%push-parser' and `%push-pull-parser' with
1268 `%define push_pull "push"' and `%define push_pull "both"'.
1269 `%define push_pull "pull"' is the default.
1270 * doc/bison.texinfo (Push Decl, Push Parser Function,
1271 Pull Parser Function, Parser Create Function, Parser Delete Function):
1272 Update declarations.
1273 (Decl Summary, Table of Symbols): Replace %push-parser and
1274 %push-pull-parser entries with a %define push_pull entry.
1275 * data/bison.m4 (b4_percent_define_check_values): New macro.
1276 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
1277 definitions...
1278 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
1279 definitions...
1280 * data/push.c: ... to here and compute them from the value of the
1281 %define variable push_pull.
1282 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
1283 parsing requests here...
1284 * data/yacc.c: ... hack this to switch to push.c any time
1285 b4_use_push_pull_flag or the %define variable push_pull is set. This
1286 will go away when we mv push.c yacc.c.
1287 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
1288 push parsing is not supported since unused %define variables are
1289 reported anyway.
1290 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
1291 * src/muscle_tab.h (muscle_percent_define_check_values): Update
1292 comments for consistency with b4_percent_define_check_values.
1293 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
1294 muscles.
1295 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
1296 Remove.
1297 (prologue_declaration): Remove %push-parser and %push-pull-parser
1298 rules.
1299 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
1300 * tests/calc.at: Update declarations.
1301 * tests/input.at (%define enum variables): New test case.
1302 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
1303 declaration.
1304 (Push Parsing: Multiple impure instances): Update declaration.
1305 (Push Parsing: Unsupported Skeletons): New test case.
1306 * tests/torture.at (Exploding the Stack Size with Alloca): Update
1307 declaration.
1308 (Exploding the Stack Size with Malloc): Update declaration.
1309
13102007-09-24 Wojciech Polak <polak@gnu.org>
1311
1312 Add XSLT transformations.
1313
1314 * data/xslt/xml2dot.xsl: Transform XML into DOT.
1315 * data/xslt/xml2text.xsl: Transform XML into plain text.
1316 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
1317 * data/Makefile.am (xsltdir): New variable.
1318 (dist_xslt_DATA): Add xslt/*.xsl files.
1319
13202007-09-23 Paul Eggert <eggert@cs.ucla.edu>
1321
1322 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
1323 Problem reported by Wojciech Polak.
1324 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
1325 (xml_printf): Undo change I made on 21 September; that is,
1326 indent 2 spaces, not 1.
1327
13282007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
1329
1330 Pacify ./configure --enable-gcc-warnings.
1331 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
1332 `char const *' instead of `char *'.
1333 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
1334 local variable `sep'.
1335
13362007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1337
1338 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
1339 elsewhere.
1340 * src/print-xml.c: Prefer "const" after types; that's more consistent.
1341 (xml_printf): Indent just 1 space for level.
1342 (e_char, xlate_char): Remove.
1343 (xml_escape_string): Rewrite to avoid undefined behavior (used
1344 storage that was freed from the stack).
1345 (xml_escape_n): Don't bother checking for subscript error.
1346
13472007-09-21 Wojciech Polak <polak@gnu.org>
1348
1349 Add Bison XML Automaton Report.
1350
1351 Add support for an -x option to generate an XML report.
1352 It is not documented yet.
1353 * src/print-xml.c: New file.
1354 * src/print-xml.h: Likewise.
1355 * lib/timevar.def (TV_XML): New var.
1356 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
1357 * src/conflicts.c: Include print-xml.h.
1358 (solved_conflicts_xml_obstack): New var.
1359 (log_resolution, conflicts_solve, conflicts_free):
1360 Add support for XML report.
1361 (conflicts_output_val): New function.
1362 * src/conflicts.h (conflicts_output_val): New decl.
1363 * src/files.c (spec_xml_file): New var.
1364 (compute_output_file_names, output_file_names_free): Add XML support.
1365 * src/files.h (spec_xml_file): New decl.
1366 * src/getargs.c (xml_flag): New var.
1367 (usage, short_options, long_options, getargs): Add XML support.
1368 * src/getargs.h (xml_flag): New decl.
1369 * src/gram.c: Include print-xml.h.
1370 (rule_lhs_print_xml, rule_rhs_print_xml):
1371 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
1372 New functions.
1373 * src/gram.h: Declare external ones.
1374 * src/main.c: Include print-xml.h.
1375 (main): Add XML support.
1376 * src/reduce.c: Include print-xml.h.
1377 (reduce_xml): New function.
1378 * src/reduce.h: Declare it.
1379 * src/state.c: Include print-xml.h.
1380 (state_new): Add XML support.
1381 (state_rule_lookahead_tokens_print_xml): New function.
1382 * src/state.h: Declare it.
1383 (struct state): New member solved_conflicts_xml.
1384 * src/symtab.c (symbol_class_get_string): New function.
1385 * src/symtab.h: Declare it.
1386
13872007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1388
1389 * GNUmakefile: Switch to coreutils's version.
1390 * bootstrap: Likewise.
1391 * Makefile.cfg: Adjust to new GNUmakefile.
1392 * README-hacking: Likewise.
1393
1394 Import from gnulib:
1395
1396 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1397 Bruno Haible <bruno@clisp.org>
1398
1399 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
1400 and is a script that invokes bison. Tighten the code. Add comments.
1401
14022007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
1403
1404 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1405 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1406 * doc/bison.texinfo (Decl Summary): Fix.
1407 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1408 * tests/input.at (Boolean %define variables): Update output.
1409 * tests/skeletons.at (%define boolean variables: invalid skeleton
1410 defaults): Rename to...
1411 (%define Boolean variables: invalid skeleton defaults): ... this and
1412 update output.
1413
14142007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1415
1416 In impure push mode, don't allow more than one yypstate to be allocated
1417 since multiple impure parsers would corrupt yynerrs.
1418 * data/push.c (yypstate_allocated): New static global variable
1419 initialized to 0.
1420 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1421 exhaustion if yypstate_allocated is 1, but still return 2.
1422 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1423 already 1. Otherwise, set it to 1.
1424 (yypstate_delete): Set it to 0.
1425 * tests/push.at (Push Parsing: Multiple impure instances): New test
1426 case.
1427
14282007-08-17 Bob Rossi <bob@brasko.net>
1429
1430 * doc/bison.texinfo (Push Decl): Document the push parser.
1431 (Table of Symbols): Ditto.
1432 (Pure Decl): Ditto.
1433 (Decl Summary): Ditto.
1434 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1435 Parser Create Function, Parser Delete Function):
1436 Add new push parser symbols.
1437 (Table of Symbols): Document push-parser, push-pull-parser,
1438 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1439
14402007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1441
1442 Update to GPLv3.
1443 * doc/gpl-3.0.texi: New file.
1444 * doc/gpl.texi: Remove.
1445 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1446 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1447 * README-hacking, TODO, bootstrap, bootstrap.conf:
1448 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1449 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1450 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1451 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1452 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1453 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1454 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1455 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1456 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1457 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1458 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1459 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1460 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1461 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1462 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1463 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1464 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1465 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1466 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1467 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1468 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1469 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1470 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1471 * src/complain.c, src/complain.h, src/conflicts.c:
1472 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1473 * src/files.h, src/flex-scanner.h, src/getargs.c:
1474 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1475 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1476 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1477 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1478 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1479 * src/print.c, src/print.h, src/print_graph.c:
1480 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1481 * src/reduce.h, src/relation.c, src/relation.h:
1482 * src/revision.h, src/scan-code.h, src/scan-code.l:
1483 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1484 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1485 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1486 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1487 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1488 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1489 * tests/existing.at, tests/glr-regression.at:
1490 * tests/headers.at, tests/input.at, tests/java.at:
1491 * tests/local.at, tests/output.at, tests/push.at:
1492 * tests/reduce.at, tests/regression.at, tests/sets.at:
1493 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1494 * tests/torture.at:
1495 Update to GPLv3.
1496
14972007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1498
1499 Get rid of broken %no-parser, -n, and --no-parser implementation and
1500 documentation.
1501 * TODO: Don't mention them.
1502 * doc/bison.1: Likewise.
1503 * doc/bison.texinfo (Decl Summary): Likewise.
1504 (Bison Options): Likewise.
1505 (Option Cross Key): Likewise.
1506 * src/getargs.c (no_parser_flag): Remove global variable.
1507 (usage): Don't print description of -n and --no-parser.
1508 (long_options): Remove --no-parser entry here.
1509 (getargs): Remove -n case in the switch here.
1510 * src/getargs.h (no_parser_flag): Remove extern.
1511 * tests/regression.at (Web2c Actions): Remove comment that mentions
1512 --no-parser.
1513
15142007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1515
1516 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1517 name user variables starting with `yy'. Just pass NULL instead of a
1518 dummy local &yylval to yypush_parse.
1519 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1520 starting with `yy'.
1521
15222007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1523
1524 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1525 true since it's then always used regardless of whether yyoverflow is
1526 defined. Reported by Christian Burger at
1527 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1528 * THANKS: Add Christian Burger.
1529
1530 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1531 node names: say "Decl Summary" not "Bison Declaration Summary".
1532
15332007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1534
1535 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1536 determine whether this function has already complained about an invalid
1537 value for a %define boolean variable, don't check whether Bison has
1538 ever examined the value. As written, the check was a tautology.
1539 Instead, record and check for this complaint using a separate muscle.
1540
15412007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1542
1543 Fix push parsing memory leak reported by Brandon Lucia at
1544 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1545 * THANKS: Add Brandon Lucia.
1546 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1547 but the parse never completed and thus freed it.
1548 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1549 * tests/testsuite.at: Include push.at.
1550 * test/push.at: New.
1551 (Push Parsing: Memory Leak for Early Deletion): New test case.
1552
15532007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1554
1555 Improve handling of multiple S/R conflicts in the same state and of S/R
1556 conflicts involving multiple reductions.
1557 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1558 set for a state here or Bison will abort if it is reassigned on a
1559 later conflicted reduction in the same state.
1560 Similarly, don't finalize and assign the solved conflicts report here
1561 or it will be lost if it is reassigned on a later conflicted reduction
1562 in the same state.
1563 (set_conflicts): Instead, assign them both here after all S/R conflicts
1564 in the state have been fully examined.
1565 * src/print.c (shift_set): Rename to...
1566 (no_reduce_set): ... this.
1567 (print_reductions): Update for rename, and add %nonassoc error action
1568 tokens to no_reduce_set so that, when printing the first remaining
1569 reduction on an error action token, the reduction is enclosed in
1570 brackets.
1571 (print_results): Update for rename.
1572 * tests/conflicts.at (Solved conflicts report for multiple reductions
1573 in a state): New test case.
1574 (%nonassoc error actions for multiple reductions in a state): New test
1575 case.
1576
1577 * src/main.c (main): Don't depend on C99 features.
1578
15792007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1580
1581 * build-aux/.cvsignore: Add compile.
1582 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1583 uniwidth.
1584
15852007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1586
1587 * bootstrap (slurp): Create target directories that don't exist.
1588 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1589
15902007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1591
1592 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1593 than item number.
1594 * closure.c (closure): Likewise.
1595 * state.h (reductions): Comment sorting of rules.
1596 (state): Comment sorting of items.
1597
15982007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1599
1600 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1601 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1602 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1603 definition in order to avoid Gnulib headers since we don't use config.h
1604 here.
1605 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1606 rather than AT_DATA so that config.h is included.
1607
16082007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1609
1610 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1611 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1612 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1613 and so that YYFPRINTF is guaranteed to be defined here.
1614
16152007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1616
1617 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1618 with...
1619 (muscle_percent_define_check_values): ... this more helpful function.
1620 Again, it's not used yet, but it will be.
1621 * src/muscle_tab.h: Likewise.
1622
1623 Improve some comments in parser table construction.
1624 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1625 (generate_states): Don't mention ruleset, which is internal to closure.
1626 * src/closure.c (closure): Explain sorting of core and itemset, which
1627 is required for this function to behave correctly.
1628 * src/closure.h (closure): Mention sorting.
1629
16302007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1631
1632 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1633 move the check for disabled transitions to an aver since conflict
1634 resolution hasn't happened yet.
1635
1636 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1637 labels a state as inconsistent just because it has error transitions.
1638 The original form of this check appeared in revision 1.1 of lalr.c,
1639 which was committed on 1991-12-21. Now (at least), changing the
1640 consistency label on such a state appears to have no useful effect in
1641 any of the places it is examined, which I enumerate below. The key
1642 point to understanding each item in this enumeration is that a state
1643 with an error transition is labelled consistent in the first place only
1644 if it has no rules, so the check cannot matter for states that have
1645 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1646 to try to identify its conflicts, and a state must have *rules* to have
1647 conflicts. (2) Labelling a state as inconsistent will affect how
1648 action_row sets the default *rule* for the state. (3) Labelling a
1649 state as inconsistent will cause build_relations to add lookback edges
1650 to *rules* in that state.
1651 * src/state.h (struct state): Word the comment for member consistent
1652 more carefully.
1653
16542007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1655
1656 Don't depend on C99 features.
1657 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1658 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1659 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1660 * src/state.c (state_mark_reachable_states): Fix for-loop.
1661 (state_remove_unreachable_states): Fix for-loop.
1662
1663 Don't widen struct state with member reachable just to temporarily
1664 record reachability. Instead, use a local bitset.
1665 * src/state.h (struct state): Remove member.
1666 * src/state.c (state_new): Don't initialize it.
1667 (state_mark_reachable_states): Rename to...
1668 (state_record_reachable_states): ... this, and use bitset.
1669 (state_remove_unreachable_states): Use bitset.
1670
16712007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1672
1673 * src/Makefile.am (yacc): Quote target action commands properly so
1674 that the yacc script isn't corrupt. Reported by Hans Aberg at
1675 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1676
1677 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1678 the case of pure parsers. Reported by Frans Englich at
1679 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1680 * THANKS: Add Frans Englich.
1681
1682 * NEWS (2.3a+): In the %code entry, reference section `Bison
1683 Declaration Summary' from the manual now since the %code summary has
1684 moved there.
1685 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1686 in the rules section must be terminated by semicolons.
1687
16882007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1689
1690 Extend the front-end API for %define variables to more completely
1691 mirror the back-end. This will be useful in the future.
1692 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1693 Update comments to mention the new front-end counterparts of these
1694 macros.
1695 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1696 for muscle_string_decode and muscle_location_decode.
1697 (muscle_string_decode): New static function.
1698 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1699 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1700 functions.
1701 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1702 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1703 implementation more closely.
1704 (muscle_percent_define_invalid_value): New function.
1705 * src/muscle_tab.h (muscle_percent_define_get,
1706 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1707 Prototype.
1708
17092007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1710
1711 * NEWS (2.3a+): Mention yesterday's state-removal change.
1712 (2.3a): Remove the %language entry, which was added after 2.3a.
1713 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1714 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1715 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1716 tests/existing.at: Update copyright date.
1717
17182007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1719
1720 If conflict resolution makes states unreachable, remove those states,
1721 report rules that are then unused, and don't report conflicts in those
1722 states.
1723 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1724 New global function.
1725 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1726 function.
1727 * src/main.c (main): After conflict resolution, remove the unreachable
1728 states and update all data structures that reference states by number.
1729 * src/state.c (state_new): Initialize each state's reachable member to
1730 false.
1731 (state_mark_reachable_states): New static function.
1732 (state_remove_unreachable_states): New global function.
1733 * src/state.h (struct state): Add member bool reachable.
1734 (state_remove_unreachable_states): Prototype.
1735 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1736 New test case.
1737 * tests/existing.at (GNU pic Grammar): Update test case output now that
1738 an unused rule is discovered.
1739
17402007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1741
1742 Minor code cleanup in parser table construction.
1743 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1744 (new_itemsets, save_reductions): Update for rename to nitemset.
1745 * src/closure.c (nritemset): Rename to...
1746 (nitemset): ... this since the "r" appears to meaningless and isn't
1747 used in the comments.
1748 (closure): Update for rename.
1749 * src/closure.h (nritemset): Update extern to...
1750 (nitemset): ... this.
1751 * src/lalr.c (LA): Fix a typo in comments.
1752 * src/print.c (print_core): Update for rename to nitemset.
1753 * src/print_graph.c (print_graph): Likewise.
1754 * src/state.h: Fix some typos in header comments.
1755
17562007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1757
1758 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1759 still sticks to ASCII. Sorry!
1760
1761 * README-hacking: New file, taken mostly from coreutils, with changes
1762 for Bison. Contains much of the contents of:
1763 * README-cvs: Remove.
1764 * bootstrap: Sync from gnulib.
1765 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1766 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1767
17682007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1769
1770 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1771 Setzer.
1772 (Java Differences): Fix some typos.
1773 * THANKS: Add Sebastian Setzer.
1774
17752007-03-07 Paolo Bonzini <bonzini@gnu.org>
1776
1777 * data/java.m4 (b4_single_class_if): Remove.
1778 (b4_abstract_if): Look at "%define abstract".
1779 (b4_lexer_if): New.
1780 (b4_union_name): Rename...
1781 (b4_yystype): ... to this. Map to "%define stype".
1782 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1783 b4_maybe_throws): Fix quoting.
1784 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1785 * data/lalr1.java (Lexer interface): Always define.
1786 (Lexer interface within parser class): Remove.
1787 (YYLexer class): New, used when "%code lexer" is present.
1788 (constructor): When "%code lexer" is used, pass %lex-param
1789 to the lexer constructor.
1790 (yylex, yyparse): Remove %lex-param from method invocations
1791 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1792
1793 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1794 abstract". Rename "%define union_name" to "%define stype".
1795 Rename method names according to previous patch.
1796 (Java Scanner Interface): Describe "%code lexer" instead of
1797 "%pure-parser" and "%define single_class".
1798 (Java Differences): Mention "%code lexer".
1799
1800 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1801 Include scanner here, using macros from tests/local.at.
1802 (AT_DATA_CALC_Y): Remove final argument.
1803 (_AT_CHECK_JAVA_CALC): Likewise.
1804 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1805 of %locations and %error-verbose.
1806 (main): Test with and without %lex-param.
1807 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1808 (AT_BISON_OPTION_POPDEFS): Pop it.
1809
18102007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1811
1812 DJGPP spefic issue. Inhibit the use of disallowed characters for
1813 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1814 and concern testsuite case 46.
1815 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1816 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1817 * djgpp/config.bat: Inhibit the use of disallowed characters.
1818
18192007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1820
1821 Miscellaneous %define and %code cleanup.
1822 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1823 values are interpreted.
1824 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1825 documentation a little more.
1826 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1827 muscle_percent_define_insert, muscle_percent_code_grow): New
1828 functions/macros.
1829 * src/muscle_tab.h (muscle_percent_define_insert,
1830 muscle_percent_code_grow): Prototype.
1831 * src/parse-gram.y (prologue_declaration): Use
1832 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1833 %define and %code directives.
1834
1835 Make it easy to share %define boolean variables between the front-end
1836 and back-end. Though not used yet, this will be useful in the future.
1837 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1838 Bison uses of names rather than just skeleton uses of names.
1839 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1840 b4_percent_define_skeleton_variables(VARIABLE) to
1841 b4_percent_define_bison_variables(VARIABLE).
1842 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1843 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1844 b4_percent_code_bison_qualifiers(QUALIFIER).
1845 (b4_check_user_names_wrap): Update for renames.
1846 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1847 muscle_percent_define_default): New functions mimicking
1848 b4_percent_define_flag_if and b4_percent_define_default.
1849
1850 For %define variables, report locations for invalid values and
1851 redefinitions.
1852 * data/bison.m4 (b4_percent_define_flag_if): Read
1853 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1854 value for VARIABLE.
1855 (b4_percent_define_default): Save a special location in
1856 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1857 must later be reported as invalid.
1858 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1859 functions.
1860 (muscle_percent_define_insert): Record the location of VARIABLE in
1861 muscle percent_define_loc(VARIABLE), and use it to report the previous
1862 location for a redefinition.
1863 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1864 (muscle_percent_define_default): Update like b4_percent_define_default.
1865 (muscle_grow_user_name_list): Rename to...
1866 (muscle_user_name_list_grow): ... this for consistency and use
1867 muscle_location_grow.
1868 * src/muscle_tab.h (muscle_location_grow): Prototype.
1869 * tests/input.at (%define errors): Update expected output.
1870 * tests/skeletons.at (%define boolean variables: invalid skeleton
1871 defaults): New test case.
1872
18732007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1874
1875 * src/print.c (lookahead_set, state_default_rule): Remove.
1876 (print_reductions): Replace state_default_rule invocation with
1877 equivalent use of yydefact, which was computed in token_actions in
1878 tables.c.
1879 (print_results): Don't allocate lookahead_set.
1880
18812007-02-27 Paolo Bonzini <bonzini@gnu.org>
1882
1883 * data/lalr1.java: Prefix all private members with yy.
1884
18852007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1886
1887 Use YYFPRINTF instead of fprintf where appropriate. Reported by
1888 Sebastien Fricker at
1889 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
1890 * THANKS: Add Sebastien Fricker.
1891 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1892 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1893 accept a variable number of arguments.
1894
18952007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1896
1897 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1898
18992007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1900
1901 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1902 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1903 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1904
19052007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1906
1907 Undo my 2007-02-07 change, switching back to the c-strcase module
1908 introduced in the 2007-02-03 change. Bruno Haible reported that
1909 the 2007-02-07 change would be dangerous in Turkish if we add a
1910 language whose name contains "i", since "i" is not lowercase "I"
1911 in Turkish.
1912 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1913 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1914 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1915 * m4/.cvsignore: Remove strcase.m4.
1916 * src/getargs.c: Revert 2007-02-07 change, as follows.
1917 Include c-strcase.h.
1918 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1919
19202007-02-11 Bruno Haible <bruno@clisp.org>
1921
1922 Enable the Java related testsuite tests when the only Java compiler
1923 found is a gcj < 4.3. Discussed at
1924 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1925 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1926
19272007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1928
1929 * data/Makefile.am: Update copyright date.
1930 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1931 yypstate_new returns NULL.
1932 (yypstate_new): Return NULL if malloc does.
1933 * src/reader.c (packgram): Move translation of rule actions from the
1934 beginning of packgram to...
1935 (check_and_convert_grammar): ... here right before packgram is invoked
1936 so it's easier to write more complete comments, and remove redundant
1937 code.
1938
19392007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1940
1941 As in semantic actions, make @$ in %initial-action, %destructor, and
1942 %printer imply %locations.
1943 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1944 scanning @$.
1945 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1946 (@$ in %initial-action implies %locations,
1947 @$ in %destructor implies %locations,
1948 @$ in %printer implies %locations): ... these new test cases.
1949
19502007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1951
1952 Undo most of the 2007-02-03 change, switching to the strcase module
1953 now that gnulib strcase has been fixed.
1954 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1955 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1956 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1957 * m4/.cvsignore: Add strcase.m4.
1958 * src/getargs.c: Revert 2007-02-03 change, as follows.
1959 Don't include c-strcase.h.
1960 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1961 strcasecmp has "unspecified behavior" outside the POSIX locale,
1962 but it works fine in practice if at least one argument is ASCII,
1963 as is the case in Bison.
1964
19652007-02-07 Paolo Bonzini <bonzini@gnu.org>
1966
1967 * tests/java.at: Skip tests if only one of javac/java is present.
1968 Reported by Joel E. Denny.
1969 * tests/atlocal.in: Adjust copyright years.
1970
19712007-02-05 Paolo Bonzini <bonzini@gnu.org>
1972
1973 * data/lalr1.java (Stack): Work around old verifiers that disallow
1974 access to the private fields of an inner class, from the outer class.
1975 We can make Stack's fields public because user code doesn't have access
1976 to the instance of Stack used by parse(). Reported by Paul Eggert.
1977
19782007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1979
1980 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1981 the right spot for these files?
1982 * bootstrap.conf (gnulib_modules): Add c-strcase.
1983 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1984 c-strncasecmp.c.
1985 * src/getargs.c: Include c-strcase.h.
1986 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1987 to avoid unspecified behavior.
1988
19892007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1990
1991 * doc/bison.texinfo (Decl Summary): Correct typo.
1992
19932007-01-30 Paolo Bonzini <bonzini@gnu.org>
1994
1995 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1996 Complain if the value does not match empty, "true" or "false".
1997 * data/c++.m4: Adjust default definitions of %define variables.
1998 * data/java.m4: Adjust default definitions of %define variables.
1999 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
2000 to above behavior.
2001 * tests/input.at (Boolean %define variables): Test new behavior.
2002
20032007-01-29 Paolo Bonzini <bonzini@gnu.org>
2004
2005 * NEWS: Mention java.
2006 * TODO: Remove things that are done.
2007 * bootstrap.conf: Add javacomp-script and javaexec-script.
2008 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
2009
2010 * data/Makefile.am: Add new files.
2011 * data/java-skel.m4: New.
2012 * data/java.m4: New.
2013 * data/lalr1.java: New.
2014
2015 * doc/bison.texinfo: Put "A Complete C++ Example" under
2016 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
2017 under Other Languages.
2018
2019 * src/getargs.c (valid_languages): Add Java.
2020 * src/getargs.h (struct bison_language): Update size of string fields.
2021
2022 * tests/Makefile.am: Add java.at.
2023 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
2024 * tests/java.at: New.
2025 * tests/testsuite.at: Include it.
2026
20272007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
2028
2029 Clean up.
2030 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
2031 at_directive_argv arguments so these no longer have to be global
2032 variables. Also, update the implementation for the following changes.
2033 (fail_for_at_directive_too_many_args,
2034 fail_for_at_directive_too_few_args): Add at_directive_name argument.
2035 (at_directive_name): Remove as at_directive_argv[0] will be used for
2036 this now.
2037 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
2038 for the directive name.
2039 (at_directive_argc, at_directive_argv): Make these local within
2040 skel_lex instead of global.
2041 (INITIAL): Update directive start action for above changes.
2042 (SC_AT_DIRECTIVE_ARG): Rename to...
2043 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
2044 (SC_AT_DIRECTIVE_SKIP_WS): Update.
2045 (scan_skel): Move yylex_destroy to...
2046 (skel_scanner_free): ... here.
2047 * tests/skeletons.at (installed skeleton file name): Rename to...
2048 (installed skeleton file names): ... this.
2049
20502007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
2051
2052 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2053 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
2054 Summary" not "Directives".
2055 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
2056 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
2057 since the former is now the more complete one.
2058 (Prologue Alternatives): Likewise and do the same for %defines.
2059 (Table of Symbols): Add summary of %code, add summary of %define, and
2060 move full %code documentation to...
2061 (Decl Summary): ... here for consistency with other entries in these
2062 sections.
2063 Move %define entry in order to keep this list alphabetized.
2064 Reword %define entry a little to put less emphasis on the skeleton
2065 concept, which most users shouldn't have to think about.
2066
20672007-01-26 Paul Eggert <eggert@cs.ucla.edu>
2068
2069 Adjust to recent gnulib changes.
2070 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
2071 Add string.h, string_.h, unistd_.h, wchar_.h.
2072 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
2073 * src/system.h: Don't include <stpcpy.h>; this is now done by
2074 <string.h>.
2075
20762007-01-23 Paolo Bonzini <bonzini@gnu.org>
2077
2078 Simplify implementation of unqualified %code, implement macros for
2079 uniform treatment of boolean %define flags. Document %define.
2080 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
2081 b4_percent_code_ifdef): New.
2082 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
2083 * data/c++.m4: Define default value for global_tokens_and_yystype.
2084 * data/glr.cc: Likewise.
2085 * data/location.cc: Use b4_percent_define_flag_if.
2086
2087 * doc/bison.texinfo (Decl Summary): Document %define.
2088
2089 * src/parse-gram.y (Unqualified %code): Change muscle name to
2090 b4_percent_code().
2091 (content.opt): Default to empty.
2092
20932007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2094
2095 Implement support for relative and absolute skeleton file names.
2096 Discussed starting at
2097 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
2098 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
2099 (Bison Options): Document in --skeleton entry.
2100 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
2101 full_skeleton can't necessarily hold all of pkgdatadir.
2102 If the specified skeleton file name contains a `/', don't prepend
2103 pkgdatadir.
2104 * src/parse-gram.y (prologue_declaration): If the specified skeleton
2105 file name contains a `/', prepend the grammar file directory.
2106 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
2107 * skeletons.at: New file.
2108 (relative skeleton file names): New test case.
2109 (installed skeleton file names): New test case.
2110 * tests/testsuite.at: Include skeletons.at.
2111
2112 * bootstrap: Update copyright to 2007.
2113
21142007-01-17 Paolo Bonzini <bonzini@gnu.org>
2115
2116 * bootstrap: Remove occurrences of .#bootmp from the files.
2117
21182007-01-17 Akim Demaille <akim@epita.fr>
2119
2120 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
2121 nonterminals.
2122 Use per-type %printer.
2123
21242007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2125
2126 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
2127 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2128 djgpp/config.site, src/files.c, src/files.h, src/main.c,
2129 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
2130 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
2131 tests/glr-regression.at, tests/input.at, tests/local.at,
2132 tests/output.at, tests/torture.at: Update copyright to 2007.
2133
21342007-01-16 Akim Demaille <akim@epita.fr>
2135
2136 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
2137 error code.
2138 (Calc++ Scanner): Exit with failure if we can't open the input
2139 file.
2140 Accept "-" standing for stdin.
2141 (Calc++ Top Level): Print the result only if the parsing was
2142 successful.
2143
21442007-01-16 Akim Demaille <akim@epita.fr>
2145
2146 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
2147
21482007-01-15 Paolo Bonzini <bonzini@gnu.org>
2149 and Joel E. Denny <jdenny@ces.clemson.edu>
2150
2151 Clean up %define and %code implementation in M4 some. Most
2152 importantly, rename all related macros to be in the b4_percent_define
2153 and b4_percent_code namespaces. Also, complete support for `.' in
2154 %define variable names and %code qualifiers.
2155 * data/bison.m4 (b4_check_user_names): Check for special
2156 "SKELETON-NAMESPACE(name)" macros instead of using two nested
2157 m4_foreach loops.
2158 (b4_get_percent_define, b4_get_percent_code): Rename to...
2159 (b4_percent_define_get, b4_percent_code_get): ... these.
2160 Extend documentation with examples.
2161 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
2162 b4_percent_define_skeleton_variables and
2163 b4_percent_code_skeleton_qualifiers.
2164 Expect any value for the %define variable `foo' to be stored in the
2165 macro named `b4_percent_define(foo)'; expect any %code blocks for the
2166 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
2167 expect any unqualified %code blocks to be stored in a macro named
2168 `b4_percent_code_unqualified'.
2169 Use m4_indir so that %define variable names and %code qualifiers can
2170 contain `.', which is allowed by the grammar parser.
2171 (b4_percent_define_default): New macro to set a default value for a
2172 %define variable.
2173 (m4_wrap): Update wrapped code, and fix some underquoting.
2174 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
2175 Expect grammar uses of %define variables and %code qualifiers to be
2176 defined in b4_percent_define_user_variables and
2177 b4_percent_code_user_qualifiers.
2178 * data/c++.m4: Use b4_percent_define_default rather than
2179 m4_define_default. Fix some underquoting. Skeleton usage of %define
2180 variable define_location_comparison now implies skeleton usage of
2181 %define variable filename_type.
2182 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2183 data/push.c, data/yacc.c: Update macro names.
2184 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
2185 muscle names.
2186
21872007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2188
2189 DJGPP specific issues.
2190
2191 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
2192 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
2193
21942007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2195
2196 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
2197 run parsers in all tests so that Valgrind is invoked during
2198 maintainer-check-valgrind.
2199 (Duplicate representation of merged trees): Free all semantic values.
2200 (Duplicated user destructor for lookahead): Likewise.
2201
22022007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2203
2204 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
2205 command-line prefix.
2206 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
2207 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
2208 miss Valgrind messages.
2209 (Exploding the Stack Size with Malloc): Likewise.
2210
22112007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2212
2213 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
2214 locals. Reported by Juan Manuel Guerrero at
2215 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
2216 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
2217 Fix some indentation also.
2218 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
2219 explaining this issue.
2220
22212007-01-09 Paolo Bonzini <bonzini@gnu.org>
2222 and Joel E. Denny <jdenny@ces.clemson.edu>
2223
2224 Simplify union and prologue handling, and escape union and lex/parse
2225 params with digraphs.
2226 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
2227 values to the empty string since these are no longer guaranteed
2228 initialized by the front-end.
2229 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
2230 braces around b4_user_stype since this is no longer done by the
2231 front-end.
2232 * src/files.c, src/files.h (pre_prologue_obstack,
2233 post_prologue_obstack): Remove.
2234 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
2235 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
2236 with digraphs. This fixes lex params and parse params.
2237 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
2238 * src/output.c (prepare): Remove muscle insertion of the prologues.
2239 (output): Remove freeing of pre_prologue_obstack and
2240 post_prologue_obstack.
2241 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
2242 than prologue_augment for prologue parsing so you don't need prologue
2243 obstacks.
2244 (grammar_declaration): For %union RHS, use `braceless' instead of
2245 "{...}" so that braces are already stripped and code is escaped with
2246 digraphs.
2247 * src/reader.c (prologue_augment): Remove.
2248 (reader): Remove initialization of pre_prologue_obstack and
2249 post_prologue_obstack.
2250 * src/reader.h (prologue_augment): Remove.
2251
2252 * data/c.m4: Remove stray parenthesis.
2253
22542007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2255
2256 Remove quotes from variables names in %define directives and from
2257 qualifiers in %code directives, and restrict the characters that are
2258 allowed in them to M4-friendly ones. For %define, continue to support
2259 the quoted form as a deprecated feature. Discussed starting at
2260 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
2261 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
2262 %code.
2263 * doc/bison.texinfo (Prologue Alternatives): Update.
2264 (Decl Summary): In %defines entry, update mention of `%code requires'
2265 and `%code provides'.
2266 (C++ Location Values): Update %define uses.
2267 (Calc++ Parser Interface): Likewise.
2268 (Calc++ Parser): Likewise, and update `%code requires' uses.
2269 (Table of Symbols): Update %code documentation.
2270 * src/parse-gram.y (prologue_declaration): For %define variables, use
2271 `variable' instead of `STRING'.
2272 (grammar_declaration): For %code qualifiers, use `ID' instead of
2273 `STRING'.
2274 (variable): New nonterminal that takes an `ID' or a `STRING'.
2275 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
2276 and %define uses.
2277 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
2278 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
2279 (%define errors): Update %define uses.
2280
22812007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2282
2283 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
2284 instead of muscle_insert for %define values so that M4-special
2285 characters are replaced with digraphs.
2286 * tests/input.at (%define errors): Extend to check weird values.
2287
22882007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2289
2290 Instead of having skeletons declare all valid %define variables and
2291 %code qualifiers, provide macros that retrieve the associated values
2292 and build these lists automatically. Thus Bison will now warn when a
2293 variable or qualifier is not used by the skeleton in the current
2294 invocation regardless of whether it might sometimes be used by that
2295 skeleton in other invocations. Also, move all %define value macros to
2296 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
2297 form, which is replaced by %code.
2298 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
2299 (b4_check_user_names): ... this, and change the series of valid name
2300 arguments to a single list argument for names used in the skeleton
2301 similar to the existing list argument for names used in the grammar.
2302 Warn instead of complaining.
2303 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
2304 values and %code code, to format %code code properly, and to build
2305 lists of all %define variables and %code qualifiers used in the
2306 skeleton: b4_skeleton_percent_define_variables and
2307 b4_skeleton_percent_code_qualifiers.
2308 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
2309 Remove, and...
2310 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
2311 the skeleton names lists can finish building first. In place of
2312 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
2313 expect the lists b4_user_percent_define_variables and
2314 b4_user_percent_code_qualifiers.
2315 * data/c++.m4: Where setting default values for b4_parser_class_name,
2316 b4_location_type, b4_filename_type, b4_namespace, and
2317 b4_define_location_comparison, update their names to the
2318 b4_percent_define_ namespace.
2319 * data/glr.c: Don't use b4_check_percent_define_variables and
2320 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2321 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
2322 (b4_parser_class_name, b4_namespace): Define these using
2323 b4_get_percent_define for parser_class_name and namespace.
2324 * data/location.cc: Use b4_get_percent_define.
2325 * data/push.c: Don't use b4_check_percent_define_variables and
2326 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2327 * data/yacc.c: Likewise, and don't call m4_exit in
2328 b4_use_push_for_pull_if or m4_wrap code will never execute.
2329 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
2330 Rename to...
2331 (muscle_grow_user_name_list): ... this for consistency with the
2332 terminology used in bison.m4.
2333 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
2334 %define variable names, and rename muscle used_percent_define_variables
2335 to user_percent_define_variables.
2336 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
2337 user_percent_code_qualifiers.
2338 (content): Remove.
2339 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
2340 {CODE} form is no longer accepted.
2341 * tests/input.at (Reject bad %code qualifiers): Rename to...
2342 (Reject unused %code qualifiers): ... this, and update test output.
2343 (%define error): Update test output.
2344
23452007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
2346
2347 Check for unrecognized %define variables similar to checking for
2348 unrecognized %code qualifiers. Check for redefined %define variables.
2349 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
2350 generalizes...
2351 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
2352 (b4_check_percent_define_variables): New, also wraps it.
2353 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
2354 variables using b4_check_percent_define_variables.
2355 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
2356 all those exercised in the test suite and all those listed in the
2357 `Default values' section of c++.m4. Are there others?
2358 * data/push.c, data/yacc.c: Declare no valid %define variables.
2359 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
2360 similar to muscle_find, but it works even when the muscle stores a
2361 const value.
2362 (muscle_grow_used_name_list): New function for constructing the used
2363 name list muscles that b4_check_for_unrecognized_names requires.
2364 * src/parse-gram.y (prologue_declaration): Warn if a variable is
2365 %define'd more than once. Define the b4_used_percent_define_variables
2366 muscle with muscle_grow_used_name_list.
2367 (grammar_declaration): Abbreviate %code code with
2368 muscle_grow_used_name_list.
2369 * tests/input.at (%define errors): New.
2370
23712007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2372
2373 Provide warn_at, complain_at, and fatal_at function callbacks to the
2374 skeletons, and use this for %code qualifier complaints.
2375 * data/bison.m4 (b4_error_at): New, invoked by...
2376 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
2377 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
2378 @fatal_at(...@) directives.
2379 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
2380 qualifiers in b4_used_percent_code_qualifiers and to use
2381 b4_complain_at.
2382 * src/location.c, src/location.h (boundary_set_from_string): New global
2383 function.
2384 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
2385 function.
2386 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
2387 to b4_used_percent_code_qualifiers.
2388 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
2389 function.
2390 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
2391 (lineno): Rename to...
2392 (out_lineno): ... this so I don't misunderstand it again.
2393 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
2394 here; these newlines are in the input but not the output file.
2395 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
2396 (at_directive_perform): ... this new static function, and add handling
2397 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
2398 directives.
2399 * tests/input.at (Reject bad %code qualifiers): Update test output with
2400 locations and extend.
2401
2402 * tests/output.at (Output file name: [, Output file name: ]): Remove
2403 bogus comment about these tests failing.
2404
24052007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2406
2407 Clean up b4_check_percent_code_qualifiers a little.
2408 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2409 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2410 documentation and add examples.
2411 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2412 qualifiers here.
2413
24142007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2415
2416 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2417 unreliable -- especially when they're hidden inside another macro.
2418 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2419 data/c.m4: Remove m4_divert(-1).
2420 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2421 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2422 m4_divert_push(0) and m4_divert_pop(0).
2423 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
2424 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2425 pushed and popped by m4sugar, should be first on the stack.
2426
2427 Provide warn, complain, and fatal function callbacks to the skeletons.
2428 This provides more flexibility than m4_fatal, improves the error
2429 message format, and captures messages for translation. Discussed
2430 starting at
2431 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2432 * data/bison.m4 (b4_error): New, invoked by...
2433 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2434 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2435 directives. Because these M4 macros might be called when the current
2436 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2437 the previous removal of uses of m4_divert, which caused trouble.
2438 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2439 m4_fatal to report unrecognized %code qualifiers.
2440 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2441 push parser requests.
2442 * data/glr.c: Use b4_complain instead of m4_fatal to report
2443 non-deterministic push parser requests.
2444 Update @output usage to @output(...@) form.
2445 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2446 report missing %defines. Update @output usage to @output(...@) form.
2447 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2448 @output(...@) form.
2449 * src/main.c (main): Invoke skel_scanner_free.
2450 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2451 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2452 obstack_for_string from flex-scanner.h.
2453 (YY_DECL): Use to declare skel_lex static.
2454 (decode_at_digraphs): Remove; now handled in the new
2455 SC_AT_DIRECTIVE_ARG start condition.
2456 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2457 functions.
2458 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2459 at_directive_argv): New static globals.
2460 (INITIAL): Use fail_for_invalid_at.
2461 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2462 recognize the start of a generalized `@directive(...@)' form and
2463 start...
2464 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2465 directive args (using the new obstack_for_string), to decode the
2466 contained @ diagraphs, and to perform the directive. It recognizes
2467 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2468 @output(...@).
2469 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2470 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2471 `@,'.
2472 (scan_skel): Initialize obstack_for_string on the first call.
2473 (skel_scanner_free): New function to free obstack_for_string.
2474 * tests/input.at (Reject bad %code qualifiers): Update test output.
2475
24762007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2477
2478 Consolidate the 4 prologue alternative directives (%code, %requires,
2479 %provides, and %code-top) into a single %code directive with an
2480 optional qualifier field. Discussed at
2481 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2482 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2483 alternatives.
2484 * doc/bison.texinfo (Prologue Alternatives): Update.
2485 (Decl Summary): Update to %code "requires" and %code "provides".
2486 (Calc++ Parser): Update to %code "requires".
2487 (Table of Symbols): Remove entries for %requires, %provides, and
2488 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2489 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2490 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2491 which are skeleton-specific.
2492 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2493 declare what %code qualifiers it supports and to complain if any other
2494 qualifiers were used in the grammar.
2495 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2496 and b4_user_code([b4_percent_code_provides]) in place of
2497 b4_user_requires and b4_user_provides.
2498 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2499 Add b4_user_code([b4_percent_code_top]) and
2500 b4_user_code([b4_percent_code]).
2501 Invoke b4_check_percent_code_qualifiers.
2502 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2503 PERCENT_REQUIRES): Remove.
2504 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2505 %requires. Rewrite the %code RHS as the unqualified form defining the
2506 muscle b4_percent_code. Add another RHS for the qualified %code form,
2507 which defines muscles of the form b4_percent_code_QUALIFIER and the
2508 b4_used_percent_code_qualifiers muscle.
2509 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2510 PERCENT_REQUIRES): Remove.
2511 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2512 %code "requires" and %code "provides".
2513 * tests/input.at (Reject bad %code qualifiers): New.
2514
25152007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2516
2517 Use the new code_props interface for destructors and printers.
2518 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2519 printer_location members, and change the type of the destructor and
2520 printer members to code_props.
2521 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2522 symbol_printer_get, semantic_type_destructor_set,
2523 semantic_type_printer_set, default_tagged_destructor_set,
2524 default_tagless_destructor_set, default_tagged_printer_set,
2525 default_tagless_printer_set): Use code_props in arguments and return
2526 types in place of char const * and location.
2527 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2528 since the locations are now contained in the return of
2529 symbol_destructor_get and symbol_printer_get.
2530 * src/output.c (symbol_destructors_output, symbol_printers_output):
2531 Replace with...
2532 (symbol_code_props_output): ... this to eliminate duplicate code.
2533 (output_skeleton): Update to use symbol_code_props_output.
2534 * src/reader.c (symbol_should_be_used): Update use of
2535 symbol_destructor_get.
2536 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2537 Update uses of the various _destructor_set and _printer_set functions.
2538 * src/symtab.c: (default_tagged_destructor_location,
2539 default_tagless_destructor_location, default_tagged_printer_location,
2540 default_tagless_printer_location): Remove since we...
2541 (default_tagged_destructor, default_tagless_destructor,
2542 default_tagged_printer, default_tagless_printer): ... change the type
2543 of these to code_props.
2544 (symbol_new, semantic_type_new, symbol_destructor_set,
2545 semantic_type_destructor_set, symbol_destructor_get,
2546 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2547 symbol_check_alias_consistency, default_tagged_destructor_set,
2548 default_tagless_destructor_set, default_tagged_printer_set,
2549 default_tagless_printer_set): Update.
2550 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2551 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2552 code_props members.
2553 (symbol_print): Use SYMBOL_CODE_PRINT.
2554
25552007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2556
2557 Use the new code_props interface for rule actions.
2558 * src/symlist.h (symbol_list): Replace action, action_location, and
2559 used members with a code_props action_props member.
2560 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2561 grammar_midrule_action, grammar_current_rule_merge_set,
2562 grammar_current_rule_symbol_append, packgram): Update.
2563 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2564 * src/scan-code.l (handle_action_dollar): Update.
2565 (translate_rule_action): Remove, no longer used.
2566 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2567
25682007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2569
2570 Use the new code_props interface in parse-gram.y.
2571 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2572 Update all uses of translate_* functions to use the new code_props
2573 interface and to use gram_scanner_last_string_free and
2574 code_scanner_last_string_free where possible.
2575 (grammar_declaration): symbol_list_destructor_set and
2576 symbol_list_printer_set now perform the translation, so don't do it
2577 here. Use gram_scanner_last_string_free where possible.
2578 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2579 translate_code): Remove, no longer used.
2580 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2581 symbol_list_printer_set): Perform code translation here rather than
2582 depending on the caller to do so.
2583
2584 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2585 * src/scan-gram.h (gram_last_string): Remove declaration.
2586 * src/scan-gram.l (last_string): Declare it static.
2587
25882007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2589
2590 Encapsulate code properties and related functionality for the various
2591 destructors, printers, and actions into a code_props structure and
2592 interface. This patch merely implements code_props in scan-code.h and
2593 scan-code.l. Future patches will rewrite other modules to use it.
2594 Discussed starting at
2595 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2596 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2597 consistently initialize const structs that have an empty location
2598 field.
2599 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2600 to ensure consistency.
2601 * src/scan-code.h (code_props): New structure.
2602 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2603 function, macro, and const global variable for initializing a
2604 code_props with no code.
2605 (code_props_plain_init, code_props_symbol_action_init,
2606 code_props_rule_action_init, code_props_translate_code): The rest of
2607 the new code_props functional interface. Among other things, the init
2608 functions set the code_props kind field so that
2609 code_props_translate_code will know whether to behave like
2610 translate_symbol_action, translate_rule_action, or translate_code.
2611 These old translate functions must remain until all other modules are
2612 updated to use the new code_props interface.
2613 (code_scanner_last_string_free): New function similar to
2614 gram_scanner_last_string_free.
2615 (code_scanner_free): Add documentation.
2616 * src/scan-code.l: Implement the new interface.
2617 (code_lex): Make it static, add a code_props* argument, and remove the
2618 rule argument.
2619 (last_string): New static global similar to the one in scan-gram.l.
2620 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2621 instead of rule.
2622 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2623 code_props since Bison may one day use this information for destructors
2624 and printers.
2625 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2626 (handle_action_dollar): Use symbol_list_n_get and set used flag
2627 directly since symbol_list_n_used_set is removed.
2628 (translate_action): Add a code_props* argument and remove the rule,
2629 action, and location arguments. Pass the code_props* on to code_lex.
2630 (translate_rule_action, translate_symbol_action, translate_code):
2631 Rewrite as wrappers around the new code_props interface.
2632 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2633 it would eventually need to break the encapsulation of code_props.
2634
26352007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2636
2637 * etc/.cvsignore: New.
2638
26392007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2640
2641 Add maintainer-push-check to run maintainer-check using push parsing in
2642 place of pull parsing where available.
2643 * Makefile.am (maintainer-push-check): New.
2644 * data/bison.m4 (b4_use_push_for_pull_if): New.
2645 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2646 appropriately based on their existing values.
2647 (yypush_parse): Don't print push-parser-specific diagnostics if push
2648 parsing is being used in place of pull parsing.
2649 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2650 push.c.
2651 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2652 variable, and insert b4_use_push_for_pull_flag into muscles.
2653 * tests/Makefile.am (maintainer-push-check): New.
2654
26552006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2656
2657 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2658 (whether successful or failed) so that yypush_parse can be invoked
2659 again to start a new parse using the same yypstate.
2660 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2661 check multiple yypull_parse invocations on the same yypstate. For pull
2662 mode, extend to check multiple yyparse invocations.
2663 (Exploding the Stack Size with Alloca): Extend to try with
2664 %push-pull-parser.
2665 (Exploding the Stack Size with Malloc): Likewise.
2666
2667 * tests/calc.at (Simple LALR Calculator): Don't specify
2668 %skeleton "push.c" since %push-pull-parser implies that now.
2669 * tests/headers.at (export YYLTYPE): Don't check for the push
2670 declarations. Otherwise, this test case can't be used to see if push
2671 mode can truly emulate pull mode.
2672 * tests/input.at (Torturing the Scanner): Likewise.
2673 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2674 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2675 AT_YACC_IF, which now includes the case of push mode since %skeleton
2676 need not be used for push mode. This will be more intuitive once
2677 push.c is renamed to yacc.c.
2678
26792006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2680
2681 For push mode, convert yyparse from a macro to a function, invoke yylex
2682 instead of passing a yylexp argument to yypull_parse, and don't
2683 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2684 Discussed starting at
2685 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2686 * data/bison.m4 (b4_pull_if): New.
2687 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2688 * data/push.c: Improve M4 quoting a little.
2689 (b4_generate_macro_args, b4_parenthesize): Remove.
2690 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2691 any time a pull parser is requested.
2692 Don't #define this as a wrapper around yypull_parse. Instead, when
2693 both push and pull are requested, make it a function that does that
2694 same thing.
2695 (yypull_parse): If there's a b4_prefix, #define this to
2696 b4_prefix[pull_parse] when both push and pull are requested.
2697 Don't define this as a function unless both push and pull are
2698 requested.
2699 Remove the yylexp argument and hard-code yylex invocation instead.
2700 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2701 %push-parser.
2702 * src/getargs.c (pull_parser): New global initialized to true.
2703 * getargs.h (pull_parser): extern it.
2704 * src/output.c (prepare): Insert pull_flag muscle.
2705 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2706 (prologue_declaration): Set both push_parser and pull_parser = true for
2707 %push-pull-parser. Set push_parser = true and pull_parser = false for
2708 %push-parser.
2709 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2710 %push-parser since there's no backward-compatibility concern here.
2711 Scan %push-pull-parser.
2712 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2713 instead of %push-parser.
2714 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2715 prototype it in the module that calls yyparse.
2716 * tests/input.at (Torturing the Scanner): Likewise.
2717 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2718
27192006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2720
2721 Update etc/bench.pl. Optimize push mode a little (the yyn change
2722 deserves most of the credit).
2723 * Makefile.am (SUBDIRS): Add etc subdirectory.
2724 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2725 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2726 yytoken, yyval, and yyloc declarations to...
2727 (yyparse or yypush_parse): ... here to improve performance. For
2728 yypush_parse invocations after the first, be sure to assign yyn its old
2729 value again.
2730 (yypstate_new): Don't bother initializing the yyresult field since the
2731 initial value isn't used.
2732 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2733 remove the #define that, in push mode, set it to yyps->NAME.
2734 * etc/Makefile.am: New.
2735 * etc/bench.pl: Remove and build it instead from...
2736 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2737 "tests/bison" from the build directory by default rather than just
2738 invoking "bison" from $PATH.
2739 (calc_grammar): Update push parser code: don't declare yylval globally,
2740 don't define yyparse_wrapper, and don't #define yyparse.
2741 (bench_grammar): Update to check all working combinations of yacc.c,
2742 push.c, impure, pure, pull, and push.
2743
27442006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2745
2746 For push mode, add pull wrappers around yypush_parse.
2747 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2748 (yypull_parse): New function wrapping yypush_parse.
2749 (yyparse): New #define wrapping yypull_parse.
2750 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2751 is declared.
2752 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2753 prototype yylex in the module that calls yyparse, and don't prototype
2754 yyparse there. Otherwise, the yyparse expansion won't compile.
2755 * tests/input.at (Torturing the Scanner): Likewise.
2756
27572006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2758
2759 Enable push parsers to operate in impure mode. Thus, %push-parser no
2760 longer implies %pure-parser. The point of this change is to move
2761 towards being able to test the push parser code by running the entire
2762 test suite as if %push-parser had been declared.
2763 * data/push.c (yypush_parse): For impure mode, remove the
2764 yypushed_char, yypushed_val, and yypushed_loc arguments.
2765 Instead, declare these as local variables initialized to the global
2766 yychar, yylval, and yylloc.
2767 For the first yypush_parse invocation only, restore the initial values
2768 of these global variables when it's time to read a token since they
2769 have been overwritten.
2770 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2771 %push-parser.
2772 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2773 %pure-parser along with %push-parser since this test case was designed
2774 for pure push parsers.
2775 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2776 (AT_YACC_OR_PUSH_IF): New.
2777 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2778 add a note that it's still wrong for some cases (as it has been for a
2779 while).
2780 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2781 %push-parser no longer implies %pure-parser.
2782
27832006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2784
2785 Remove some unnecessary differences between the pull parser code and
2786 the push parser code. This patch enables yynerrs in push mode.
2787 * data/push.c: Reformat M4 a little.
2788 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2789 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2790 because push mode is on. Instead, if pure mode is on, move yynerrs
2791 to...
2792 (b4_declare_parser_state_variables): ... here.
2793 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2794 to yyps->NAME so it can be used in yypush_parse.
2795 (yypush_parse): Don't omit uses of yynerrs in push mode.
2796
27972006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2798
2799 Fix bug such that the first pushed token's value and location are
2800 sometimes overwritten (sometimes by %initial-action) before being used.
2801 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2802 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2803 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2804 more closely mimic the pull parser logic.
2805 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2806 time to read a token, which is after any initialization of yylval and
2807 yylloc.
2808 (gottoken): Rename label to...
2809 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2810 user namespace.
2811
28122006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2813
2814 Rearrange initialization of the parser state variables so that the
2815 skeleton doesn't have to have a copy for pull mode and another for push
2816 mode. This patch also fixes at least a bug such that yylloc was not
2817 initialized (with b4_location_initial_line and
2818 b4_location_initial_column) upon calling yypush_parse. However, that
2819 initialization now overwrites the first token's location;
2820 %initial-action assigning @$ already did the same thing, and both bugs
2821 will be fixed in a later patch.
2822 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2823 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2824 yyss, yyvs, yyls, and yystacksize.
2825 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2826 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2827 yylsp.
2828 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2829 yyps->NAME so it can be used in yypush_parse.
2830 (yyparse or yypush_parse): For yypush_parse, don't print the
2831 "Starting parse" diagnostic for invocations after the first.
2832 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2833 yypush_parse, only do it for the first invocation.
2834 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2835 initialization to occur in yypush_parse but only on the first
2836 invocation.
2837
28382006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2839
2840 * data/push.c: Add CPP guards around push parser declarations in both
2841 the header and the code file.
2842 In the code file, move the push parser declarations to the same place
2843 they appear in the header file.
2844 Clean up the M4 some, especially the inconsistent underquoting in
2845 some b4_c_function_def and b4_c_function_decl uses.
2846
28472006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2848
2849 Encapsulate the push parser state variables into an M4 macro so the
2850 push skeleton doesn't have to list them again for pull mode's yyparse.
2851 For push mode, remove yypush_parse's local equivalents of these
2852 variables to eliminate unnecessary copying between the two sets at
2853 run-time. This patch also fixes at least a bug related to multiple
2854 %initial-action invocations in push mode.
2855 * data/push.c (b4_declare_parser_variables): Rename to...
2856 (b4_declare_scanner_communication_variables): ... this for clarity and
2857 update both uses.
2858 (b4_declare_yyparse_variables): Remove and move its contents to the one
2859 spot where it was invoked.
2860 (b4_declare_parser_state_variables): New macro containing the parser
2861 state variables required by push mode.
2862 (struct yypstate): Replace all fields but yynew with
2863 b4_declare_parser_state_variables.
2864 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2865 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2866 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2867 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2868 parser state variable declarations with
2869 b4_declare_parser_state_variables.
2870 Don't initialize parser state variables when calling yypush_parse since
2871 yypstate_new already does that.
2872 Invoke the user's initial action only upon the first yypush_parse
2873 invocation.
2874 Remove all code that copies between the local parser state variables
2875 and the yypstate.
2876
28772006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2878
2879 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2880 prevent a name collision in a future patch where these names will
2881 sometimes be #define'd.
2882 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2883 since it no longer has the same name as the existing argument.
2884 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2885
28862006-12-19 Paolo Bonzini <bonzini@gnu.org>
2887 and Joel E. Denny <jdenny@ces.clemson.edu>
2888
2889 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2890 that the argument is case-insensitive, and there's no `=' here.
2891 For the %skeleton entry, mention that %language is better.
2892 (Bison Options): Likewise for --language and --skeleton. Move the
2893 --skeleton entry so that the `Tuning the parser' section is sorted
2894 alphabetically on long options.
2895 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2896 %language directive in detail here; cross-reference the %language
2897 documentation instead.
2898 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2899 `%require "2.3b"' so that the example is always up-to-date.
2900 (Table of Symbols): Add entries for %language and %skeleton.
2901 * examples/extexi (normalize): Instead of replacing every %require
2902 argument with the current Bison version, just substitute for
2903 `@value{VERSION}'. This guarantees that we're testing what actually
2904 appears in the documentation.
2905 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2906 rather than `@VERSION@'.
2907
29082006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2909
2910 * NEWS: Reword the %language news a bit, and put it earlier.
2911
2912 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2913 Rewrite to simplify the logic.
2914 (language_argmatch): Likewise.
2915 (program_name): We now own this var.
2916 * src/getargs.h (struct bison_language): Use char[] rather than
2917 const char *.
2918
2919 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2920 Java is supported.
2921 * src/complain.c (program_name): Remove decl; no longer needed.
2922 * src/main.c (program_name): Remove; now belongs to getargs.
2923
29242006-12-18 Paolo Bonzini <bonzini@gnu.org>
2925
2926 * NEWS: Document %language.
2927
2928 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2929
2930 * data/c-skel.m4, data/c++-skel.m4: New files.
2931 * data/glr.c: Complain on push parsers.
2932
2933 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2934 over %skeleton.
2935 (Decl Summary): Document %language and %skeleton.
2936 (Command line): Document -L.
2937
2938 * examples/extexi: Rewrite %require directive.
2939 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2940
2941 * src/files.c (compute_exts_from_gc): Look in language structure
2942 for .y extension.
2943 (compute_file_name_parts): Check whether .tab should be added.
2944 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2945 (language, skeleton_arg, language_argmatch): New.
2946 (long_options): Add --language.
2947 (getargs): Use skeleton_arg, add -L/--language.
2948 * src/getargs.h: Include location.h.
2949 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2950 * src/output.c (prepare): Pick default skeleton from struct language.
2951 Don't dispatch C skeletons here.
2952 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2953 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2954 * src/scan-gram.l ("%language"): New rule.
2955
2956 * tests/calc.at: Test %skeleton and %language.
2957 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2958 (AT_GLR_IF): Look for %skeleton "glr.cc".
2959 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2960 (AT_YACC_IF): Reject %language.
2961
29622006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2963
2964 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2965 since it wasn't used; only the typedef name 'semantic_type' is needed.
2966 Also, omit trailing white space.
2967
2968 * bootstrap: Sync from coreutils.
2969 (gnulib_extra_files): Add build-aux/announce.gen.
2970 (slurp): Adjust .gitignore files like .cvsignore files.
2971 * build-aux/announce-gen: Remove from CVS, since bootstrap
2972 now creates this.
2973
29742006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2975
2976 Make %push-parser imply %pure-parser. This fixes several bugs; see
2977 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2978 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2979 pure_parser = true.
2980 * data/push.c: Don't bother testing b4_push_if when deciding whether
2981 to expand b4_declare_parser_variables globally.
2982 (yypush_parse): Likewise in here.
2983
2984 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2985 (yy_reduce_print): Reformat M4 for readability.
2986
29872006-12-15 Bob Rossi <bob@brasko.net>
2988 and Joel Denny <jdenny@ces.clemson.edu>
2989
2990 * data/push.c (yypstate): Add typedef, and update all uses of
2991 struct yypstate to just yypstate.
2992 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2993
29942006-12-14 Bob Rossi <bob@brasko.net>
2995
2996 * data/push.c (yypush_parse): Declare prototype regardless of
2997 %locations option.
2998
29992006-12-14 Bob Rossi <bob@brasko.net>
3000
3001 * data/push.c (yyparse): Remove the prototype and the #define when in
3002 push-parser mode.
3003
30042006-12-13 Bob Rossi <bob@brasko.net>
3005
3006 * data/push.c (yypstate_init): Rename to...
3007 (yypstate_new): ... this and use b4_c_function_def.
3008 (yypstate_delete): New.
3009 (yypush_parse): Change parameters yynval and yynlloc to be const.
3010 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
3011 yypstate_delete functions.
3012
30132006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
3014
3015 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
3016 strange test case titles. Reported by Bob Rossi.
3017
30182006-12-13 Paul Eggert <eggert@cs.ucla.edu>
3019
3020 * TODO: Add pointer to Sylvain Schmitz's work on static detection
3021 of potential ambiguities in GLR grammers.
3022
30232006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
3024
3025 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
3026 `bison ', use m4_index instead of m4_substr since chopping up a string
3027 containing M4-special characters causes problems here.
3028
3029 Fix a couple of bugs related to special characters in user-specified
3030 file names, and make it easier for skeletons to compute output file
3031 names with the same file name prefix as Bison-computed output file
3032 names.
3033 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
3034 b4_parser_file_name and b4_spec_defines_file instead of
3035 @output_parser_name@ and @output_header_name@, which are now redundant.
3036 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
3037 b4_parser_file_name, b4_spec_defines_file, and the new
3038 @basename(FILENAME@) instead of @output_parser_name@ and
3039 @output_header_name@, which inappropriately escaped the file names as
3040 C string literals.
3041 * src/files.c (all_but_ext): Remove static qualifier.
3042 (compute_output_file_names): Move `free (all_but_ext)' to...
3043 (output_file_names_free): ... here since all_but_ext is needed later.
3044 * src/files.h (all_but_ext): Extern.
3045 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
3046 exactly what MUSCLE_INSERT_STRING used to do.
3047 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
3048 characters are escaped properly.
3049 * src/output.c (prepare): Define muscle file_name_all_but_ext as
3050 all_but_ext.
3051 For pkgdatadir muscle, maintain previous functionality by using
3052 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
3053 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
3054 digraphs would never be expanded. Hopefully no one has M4-special
3055 characters in his Bison installation path.
3056 * src/scan-skel.l: Don't parse @output_header_name@ and
3057 @output_parser_name@ anymore since they're now redundant.
3058 In @output, use decode_at_digraphs.
3059 Parse a new @basename command that invokes last_component.
3060 (decode_at_digraphs): New.
3061 (BASE_QPUTS): Remove unused.
3062 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
3063 (Output file name): New tests.
3064
30652006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
3066
3067 Warn about output files that are generated by the skeletons and that
3068 conflict with other output files.
3069 * data/glr.c: Don't generate the header file here when glr.cc does.
3070 * src/files.c (file_names, file_names_count): New static globals.
3071 (compute_output_file_names): Invoke output_file_name_check for files
3072 not generated by the skeletons and remove existing checks.
3073 (output_file_name_check): New function that warns about conflicting
3074 output file names.
3075 (output_file_names_free): Free file_names.
3076 * src/files.h (output_file_name_check): Declare.
3077 * src/scan-skel.l: Invoke output_file_name_check for files generated by
3078 the skeletons.
3079 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
3080 (Conflicting output files): New tests.
3081
30822006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3083
3084 * doc/bison.texinfo: Fix a couple of typos.
3085
30862006-12-08 Bob Rossi <bob@brasko.net>
3087
3088 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
3089 Rename to...
3090 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
3091 update all uses.
3092 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
3093 (yypush_parse): Rename yypvars argument to yyps and remove redundant
3094 local pv.
3095 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
3096 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
3097
30982006-12-07 Bob Rossi <bob@brasko.net>
3099 and Joel Denny <jdenny@ces.clemson.edu>
3100
3101 * data/push.c (yypvarsinit): Change return type from void* to struct
3102 yypvars*. No longer cast to void* on return.
3103 (struct yypvars): Remove yylen since it need not be remembered between
3104 yypushparse invocations.
3105 (yypushparse): Don't copy between yylen and pv->yylen.
3106
31072006-12-05 Bob Rossi <bob@brasko.net>
3108
3109 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
3110 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
3111 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
3112 (struct yypvars): Remove b4_declare_parser_variables.
3113 (yypvarsinit): Remove init code for removed variables.
3114 (global scope): Do not declare b4_declare_parser_variables if
3115 push or pure mode.
3116 (yypushparse): Add b4_declare_parser_variables.
3117 Init new local variables, and remove init code for removed
3118 yypvars variables.
3119 (yyparse): Delete.
3120 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
3121 and yyparse for other modes.
3122 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
3123 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
3124 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
3125 (AT_PURE_LEX_IF): True if pure or push parser.
3126
31272006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
3128
3129 Document Yacc prologue alternatives and default %destructor's and
3130 %printer's as experimental. Don't mention Java yet. Discussed at
3131 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
3132 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
3133 (2.3a): Annotate this entry to say the old forms of these features were
3134 also experimental.
3135 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
3136 Table of Symbols): Say they're experimental. Comment out any mention
3137 of Java (we'll want this back eventually).
3138
31392006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3140
3141 Support a file name argument to %defines. Deprecate `=' in
3142 %file-prefix, %name-prefix, and %output. Discussed at
3143 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
3144 * NEWS (2.3a+): Mention.
3145 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
3146 form of %defines, and remove `=' from entries for %file-prefix,
3147 %name-prefix, and %output.
3148 * src/parse-gram.y (prologue_declaration): Implement.
3149 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
3150 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
3151 all but one occurrence of %name-prefix.
3152 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
3153 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
3154 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
3155 occurrence of each of %file-prefix and %output. Add check for %defines
3156 with argument.
3157 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
3158 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
3159 Remove the `=' from %output.
3160
31612006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
3162
3163 Don't escape $ in test case titles since Autoconf 2.61 now does that
3164 correctly.
3165 * tests/actions.at (Default %printer and %destructor are not for error
3166 or $undefined): Here.
3167 (Default %printer and %destructor are not for $accept): Here.
3168 * tests/input.at (Invalid $n and @n): Here.
3169
31702006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
3171
3172 Rename <!> to <>. Discussed starting at
3173 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
3174 * NEWS (2.3a+): Update.
3175 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3176 Update.
3177 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
3178 * src/scan-gram.l (INITIAL): Implement.
3179 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
3180 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
3181 comment.
3182 * tests/actions.at (Default tagless %printer and %destructor,
3183 Default tagged and per-type %printer and %destructor,
3184 Default %printer and %destructor are not for error or $undefined,
3185 Default %printer and %destructor are not for $accept,
3186 Default %printer and %destructor for mid-rule values): Update.
3187 * tests/input.at (Default %printer and %destructor redeclared,
3188 Unused values with default %destructor): Update.
3189
31902006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3191
3192 Don't let %prec take a nonterminal.
3193 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
3194 token.
3195 * tests/input.at (%prec takes a token): New test checking that %prec
3196 won't take a nonterminal.
3197
31982006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3199
3200 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
3201 it was double-quoted.
3202 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
3203 grammar is maintained with Bison's highest standards.
3204 * src/getargs.c: Fix some typos in Doxygen comments.
3205
32062006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3207
3208 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
3209 later. Reported by Paul Eggert in
3210 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
3211 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
3212 * src/scan-code.l (translate_action): Don't bother invoking
3213 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
3214 (code_scanner_free): Instead of invoking
3215 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
3216 which frees more.
3217 * src/scan-gram.l (gram_scanner_free): Likewise.
3218 * src/scan-skel.l (scan_skel): Likewise.
3219
32202006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3221
3222 * src/files.c (tr): Change return type to void.
3223 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
3224 has been called previously for the same key.
3225 (muscle_find): Return storage instead of value so that
3226 --enable-gcc-warnings doesn't produce warnings that the return discards
3227 const. aver that the value and storage are the same since storage
3228 could potentially be NULL when value is not.
3229 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
3230 same as 0.
3231
32322006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3233
3234 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
3235 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
3236 us a slightly cleaner distribution, and also works.
3237 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
3238 gnulib changes.
3239
32402006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
3241 and Paul Eggert <eggert@cs.ucla.edu>
3242
3243 Don't let Bison leak memory except when it complains.
3244 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
3245 (spec_defines_file, dir_prefix): Now char *, not const char *,
3246 since they are freed.
3247 * src/files.c: Likewise.
3248 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
3249 Likewise.
3250 (tr): Now operates in-place. All uses changed.
3251 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
3252 values.
3253 (compute_file_name_parts, compute_output_file_names): Don't store
3254 read-only data in variables that will be freed.
3255 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
3256 src_extension, and header_extension.
3257 (output_file_names_free): New public function to free
3258 spec_verbose_file, spec_graph_file, spec_defines_file,
3259 parser_file_name, and dir_prefix.
3260 * src/getargs.c (getargs): Don't store read-only data in variables that
3261 will be freed.
3262 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
3263 (which previously existed but was unused), and quotearg_free.
3264 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
3265 * src/muscle_tab.c: Likewise.
3266 (muscle_entry): Make the value char const *,
3267 and add a new storage member that is char * and can be freed.
3268 (muscle_entry_free): New private function.
3269 (muscle_init): Use it instead of free.
3270 (muscle_insert, muscle_grow): Update and use new storage member.
3271 (muscle_code_grow): Free the string passed to muscle_grow
3272 since it's not needed anymore.
3273 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
3274 add a new `char *code' member.
3275 ("{...}"): Declare semantic type as code.
3276 * src/scan-code.h (translate_rule_action):
3277 (translate_symbol_action, translate_code, translate_action): Return
3278 `char const *' rather than `char *' since external code should not free
3279 these strings.
3280 * src/scan-code.l: Likewise.
3281 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
3282 which is "{...}" in the parser.
3283 * tests/Makefile.am (maintainer-check-valgrind): Set
3284 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
3285 Valgrind.
3286 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
3287 complain.
3288 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
3289 expecting a non-zero exit status sets --leak-check=summary and
3290 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
3291 this case, and we don't want to hear about it.
3292
32932006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3294
3295 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
3296 instead of from the template, to simplify configuration a bit.
3297 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
3298 and m4/wint_t.m4, as they are needed with the latest gnulib.
3299
33002006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3301
3302 Disable unset/unused mid-rule value warnings by default, and recognize
3303 --warnings=midrule-values to enable them. Discussed starting at
3304 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
3305 * NEWS (2.3a+): Mention.
3306 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
3307 warnings): Add entry for midrule-values subargument.
3308 * src/reader.c (symbol_should_be_used): Don't return true just because
3309 the value is a set/used mid-rule value unless
3310 --warnings=midrule-values was specified.
3311 * tests/input.at (Unused values, Unused values before symbol
3312 declarations): Run tests with and without --warnings=midrule-values.
3313
3314 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
3315 than LIST_FREE directly.
3316
33172006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3318
3319 Finish implementing --warnings=error, which should not be implied by
3320 --warnings=all (or by its synonyms -W and --warnings without
3321 subarguments).
3322 * src/complain.c (set_warning_issued): New function to report that
3323 warnings are being treated as errors and to record an error if so.
3324 Invoke...
3325 (warn_at, warn): ... here.
3326 * src/getargs.c (warnings_args, warnings_types): Reorder so that
3327 "error - warnings are errors" does not appear above "all - all of the
3328 above".
3329 (getargs): For -W and --warnings without subarguments, don't let
3330 FLAGS_ARGMATCH set warnings_error in warnings_flag.
3331 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
3332
33332006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3334
3335 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
3336 empty subargument list. For example: `bison --warnings= parser.y'.
3337
33382006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3339
3340 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
3341 the parser header file so that gcc doesn't warn.
3342
33432006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3344
3345 Split the default %destructor/%printer into two kinds: <*> and <!>.
3346 Discussed starting at
3347 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
3348 * NEWS (2.3a+): Mention.
3349 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
3350 previous change today related to mid-rules.
3351 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3352 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
3353 (TYPE_TAG_ANY): Add as <*>.
3354 (TYPE_TAG_NONE): Add as <!>.
3355 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
3356 for <*> and <!>.
3357 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
3358 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
3359 * src/symlist.c (symbol_list_default_new): Split into tagged and
3360 tagless versions.
3361 (symbol_list_destructor_set, symbol_list_printer_set): Split
3362 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
3363 SYMLIST_DEFAULT_TAGLESS.
3364 * src/symlist.h: Update symbol_list_default*_new prototypes.
3365 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
3366 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
3367 * src/symtab.c (default_destructor, default_destructor_location,
3368 default_printer, default_printer_location): Split each into tagged and
3369 tagless versions.
3370 (symbol_destructor_get, symbol_destructor_location_get,
3371 symbol_printer_get, symbol_printer_location_get): Implement tagged
3372 default and tagless default cases.
3373 (default_destructor_set, default_printer_set): Split each into tagged
3374 and tagless versions.
3375 * src/symtab.h: Update prototypes.
3376 * tests/actions.at (Default %printer and %destructor): Rename to...
3377 (Default tagless %printer and %destructor): ... this, and extend.
3378 (Per-type %printer and %destructor): Rename to...
3379 (Default tagged and per-type %printer and %destructor): ... this, and
3380 extend.
3381 (Default %printer and %destructor for user-defined end token): Extend.
3382 (Default %printer and %destructor are not for error or $undefined):
3383 Update.
3384 (Default %printer and %destructor are not for $accept): Update.
3385 (Default %printer and %destructor for mid-rule values): Extend.
3386 * tests/input.at (Default %printer and %destructor redeclared): Extend.
3387 (Unused values with default %destructor): Extend.
3388
33892006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3390
3391 Don't apply the default %destructor/%printer to an unreferenced midrule
3392 value. Mentioned at
3393 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
3394 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
3395 like $@n instead of just @n so that the default %destructor/%printer
3396 logic doesn't see them as user-defined symbols.
3397 (symbol_is_dummy): Check for both forms of the name.
3398 * src/reader.c (packgram): Remove the `$' from each midrule symbol
3399 name for which the midrule value is referenced in any action.
3400 * tests/actions.at (Default %printer and %destructor for mid-rule
3401 values): New test.
3402 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
3403 for change to dummy symbol names.
3404
34052006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3406
3407 Warn about unset midrule $$ if the corresponding $n is used.
3408 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3409 $n usage.
3410 (packgram): Before invoking grammar_rule_check on any rule, make sure
3411 all actions have already been scanned in order to set `used' flags.
3412 Otherwise, checking that a midrule's $$ is set will not always work
3413 properly because the midrule check must forward-reference the midrule's
3414 parent rule.
3415 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3416 warning.
3417
34182006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3419
3420 More improvements to the documentation of the prologue alternatives:
3421 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3422 Bison manual.
3423 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3424 some text to clarify the relative importance of the new directives and
3425 to show how these directives may be viewed as code labels.
3426
34272006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3428
3429 Similar to the recently removed %before-header, add %code-top as the
3430 alternative to the pre-prologue. Mentioned at
3431 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3432 Also, let the prologue alternatives appear in the grammar section.
3433 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3434 (prologue_declaration): Move the existing prologue alternatives to...
3435 (grammar_declaration): ... here and add %code-top.
3436 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3437
3438 Clean up and extend documentation for the prologue alternatives.
3439 * NEWS (2.3a+): Describe prologue alternatives.
3440 * doc/bison.texinfo (Prologue): Move discussion of prologue
3441 alternatives to...
3442 (Prologue Alternatives): ... this new section, and extend it to discuss
3443 all 4 directives in detail.
3444 (Table of Symbols): Clean up discussion of prologue alternatives and
3445 add %code-top.
3446
34472006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3448
3449 DJGPP specific issues.
3450
3451 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3452 config.bat accordingly.
3453 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3454 * djgpp/config.site: Likewise.
3455
34562006-10-16 Paolo Bonzini <bonzini@gnu.org>
3457
3458 Replace %*-header with %provides, %requires, %code. See discussion at
3459 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3460
3461 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3462 (b4_user_start_header): Remove.
3463 * data/glr.c: Use new macros instead of b4_*start_header
3464 and b4_*end_header.
3465 * data/glr.cc: Likewise.
3466 * data/lalr1.cc: Likewise.
3467 * data/push.c: Likewise.
3468 * data/yacc.c: Likewise.
3469
3470 * doc/bison.texinfo: Remove %before-header, rename
3471 %{start,end,after}-header to %requires, %provides, %code.
3472
3473 * src/parse-gram.y: Likewise (also rename token names accordingly).
3474 * src/scan-gram.l: Likewise.
3475 * tests/actions.at: Likewise.
3476
34772006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3478
3479 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3480 Problem reported by Joel E. Denny.
3481
34822006-10-14 Jim Meyering <jim@meyering.net>
3483
3484 (Sync from coreutils.)
3485 Work also when the working directory (with e.g. coreutils sources)
3486 is version controlled with git, rather than CVS.
3487 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3488 rather than CVS.
3489 In messages and comments, say e.g., "checked-out sources",
3490 rather than "CVS sources".
3491 (version_controlled_file): New function. Work for git as well as
3492 for CVS. Don't use grep's -q option.
3493 (slurp): Call it here, in place of CVS-specific code.
3494
34952006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3496
3497 Fix testsuite for ./configure --enable-gcc-warnings:
3498 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3499 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3500 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3501 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3502 * test/regression.at (Diagnostic that expects two alternatives):
3503 Likewise.
3504
35052006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3506
3507 * bootstrap.conf (gnulib_modules): Add config-h.
3508 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3509 worry about HAVE_CONFIG_H.
3510 * lib/abitset.c: Likewise.
3511 * lib/bitset.c: Likewise.
3512 * lib/bitset_stats.c: Likewise.
3513 * lib/bitsetv-print.c: Likewise.
3514 * lib/bitsetv.c: Likewise.
3515 * lib/ebitset.c: Likewise.
3516 * lib/get-errno.c: Likewise.
3517 * lib/lbitset.c: Likewise.
3518 * lib/subpipe.c: Likewise.
3519 * lib/timevar.c: Likewise.
3520 * lib/vbitset.c: Likewise.
3521 * lib/bitset.c: Include "bitset.h" first, to test interface.
3522 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3523 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3524 * lib/bitsetv.c: Include "bitsetv.h" first.
3525 * lib/get-errno.c: Include "get-errno.h" first.
3526 * m4/.cvsignore: Add config-h.m4.
3527 * tests/actions.at (Default %printer and %destructor for ...):
3528 Adjust expected line numbers in output to reflect removal of #if
3529 HAVE_CONFIG_H lines.
3530 * tests/glr-regression.at (Missed %merge type warnings when ...):
3531 Likewise.
3532 * tests/regression.at (Braced code in declaration in rules section):
3533 Likewise.
3534 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3535 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3536 Include <config.h> unconditionally.
3537
3538 * bootstrap: Sync from coreutils, as follows:
3539
3540 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3541
3542 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3543 variable was sometimes used without being initialized. This
3544 messed up the installation of the INSTALL file in some cases.
3545
3546 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3547
3548 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3549 --copy. Inspired by a suggestion from Bruno Haible.
3550
3551 2006-10-03 Jim Meyering <jim@meyering.net>
3552
3553 * bootstrap: Undo last change to this file, since now gnulib-tool
3554 sticks with the automake default in generating dependencies.
3555
35562006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3557
3558 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3559 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3560
3561 * doc/bison.1: Add copyright notice.
3562
3563 * data/glr.c: Don't include <stdarg.h>; not used.
3564
3565 * NEWS: The -g and --graph options now output graphs in Graphviz
3566 DOT format, not VCG format.
3567 * doc/bison.1: Likewise.
3568 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
3569 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3570 of this change in
3571 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
3572 * TODO: Remove Graphviz entry.
3573 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3574 remove vcg.c, vcg.h, vcg_defaults.h.
3575 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3576 * src/graphviz.c, src/graphviz.h: New files.
3577 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3578 * src/files.h: Make comment more generic.
3579 * src/main.c (main): Likewise.
3580 * src/print_graph.h: Likewise.
3581 * src/getargs.c (usage): Make usage description more generic.
3582 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3583 (static_graph, fgraph): Remove. All uses changed to pass
3584 arguments instead of sharing a static var.
3585 (print_core, print_actions, print_state, print_graph):
3586 Output graphviz format rather than VCG format.
3587 * tests/.cvsignore: Remove *.vcg; add *.dot.
3588 * tests/output.at: Expect *.dot files, not *.vcg files.
3589
3590 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3591 accommodates the 2006-10-08 change.
3592
35932006-10-11 Bob Rossi <bob@brasko.net>
3594
3595 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3596 (b4_yyssa, b4_yyerror_range): New macros.
3597 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3598 (yypvarsinit): Remove init of removed fields.
3599 (yypushparse): Remove use of removed fields; use new macros instead.
3600
36012006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3602
3603 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3604 in a push parser. Reindent slightly to match yacc.c better.
3605
36062006-10-11 Bob Rossi <bob@brasko.net>
3607
3608 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3609 yymsg_alloc fields.
3610 (yypvarsinit, yypushparse): Remove init of removed fields.
3611 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
3612
36132006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3614
3615 * THANKS: Add Paolo Bonzini and Bob Rossi.
3616
36172006-10-08 Paolo Bonzini <bonzini@gnu.org>
3618
3619 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3620 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3621 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3622 b4_define_user_cde and uses): Remove.
3623 (b4_comment, b4_prefix, b4_sync_start): New.
3624 * data/bison.m4: New file, with most of the content removed from c.m4.
3625 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3626 * src/output.c (output_skeleton): Pass bison.m4.
3627 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3628 only if specified.
3629
36302006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3631
3632 Fix test failure reported by Tom Lane in
3633 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3634 and try to make such failures easier to catch in the future.
3635 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3636 that's now the caller's responsibility.
3637 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3638 Set yychar = YYEOF if it's negative.
3639 * tests/actions.at (yylex): Abort if asked to read past EOF.
3640 * tests/conflicts.at (yylex): Likewise.
3641 * tests/cxx-type.at (yylex): Likewise.
3642 * tests/glr-regression.at (yylex): Likewise.
3643 * tests/input.at (yylex): Likewise.
3644 * tests/regression.at (yylex): Likewise.
3645 * tests/torture.at (yylex): Likewise.
3646
36472006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3648
3649 Fix problems with translating English-language diagnostics.
3650 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3651 respect to bison-runtime pot generation. The YY_ stuff
3652 wasn't being captured.
3653 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3654 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3655 * runtime-po/POTFILES.in: Add data/push.c.
3656
36572006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3658
3659 Merge bootstrap changes from coreutils.
3660
3661 2006-09-28 Jim Meyering <jim@meyering.net>
3662
3663 Automatically generated dependencies are important even
3664 when all of the sources in a directory come from gnulib.
3665 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3666 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3667
3668 2006-09-23 Jim Meyering <jim@meyering.net>
3669
3670 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3671
3672 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3673
3674 * bootstrap: Add support for --force.
3675 (usage): New function. Describe usage less tersely.
3676 (CVS_only_file): New var.
3677
36782006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3679
3680 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3681 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3682 Adjust white space and comments to match GNU style better.
3683
36842006-09-20 Bob Rossi <bob@brasko.net>
3685
3686 * data/push.c (yyresult_get): Remove function.
3687 (YYPUSH_MORE): Add #define.
3688 (yypushparse): Modify return value.
3689
36902006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3691
3692 * stamp-h.in: Remove; no longer needed.
3693 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3694 Remove config.h, config.hin, intl (no longer created).
3695 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3696 stamp-h1.
3697
3698 Sync bootstrap from coreutils, as follows:
3699
3700 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3701
3702 * bootstrap (symlink_to_gnulib): New function.
3703 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3704 to copies-of-gnulib.
3705 (cp_mark_as_generated, slurp, gnulib_files):
3706 Avoid making a copy if it's the same as the old version.
3707 (gnulib_files): Add support for this variable (used by Bison).
3708
37092006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3710
3711 * src/getargs.c (usage): Rework to use conventions similar to
3712 coreutils, to make translation a bit easier and the code a bit
3713 smaller. Problem reported by Tim Van Holder.
3714
37152006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3716
3717 Use some of gnulib's new modules, taken from coreutils.
3718
3719 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3720 * bootstrap.conf: New file.
3721 (gnulib_modules): Add configmake, inttypes, unistd.
3722 (XGETTEXT_OPTIONS): Add complain, complain_at,
3723 fatal, fatal_at, warn, warn_at, unexpected_end.
3724 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3725 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3726 (gl_EARLY): Add.
3727 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3728 (gl_INIT): Add
3729 (GNULIB_AUTOCONF_SNIPPET): Remove.
3730 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3731 the pickiest.
3732 * lib/.cvsignore: Add inttypes_.h.
3733 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3734 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3735 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3736 no-longer-necessary initializations.
3737 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3738 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3739 use the unistd module.
3740 * src/system.h: Likewise.
3741 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3742 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3743 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3744 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3745 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3746 * src/system.h: Include inttypes.h unconditionally, now that we
3747 use the inttypes module. Don't bother to include stdint.h, since
3748 inttypes.h now does that for us.
3749 (LOCALEDIR): Remove, now that we use the configmake module.
3750 * src/getargs.c: Include configmake.h.
3751 * src/main.c: Likewise.
3752 * src/output.c: Likewise.
3753 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3754 not from $abs_top_builddir, since config.h moved.
3755
3756
3757 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3758 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3759
3760 * src/parse-gram.y (symbol_declaration): Don't put statements
3761 before declarations; it's not portable to C89.
3762 * src/scan-code.l (handle_action_at): Likewise.
3763
3764 * src/scan-code.l: Always initialize braces_level; the old code
3765 left it uninitialized and therefore had undefined behavior.
3766
3767 Don't attempt to redefine 'assert', since it runs afoul of
3768 systems where standard headers (mistakenly) include <assert.h>.
3769 Instead, define and use our own alternative, called 'aver'.
3770 * src/reader.c: Don't include assert.h, since we no longer
3771 use assert.
3772 * src/scan-code.l: Likewise.
3773 * src/system.h (assert): Remove, replacing with....
3774 (aver): New function, taking a bool arg. All uses changed.
3775 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3776 not merely an integer.
3777
37782006-09-15 Bob Rossi <bob@brasko.net>
3779
3780 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3781 * data/c.m4 (YYPUSH): New.
3782 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3783 * src/getargs.c (push_parser): New var.
3784 * src/getargs.h (push_parser): New declaration.
3785 * src/output.c (prepare): Add macro insertion of `push_flag'.
3786 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3787 (prologue_declaration): Parse %push-parser.
3788 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3789 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3790 list of removed lines from the traces observed.
3791 (AT_CHECK_CALC_LALR): Added push parser tests.
3792
37932006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3794
3795 * NEWS: Version 2.3a.
3796 * configure.ac (AC_INIT): Likewise.
3797
3798 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3799 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3800 due to header ordering dependencies. I don't know why the #define
3801 was there.
3802
3803 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3804 runtime cost when YYDEBUG is not defined, and so that some tests
3805 that used to fail now work. Problem and initial suggestion by
3806 Paolo Bonzini.
3807 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3808 * data/glr.cc (b4_parser_class_name):
3809 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3810 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3811 (yydebug_) [YYDEBUG]: New member.
3812 (yycdebug_): Now defined only if YYDEBUG.
3813 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3814 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3815 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3816 if YYYDEBUG.
3817 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3818 Define only if YYDEBUG.
3819 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3820 set_debug_level.
3821 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3822 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3823 AT_CHECK_CALC_GLR_CC that are working now.
3824
38252006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3826
3827 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3828 We don't need them in glr.cc, and glr.c defines them.
3829 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3830 assumes that defining it to anything is the same as defining
3831 it to 1. Problem reported by Paolo Bonzini.
3832
38332006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3834
3835 * data/c.m4 (b4_null, b4_case): Define.
3836 * src/output.c (prepare_symbols): Use b4_null.
3837 (user_actions_output): Use b4_case.
3838
38392006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3840
3841 * data/glr.c (b4_shared_declarations): Put start-header first,
3842 before any #includes that we generate, so that feature-test
3843 macros work. Problem reported by Michael Deutschmann in
3844 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3845 * data/lalr1.cc: Likewise.
3846 * doc/bison.texinfo (Prologue): Document that feature-test macros
3847 should be defined before any Bison declarations.
3848 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3849 that depend on location.hh after, not before, Bison decls, since
3850 we now include location.hh after the first user prologue.
3851
3852 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3853 Sander Brandenburg in
3854 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3855 Also, fix minor white space and comment issues.
3856 (Prologue): Mention that it's better to define feature-test macros
3857 before Bison declarations. Problem reported by Michael Deutschmann.
3858
3859 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3860 by Jim Meyering.
3861 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3862 This adjusts to recent gnulib changes.
3863
38642006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3865
3866 Finish implementation of per-type %destructor/%printer. Discussed
3867 starting at
3868 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3869 and
3870 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3871 * NEWS (2.3+): Add a description of this feature to the default
3872 %destructor/%printer description.
3873 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3874 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3875 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3876 list node contains a semantic type.
3877 * src/symtab.c, src/symtab.h: Extend with a table that associates
3878 semantic types with their %destructor's and %printer's.
3879 (semantic_type_from_uniqstr, semantic_type_get,
3880 semantic_type_destructor_set, semantic_type_printer_set): New functions
3881 composing the public interface of that table.
3882 (symbol_destructor_get, symbol_destructor_location_get,
3883 symbol_printer_get, symbol_printer_location_get): If there's no
3884 per-symbol %destructor/%printer, look up the per-type before trying
3885 the default.
3886 * tests/actions.at (Per-type %printer and %destructor): New test case.
3887 * tests/input.at (Default %printer and %destructor redeclared):
3888 Extend to check that multiple occurrences of %symbol-default in a
3889 single %destructor/%printer declaration is an error.
3890 (Per-type %printer and %destructor redeclared, Unused values with
3891 per-type %destructor): New test cases.
3892
38932006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3894
3895 Require default %destructor/%printer to be declared using
3896 %symbol-default instead of an empty symbol list, and start working on
3897 new per-type %destructor/%printer. Discussed at
3898 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3899 * NEWS (2.3+): Add %symbol-default to example.
3900 * bison.texinfo (Freeing Discarded Symbols): Likewise.
3901 (Table of Symbols): Add entry for %symbol-default.
3902 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3903 (generic_symlist, generic_symlist_item): New nonterminals for creating
3904 a list in which each item is a symbol, semantic type, or
3905 %symbol-default.
3906 (grammar_declaration): Use generic_symlist in %destructor and %printer
3907 declarations instead of symbols.1 or an empty list.
3908 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3909 for changes to symbol_list.
3910 * src/reader.c: Update for changes to symbol_list.
3911 * src/scan-code.l: Likewise.
3912 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3913 * src/symlist.c, src/symlist.h: Extend such that a list node may
3914 represent a semantic type or a %symbol-default in addition to just an
3915 ordinary symbol. Add switched functions for setting %destructor's and
3916 %printer's.
3917 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3918 %destructor/%printer declarations.
3919
39202006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3921
3922 Whether the default %destructor/%printer applies to a particular symbol
3923 isn't a question of whether the user *declares* that symbol (in %token,
3924 for example). It's a question of whether the user by any means
3925 *defines* the symbol at all (by simply using a char token, for
3926 example). $end is defined by Bison whereas any other token with token
3927 number 0 is defined by the user. The error token is always defined by
3928 Bison regardless of whether the user declares it with %token, but we
3929 may one day let the user define error as a nonterminal instead.
3930 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3931 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3932 the meaning of "user-defined".
3933 * tests/actions.at (Default %printer and %destructor for user-declared
3934 end token): Rename to...
3935 (Default %printer and %destructor for user-defined end token): ...
3936 this.
3937
3938 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3939 computation of whether to apply the default, don't maintain a list of
3940 every Bison-defined symbol. Instead, just check for a first character
3941 of '$', which a user symbol cannot have, and check for the error token.
3942
39432006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3944
3945 Don't apply the default %destructor or %printer to the error token,
3946 $undefined, or $accept. This change fits the general rule that the
3947 default %destructor and %printer are only for user-declared symbols,
3948 and it solves several difficulties that are described in the new test
3949 cases listed below.
3950 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3951 * tests/actions.at (Default %printer and %destructor are not for error
3952 or $undefined, Default %printer and %destructor are not for $accept):
3953 New test cases.
3954
39552006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3956
3957 Allow %start after the first rule.
3958 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3959 when parsing the first rule.
3960 (check_and_convert_grammar): Search for it here after all grammar
3961 declarations have been parsed. Skip midrules, which have dummy LHS
3962 nonterminals.
3963 * src/symtab.c (symbol_is_dummy): New function.
3964 * src/symtab.h (symbol_is_dummy): Declare it.
3965 * tests/input.at (%start after first rule): New test.
3966
39672006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3968
3969 Redo some of the previous commit: add back the ability to use
3970 non-aliased/undeclared string literals since it might be useful to
3971 those declaring %token-table.
3972 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3973 commit: don't worry about complaints from symbols_pack.
3974 * src/symtab.c (symbol_new, symbol_class_set,
3975 symbol_check_alias_consistency): Undo changes in previous commit: count
3976 each string literal as a new symbol and token, assign it a symbol
3977 number, and don't complain about non-aliased string literals.
3978 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3979 and token counts but does still set aliased tokens to the same number,
3980 symbol_pack_processor now leaves empty slots in the symbols array.
3981 Remove those slots.
3982 * tests/regression.at (Undeclared string literal): Remove test case
3983 added in previous commit since non-aliased string literals are allowed
3984 again.
3985 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3986 remove unnecessary string literal declarations.
3987 * tests/sets.at (Firsts): Likewise.
3988
39892006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3990
3991 Don't allow an undeclared string literal, but allow a string literal to
3992 be used before its declaration.
3993 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3994 symbols_pack complained.
3995 * src/symtab.c (symbol_new): Don't count a string literal as a new
3996 symbol.
3997 (symbol_class_set): Don't count a string literal as a new token, and
3998 don't assign it a symbol number since symbol_make_alias does that.
3999 (symbol_make_alias): It's not necessary to decrement the symbol and
4000 token counts anymore. Don't assume that an alias declaration occurs
4001 before any uses of the identifier or string, and thus don't assert that
4002 one of them has the highest symbol number so far.
4003 (symbol_check_alias_consistency): Complain if there's a string literal
4004 that wasn't declared as an alias.
4005 (symbols_pack): Bail if symbol_check_alias_consistency failed since
4006 symbol_pack asserts that every token has been assigned a symbol number
4007 although undeclared string literals have not.
4008 * tests/regression.at (String alias declared after use, Undeclared
4009 string literal): New test cases.
4010 (Characters Escapes, Web2c Actions): Declare string literals as
4011 aliases.
4012 * tests/sets.at (Firsts): Likewise.
4013
40142006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
4015
4016 In the grammar scanner, STRING_FINISH unclosed constructs and return
4017 them to the parser in order to improve error messages.
4018 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
4019 SC_BRACED_CODE, SC_PROLOGUE): Implement.
4020 * tests/input.at (Unclosed constructs): New test case.
4021 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
4022 seen.
4023
4024 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
4025 unused global.
4026
40272006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
4028
4029 Handle string aliases for character tokens correctly.
4030 * src/symtab.c (symbol_user_token_number_set): If the token has an
4031 alias, check and set its alias's user token number instead of its own,
4032 which is set to indicate the alias. Previously, every occurrence of
4033 the character token in the grammar overwrote that alias indicator with
4034 the character code.
4035 * tests/input.at (String aliases for character tokens): New test.
4036
40372006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
4038
4039 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
4040
40412006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4042
4043 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
4044 to prevent failures when building on older platforms.
4045 Check for autopoint failure.
4046 Set XGETTEXT_OPTIONS to values that check for C format strings,
4047 so that translators are warned about them (this also helps
4048 prevent core dumps).
4049
4050 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
4051 function, since it simplifies our code a bit.
4052
4053 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
4054 rather than -W, so we don't get bogus warnings about sign comparisons.
4055 Add -Wpointer-arith, since that warning is useful (it reports code
4056 that does not conform to C89 and that some compilers reject).
4057 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
4058 since it's no longer needed.
4059
40602006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
4061
4062 Clean up scanners a bit.
4063 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
4064 definitions so gcc won't warn when obstack_for_string is unused.
4065 * src/scan-code.l: config.h and system.h are already #include'd by
4066 scan-code-c.c, so get rid of them here.
4067 * src/scan-gram.l: Likewise.
4068 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
4069 definitions rather than duplicating the rest of it.
4070 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
4071
40722006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
4073
4074 Suppress signed/unsigned comparison warnings for yycheck.
4075 * data/c.m4 (b4_safest_int_type): New macro.
4076 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
4077 a signed int type, cast it to b4_safest_int_type first.
4078 * data/yacc.c: Likewise.
4079 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
4080 also overwritten.
4081
40822006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
4083
4084 * doc/bison.texinfo: Fix some typos.
4085
40862006-08-02 Paul Eggert <eggert@cs.ucla.edu>
4087
4088 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
4089 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
4090
4091 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
4092 the latest gnulib does this a different way.
4093 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
4094 translation was patched, so stop omitting it.
4095
40962006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4097
4098 Enable declaration of default %printer/%destructor. Make the parser
4099 use these for all user-declared grammar symbols for which the user does
4100 not declare a specific %printer/%destructor. Thus, the parser uses it
4101 for token 0 if the user declares it but not if Bison generates it as
4102 $end. Discussed starting at
4103 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
4104 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
4105 and
4106 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
4107 * NEWS (2.3+): Mention.
4108 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
4109 declare a %destructor for a mid-rule's semantic value. It's just
4110 impossible to declare one specific to it.
4111 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
4112 code. Describe default %destructor form.
4113 * src/parse-gram.y (grammar_declaration): Parse default
4114 %printer/%destructor declarations.
4115 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
4116 and symbol_destructor_location_get rather than accessing the destructor
4117 and destructor_location members of struct symbol.
4118 (symbol_printers_output): Likewise but for %printer's.
4119 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
4120 again.
4121 * src/symtab.c (default_destructor, default_destructor_location,
4122 default_printer, default_printer_location): New static global
4123 variables to record the default %destructor and %printer.
4124 (symbol_destructor_get, symbol_destructor_location_get,
4125 symbol_printer_get, symbol_printer_location_get): New functions to
4126 compute the appropriate %destructor and %printer for a symbol.
4127 (default_destructor_set, default_printer_set): New functions to set the
4128 default %destructor and %printer.
4129 * src/symtab.h: Prototype all those new functions.
4130 * tests/actions.at (Default %printer and %destructor): New test to
4131 check that the right %printer and %destructor are called, that they're
4132 not called for $end, and that $$ and @$ work correctly.
4133 (Default %printer and %destructor for user-declared end token): New
4134 test to check that the default %printer and %destructor are called for
4135 a user-declared end token.
4136 * tests/input.at (Default %printer and %destructor redeclared, Unused
4137 values with default %destructor): New tests to check related grammar
4138 warnings and errors.
4139
41402006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4141
4142 Clean up handling of %destructor for the end token (token 0).
4143 Discussed starting at
4144 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
4145 and
4146 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
4147
4148 Make the skeletons consistent in how they pop the end token and invoke
4149 its %destructor.
4150 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
4151 state, which has token number 0, since this would invoke the
4152 %destructor for the end token.
4153 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
4154 until after shifting the end token, or else it won't be popped.
4155 * data/yacc.c (yyparse): Likewise.
4156
4157 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
4158 it's the end token. Upon termination, destroy an unshifted lookahead
4159 even when it's the end token.
4160 * data/lalr1.cc (yy::parser::parse): Likewise.
4161 * data/yacc.c (yyparse): Likewise.
4162
4163 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
4164 value warnings for the end token when the user gives the end token a
4165 %destructor.
4166
4167 * tests/actions.at (Printers and Destructors): Test all the above.
4168
41692006-07-24 Paul Eggert <eggert@cs.ucla.edu>
4170
4171 Update to latest gnulib and gettext versions.
4172 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
4173 Add fopen-safer.
4174 (gnulib_files): Add m4/warning.m4. Don't worry about files
4175 overwritten by autopoint.
4176 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
4177 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
4178 rejects them.
4179 Don't use autoreconf; instead, invoke autopoint etc. by hand,
4180 so that we can remove the intl files at a better time.
4181 (intl_files_to_remove): Remove aclocal.m4, since it gets
4182 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
4183 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
4184 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4185 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
4186 Remove datarootdir hack; no longer needed.
4187 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
4188 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
4189 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
4190 strdup.h.
4191 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
4192 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
4193
41942006-07-20 Paul Eggert <eggert@cs.ucla.edu>
4195
4196 * bootstrap: Adjust to today's change to gnulib-tool by invoking
4197 it with --assume-autoconf='latest-stable'.
4198
41992006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
4200
4201 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
4202 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
4203 YYSTYPE' and `{'.
4204 * src/muscle_tab.h (muscle_grow): Replace the header comments with
4205 those from muscle_tab.c since the old ones are misleading.
4206
42072006-07-13 Akim Demaille <akim@epita.fr>
4208
4209 Support %define "KEY" {VALUE}.
4210 * src/scan-code.h, src/scan-code.l (translate_action)
4211 (translate_rule_action, translate_symbol_action, translate_code):
4212 Return char *, not const char *.
4213 * src/parse-gram.y (declaration): Rename as...
4214 (prologue_declaration): this.
4215 (string_content): Remove this nonterminal, use STRING.
4216 (braceless, content, content.opt): New nonterminal.
4217 Use them.
4218 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
4219 as value.
4220 * src/scan-gram.l (getargs.h): Don't include it.
4221
42222006-07-12 Paul Eggert <eggert@cs.ucla.edu>
4223
4224 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
4225 rather than a for-loop that declares a local bool variable. This
4226 should work around a compatibility problem with a Cray x1e C++
4227 compiler reported by Hung Nguyen in
4228 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
4229 The for-loop was introduced in the 2004-11-17 change but I don't
4230 know why it was needed.
4231
42322006-07-12 Akim Demaille <akim@epita.fr>
4233
4234 * data/c.m4: Comment changes.
4235
42362006-07-10 Akim Demaille <akim@lrde.epita.fr>
4237
4238 * src/complain.c (error_message, ERROR_MESSAGE): New.
4239 To factor...
4240 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
4241 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
4242
42432006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4244
4245 * NEWS: Instead of %union, you can define and use your own union type
4246 YYSTYPE if your grammar contains at least one <type> tag.
4247 Your YYSTYPE need not be a macro; it can be a typedef.
4248 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
4249 (Union Decl, Decl Summary): Document this.
4250 * data/glr.c (YYSTYPE): Implement this.
4251 * data/glr.cc (YYSTYPE): Likewise.
4252 * data/lalr1.cc (YYSTYPE): Likewise.
4253 * data/yacc.c (YYSTYPE): Likewise.
4254 * src/output.c (prepare): Output tag_seen_flag.
4255 * src/parse-gram.y (declaration, grammar_declaration):
4256 Use 'union_seen' rather than 'typed' to determine whether
4257 %union has been seen, since grammars can now be typed without
4258 %union.
4259 (symbol_declaration, type.opt, symbol_def):
4260 Keep track of whether a tag has been seen.
4261 * src/reader.c (union_seen, tag_seen): New vars.
4262 (typed): remove.
4263 * src/reader.h (union_seen, tag_seen, typed): Likewise.
4264 * src/scan-code.l (untyped_var_seen): New variable.
4265 (handle_action_dollar): Adjust to above changes.
4266 (handle_action_dollar, handle_action_at):
4267 Improve overflow checking for outlandish numbers.
4268 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
4269 avoid new diagnostics generated by above changes.
4270 * tests/regression.at (YYSTYPE typedef): Add test to check
4271 for type tags without %union.
4272
4273 * src/symlist.c (symbol_list_length): Return int, not unsigned
4274 int, since callers expect int. This may need to get revisited
4275 once we have proper integer overflow checking.
4276
4277 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
4278 object is now static.
4279
4280 * src/getargs.c (flags_argmatch): Return void, not int,
4281 to pacify ./configure --enable-gcc-warnings.
4282
4283 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
4284 since last_string is already defined to FLEX_PREFIX (last_string).
4285
42862006-07-09 Akim Demaille <akim@lrde.epita.fr>
4287
4288 Implement --warnings/-W.
4289 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
4290 replaced by...
4291 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
4292 Adjust callers.
4293 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
4294 (warnings_args, warnings_types): New.
4295 (getargs, short_options, long_options): Accept -W/--warnings.
4296 Sort the options by alphabetical order, upper case letter right
4297 before its lower case.
4298
42992006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4300
4301 Change %merge result type clash warnings to errors. Discussed at
4302 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
4303 * src/reader.c (record_merge_function_type): Use complain_at.
4304 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4305 declared later): Update test case results.
4306
43072006-07-09 Akim Demaille <akim@lrde.epita.fr>
4308
4309 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
4310 to be in alphabetical order.
4311 (trace_args): Spelling fixes.
4312
43132006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4314
4315 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
4316 so they don't collide with user-defined macros.
4317 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
4318 this was never guaranteed, and now that we're using gnulib stdint,
4319 which defines int_fast16_t to long int, the problem is exposed.
4320
43212006-07-08 Paul Eggert <eggert@cs.ucla.edu>
4322
4323 * data/c.m4 (b4_basename): Simplify a bit, since we don't
4324 need the full POSIX semantics (and weren't implementing them
4325 anyway).
4326
4327 Adjust to Autoconf 2.60 and today's gnulib.
4328 * bootstrap (gnulib_modules): Add stdint.
4329 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
4330 no longer copies it.
4331 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
4332 since stdint needs the former and wcwidth (which is now required
4333 by mbswidth) needs the latter.
4334 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
4335 work around a compatibility glitch between gettext 0.14.6 and
4336 Autoconf 2.60.
4337 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
4338 Do not check for uintptr_t, since new stdint module does the right
4339 thing.
4340 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
4341 Add stdint.h, stdint_.h, wcwidth.h.
4342 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
4343 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
4344 stdint.m4, wchar_t.m4, wcwidth.m4.
4345 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
4346 usual order for ../lib/*.h files.
4347 (file_name_split): Use last_component, not base_name, to adjust
4348 to gnulib changes.
4349 * src/parse-gram.h: Include <strverscmp.h> in the usual order
4350 for ../lib/*.h files.
4351 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
4352 Define unconditionally, since we now assume the stdint module.
4353 * src/scan-skel.l: Include <dirname.h>.
4354 (BASE_QPUTS): Use last_component, not base_name.
4355 * src/system.h: Include <unlocked-io.h> in the usual order
4356 for ../lib/*.h files. Include <stdint.h> unconditionally,
4357 since we now use the stdint module.
4358 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
4359 HAVE_UINTPTR_T, since we now use the stdint module.
4360 (base_name): Remove decl, since files now include <dirname.h>
4361 to get the decl.
4362
43632006-07-08 Akim Demaille <akim@lrde.epita.fr>
4364
4365 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
4366 New, default to 1.
4367 * data/yacc.c, data/glr.c, data/location.cc: Use them.
4368 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
4369 default.
4370 * tests/calc.at: Adjust.
4371
43722006-07-08 Akim Demaille <akim@lrde.epita.fr>
4373
4374 * data/c.m4 (b4_basename): New.
4375 (b4_syncline): Also output the location of its invocation (from
4376 the skeleton).
4377 (b4_user_action, b4_define_user_action, b4_user_actions)
4378 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
4379 (b4_user_stype): New.
4380 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
4381
43822006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4383
4384 In the grammar file, the first column is 1 not 0 on the first line as
4385 on every other line.
4386 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
4387 * tests/input.at (Torturing the Scanner): Update output.
4388
4389 * src/scan-gram.l (scanner_cursor): Declare it static.
4390
43912006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4392
4393 In warnings, say "previous declaration" rather than "first
4394 declaration".
4395 * src/symtab.c (redeclaration): Do that here.
4396 * src/reader.c (record_merge_function_type): In the case of a result
4397 type clash, report the previous declaration rather than the very first
4398 one in the grammar file.
4399 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4400 declared later): Add a third declaration to check this behavior.
4401 * tests/input.at (Incompatible Aliases): Update output.
4402
44032006-06-27 Akim Demaille <akim@epita.fr>
4404
4405 * doc/Doxyfile.in: New.
4406 * doc/Makefile.am: Use it.
4407 * src/lalr.h, src/symtab.h: Initial doxygenation.
4408
44092006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4410
4411 Don't miss %merge result type warnings just because the LHS types are
4412 declared after the %merge. This continues the effort of the previous
4413 patch.
4414 * src/reader.c (get_merge_function): Don't set the merger type yet.
4415 (record_merge_function_type): New function for setting the merger type
4416 and checking for clashes.
4417 (grammar_current_rule_merge_set): Set the location of the %merge for
4418 the current rule.
4419 (packgram): Invoke record_merge_function_type for each rule now that
4420 all symbol type declarations have been parsed.
4421 * src/reader.h (merger_list.type_declaration_location): New member
4422 storing the location of the first %merge from which the type for this
4423 merging function was derived.
4424 * src/symlist.h (symbol_list.merger_declaration_location): New member
4425 storing the location of a rule's %merge, if any.
4426 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4427 declared later): New test to catch the error fixed by the above patch.
4428
44292006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4430
4431 Get action warnings (grammar_rule_check) right even when symbol
4432 declarations appear after the rules. Discussed at
4433 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4434 and
4435 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4436 Don't mistake the type of $$ in a midrule to be that of its parent
4437 rule's $$.
4438 * src/reader.c (grammar_current_rule_end): Don't invoke
4439 grammar_rule_check yet since not all symbol declarations may have been
4440 parsed yet.
4441 (grammar_midrule_action): Likewise.
4442 Don't record whether the midrule's $$ has been used yet since actions
4443 haven't been translated yet.
4444 Record the midrule's parent rule and its RHS index within the parent
4445 rule.
4446 (grammar_current_rule_action_append): Don't translate the action yet
4447 since not all symbol declarations may have been parsed yet and, thus,
4448 warnings about types for $$, $n, @$, and @n can't be reported yet.
4449 (packgram): Translate the action and invoke grammar_rule_check now that
4450 all symbol declarations have been parsed.
4451 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4452 after parsing the entire grammar file, the symbol list here in the case
4453 of a midrule is actually the midrule's empty RHS, so reference its
4454 parent rule's RHS where necessary.
4455 On the other hand, now that you can already know it's a midrule, you
4456 aren't forced to think $$ has the same type as its parent rule's $$.
4457 (handle_action_at): In the case of a midrule, reference the parent rule
4458 where necessary.
4459 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4460 members.
4461 (symbol_list_length): Now that this is invoked after all rules have
4462 been parsed, a NULL symbol (rather than a NULL symbol list node)
4463 terminates a rule. symbol_list_print already does this correctly.
4464 * src/symlist.h (symbol_list.midrule_parent_rule,
4465 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4466 remember their relationships with their parents.
4467 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4468 fixed by the above patch.
4469 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4470 implementing...
4471 (Unused values): ... this old test case and...
4472 (Unused values before symbol declarations): ... this new test case.
4473 This one is the same as `Unused values' except that all symbol
4474 declarations appear after the rules in order to catch the rest of the
4475 errors fixed by the above patch.
4476
44772006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4478
4479 More cleanup.
4480 * src/reader.c (current_rule): Declare it static since it's no longer
4481 used outside this file.
4482 (grammar_current_rule_action_append): Remove redundant arguments from
4483 translate_rule_action invocation.
4484 * src/reader.h (current_rule): Remove this unused extern.
4485 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4486 * src/scan-code.l (translate_rule_action): Likewise.
4487
44882006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4489
4490 Clean up yesterday's patch.
4491 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4492 to...
4493 * src/reader.c (grammar_current_rule_action_append): ... here for
4494 consistency with grammar_current_rule_symbol_append.
4495 * tests/regression.at (Braced code in declaration in rules section):
4496 Make yyerror and yylex static as usual.
4497
44982006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4499
4500 Fix bug that mistakes braced code in a declaration in the rules section
4501 to be a rule action. Mentioned at
4502 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4503 * src/scan-gram.l: Move midrule action detection from the start of the
4504 scanning of any braced code to...
4505 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4506 action. For readability, use $2 and @2 rather than the equivalent
4507 global variables.
4508 * tests/regression.at (Braced code in declaration in rules section):
4509 New test to catch the error fixed by the above patch.
4510
4511 Work on code readability some.
4512 * src/scan-code.l (current_rule): Get rid of this misleading and
4513 redundant declaration: it's actually extern'ed in reader.h.
4514 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4515 translate_action): Add a rule argument and use it instead of the global
4516 current_rule.
4517 (translate_rule_action): This already receives current_rule through an
4518 argument, so pass it on to translate_action instead of assigning
4519 current_rule to current_rule.
4520 (translate_symbol_action, translate_code): Pass rule = NULL to
4521 translate_action.
4522
45232006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4524
4525 Rename %before-definitions to %start-header and %after-definitions to
4526 %end-header. Don't use these declarations to separate pre-prologue
4527 blocks from post-prologue blocks. Add new order-independent
4528 declarations %before-header and %after-header as alternatives to the
4529 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4530 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4531 * NEWS (2.3+): Update for these changes.
4532 * data/glr.c (b4_before_definitions): Update to...
4533 (b4_start_header): ... this.
4534 (b4_after_definitions): Update to...
4535 (b4_end_header): ... this.
4536 * data/glr.cc: Likewise.
4537 * data/lalr1.cc: Likewise.
4538 * data/yacc.c: Likewise.
4539 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4540 prologue blocks with %*-header declarations.
4541 (Calc++ Parser): Likewise.
4542 (Decl Summary): Update names.
4543 (Table of Symbols): Update description.
4544 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4545 (PERCENT_END_HEADER): ... this.
4546 (PERCENT_BEFORE_DEFINITIONS): Update to...
4547 (PERCENT_START_HEADER): ... this.
4548 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4549 (declaration): Update token names and m4 macro names.
4550 When parsing %end-header and %start-header, invoke translate_code
4551 before muscle_code_grow, and no longer set global booleans to remember
4552 whether these declarations have been seen.
4553 Parse new %after-header and %before-header.
4554 * src/reader.c (before_definitions, after_definitions): Remove.
4555 (prologue_augment): Accept a new bool argument to specify whether to
4556 augment the pre-prologue or post-prologue.
4557 * src/reader.h (before_definitions, after_definitions): Remove these
4558 extern's.
4559 (prologue_augment): Add new bool argument.
4560 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4561 (PERCENT_END_HEADER): ... this.
4562 (PERCENT_BEFORE_DEFINITIONS): Update to...
4563 (PERCENT_START_HEADER): ... this.
4564 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4565 * tests/actions.at (Printers and Destructors): Update names.
4566
45672006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4568
4569 Add comparison operators for C++ location classes. Discussed at
4570 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4571 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4572 declaration indicating whether filename_type has an operator==. If
4573 filename_type is `std::string', it defaults to `1', `0' otherwise.
4574 * data/location.cc: Iff b4_define_location_comparison is `1', add
4575 operator== and operator!= for class position and for class location.
4576
4577 Some minor fixes.
4578 * src/scan-action.l: Remove unused file.
4579 * src/symtab.c (symbol_printer_set): Use printer_location not
4580 destructor_location.
4581 * src/symtab.h (struct symbol): Replace incorrect source comment for
4582 printer members.
4583 * tests/input.at (Incompatible Aliases): Update output with correct
4584 printer location.
4585
45862006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4587
4588 Don't put the pre-prologue in the header file. For the yacc.c code
4589 file and the glr.c header and code files, move the pre-prologue before
4590 the token definitions. Add new %before-definitions and
4591 %after-definitions to declare code that will go in both the header file
4592 and code file. Discussed at
4593 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4594 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4595 and
4596 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4597 * NEWS (2.3+): Describe these changes.
4598 * data/glr.c (b4_pre_prologue): Move from within to before...
4599 (b4_shared_declarations): ... this.
4600 Add new b4_before_definitions before b4_token_enums.
4601 Add new b4_after_definitions at the end.
4602 * data/glr.cc (b4_pre_prologue): Replace with...
4603 (b4_before_definitions): ... this in the header file.
4604 (b4_after_definitions): New near the end of the header file.
4605 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4606 code file right before including the header file.
4607 (b4_before_definitions): New in the previous position of
4608 b4_pre_prologue in the header file.
4609 (b4_after_definitions): New near the end of the header file.
4610 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4611 (b4_token_enums_defines): In the code file, move to right before
4612 YYSTYPE for consistency with the header file.
4613 (b4_before_definitions): New right before b4_token_enums_defines in
4614 both the header and code file.
4615 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4616 header and code file.
4617 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4618 of prologues for %union dependencies.
4619 (Decl Summary): In %defines description, mention the effect of
4620 %before-definitions and %after-definitions on the header file.
4621 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4622 than in the pre-prologue so that make check succeeds.
4623 (Table of Symbols): Add entries for %before-definitions and
4624 %after-definitions.
4625 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4626 %before-definitions.
4627 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4628 (declaration): Parse those declarations and append to
4629 b4_before_definitions and b4_after_definitions, respectively.
4630 * src/reader.c (before_definitions, after_definitions): New bools to
4631 track whether those declarations have been seen.
4632 (prologue_augment): Add to the post-prologue if %union,
4633 %before-definitions, or %after-definitions has been seen.
4634 * src/reader.h (before_definitions, after_definitions): New extern's.
4635 * src/scan-gram.l: Scan the new declarations.
4636 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4637 prologue block in a %before-definitions or a %after-definitions based
4638 on whether the %union is declared.
4639 * tests/regression.at (Early token definitions with --yacc, Early token
4640 definitions without --yacc): Move tests for token definitions into the
4641 post-prologue since token names are no longer defined in the
4642 pre-prologue.
4643
46442006-06-20 Akim Demaille <akim@epita.fr>
4645
4646 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4647 (symbol_get): Use it.
4648 * src/parse-gram.y: Use it.
4649
46502006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4651
4652 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4653 build succeeds when configured with --enable-gcc-warnings.
4654
46552006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4656
4657 * src/parse-gram.y (char_name): New function.
4658 (CHAR, STRING, string_content): For %printer, properly escape.
4659 (ID): Prefer fputs to fprintf.
4660 (id): Reindent to be consistent with other rules.
4661 Properly quote char.
4662
4663 The Translation Project changed its way of publishing translations
4664 to maintainers. I haven't received any responses to my request
4665 for supporting the old way, or for documenting the new way. I
4666 have modified 'bootstrap' to use screen scraping
4667 (in this case, HTML scraping). This is unreliable and inelegant,
4668 but I don't see any better way. Yuck.
4669 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4670 (get_translations): New function, which uses HTML scraping to
4671 deduce locations of latest translations.
4672 Use this function to grab both bison and bison-runtime .po files.
4673 Don't bother priming the pump for the runtime-po domain any more,
4674 as it's now translated better than bison is.
4675
46762006-06-19 Akim Demaille <akim@epita.fr>
4677
4678 * src/scan-gram.l: No longer "parse" things after `%union' until
4679 `{'. Rather, return a single "%union" token.
4680 No longer make symbols: return strings, and leave the conversion
4681 to symbols to the parser.
4682 (SC_PRE_CODE, token_type): Remove.
4683 * src/parse-gram.y (%union): New field `character'.
4684 Sort tokens.
4685 (CHAR): New token.
4686 (ID, ID_COLON): Now that the scanner no longer makes them
4687 identifiers, adjust all uses to invoke symbol_get.
4688 (id_colon): New, wraps the conversion from string to symbol.
4689 (%union): Accept a possible union_name.
4690 (symbol): Now can be a char.
4691 * data/c.m4 (b4_union_name): Leave a default value.
4692 * data/glr.c, data/yacc.c: Use it.
4693
46942006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4695
4696 For associating token numbers with token names for "yacc.c", don't use
4697 #define statements unless `--yacc' is specified; always use enum
4698 yytokentype. Most important discussions start at:
4699 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4700 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4701 and
4702 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4703 * NEWS (2.3+): Mention.
4704 * data/c.m4 (b4_yacc_if): New.
4705 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4706 token #define's.
4707 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4708 on token name definitions.
4709 * src/getargs.c (usage): Capitalize `Yacc' in English.
4710 * src/output.c (prepare): Define b4_yacc_flag.
4711 * tests/regression.at (Early token definitions): Test that tokens names
4712 are defined before the pre-prologue not just before the post-prologue.
4713 Remove this test case and copy to...
4714 (Early token definitions with --yacc): ... this to test #define's.
4715 (Early token definitions without --yacc): ... and this to test enums.
4716
47172006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4718
4719 * NEWS: Reword the post-2.3 change to not be so optimistic about
4720 removing the old "look-ahead" spelling.
4721 Update previous look-ahead/lookahead change reports.
4722 * REFERENCES: look-ahead -> lookahead (since that's
4723 what he actually wrote).
4724 * doc/refcard.tex: look ahead -> lookahead,
4725 look-ahead -> lookahead
4726
47272006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4728
4729 For consistency, use `lookahead' instead of `look-ahead' or
4730 `look_ahead'. Discussed starting at
4731 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4732 and then at
4733 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4734 * NEWS: For the next release, note the change to `--report'.
4735 * TODO, doc/bison.1: Update English.
4736 * doc/bison.texinfo: Update English.
4737 (Understanding Your Parser, Bison Options): Document as
4738 `--report=lookahead' rather than `--report=look-ahead'.
4739 * src/conflicts.c: Update English in comments.
4740 (lookahead_set): Rename from look_ahead_set.
4741 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4742 (resolve_sr_conflict): Rename local look_ahead_tokens to
4743 lookahead_tokens, and update other uses.
4744 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4745 count_rr_conflicts, conflicts_free): Update uses.
4746 * src/getargs.c (report_args): Move "lookahead" before alternate
4747 spellings.
4748 (report_types): Update uses.
4749 (usage): For `--report' usage description, state `lookahead' spelling
4750 rather than `look-ahead'.
4751 * src/getargs.h (report.report_lookahead_tokens): Rename from
4752 report_look_ahead_tokens.
4753 * src/lalr.c: Update English in comments.
4754 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4755 (state_lookahead_tokens_count): Rename from
4756 state_look_ahead_tokens_count.
4757 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4758 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4759 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4760 Update other uses.
4761 Update English in output.
4762 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4763 * src/print.c: Update English in comments.
4764 (lookahead_set): Rename from look_ahead_set.
4765 (print_reduction): Rename argument lookahead_token from
4766 look_ahead_token.
4767 (print_core, state_default_rule, print_reductions, print_results):
4768 Update uses.
4769 * src/print_graph.c: Update English in comments.
4770 (print_core): Update uses.
4771 * src/state.c: Update English in comments.
4772 (reductions_new): Update uses.
4773 (state_rule_lookahead_tokens_print): Rename from
4774 state_rule_look_ahead_tokens_print, and update other uses.
4775 * src/state.h: Update English in comments.
4776 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4777 (state_rule_lookahead_tokens_print): Rename from
4778 state_rule_look_ahead_tokens_print.
4779 * src/tables.c: Update English in comments.
4780 (conflict_row, action_row): Update uses.
4781 * tests/glr-regression.at
4782 (Incorrect lookahead during deterministic GLR,
4783 Incorrect lookahead during nondeterministic GLR): Rename
4784 print_look_ahead to print_lookahead.
4785 * tests/torture.at: Update English in comments.
4786 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4787 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4788 (Many lookahead tokens): Update uses.
4789 * data/glr.c: Update English in comments.
4790 * lalr1.cc: Likewise.
4791 * yacc.c: Likewise.
4792 * src/conflicts.h: Likewise.
4793 * src/lalr.h: Likewise.
4794 * src/main.c: Likewise.
4795 * src/output.c: Likewise.
4796 * src/parse-gram.c: Likewise.
4797 * src/tables.h: Likewise.
4798 * tests/calc.at: Likewise.
4799
48002006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4801
4802 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4803
48042006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4805
4806 * TODO: Add request from Nelson H. F. Beebe to be able to install
4807 Bison without installing the yacc script.
4808
48092006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4810
4811 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4812 and yytext if they're already #define'd.
4813 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4814 * src/scan-code-c.c: ... here.
4815 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4816 <config.h>.
4817
48182006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4819
4820 Get Bison to build again when configured with --enable-gcc-warnings.
4821 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4822 missing #include's.
4823 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4824 loc argument as it shadows a global.
4825 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4826 invocation.
4827
4828 * src/.cvsignore: Add scan-code.c.
4829
48302006-06-07 Akim Demaille <akim@epita.fr>
4831
4832 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4833 to...
4834 * src/scan-code.l: here.
4835 * tests/input.at (Torturing the Scanner): Fix another location
4836 error.
4837
48382006-06-07 Akim Demaille <akim@epita.fr>
4839
4840 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4841
48422006-06-06 Akim Demaille <akim@epita.fr>
4843
4844 Extract the parsing of user actions from the grammar scanner.
4845 As a consequence, the relation between the grammar scanner and
4846 parser is much simpler. We can also split "composite tokens" back
4847 into simple tokens.
4848 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4849 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4850 rename as...
4851 * src/location.h, src/location.c (add_column_width)
4852 (location_compute): these.
4853 Fix the column count: the initial column is 0.
4854 (location_print): Be robust to ending column being 0.
4855 * src/location.h (boundary_set): New.
4856 * src/main.c: Adjust to scanner_free being renamed as
4857 gram_scanner_free.
4858 * src/output.c: Include scan-code.h.
4859 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4860 Use boundary_set.
4861 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4862 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4863 which is now, again, a separate token.
4864 Adjust all dependencies.
4865 Whereever actions with $ and @ are used, use translate_code.
4866 (action): Remove this nonterminal which is now useless.
4867 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4868 (grammar_current_rule_action_append): Use translate_code.
4869 (packgram): Bound check ruleno, itemno, and rule_length.
4870 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4871 (last_string, last_braced_code_loc, max_left_semantic_context)
4872 (scanner_initialize, scanner_free, scanner_last_string_free)
4873 (gram_out, gram_lineno, YY_DECL_): Move to...
4874 * src/scan-gram.h: this new file.
4875 (YY_DECL): Rename as...
4876 (GRAM_DECL): this.
4877 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4878 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4879 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4880 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4881 Move these declarations, and...
4882 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4883 these to...
4884 * src/flex-scanner.h: this new file.
4885 * src/scan-gram.l (rule_length, rule_length_overflow)
4886 (increment_rule_length): Remove.
4887 (last_braced_code_loc): Rename as...
4888 (gram_last_braced_code_loc): this.
4889 Adjust to the changes of the parser.
4890 Move all the handling of $ and @ into...
4891 * src/scan-code.l: here.
4892 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4893 (handle_action_dollar, handle_action_at): Move to...
4894 * src/scan-code.l: here.
4895 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4896 scan-code.h, scan-code-c.c, scan-gram.h.
4897 (EXTRA_bison_SOURCES): Add scan-code.l.
4898 (BUILT_SOURCES): Add scan-code.c.
4899 (yacc): Be robust to white spaces.
4900
4901 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4902 * tests/regression.at: Adjust the column numbers.
4903 * tests/regression.at: Adjust the error message.
4904
49052006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4906
4907 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4908 Use Akim's wording from
4909 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4910
49112006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4912
4913 Between Bison releases, manually append `+' to the previous Bison
4914 release number, and use that as a signal to automatically print the
4915 ChangeLog's CVS Id keyword from --version. Discussed starting at
4916 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4917 * ChangeLog: Add Id header.
4918 * configure.ac (AC_INIT): Append `+' to `2.3'.
4919 * src/.cvsignore: Add revision.c.
4920 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4921 (BUILT_SOURCES): Add revision.c.
4922 (revision.c): New target rule. This file defines a new global variable
4923 named revision. It initializes it with either the Id from ChangeLog
4924 or, if VERSION doesn't contain `+', with the empty string.
4925 * src/getargs.c (version): Print the value of revision.
4926 * src/revision.h: Extern revision.
4927
49282006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4929
4930 * NEWS: Version 2.3.
4931 * configure.ac (AC_INIT): Likewise.
4932
49332006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4934
4935 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4936 with no arguments, not as an object-like macro. This is for
4937 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4938 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4939 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4940 Document this.
4941
49422006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4943
4944 * src/getargs.c (usage): Back out yesterday's modification of the
4945 --help output so that we don't have to wait for translation before
4946 releasing 2.3.
4947
49482006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4949
4950 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4951 Problem reported by Akim Demaille.
4952
49532006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4954
4955 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4956
49572006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4958
4959 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4960 generated source code. Problem reported by Frans Englich in
4961 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4962
49632006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4964
4965 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4966 shell, not within 'make', so that 'make' by an ordinary builder
4967 (using GNU make) does not worry about configuring gzip. This also
4968 works around a bug reported independently by Keith Thompson and by
4969 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4970 stderr rather than stdout, messing up the build logs.
4971
49722006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4973
4974 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4975 to make sure that YYID will never be unused. This fixes a 'make
4976 maintainer-check' failure caused by the recent changes to the 'Trivial
4977 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4978 not used.
4979 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4980
49812006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4982
4983 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4984 state before an empty RHS is always resolved here. Only the location
4985 of that state is guaranteed to be resolved, and that's enough. This
4986 fixes the remaining bug reported by Derek M. Jones in
4987 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4988 * tests/glr-regression.at (Uninitialized location when reporting
4989 ambiguity): Test the above case.
4990 Also, the embedded comments in this test case claim it checks the case
4991 of an empty RHS that has inherited the initial location. However, the
4992 corresponding LHS was already resolved, so yyresolveLocations didn't
4993 actually have reason to modify it. Fix this by forcing
4994 nondeterministic operation at the beginning of the parse.
4995
49962006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4997
4998 * data/c.m4 (b4_yy_symbol_print_generate):
4999 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
5000 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
5001 of the bugs reported today by Derek M Jones in
5002 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5003 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
5004 defined to be a type name without parens or brackets.
5005 (Location Type): Similarly for YYLTYPE.
5006 * tests/regression.at (Trivial grammars): Put in a test for this
5007 bug that will be caught by 'make maintainer-check' (though not,
5008 alas, by 'make check' unless your compiler is picky).
5009
50102006-05-19 Paul Eggert <eggert@cs.ucla.edu>
5011
5012 * NEWS: Version 2.2.
5013 * configure.ac (AC_INIT): Likewise.
5014
50152006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
5016
5017 * data/glr.c (yyreportTree): Make room in yystates for the state
5018 preceding the RHS. This fixes the segmentation fault reported by Derek
5019 M. Jones in
5020 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
5021 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
5022 to the user. Reported for yyreportTree by Derek M. Jones later in the
5023 same thread.
5024 * THANKS: Add Derek M. Jones.
5025 Update my email address.
5026 Fix typo in Steve Murphy's name.
5027
50282006-05-14 Paul Eggert <eggert@cs.ucla.edu>
5029
5030 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
5031 checking against YYLAST that caused the parser to miss a potential
5032 alternative in its diagnostic.
5033 Problem reported by Maria Jose Moron Fernandez in
5034 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
5035 * data/lalr1.cc (yysyntax_error_): Likewise.
5036 * data/yacc.c (yysyntax_error): Likewise.
5037 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
5038 tokens, in case we run into an older C compiler.
5039 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
5040 Use them to check for the off-by-one error fixed above.
5041
5042 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
5043 YYSIZE_T, not size_t.
5044 * tests/regression.at (Trivial grammars): New test, to catch
5045 the error fixed by the above patch.
5046
50472006-05-14 Akim Demaille <akim@lrde.epita.fr>
5048
5049 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
5050 scheme.
5051 Reported by Steve Murphy.
5052
50532006-05-14 Akim Demaille <akim@lrde.epita.fr>
5054
5055 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
5056 * data/glr.cc: b4_location_flag is now b4_locations_flag.
5057
50582006-05-14 Akim Demaille <akim@lrde.epita.fr>
5059
5060 Implement --trace=m4.
5061 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
5062 * src/output.c (output_skeleton): When set, pass -dV to m4.
5063
5064 Factor the handling of flags in m4.
5065 * src/output.c (prepare): Rename the muscle names debug, defines,
5066 error_verbose to debug_flag, defines_flag, error_verbose_flag.
5067 * data/c.m4: Adjust.
5068 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
5069 Use b4_define_flag_if to define other b4_FLAG_if macros.
5070 (b4_location_if): As a consequence, rename as...
5071 (b4_locations_if): this, for consistency.
5072 Adjust all the skeletons.
5073
50742006-05-14 Akim Demaille <akim@lrde.epita.fr>
5075
5076 * etc/bench.pm: Shorten bench names.
5077
50782006-05-14 Akim Demaille <akim@lrde.epita.fr>
5079
5080 * src/output.h, src/output.c (error_verbose): Move to...
5081 * src/getargs.h, src/getargs.c: here.
5082 Sort the flags.
5083 Adjust dependencies.
5084
50852006-05-13 Paul Eggert <eggert@cs.ucla.edu>
5086
5087 * data/c.m4 (b4_copyright): Put the special exception for Bison
5088 skeletons here, so we don't have to put it in each skeleton. All
5089 uses changed. Suggested by Akim Demaille. Also, wrap the
5090 copyright notice, in case it is longer than 80 columns. Replace
5091 comma by newline after title.
5092
50932006-05-11 Paul Eggert <eggert@cs.ucla.edu>
5094
5095 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
5096 incompatibility, not a bug. Mention that it wasn't fixed as of
5097 flex 2.5.33.
5098
50992006-05-11 Akim Demaille <akim@lrde.epita.fr>
5100
5101 * examples/extexi: Enforce the precedence of concatenation over
5102 >>.
5103 Reported by Tommy Nordgren.
5104
51052006-05-11 Akim Demaille <akim@lrde.epita.fr>
5106
5107 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
5108 with the member "token".
5109 Reported by Martin Nylin.
5110
51112006-05-08 Paul Eggert <eggert@cs.ucla.edu>
5112
5113 * data/glr.c: Switch to Bison 2.2 special-exception language in
5114 the copyright notice. Use more-regular format for titles and
5115 copyright notices.
5116 * data/glr.cc: Likewise.
5117 * data/location.cc: Likewise.
5118 * data/yacc.cc: Likewise.
5119 * doc/bison.texinfo (Conditions): Document this.
5120 * NEWS: likewise. Upgrade version to 2.2.
5121
51222006-04-27 Akim Demaille <akim@lrde.epita.fr>
5123
5124 * data/glr.cc: Remove dead code.
5125
51262006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5127
5128 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
5129 that variable and the line breaks the bootstrap. Problem reported
5130 by Juan M. Guerrero.
5131
51322006-04-24 Akim Demaille <akim@lrde.epita.fr>
5133
5134 * doc/bison.texinfo (Multiple start-symbols): New.
5135
51362006-04-24 Akim Demaille <akim@lrde.epita.fr>
5137
5138 * etc/README, etc/bench.pl: New.
5139
51402006-04-03 Akim Demaille <akim@lrde.epita.fr>
5141
5142 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
5143 rule.
5144 Reported by Mickael Labau.
5145 * tests/input.at (Torturing the Scanner): Test it.
5146
51472006-03-16 Paul Eggert <eggert@cs.ucla.edu>
5148
5149 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
5150 Problem reported by Bob Rossi.
5151
51522006-03-13 Paul Eggert <eggert@cs.ucla.edu>
5153
5154 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
5155 and didn't really work.
5156 For the index, use @ifnotinfo, not @iftex.
5157 Minor cleanups of spacing and terminology.
5158
51592006-03-12 Akim Demaille <akim@lrde.epita.fr>
5160
5161 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
5162 of AT_NAME_PREFIX when %name-prefix is not used.
5163
51642006-03-12 Akim Demaille <akim@lrde.epita.fr>
5165
5166 Apply --prefix to C++ skeletons too: they change the namespace.
5167 The test suite already exercize these cases.
5168 * data/c++.m4 (b4_namespace): New.
5169 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
5170 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
5171 * data/yacc.c, data/glr.c: Remove a useless `[]'.
5172 * doc/bison.texinfo: Document it.
5173 (Option Cross Key): Use @multitable in all formats. It looks
5174 nicer, even in TeX outputs.
5175 (Rules): Use the same code whatever the output type is.
5176 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
5177 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
5178 * tests/calc.at: Use it, instead of hard coding `yy'.
5179
51802006-03-10 Akim Demaille <akim@lrde.epita.fr>
5181
5182 * TODO: Remove dead items.
5183
51842006-03-10 Akim Demaille <akim@lrde.epita.fr>
5185
5186 * doc/FAQ: Remove, merged into...
5187 * doc/bison.texinfo (FAQ): this.
5188 * doc/Makefile.am (EXTRA_DIST): Adjust.
5189
51902006-03-10 Akim Demaille <akim@lrde.epita.fr>
5191
5192 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
5193 even if empty.
5194 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
5195 * doc/bison.texinfo (Calc++ Scanner): Use it.
5196
51972006-03-09 Paul Eggert <eggert@cs.ucla.edu>
5198
5199 Fix two nits reported by twlevo, plus one more that I discovered.
5200
5201 * src/assoc.h (assoc_to_string): Give a name to the arg, as
5202 this is the usual Bison style.
5203 * src/location.h (location_print): Likewise.
5204
5205 * src/reader.h (token_name): Likewise.
5206
52072006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5208
5209 Fix some nits reported by twlevo.
5210 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
5211 and "POSIX". Use more-modern syntax for URLs. Mention C++
5212 and ask for Java. Don't hardwire OS version numbers. Add
5213 copyright notice.
5214 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
5215 * src/conflicts.c (solved_conflicts_obstack): Now static.
5216
52172006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5218
5219 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
5220 page. Say "you can use it" not "you may use it" as on the web page;
5221 we're describing capabilities not granting permission.
5222
52232006-03-06 Paul Eggert <eggert@cs.ucla.edu>
5224
5225 * data/glr.c (yyresolveLocations): Rename local variables to avoid
5226 shadowing warnings. Use usual patter for iterating through RHS.
5227 * tests/glr-regression.at
5228 (Uninitialized location when reporting ambiguity):
5229 Modify yylex so that it uses its argument, rather than trying
5230 to rely on ARGSUSED (which doesn't work for gcc with warnings).
5231 const char -> char const.
5232
5233 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
5234 Don't use tabs inside commands; it messes up 'ps'.
5235 Problem reported by twlevo.
5236
52372006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
5238
5239 * tests/glr-regression.at (Uninitialized location when reporting
5240 ambiguity): New test case.
5241 * data/glr.c (yyresolveLocations): New function, which uses
5242 YYLLOC_DEFAULT.
5243 (yyresolveValue): Invoke yyresolveLocations before reporting an
5244 ambiguity.
5245 * doc/bison.texinfo (Default Action for Locations): Note
5246 YYLLOC_DEFAULT's usage for ambiguity locations.
5247 (GLR Semantic Actions): Cross-reference those notes.
5248
52492006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
5250
5251 * tests/glr-regression.at (Leaked semantic values when reporting
5252 ambiguity): Remove unnecessary union and type declarations.
5253 (Leaked lookahead after nondeterministic parse syntax error): New test
5254 case.
5255 * data/glr.c (yyparse): Check for zero stacks remaining before
5256 attempting to shift the lookahead so that you don't lose it.
5257
52582006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5259
5260 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
5261 * tests/glr-regression.at (Leaked semantic values when reporting
5262 ambiguity): New test case.
5263 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
5264 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
5265 now unnecessary yystackp parameter.
5266 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
5267 destructors can be called.
5268
5269 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
5270 in existing testcases.
5271
52722006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5273
5274 Don't leak semantic values for parent RHS when a user action cuts the
5275 parser, and clean up related code a bit.
5276 * tests/glr-regression.at (Leaked merged semantic value if user action
5277 cuts parse): Rename to...
5278 (Leaked semantic values if user action cuts parse): ... this. Add check
5279 for leaked parent RHS values.
5280 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
5281 between an unresolved state (non-empty chain of semantic options) and
5282 an incomplete one (signaled by an empty chain).
5283 (yyresolveStates): Document the interface. Move all manipulation of a
5284 successfully or unsuccessfully resolved yyGLRState to...
5285 (yyresolveValue): ... here so that yyresolveValue always leaves a
5286 yyGLRState with consistent data and thus is easier to understand.
5287 Remove the yyvalp and yylocp parameters since they are always just
5288 taken from the yys parameter. When reporting a discarded merged value
5289 in debugging output, note that it is incompletely merged. Document the
5290 interface.
5291 (yyresolveAction): If resolving any of the RHS states fails, destroy
5292 them all rather than leaking them. Thus, as long as user actions are
5293 written to clean up the RHS correctly, yyresolveAction always cleans up
5294 the RHS of a semantic option. Document the interface.
5295
52962006-02-27 Paul Eggert <eggert@cs.ucla.edu>
5297
5298 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
5299 led to a segmentation fault in GNU Pascal. Problem reported
5300 by Waldek Hebisch.
5301
53022006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
5303
5304 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
5305 mid-rule action inside a nonterminal symbol in order to declare a
5306 destructor for its semantic value.
5307
53082006-02-16 Paul Eggert <eggert@cs.ucla.edu>
5309
5310 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
5311 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
5312 __cplusplus && ! defined _STDLIB_H && !
5313 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
5314 defined free))]: Include <stdlib.h> rather than rolling our own
5315 declarations of malloc and free, to avoid problems with
5316 incompatible declarations (using 'throw') C++'s stdlib.h. This
5317 should fix Debian bug 340012
5318 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
5319 reported by Guillaume Melquiond.
5320
53212006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5322
5323 * NEWS: Clarify symbols versus types in unused-value warnings.
5324
5325 * configure.ac (AC_INIT): Bump version number.
5326
53272006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5328
5329 * NEWS: Version 2.1a.
5330 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
5331 since C99 requires this.
5332
53332006-02-11 Paul Eggert <eggert@cs.ucla.edu>
5334
5335 * m4/c-working.m4: New file.
5336 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
5337
53382006-02-10 Paul Eggert <eggert@cs.ucla.edu>
5339
5340 * Makefile.maint: Merge from coreutils.
5341
53422006-02-09 Paul Eggert <eggert@cs.ucla.edu>
5343
5344 More portability fixes for problems summarized by Nelson H. F. Beebe.
5345
5346 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
5347 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
5348 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
5349 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
5350 messes up because C++ code is compiled in 32-bit mode but linked
5351 in 64-bit mode.
5352
53532006-02-08 Paul Eggert <eggert@cs.ucla.edu>
5354
5355 More portability fixes for problems summarized by Nelson H. F. Beebe.
5356
5357 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
5358 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
5359
5360 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
5361 nodist_PROGRAMS, since we don't need to actually compile the
5362 example if we're just doing a plain 'make'. This avoids bothering
5363 the installer unnecessarily about problems due to weird C++
5364 compilers.
5365
53662006-02-06 Paul Eggert <eggert@cs.ucla.edu>
5367
5368 More portability fixes for problems summarized by Nelson H. F. Beebe.
5369
5370 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
5371 than #include "...", and compile with -I'.'. The old method was
5372 not portable, according to Posix and the C standard, and it does
5373 not work with Sun C 5.7, where previous #line directives affect
5374 the working directory used in later #include "..." directives.
5375
53762006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5377
5378 Various DJGGP specific issues in /djgpp
5379
53802006-02-02 Paul Eggert <eggert@cs.ucla.edu>
5381
5382 More portability fixes for problems summarized by Nelson H. F. Beebe.
5383
5384 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
5385 '#include <map>' works and that you can apply ++ to iterators.
5386
53872006-02-01 Paul Eggert <eggert@cs.ucla.edu>
5388
5389 Work around portability problems summarized by Nelson H. F. Beebe in
5390 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
5391
5392 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5393 that '#include <string>' works.
5394
5395 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
5396 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
5397 "warning: sorry: semantics of inline function static data `const
5398 unsigned char translate_table[262]' are wrong (you'll wind up with
5399 multiple copies)".
5400
5401 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
5402 or, xor to not_, and_, or_, and xor_, respectively. This works
5403 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
5404 random system header somewhere that includes the equivalent of
5405 <iso646.h>.
5406
5407 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5408 -E" works; it apparently doesn't work with PathScale EKO Compiler
5409 Suite Version 2.0.
5410
54112006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5412
5413 During deterministic GLR operation, user actions should be able to
5414 influence the parse by changing yychar. To make this easier to fix and
5415 to make glr.c easier to evolve in general, don't maintain yytoken in
5416 parallel with yychar; just compute yytoken when needed.
5417 * tests/glr-regression.at (Incorrect lookahead during deterministic
5418 GLR): Check that setting yychar in a user action has the intended
5419 effect.
5420 * data/glr.c (yyGLRStack): Remove yytokenp member.
5421 (yyclearin): Don't set *yytokenp.
5422 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5423 yychar rather than *yytokenp to determine the current lookahead.
5424 Compute yytoken locally when needed.
5425 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5426 point to.
5427
5428 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5429 after `--report' documentation.
5430
54312006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5432
5433 * src/parse-gram.y (grammar_declaration): Location of printer
5434 symbol is @1, not list->location. Bug reported by twlevo.
5435 * tests/input.at (Incompatible Aliases): Adjust to above change.
5436
54372006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5438
5439 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5440 all the test at once. This makes the output easier to read in the
5441 normal case.
5442
5443 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5444 got from <http://bro-ids.org/download.html>. The bug is that
5445 when two actions appeared in succession, the second one was
5446 scanned before the first one was added to the grammar rule
5447 as a midrule action. Bison then output the incorrect warning
5448 "parse.y:905.17-906.36: warning: unused value: $3".
5449 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5450 associated with a value.
5451 (rhs): Don't invoke grammar_current_rule_action_append.
5452 (action): Invoke it here instead.
5453 * src/reader.c (grammar_midrule_action): Now extern.
5454 (grammar_current_rule_action_append): Don't invoke
5455 grammar_midrule_action; that is now the scanner's job.
5456 * src/reader.h (last_string, last_braced_code_loc):
5457 (grammar_midrule_action): New decls.
5458 * src/scan-gram.l (last_string): Now extern, sigh.
5459 (last_braced_code_loc): New extern variable.
5460 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5461 rule already has an action.
5462 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5463 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5464 Add some tests to check that the above changes fixed the bug.
5465
54662006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5467
5468 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5469 All used changed. Check whether the symbol has a destructor,
5470 not whether it is typed.
5471 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5472 that the values are still reported as unused. All line numbers
5473 adjusted.
5474
54752006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5476
5477 Work around a bug in bro 0.8, which underparenthesizes its
5478 definition of YYLLOC_DEFAULT.
5479 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5480 their arguments.
5481 * data/lalr1.cc: Likewise.
5482 * data/yacc.cc: Likewise.
5483
54842006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5485
5486 Work around a bug in Pike 7.0, and give the Pike folks a
5487 better way to override the usual int widths.
5488 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5489 user can override the types.
5490 (short): #undef, to work around a bug in Pike 7.0.
5491 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5492 (union yyalloc.yyss): Use yytype_int16 rather than short.
5493 All uses changed.
5494 (yysigned_char): Remove.
5495 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5496 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5497 * tests/regression.at (Web2c Actions): Adjust to above changes.
5498
5499 * src/reader.c (check_and_convert_grammar): New function.
5500 (reader): Close the input file even if something went wrong during
5501 parsing. Minor file descriptor leak reported by twlevo.
5502
5503 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5504 to pacify gcc -Wswitch-default.
5505 * src/scan-gram.l (adjust_location): Use a default: break; case
5506 to pacify gcc -Wswitch-default.
5507 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5508 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5509 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5510 Move these decls to scan-skel.l, since they don't need to be
5511 visible elsewhere.
5512 * src/scan-skel.l: Accept the above decls.
5513 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5514 is used.
5515
55162006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5517
5518 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5519 since we don't want to insist on a version number at the start
5520 of the changelog every time.
5521 * Makefile.maint: Sync from coreutils a bit better.
5522 (sc_trailing_blank): Renamed from sc_trailing_space.
5523 All uses changed.
5524 (sc_no_if_have_config_h, sc_require_config_h):
5525 (sc_prohibit_assert_without_use): New rules.
5526 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5527 (sc_dd_max_sym_length): Fix leading spaces in rule.
5528 (sc_system_h_headers): Prefix with @.
5529 (sc_useless_cpp_parens, m4-check): Output line numbers.
5530 (changelog-check): Allow version only in head.
5531 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5532 satisfy new Makefile.maint rule.
5533 * data/glr.c: Likewise.
5534 * data/glr.cc: Likewise.
5535 * data/lalr1.cc: Likewise.
5536 * data/yacc.c: Likewise.
5537 * lib/ebitsetv.c: Likewise.
5538 * lib/lbitset.c: Likewise.
5539 * lib/subpipe.c: Likewise.
5540 * lib/timevar.c: Likewise.
5541 * src/system.h: Likewise.
5542 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5543 * djgpp/Makefile.maint: Add copyright notice.
5544 * djgpp/README.in: Likewise.
5545 * djgpp/config.bat: Likewise.
5546 * djgpp/config.site: Likewise.
5547 * djgpp/config_h.sed: Likewise.
5548 * djgpp/djunpack.bat: Likewise.
5549 * djgpp/config.sed: Fix copyright notice to match standard format.
5550 * djgpp/subpipe.h: Likewise.
5551 * lib/bitsetv-print.c: Likewise.
5552 * lib/bitsetv.c: Likewise.
5553 * lib/subpipe.h: Likewise.
5554 * lib/timevar.c: Likewise.
5555 * lib/timevar.h: Likewise.
5556 * djgpp/subpipe.c: Use standard recipe for config.h.
5557 * lib/abitset.c: Likewise.
5558 * lib/bitset.c: Likewise.
5559 * lib/bitset_stats.c: Likewise.
5560 * lib/bitsetv-print.c: Likewise.
5561 * lib/bitsetv.c: Likewise.
5562 * lib/ebitsetv.c: Likewise.
5563 * lib/get-errno.c: Likewise.
5564 * lib/lbitset.c: Likewise.
5565 * lib/subpipe.c: Likewise.
5566 * lib/timevar.c: Likewise.
5567 * lib/vbitset.c: Likewise.
5568 * tests/local.at: Likewise.
5569 * src/scan-gram.l: Don't include verify.h, since system.h does
5570 that for us.
5571 * .x-sc_require_config_h: New file.
5572 * .x-sc_unmarked_diagnostics: New file.
5573
55742006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5575
5576 Be a bit more systematic about using 'abort'.
5577 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5578 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5579 Put 'default: abort ();' before some other case, to satisfy older
5580 pedantic compilers.
5581 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5582 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5583 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5584 * src/conflicts.c (resolve_sr_conflict): Likewise.
5585 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5586 (get_decision_str, get_orientation_str, get_node_alignment_str):
5587 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5588 (get_linestyle_str, get_arrowstyle_str): Likewise.
5589 * src/conflicts.c (resolve_sr_conflict):
5590 Use a default case rather than one for the one remaining enum
5591 value, to catch invalid enum values as well.
5592 * src/lalr.c (set_goto_map, map_goto):
5593 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5594 * src/nullable.c (nullable_compute, token_definitions_output):
5595 Likewise.
5596 * src/reader.c (packgram, reader): Likewise.
5597 * src/state.c (transitions_to, state_new, state_reduction_find):
5598 Likewise.
5599 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5600 (symbol_pack): Likewise.
5601 * src/tables.c (conflict_row, pack_vector): Likewise.
5602 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5603 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
5604 * src/system.h: Don't include <assert.h>.
5605 (assert): New macro.
5606
5607 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5608 (Destructor Decl, Parser Function, Pure Calling):
5609 Describe rules for braces inside C code more carefully.
5610
56112006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5612
5613 Fix some porting glitches found by Nelson H. F. Beebe.
5614 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5615 compilers that don't understand that abort () does not return.
5616 * src/state.c (transitions_to): Likewise.
5617 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5618 that '#include <cstdlib>' works.
5619 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5620 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5621 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5622 for the benefit of some pre-C99 compilers.
5623
5624 * bootstrap: Undo changes to gnulib files that autoreconf made.
5625
5626 Minor fixups to get 'make maintainer-check' to work.
5627 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5628 with the new verify.h implementation.
5629 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5630 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5631 * data/yacc.c (YYUSE): Likewise.
5632 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5633 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5634 * src/parse-gram.y (declaration): Don't pass a string constant
5635 to a function that expects char *, since GCC might complain
5636 about the constant value.
5637 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5638 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5639 before #defining them.
5640 * tests/glr-regression.at
5641 (Incorrectly initialized location for empty right-hand side in GLR):
5642 In yyerror, use the msg arg.
5643 (Corrupted semantic options if user action cuts parse):
5644 (Incorrect lookahead during deterministic GLR):
5645 (Incorrect lookahead during nondeterministic GLR):
5646 Don't name a local var 'index'; it shadows string.h's 'index'.
5647
56482006-01-19 Akim Demaille <akim@epita.fr>
5649
5650 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5651 location, not just parts of it.
5652
56532006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5654
5655 * NEWS: Document the fact that multiple %unions are now allowed.
5656 * doc/bison.texinfo (Union Decl): Likewise.
5657 * TODO: This feature is now implemented, so remove it from
5658 the wishlist.
5659
5660 * Makefile.maint: Merge with coreutils Makefile.maint.
5661 (CVS_LIST): Use build-aux version if available.
5662 (VERSION_REGEXP): New macro.
5663 (syntax-check-rules): Add sc_no_if_have_config_h,
5664 sc_prohibit_assert_without_use, sc_require_config_h,
5665 sc_useless_cpp_parens.
5666 (sc_obsolete_symbols): Check for O_NDELAY.
5667 (sc_dd_max_sym_length): Track coreutils.
5668 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5669 (sc_useless_cpp_parens): New rule.
5670 (news-date-check): Look for version or today's date.
5671 (changelog-check): Don't require version number near head.
5672 (copyright-check): Use current year instead of hardwiring 2005.
5673 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5674 (announcement): Add --gpg-key-ID.
5675
5676 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5677 with "file system".
5678
5679 Avoid undefined behavior that addressed just before the start of an
5680 array. Problem reported by twlevo.
5681 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5682 * src/lalr.c (build_relations): Rely on new sentinel.
5683 * src/gram.c (gram_free): Adjust to new sentinel.
5684
56852006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5686
5687 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5688 yylookaheadNeeds. All uses updated.
5689 (yysplitStack): Rename local yynewLookaheadStatuses to
5690 yynewLookaheadNeeds.
5691 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5692 GLR): In comments, change `lookahead status' to `lookahead need'.
5693
56942006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5695
5696 * data/glr.c (yysplitStack): A little stylistic rewrite.
5697
56982006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5699
5700 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5701
57022006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5703
5704 * doc/bison.texinfo: Fix some typos.
5705 (GLR Semantic Actions): New subsection discussing special
5706 considerations because GLR semantic actions might be deferred.
5707 (Actions): Mention look-ahead usage of yylval.
5708 (Actions and Locations): Mention look-ahead usage of yylloc.
5709 (Special Features for Use in Actions): Add YYEOF entry and mention it
5710 in the yychar entry.
5711 In the yychar entry, remove mention of the local yychar case (pure
5712 parser) since this is irrelevant information when writing semantic
5713 actions and since it's already discussed in `Table of Symbols' where
5714 yychar is otherwise described as an external variable.
5715 In the yychar entry, don't call it the `current' look-ahead since it
5716 isn't when semantic actions are deferred.
5717 In the yychar and yyclearin entries, add note about deferred semantic
5718 actions.
5719 Add yylloc and yylval entries discussing look-ahead usage.
5720 (Look-Ahead Tokens): When discussing yychar, don't call it the
5721 `current' look-ahead, and do mention yylval and yylloc.
5722 (Error Recovery): Cross-reference `Action Features' when mentioning
5723 yyclearin.
5724 (Table of Symbols): In the yychar entry, don't call it the `current'
5725 look-ahead.
5726 In the yylloc and yylval entries, mention look-ahead usage.
5727
57282006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5729
5730 * tests/glr-regression.at: Update copyright year to 2006.
5731
57322006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5733
5734 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5735 use during nondeterministic operation to track which stacks have
5736 actually needed the current lookahead.
5737 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5738 Allocate, deallocate, resize, and otherwise shuffle space for
5739 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5740 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5741 appropriately during nondeterministic operation.
5742 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5743 members to store the current lookahead to be used by the deferred
5744 user action.
5745 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5746 from which the RHS is taken. Set the lookahead members of the new
5747 yySemanticOption according to the lookahead status for stack yyk.
5748 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5749 yyaddDeferredAction.
5750 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5751 members of yySemanticOption before invoking yyuserAction, and then set
5752 them back to their current values afterward.
5753 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5754 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5755 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5756 titles for consistency.
5757 (Leaked merged semantic value if user action cuts parse): In order to
5758 suppress lint warnings, use arguments in merge function, and assign
5759 char value < 128 in main.
5760 (Incorrect lookahead during deterministic GLR): New test case.
5761 (Incorrect lookahead during nondeterministic GLR): New test case.
5762
57632006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5764
5765 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
5766 !yyvaluep as signal that no semantic value is available to print.
5767 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5768 to print a semantic value.
5769
57702006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5771
5772 * tests/glr-regression.at: For consistency with my newer test cases,
5773 don't thank myself.
5774
57752006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5776
5777 * data/glr.c (yyresolveValue): When merging semantic options, if at
5778 least one user action succeeds but a later one cuts the parse, then
5779 destroy the semantic value before returning rather than leaking it.
5780 (yyresolveStates): If a user action cuts the parse and thus
5781 yyresolveValue fails, ignore the (unset) semantic value rather than
5782 corrupting the yyGLRState, and empty the semantic options list since
5783 the user actions should have called all necessary destructors.
5784 Simplify code with YYCHK.
5785 * tests/glr-regression.at (Corrupted semantic options if user action
5786 cuts parse): New test case.
5787 (Undesirable destructors if user action cuts parse): New test case.
5788 Before applying any of this patch, this test case never actually failed
5789 for me... but only because the corrupted semantic options usually
5790 masked this bug.
5791 (Leaked merged semantic value if user action cuts parse): New test
5792 case.
5793
57942006-01-05 Akim Demaille <akim@epita.fr>
5795
5796 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5797
57982006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5799
5800 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5801 _MSC_VER. Problem reported by Cenzato Marco.
5802 (b4_c_function_def): Use it.
5803 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5804 b4_c_modern.
5805 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5806 than rolling our own.
5807
58082006-01-04 Akim Demaille <akim@epita.fr>
5809
5810 Also warn about non-used mid-rule values.
5811 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5812 member.
5813 (symbol_list_new): Adjust.
5814 * src/reader.c (symbol_typed_p): New.
5815 (grammar_rule_check): Use it.
5816 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5817 Check its rule.
5818 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5819 Use it.
5820 * tests/actions.at (Exotic Dollars): Adjust.
5821
58222006-01-04 Akim Demaille <akim@epita.fr>
5823
5824 * src/reader.c (grammar_midrule_action): If $$ is set in a
5825 mid-rule, move the `used' bit to its lhs.
5826 * tests/input.at (Unused values): New.
5827 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5828
58292006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5830
5831 * doc/bison.texinfo (Bison Options): Say more accurately what
5832 --yacc does.
5833 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5834 about declarations in the grammar when in Yacc mode, as POSIX does
5835 not require a diagnostic when the grammar uses extensions.
5836
5837 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5838
5839 Warn about dubious constructions like "%token T T".
5840 Reported by twlevo.
5841 * src/symtab.h (struct symbol.declared): New member.
5842 * src/symtab.c (symbol_new): Initialize it to false.
5843 (symbol_class_set): New arg DECLARING, specifying whether
5844 this is a declaration that we want to warn about, if there
5845 is more than one of them. All uses changed.
5846
5847 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5848 Allow multiple %union directives, whose contents concatenate.
5849 * src/parse-gram.y (grammar_declaration): Likewise.
5850 Use muscle_code_grow, so that we don't need stype_line any more.
5851 All uses changed.
5852
5853 * src/muscle_tab.c (muscle_grow): Fix comment.
5854
5855 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5856 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5857 Update copyright year to 2006.
5858
58592006-01-03 Akim Demaille <akim@epita.fr>
5860
5861 Have glr.cc pass (some of) the calc.at tests.
5862 * data/glr.cc (b4_parse_param_orig): New.
5863 (b4_parse_param): Improve its definition, and bound it more
5864 clearly in the skeleton.
5865 (b4_epilogue): Append, instead of prepending, in order to keep
5866 #line consistency.
5867 Simplify the generation of auxiliary functions: locations and
5868 purity are mandated.
5869 (b4_global_tokens_and_yystype): Honor it.
5870 * data/location.cc (c++.m4): Don't include it.
5871 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5872 and AT_SKEL_CC_IF.
5873 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5874 AT_LALR1_CC_IF.
5875 Be sure to initialize the first position's filename.
5876 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5877 mandated anyway.
5878 (AT_CHECK_CALC_GLR_CC): New.
5879 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5880
58812006-01-02 Akim Demaille <akim@epita.fr>
5882
5883 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5884 c.m4.
5885 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
5886 * data/glr.cc: Do not include stack.hh.
5887
58882006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5889
5890 * data/glr.c: Reformat whitespace with tabs.
5891 (b4_lpure_formals): Remove this unused m4 macro.
5892 * tests/cxx-type.at: Reformat whitespace with tabs.
5893 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5894 since it's a member. Rename type to isNterm for clarity.
5895
58962005-12-29 Akim <akim@sulaco.local>
5897
5898 Let glr.cc catch up with symbol_value_print.
5899 * data/glr.cc (b4_yysymprint_generate): Replace by...
5900 (b4_yy_symbol_print_generate): this.
5901 (yy_symbol_print, yy_symbol_value_print): Declare them.
5902
59032005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5904
5905 * src/location.h (boundary): Note that a line or column equal
5906 to INT_MAX indicates an overflow.
5907 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5908 (rule_length_overflow, increment_rule_length, add_column_width):
5909 New functions.
5910 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5911 (<SC_BRACED_CODE>"}"):
5912 Use increment_rule_length rather than incrementing it by hand.
5913 (adjust_location, handle_syncline): Diagnose overflow.
5914 (handle_action_dollar, handle_action_at):
5915 Fix bug with monstrosities like $-2147483648.
5916 Remove now-unnecessary checks.
5917 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5918 (convert_ucn_to_byte): Verify assumptions.
5919 (handle_syncline): New arg LOC. All callers changed.
5920 Don't store through a value derived from char const * pointer.
5921
5922 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5923 GCC warnings.
5924
59252005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5926
5927 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5928 Remove unnecessary forward static decls.
5929
59302005-12-27 Akim Demaille <akim@epita.fr>
5931
5932 * src/reader.c (grammar_current_rule_check): Also check that $$
5933 is used.
5934 Take the rule to check as argument, hence rename as...
5935 (grammar_rule_check): this.
5936 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5937 Rename as...
5938 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5939 (grammar_midrule_action, grammar_symbol_append): Now static.
5940 * tests/torture.at (input): Don't rely on the default action
5941 being always performed.
5942 * tests/calc.at: "Set" $$ even when the action is "cut" with
5943 YYERROR or other.
5944 * tests/actions.at (Exotic Dollars): Instead of using unused
5945 values, check that the warning is issued.
5946
59472005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5948
5949 * NEWS: Improve wording for unused-value warnings.
5950
59512005-12-22 Akim Demaille <akim@epita.fr>
5952
5953 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5954 (b4_yysymprint_generate): Rename as...
5955 (b4_yy_symbol_print_generate): this.
5956 Generate yy_symbol_print instead of yysymprint.
5957 Generate also yy_symbol_value_print, and use it.
5958
59592005-12-22 Akim Demaille <akim@epita.fr>
5960
5961 * NEWS: Warn about unused values.
5962 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5963 a `used' member.
5964 (symbol_list_n_get, symbol_list_n_used_set): New.
5965 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5966 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5967 * src/reader.c (grammar_current_rule_check): Check that values are
5968 used.
5969 * src/symtab.c (symbol_print): Accept 0.
5970 * tests/existing.at: Remove the type information.
5971 Empty the actions.
5972 Remove useless actions (beware of mid-rule actions: perl -000
5973 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5974 * tests/actions.at (Exotic Dollars): Use unused values.
5975 * tests/calc.at: Likewise.
5976 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5977 Likewise.
5978
5979 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5980 rule_useful_p.
5981
59822005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5983
5984 Undo 2005-12-01 tentative license wording change. The wording is
5985 still being reviewed by the lawyers, and we don't want to wait for
5986 them before publishing a test release. For now, revert to the
5987 previous wording.
5988 * NEWS: Undo 2005-12-01 change.
5989 * data/glr.c: Revert to previous license wording.
5990 * data/glr.cc: Likewise.
5991 * data/lalr1.cc: Likewise.
5992 * data/location.cc: Likewise.
5993 * data/yacc.c: Likewise.
5994
5995 * NEWS: Reword %destructor vs YYABORT etc.
5996 * data/glr.c: Use American spacing, for consistency.
5997 * data/glr.cc: Likewise.
5998 * data/lalr1.cc: Likewise.
5999 * data/yacc.c: Likewise.
6000 * data/yacc.c: Reformat comments slightly.
6001 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
6002 for consistency. Fix some spelling errors and reword recently-included
6003 text slightly.
6004 * tests/cxx-type.at: Cast results of malloc, for C++.
6005
60062005-12-21 Joel E. Denny <address@hidden>
6007
6008 * tests/cxx-type.at: Construct a tree, count the parents of shared
6009 nodes, and free each node once and only once. Previously, the memory
6010 for semantic values was leaked instead.
6011
60122005-12-21 Joel E. Denny <address@hidden>
6013
6014 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
6015 (yylval, yylloc): If pure, #define to yystackp->yyval and
6016 yystackp->yyloc similar to yychar and yynerrs.
6017 (yyparse): If pure, remove local yylval and yylloc. Add local
6018 yystackp to accommodate pure definitions of yylval and yylloc.
6019 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
6020 yylvalp and yyllocp to &yylval and &yylloc.
6021 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
6022 namespace. Previously, nerrs and char were missing, but lval and lloc
6023 weren't necessary.
6024 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
6025 yylvalp and yyllocp parameters since, if pure, these are now always
6026 accessible through yystackp. If not pure, they are still accessible
6027 globally.
6028 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
6029 `if (YYID (N))' to pacify lint.
6030
60312005-12-21 Akim Demaille <akim@epita.fr>
6032
6033 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
6034 destroy the RHS symbols of a rule.
6035 * data/yacc.c (yylen): Initialize to 0.
6036 Keep its value to the number of items to possibly shift.
6037 In particular, a regular successful parse that ends on YYFINAL by
6038 a (internal) YYACCEPT must not have yylen != 0.
6039 (yyerrorlab, yyreturn): Pop the RHS.
6040 Reorder a bit to emphasize the `shifting' bits of code.
6041 (YYPOPSTACK): Now accept a number of items to pop.
6042 * data/lalr1.cc: Likewise.
6043 * data/glr.c: Formatting changes.
6044 Use goto instead of fall through.
6045 * doc/bison.texinfo (Destructor Decl): Complete.
6046
60472005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6048
6049 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6050 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
6051 * djgpp/config.bat: Replace every occurence of the file name
6052 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6053 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6054 * djgpp/config.sed: Replace every occurence of the file name
6055 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6056 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6057 * djgpp/djunpack.bat: DJGPP specific file.
6058 * djgpp/fnchange.lst: DJGPP specific file.
6059 * djgpp/README.in: Add new information about how to unpack the bison
6060 source on MSDOS and other systems which have 8.3 file name restrictions
6061 using djunpack.bat and fnchange.lst.
6062
60632005-12-12 Paul Eggert <eggert@cs.ucla.edu>
6064
6065 * bootstrap (build_cvs_prefix): Remove; unused.
6066 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
6067 when getting gnulib.
6068
60692005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
6070
6071 * data/glr.c: Reorder typedef declarations for structs to match order
6072 of struct declarations.
6073 Rename yystack everywhere to yystackp except in yyparse where it's not
6074 a pointer.
6075 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
6076 consistency.
6077 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
6078 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
6079 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
6080 lint.
6081
60822005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6083
6084 * tests/sets.at (Accept): Fix typos in regular expression used to
6085 sed out the final state number.
6086
6087 Work around portability problem on Solaris 10: flex-generated
6088 files include <stdio.h> before <config.h>, which messes up
6089 because the latter defines __EXTENSIONS__. Address the problem
6090 by creating two new little files that include <config.h> first,
6091 then include the flex-generated files. Rewrite everyone else
6092 to include <config.h> first, as well.
6093 * lib/timevar.c: Always include "config.h".
6094 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
6095 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
6096 (EXTRA_bison_SOURCES): New macro.
6097 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
6098 * src/system.h: Don't include config.h.
6099 * src/LR0.c: Include <config.h> first.
6100 * src/assoc.c: Likewise.
6101 * src/closure.c: Likewise.
6102 * src/complain.c: Likewise.
6103 * src/conflicts.c: Likewise.
6104 * src/derives.c: Likewise.
6105 * src/files.c: Likewise.
6106 * src/getargs.c: Likewise.
6107 * src/gram.c: Likewise.
6108 * src/lalr.c: Likewise.
6109 * src/location.c: Likewise.
6110 * src/main.c: Likewise.
6111 * src/muscle_tab.c: Likewise.
6112 * src/nullable.c: Likewise.
6113 * src/output.c: Likewise.
6114 * src/parse-gram.y: Likewise.
6115 * src/print.c: Likewise.
6116 * src/print_graph.c: Likewise.
6117 * src/reader.c: Likewise.
6118 * src/reduce.c: Likewise.
6119 * src/relation.c: Likewise.
6120 * src/state.c: Likewise.
6121 * src/symlist.c: Likewise.
6122 * src/symtab.c: Likewise.
6123 * src/tables.c: Likewise.
6124 * src/uniqstr.c: Likewise.
6125 * src/vcg.c: Likewise.
6126
6127 * src/parse-gram.y: Fix minor problems uncovered by lint.
6128 (current_lhs, current_lhs_location): Now static.
6129 (current_assoc): Remove unused variable.
6130
6131 Cleanups so that Bison-generated parsers have less lint.
6132 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
6133 Prepend /*ARGSUSED*/, for lint's sake.
6134 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
6135 definition if 'lint' is defined.
6136 (YYID): New macro (or function, if lint).
6137 All uses of /*CONSTCOND*/0 replaced by YYID(0).
6138 * data/yacc.c: Likewise.
6139 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
6140 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
6141 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
6142 is C++ only.
6143 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
6144 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
6145 Use YYID(0) rather than 0, for lint.
6146 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
6147 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
6148
61492005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6150
6151 * tests/glr-regression.at
6152 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6153 Close memory leak reported by twlevo.
6154
61552005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
6156
6157 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
6158 all stacks.
6159 (yyparse): Iterate another stack in order to call user destructors.
6160 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6161 New test case.
6162 (Duplicated user destructor for lookahead): This test now is expected
6163 to succeed.
6164
61652005-12-01 Paul Eggert <eggert@cs.ucla.edu>
6166
6167 * NEWS: Document the following change.
6168 * data/yacc.c: Say "parser skeleton" rather than "file", since
6169 it's no longer just a file.
6170 * data/glr.c: Grant a special exception for C GLR parsers, that
6171 reads like the already-existing exception for C LALR(1) parsers.
6172 * data/glr.cc: Likewise.
6173 * data/lalr1.cc: Likewise.
6174 * data/location.cc: Likewise.
6175 * data/yacc.c: Reword the "written by" statement to clarify that
6176 it was the parser skeleton, not the entire output file.
6177 * data/glr.c: Written by Paul Hilfinger.
6178 * data/glr.cc: Written by Akim Demaille.
6179 * data/lalr1.cc: Likewise.
6180
61812005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6182
6183 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
6184 Fix typos in previous change that broke 'make check'.
6185 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
6186 supported in C.
6187 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
6188 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
6189 We can revert this once things settle down.
6190
6191 * src/conflicts.c (conflicts_print): Don't print file name twice
6192 when %expect fails because there were no conflicts.
6193 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
6194 change.
6195 * tests/conflicts.at (%expect not enough, %expect too much):
6196 (%expect with reduce conflicts): Adjust to new behavior.
6197
61982005-11-18 Akim Demaille <akim@epita.fr>
6199
6200 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
6201 errors.
6202 * NEWS: Document this.
6203 * doc/bison.texinfo (Expect Decl): Likewise.
6204
62052005-11-16 Akim Demaille <akim@epita.fr>
6206
6207 Generalize the display of semantic values and locations in traces.
6208 * data/glr.c (yy_reduce_print): Fix indices (again).
6209 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
6210 literal integers.
6211 * data/lalr1.cc (yyreduce_print): Rename as...
6212 (yy_reduce_print): this.
6213 Display values and locations.
6214 * data/yacc.c (yy_reduce_print): Likewise.
6215 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
6216 (yysymprint): Move higher to be visible from yy_reduce_print).
6217 (yyparse): Adjust.
6218 * tests/calc.at: Adjust the expected length of the traces.
6219
62202005-11-14 Akim Demaille <akim@epita.fr>
6221
6222 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
6223 from 1 to N, while values and location start at 0.
6224 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
6225
62262005-11-14 Akim Demaille <akim@epita.fr>
6227
6228 * data/glr.c (yy_reduce_print): Fix the $ number.
6229
62302005-11-14 Akim Demaille <akim@epita.fr>
6231
6232 "Use" parse parameters.
6233 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
6234 * data/glr.c, data/glr.cc: Use them.
6235 * data/glr.c (YYUSE): Have a C++ definition that supports
6236 non-pointer types.
6237
62382005-11-14 Akim Demaille <akim@epita.fr>
6239
6240 * data/glr.c (yyexpandGLRStack): Declare only if defined.
6241
62422005-11-14 Akim Demaille <akim@epita.fr>
6243
6244 * data/glr.cc: New.
6245 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
6246
62472005-11-12 Akim Demaille <akim@epita.fr>
6248
6249 Let position and location be PODs.
6250 * data/location.cc (position::initialize, location::initialize): New.
6251 (position::position, location::location): Define only if
6252 b4_location_constructors is defined.
6253 * data/lalr1.cc (b4_location_constructors): Define it for backward
6254 compatibility.
6255 * doc/bison.texinfo (Initial Action Decl): Use initialize.
6256
62572005-11-12 Akim Demaille <akim@epita.fr>
6258
6259 * data/lalr1.cc: Move the body of the ctor and dtor into the
6260 parser file (instead of the header).
6261 Wrap the implementations in a "namespace yy".
6262
62632005-11-12 Akim Demaille <akim@epita.fr>
6264
6265 Have glr.c include its header file when created.
6266 * data/glr.c (b4_shared_declarations): New.
6267 Output them verbatim in the parser if !%defines, otherwise
6268 output then in the header file, and include it instead.
6269
62702005-11-11 Akim Demaille <akim@epita.fr>
6271
6272 * data/glr.c: Comment changes.
6273
62742005-11-11 Akim Demaille <akim@epita.fr>
6275
6276 When yydebug, report semantic and location values for reductions.
6277 * data/glr.c (yy_reduce_print): Report the semantic values and the
6278 locations.
6279 (YY_REDUCE_PRINT): Adjust.
6280 (yyglrReduce): Use them.
6281 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
6282 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
6283 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
6284 traces.
6285
62862005-11-10 Akim Demaille <akim@epita.fr>
6287
6288 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
6289 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
6290 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
6291
62922005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
6293
6294 * m4/cxx.m4, examples/Makefile.am: Don't build
6295 examples/calc++ if no C++ compiler is available. (trivial change)
6296
62972005-11-09 Akim Demaille <akim@epita.fr>
6298
6299 * src/scan-skel.l: Use a couple of asserts.
6300
63012005-11-03 Akim Demaille <akim@epita.fr>
6302
6303 In some (weird) cases, the final state number is incorrect.
6304 Reported by Alexandre Duret-Lutz.
6305 * src/LR0.c (state_list_append): Remove the computation of
6306 final_state.
6307 (save_reductions): Do it here.
6308 (get_state): Alpha conversion.
6309 (generate_states): Use a for loop.
6310 * src/gram.h (item_number_is_rule_number)
6311 (item_number_is_symbol_number): New.
6312 * src/state.c: Use assert.
6313 * src/system.h: Include assert.h.
6314 * tests/sets.at (Accept): New.
6315
63162005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6317
6318 * data/glr.c (yyfill): Adjust comment.
6319 (yyresolveAction): Initialize default location properly
6320 for empty right-hand sides.
6321 (yydoAction): Ditto.
6322 Add comment explaining apparently dead code.
6323 * tests/glr-regression.at
6324 (Incorrectly initialized location for empty right-hand side in GLR):
6325 New test.
6326
63272005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6328
6329 * bootstrap (cleanup_gnulib): New function. Use it to clean up
6330 gnulib when interrupted. This fixes some race conditions and
6331 works around some portability problems (one noted by Paul
6332 Hilfinger).
6333
63342005-10-22 Akim <akim@epita.fr>
6335
6336 * Makefile.cfg: Adjust to config -> build-aux.
6337 Reported by twledo.
6338
63392005-10-21 Akim Demaille <akim@epita.fr>
6340
6341 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
6342 the %parse-params.
6343 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
6344 * data/yacc.c (b4_Pure_if): Rename as...
6345 (b4_yacc_pure_if): this.
6346 (YY_SYMBOL_PRINT, yyparse): Adjust.
6347 * doc/bison.texinfo: Formatting changes.
6348
63492005-10-21 Akim Demaille <akim@epita.fr>
6350
6351 Finish the transition config -> build-aux.
6352 * configure.ac, Makefile.am: Use build-aux.
6353 * config/prev-version, config/announce-gen, config/Makefile.am:
6354 Move to...
6355 * build-aux/prev-version, build-aux/announce-gen,
6356 * build-aux/Makefile.am: here.
6357
63582005-10-14 Akim Demaille <akim@epita.fr>
6359
6360 * examples/calc++/test: Use set -x only when VERBOSE.
6361
63622005-10-13 Paul Eggert <eggert@cs.ucla.edu>
6363
6364 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
6365 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
6366
63672005-10-13 Akim Demaille <akim@epita.fr>
6368
6369 * src/scan-skel.l: Output the base name parts of the parser and
6370 header file names.
6371 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
6372 additional checks.
6373 Use this to exercise C++ outputs in subdirs.
6374 Reported by Oleg Smolsky.
6375
63762005-10-12 Paul Eggert <eggert@cs.ucla.edu>
6377
6378 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
6379 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
6380 Problem reported by John P. Hartmann.
6381 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
6382 already defined it.
6383
63842005-10-12 Akim Demaille <akim@epita.fr>
6385
6386 * src/parse-gram.y (version_check): Exit 63 to please missing
6387 (stands for "version mismatch).
6388 * tests/input.at, doc/bison.texinfo: Adjust.
6389
63902005-10-10 Paul Eggert <eggert@cs.ucla.edu>
6391
6392 Work around portability problems with Visual Age C compiler
6393 (xlc and xlC_r) reported by John P. Hartmann.
6394 * data/location.cc (initial_column, initial_line): Remove.
6395 All uses replaced by 0 and 1.
6396 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
6397 that xlc complains about.
6398 * src/scan-skel.l (skel_wrap): Likewise.
6399 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
6400 as __STDC__.
6401 * data/yacc.c (YYMODERN_C): New macro, which also looks at
6402 __STDC_VERSION__. Use it everywhere instead of looking at
6403 __STDC__ and __cplusplus.
6404
64052005-10-10 Akim Demaille <akim@epita.fr>
6406
6407 * examples/calc++/test: Be quiet unless VERBOSE.
6408
64092005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6410
6411 * data/c.m4 (yydestruct, yysymprint):
6412 Use YYUSE instead of casting to void.
6413 * data/glr.c (YYUSE): New macro.
6414 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6415 Use it instead of rolling our own.
6416 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6417 (YYCHK1):
6418 Use /*CONSTCOND*/ to suppress lint warnings.
6419 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6420 (YY_STACK_PRINT): Use 'false' not '0'.
6421 (YYUSE): New macro.
6422 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6423 * data/yacc.c (YYUSE): New macro.
6424 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6425 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6426 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6427
6428
6429 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6430 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6431
64322005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6433
6434 Undo the parts of the unlocked-I/O change that substituted
6435 putc or puts for printf. This might hurt performance a bit,
6436 but some people prefer the printf style.
6437 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6438 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6439 All uses replaced by YYFPRINTF and YYDPRINTF.
6440 * data/yacc.c: Likewise.
6441 * lib/bitset.c (bitset_print): Likewise.
6442 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6443 putc and puts.
6444 * lib/lbitset.c (debug_lbitset): Likewise.
6445 * src/closure.c (print_firsts, print_fderives): Likewise.
6446 * src/gram.c (grammar_dump): Likewise.
6447 * src/lalr.c (look_ahead_tokens_print): Likewise.
6448 * src/output.c (escaped_output): Likewise.
6449 (user_actions_output): Break apart two printfs.
6450 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6451 * src/reduce.c (reduce_print): Likewise.
6452 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6453 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6454
6455 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6456 Use assignments rather than casts-to-void to suppress
6457 unused-variable warnings. This pacifies 'lint'.
6458 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6459 unused-variable warnings.
6460
64612005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6462
6463 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6464
64652005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6466
6467 Use unlocked I/O for a minor performance improvement on hosts like
6468 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6469 is to use the gnlib unlocked-io module, and to prefer putc and
6470 puts to printf when either will work (since the latter doesn't
6471 come in an unlocked flavor).
6472 * bootstrap (gnulib_modules): Add unlocked-io.
6473 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6474 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6475 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6476 and similarly for puts and putc and printf.
6477 * data/yacc.c: Likewise.
6478 * lib/bitset.c (bitset_print): Likewise.
6479 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6480 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6481 to printf.
6482 * lib/lbitset.c (debug_lbitset): Likewise.
6483 * src/closure.c (print_firsts, print_fderives): Likewise.
6484 * src/gram.c (grammar_dump): Likewise.
6485 * src/lalr.c (look_ahead_tokens_print): Likewise.
6486 * src/output.c (escaped_output): Likewise.
6487 (user_actions_output): Coalesce two printfs.
6488 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
6489 * src/reduce.c (reduce_print): Likewise.
6490 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6491 * src/system.h: Include unlocked-io.h rather than stdio.h.
6492
6493 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6494 this confuses xgettext.
6495
64962005-10-02 Akim Demaille <akim@epita.fr>
6497
6498 * bootstrap (gnulib_modules): Add strverscmp.
6499 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6500 * m4/.cvsignore: Add strverscmp.m4.
6501 * src/parse-gram.y (%require): New token, new rule.
6502 (version_check): New.
6503 * src/scan-gram.l (%require): Adjust.
6504 * tests/input.at (AT_REQUIRE): New.
6505 Use it.
6506 * doc/bison.texinfo (Require Decl): New.
6507 (Calc++ Parser): Use %require.
6508
65092005-10-02 Akim Demaille <akim@epita.fr>
6510
6511 * data/location.cc: New.
6512
65132005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6514 Akim Demaille <akim@epita.fr>
6515
6516 Make sure -odir/foo.cc creates dir/location.hh etc.
6517 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6518 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6519 (spec_defines_file): Now const.
6520 (dir_prefix): New.
6521 (short_base_name): Remove.
6522 * src/files.c: Adjust.
6523 (dirname.h): Include.
6524 (base_name): Don't prototype it.
6525 (finput): Remove, duplicates gram_in.
6526 (full_base_name, short_base_name): Replace by...
6527 (all_but_ext, all_but_tab_ext): these.
6528 (compute_base_names): Rename as...
6529 (compute_file_name_parts): this.
6530 Update to compute the new variables, including dir_prefix.
6531 Adjust dependencies.
6532 * src/output.c (prepare): Output them.
6533 * src/reader.c: Adjust to use gram_in, not finput.
6534 * src/scan-skel.l (@dir_prefix@): New.
6535
65362005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6537
6538 * lib/subpipe.c: New function end_of_output_subpipe() added
6539 to allow support for non-posix systems. This is a no-op function
6540 for posix systems.
6541
6542 * lib/subpipe.h: New function end_of_output_subpipe() added
6543 to allow support for non-posix systems. This is a no-op function
6544 for posix systems.
6545
6546 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6547 handle the lack of pipe/fork functionality on non-posix systems.
6548
6549 * djgpp/Makefile.maint: DJGPP specific file.
6550
6551 * djgpp/README.in: DJGPP specific file.
6552
6553 * djgpp/config.bat: DJGPP specific configuration file.
6554
6555 * djgpp/config.sed: DJGPP specific configuration file.
6556
6557 * djgpp/config.site: DJGPP specific configuration file.
6558
6559 * djgpp/config_h.sed: DJGPP specific configuration file.
6560
6561 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6562
6563 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6564
65652005-10-02 Akim Demaille <akim@epita.fr>
6566
6567 * data/location.cc: New, extract from...
6568 * data/lalr1.cc: here.
6569 (location.hh): Include it after the user prologue, in case the
6570 filename type is defined by the user.
6571 Forward declation location and position before the pre-prologue.
6572 (yyresult_): Rename as...
6573 (yyresult): this, it's a local variable, not an attribute.
6574 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6575
65762005-10-01 Akim Demaille <akim@epita.fr>
6577
6578 * examples/extexi: Restore the #line generation.
6579
65802005-09-30 Akim Demaille <akim@epita.fr>,
6581 Alexandre Duret-Lutz <adl@gnu.org>
6582
6583 Move the token type and YYSTYPE in the parser class.
6584 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6585 (parser::token): New, from the moved free definition of tokens.
6586 (parser::semantic_value): Now a full definition instead of an
6587 indirection to YYSTYPE.
6588 (b4_post_prologue): No longer included in the header file, but
6589 in the implementation file.
6590 * doc/bison.texi (C+ Language Interface): Update.
6591 * src/parse-gram.y: Support unary %define.
6592 * tests/actions.at: Define global_tokens_and_yystype for backward
6593 compatibility until we update the tests.
6594 * tests/calc.at: Idem.
6595 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6596 to simplify the code.
6597
65982005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6599
6600 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6601 Ah, the good old days! Problem reported by Peter Klein.
6602 * bootstrap (gnulib_modules): Add strerror, strtoul.
6603 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6604 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6605
66062005-09-29 Akim Demaille <akim@epita.fr>
6607
6608 * data/c.m4 (b4_error_verbose_if): New.
6609 * data/lalr1.cc: Use it.
6610 (YYERROR_VERBOSE_IF): Remove.
6611 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6612 parser members, replaced by...
6613 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6614 local variables.
6615 (yysyntax_error_): Takes the state number as argument.
6616 (yyreduce_print_): Use the argument yyrule, not the former
6617 attribute yyn_.
6618
66192005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6620
6621 * bootstrap (gnulib_modules): Add verify.
6622 * lib/.cvsignore: Add verify.h.
6623 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6624 * src/system.h (verify): Remove.
6625 Include verify.h instead.
6626 * src/tables.c (tables_generate): Use new API for 'verify'.
6627
66282005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6629
6630 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6631 local variables whose names begin with 'yy'.
6632 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6633 Trivial changes from Joel E. Denny.
6634
6635 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6636 it itself.
6637 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6638 don't use alloca any more.
6639
6640 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6641 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
6642 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
6643 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6644 to match yacc.c, to test more hosts.
6645
66462005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6647
6648 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6649 doesn't affect behavior.
6650 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6651 Solaris, AIX, MSC.
6652 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6653 This works a bit better with glibc, if user code has already included
6654 stdlib.h.
6655 * doc/bison.texinfo (Bison Parser): Document that users can't
6656 arbitrarily use malloc and free for other purposes. Document
6657 that <alloca.h> and <malloc.h> might be included.
6658 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6659 user must declare alloca.
6660
6661 * HACKING (release): Forwarn the Translation Project about
6662 stable releses.
6663
66642005-09-20 Akim Demaille <akim@epita.fr>
6665
6666 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6667
66682005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6669
6670 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6671 (YYSTACK_ALLOC_MAXIMUM): Use it.
6672 (yysyntax_error): New function.
6673 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6674 multiple syntax errors are reported, and alloca is being used.
6675 Instead, reallocate buffers twice as big each time, so that
6676 we waste at most half the allocated memory. Start with a small
6677 (128-byte) buffer that will suffice in most cases anyway.
6678 Use yysyntax_error to do most of the work.
6679
6680 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6681 yynerrs is the number of errors reported, not the number of
6682 errors encountered.
6683
6684 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6685 Mark it as expected to fail.
6686 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6687 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6688 Don't start user-code symbols with "yy", to avoid name space problems.
6689
66902005-09-19 Akim Demaille <akim@epita.fr>
6691
6692 Remove the traits, failed experiment.
6693 It never proved useful, and anyway because of the current
6694 definition, it was not possible to have several specialization of
6695 this traits, making it useless.
6696 * data/lalr1.cc (yy:traits): Remove.
6697 Inline its definitions in the parser class.
6698
66992005-09-19 Akim Demaille <akim@epita.fr>
6700
6701 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6702 least Mac OSX with a /usr/local install of gettext.
6703
67042005-09-19 Akim Demaille <akim@epita.fr>
6705
6706 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6707 and yytoken for similarity with the other skeletons.
6708
67092005-09-19 Akim Demaille <akim@epita.fr>
6710
6711 * NEWS, configure.ac: update version number to 2.1a.
6712
67132005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6714
6715 * NEWS: Version 2.1.
6716
6717 * NEWS: Remove notice of yytname change, since it was never in an
6718 official release.
6719 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6720 diagnostic.
6721 * src/output.c (prepare): Likewise.
6722 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6723 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6724 is not defined. This is an awful hack, but it's enough for now.
6725 All callers changed.
6726 * tests/glr-regression-at (make_value): Args are const pointers now,
6727 to avoid GCC warning.
6728 (Duplicated user destructor for lookahead): New test. Currently
6729 skipped. It fails on my host but I'm not sure it'll always fail.
6730
67312005-09-16 Akim Demaille <akim@epita.fr>
6732
6733 * src/symtab.h (struct symbol): Declare the printer and destructor
6734 as const, to avoid accidental calls to free.
6735 (symbol_destructor_set, symbol_printer_set): Adjust.
6736 * src/symtab.c: Adjust.
6737
67382005-09-16 Akim Demaille <akim@epita.fr>
6739
6740 * data/c.m4 (b4_token_enums): New.
6741 (b4_token_defines): Rename as...
6742 (b4_token_enums_defines): this.
6743 (b4_token_defines): New, output only the #defines.
6744 * data/yacc.c, data/glr.c: Adjust.
6745 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6746 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6747 as default values.
6748
67492005-09-16 Akim Demaille <akim@epita.fr>
6750
6751 * data/lalr1.cc (yylex_): Remove, inline its code.
6752 (yyreport_syntax_error_): Remove, replaced by...
6753 (yysyntax_error_): this which returns a string and leaves to the
6754 caller the call to the users' error function.
6755 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6756 Move from members of the parser object...
6757 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6758 to local variables of the parse function.
6759
67602005-09-16 Akim Demaille <akim@epita.fr>
6761
6762 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6763 since it's in Bison's name space.
6764
67652005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6766
6767 * data/glr.c (yyresolveValue): Add default case to pacify
6768 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6769
6770 * NEWS: Document when yyparse started to return 2.
6771 * doc/bison.texinfo (Parser Function): Document when yyparse
6772 returns 2.
6773
6774 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6775 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6776 changed.
6777 (class position): file_name -> filename (reverting). All uses changed.
6778
67792005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6780
6781 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6782 do anything if $@ exists. This reverts part of the 2005-07-07
6783 patch.
6784
67852005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6786
6787 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6788 contains obsolete information and isn't worth distributing as a
6789 separate file anyway.
6790 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6791 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6792 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6793 (yyparse): Abort if user code uses longjmp to throw an unexpected
6794 value.
6795
67962005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6797
6798 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6799 Suggested by twlevo@xs4all.nl.
6800
6801 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6802 This avoids a diagnostic from gcc -Wswitch-enum.
6803 Problem reported by twlevo@xs4all.nl.
6804
6805 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6806 standards. Use "file name" or "file" or "name", depending on
6807 the context.
6808 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6809 not to hack/foo.tab.c.
6810 (Calc++ Top Level): 2nd arg of main is not const.
6811 * data/glr.c: b4_filename -> b4_file_name.
6812 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6813 All uses changed.
6814 (class position): filename -> file_name. All uses changed.
6815 * data/yacc.c: b4_filename -> b4_file_name.
6816 * lib/bitset.h: filename -> file_name in local vars.
6817 * lib/bitset_stats.c: Likewise.
6818 * src/files.c: Likewise.
6819 * src/scan-skel.l ("@output ".*\n): Likewise.
6820 * src/files.c (file_name_split): Renamed from filename_split.
6821 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6822
68232005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6824
6825 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6826 to accommodate latest gnulib.
6827
6828 * tests/glr-regression.at (Duplicate representation of merged trees):
6829 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6830
6831 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6832 needed.
6833
68342005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6835
6836 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6837 All uses changed. Invoke user destructor after an error during a
6838 split parse (trivial change from Joel E. Denny).
6839
6840 * tests/glr-regression.at
6841 (User destructor after an error during a split parse): New test case.
6842 Problem reported by Joel E. Denny in:
6843 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6844
68452005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6846
6847 * README-cvs: Give URLs for recommended tools.
6848 Mention Gzip version problem, and bootstrapping issues.
6849 Remove troubleshooting section, as it's somewhat obsolete.
6850
6851 * bootstrap (no_cache): New var, to accommodate different wget
6852 variants. Use it instead of '-C off'. Problem reported by
6853 twlevo@xs4all.nl.
6854
6855 * data/glr.c (yydestroyStackItem): New function.
6856 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6857 debugging information. Problem reported by Joel E. Denny.
6858
68592005-08-25 Akim Demaille <akim@epita.fr>
6860
6861 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6862
68632005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6864
6865 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6866 Don't invoke destructor on unresolved entries.
6867 * tests/glr-regression.at
6868 (User destructor for unresolved GLR semantic value): New test case.
6869 Problem reported by Joel E. Denny in:
6870 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6871
68722005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6873
6874 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6875 Add strnlen.c.
6876 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6877 lib-prefix.m4, po.m4.
6878
6879 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6880 in yydestruct diagnostic, since it might not be an error.
6881 Problem reported by Joel Denny near end of
6882 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6883 * data/lalr1.cc (yyerturn): Likewise.
6884 * data/yacc.c (yyreturn): Likewise.
6885 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6886
6887 * src/files.c: Remove obsolete FIXME comment.
6888
6889 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6890 with the other templates, and to fix bogus run-on messages such
6891 as the one reported at the end of
6892 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6893 All callers changed to avoid the newline.
6894 (yyprocessOneStack): Output two lines rather than one, to accommodate
6895 the above change. This changes the debug output format slightly.
6896
6897 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6898 reported by Joel E. Denny in
6899 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6900 (trivial change).
6901 * tests/glr-regression.at (Duplicate representation of merged trees):
6902 New test, from Joel E. Denny in:
6903 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6904 * THANKS: Add Joel E. Denny.
6905
6906 * configure.ac (AC_INIT): Bump to 2.0c.
6907
69082005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6909
6910 * NEWS: Version 2.0b.
6911
6912 * Makefile.am (SUBDIRS): Put examples before tests, so that
6913 "make check" doesn't finish with "All 1 tests passed".
6914
6915 * tests/regression.at (Token definitions): Don't rely on
6916 AT_PARSER_CHECK for data that contains backslashes. It currently
6917 uses 'echo', and 'echo' isn't portable if its argument contains
6918 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6919 that the byte '\0xff' is not printable in the C locale; it is,
6920 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6921 not printable, so use '\0x81' to test.
6922
6923 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6924 version of GCC, since the macro is used with non-GCC compilers.
6925
6926 Fix core dump reported by Pablo De Napoli in
6927 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6928 * tests/regression.at (Invalid inputs with {}): New test.
6929 * src/parse-gram.y (token_name): Translate type before using
6930 it as an index.
6931
6932 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6933 the user's name space. All uses changed to __attribute__
6934 ((__unused__)).
6935 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6936 Add __attribute__ ((__noreturn__)).
6937
6938 * etc/clcommit: Remove. We weren't using it, and it failed
6939 "make maintainer-distcheck".
6940 * Makefile.maint: Merge from coreutils.
6941 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6942 (syntax-check-rules): Change list of rules as described below.
6943 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6944 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6945 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6946 (sc_trailing_space): New rules.
6947 (sc_xalloc_h_in_src): Remove.
6948 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6949 (sc_space_tab, sc_error_exit_success, sc_changelog):
6950 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6951 (makefile-check, po-check, author_mark_check):
6952 (makefile_path_separator_check, copyright-check):
6953 Use grep -n, to make it easier to find violations.
6954 Use CVS_LIST and CVS_LIST_EXCEPT.
6955 (header_regexp, h_re): Remove.
6956 (dd_c): New macro.
6957 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6958 (my-distcheck): Use more-modern GCC flags.
6959 (signatures, %.asc): Remove.
6960 (rel-files, announcement): Remove signatures.
6961 Restore old updating code, even though we don't use it, so
6962 that we're the same as coreutils.
6963 (alpha, beta, major): Depend on news-date-check.
6964 Make the upload commands.
6965
6966 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6967 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6968 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6969 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6970 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6971 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6972 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6973 * tests/sets.at: Likewise.
6974
6975 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6976 we comment out the Autoconf version number.
6977 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6978 it's error-prone and "make maintainer-distcheck" rejects it.
6979
6980 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6981 Indent calls to "error" to pacify "make maintainer-distcheck",
6982 when the calls are not intended to be translated.
6983 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6984
6985 * src/Makefile.am (DEFS): Use +=, to pacify
6986 "make maintainer-distcheck".
6987 (bison_SOURCES): Add scan-skel.h.
6988 (sc_tight_scope): New rule, from coreutils.
6989
6990 * src/files.c (src_extension, header_extension):
6991 Now static, not extern.
6992 * src/getargs.c (short_options): Likewise.
6993 * src/muscle_tab.c (muscle_table): Likewise.
6994 * src/parse-gram.y (current_class, current_type, current_prec):
6995 Likewise.
6996 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6997 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6998 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6999 void, to avoid warning when NLS is disabled.
7000 * src/output.c: Include scan-skel.h.
7001 (scan_skel): Remove decl, since scan-skel.h does this.
7002 (output_skeleton):
7003 Indent calls to "error" to pacify "make maintainer-distcheck".
7004 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
7005 * src/reader.h (gram_end, gram_lineno): New decls to pacify
7006 "make maintainer-distcheck".
7007 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
7008 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
7009 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
7010 (skel_lex_destroy, scan_skel): Move these decls to...
7011 * src/scan-skel.h: New file.
7012 * src/uniqstr.c (uniqstr_assert):
7013 Indent calls to "error" to pacify "make maintainer-distcheck".
7014
7015 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
7016 not @VAR@.
7017
7018 * tests/torture.at: Revamp to avoid misuse of atoi that
7019 "make maintainer-distcheck" complained about.
7020
7021 * examples/extexi (message): Don't print a message more than once,
7022 and omit line-number decoration that makes Emacs compile think
7023 that informative messages are worth worrying about.
7024
70252005-07-22 Paul Eggert <eggert@cs.ucla.edu>
7026
7027 * configure.ac: Update version number.
7028
7029 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
7030 accidentally.
7031 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
7032 autogenerated by the maintainer.
7033 * examples/calc++/.cvsignore: Add *.yy.
7034
7035 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
7036 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7037 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7038
7039 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
7040
7041 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
7042 from maintainer-distcheck about casting the argument of 'free'.
7043
7044 * NEWS: Mention recent yytname changes.
7045 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
7046
7047 * bootstrap: For translations that have not yet been upgraded to
7048 the new runtime-po domain, prime the pump by extracting the
7049 relevant strings from the obsolete translations. This code can be
7050 removed once the bison-runtime domain has been translated by each
7051 team.
7052
7053 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
7054 now that token names are already quoted.
7055
7056 Fix problem reported by Anthony Heading.
7057 * data/glr.c (YYTOKEN_TABLE): New macro.
7058 (yytname): Define if YYTOKEN_TABLE.
7059 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
7060 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
7061 (YYERROR_VERBOSE): Define the same way the other skeletons do.
7062 * src/output.c (prepare_symbols): Output token_table_flag.
7063
70642005-07-21 Paul Eggert <eggert@cs.ucla.edu>
7065
7066 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
7067 again if the first call fails.
7068
7069 * data/glr.c (yytnamerr): New function.
7070 (yyreportSyntaxError): Use it to dequote most string literals.
7071 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
7072 with other skeletons. All uses changed.
7073 (yytnameerr_): New function.
7074 (yyreport_syntax_error): Use it to dequote most string literals.
7075 * data/yacc.c (yytnamerr): New function.
7076 (yyerrlab): Use it to decode most string literals.
7077 * doc/bison.texinfo (Decl Summary, Calling Convention):
7078 Clarify quoting convention of yytname.
7079 * src/output.c (prepare_symbols): Quote all names. This undoes
7080 the 2005-04-17 change, which is now accomplished (mostly) via
7081 changes in the parsers as described above.
7082 * tests/regression.at (Token definitions, Web2c Actions):
7083 Undo most 2005-04-17 change here, too.
7084
70852005-07-20 Paul Eggert <eggert@cs.ucla.edu>
7086
7087 Fix more problems reported by twlevo@xs4all.nl.
7088 * tests/cxx-type.at: Don't pipe output of ./types through sed to
7089 remove trailing spaces. This loses the exit status of ./types,
7090 and isn't needed since ./types shouldn't be emitting trailing
7091 spaces.
7092 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
7093 as the stack isn't valid in that case.
7094
7095 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7096 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7097 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7098 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
7099 is used.
7100 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
7101 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7102 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7103 Likewise.
7104
7105 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
7106 overly-picky compilers that reject 'char *foo = "bar";'.
7107
7108 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
7109 to FILE * parameter, not to stderr. This fixes a typo introduced
7110 in the 2005-07-12 change.
7111
7112 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
7113 warnings from GCC 4.
7114
7115 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
7116 (yyglrShiftDefer, yysplitStack):
7117 Remove unused parameters b4_pure_formals. All uses changed.
7118 (yyglrShift): Remove unused parameters b4_user_formals.
7119 All uses changed.
7120 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
7121
71222005-07-18 Paul Eggert <eggert@cs.ucla.edu>
7123
7124 Destructor cleanups and regularization among the three skeletons.
7125 * NEWS: Document the behavior changes.
7126 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
7127 stack before failing, as the cleanup code will do it for us now.
7128 * data/lalr1.cc (yyerrlab): Likewise.
7129 * data/glr.c (yyparse): Pop everything off the stack before
7130 freeing it, so that destructors get called properly.
7131 * data/lalr1.cc (yyreturn): Likewise.
7132 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
7133 This is more consistent.
7134 * doc/bison.texinfo (Destructor Decl): Mention more reasons
7135 why destructors might be called. 1.875 -> 2.1.
7136 (Destructor Decl, Decl Summary, Table of Symbols):
7137 Some English-language cleanups for %destructor.
7138 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7139 Add output line for destructor of start symbol.
7140 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
7141 because of that same extra output line.
7142
7143 * NEWS: Document minor wording changes in diagnostics of
7144 Bison-generated parsers.
7145 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
7146 Remove unused formals. All uses changed.
7147 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
7148 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
7149 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
7150 Rename yyoverflowab to yyexhaustedlab.
7151 When memory exhaustion occurs during syntax-error reporting,
7152 report it separately rather than in a single diagnostic; this
7153 eases translation.
7154 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
7155 (Memory Exhausted): Renamed from Parser Stack Overflow.
7156 Revamp wording slightly to prefer "memory exhaustion".
7157 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
7158
7159 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
7160
7161 Add i18n support to the GLR skeleton. Partially fix the C++
7162 skeleton; a C++ expert needs to finish this. Remove debugging
7163 msgids; there's little point to having them translated, since they
7164 can be understood only by someone who can read the
7165 (English-language) source code.
7166
7167 Generate runtime-po/bison-runtime.pot automatically, so that we
7168 don't have to worry about garbage getting in that file. We'll
7169 make sure after the next official release that old msgids don't
7170 get lost. See
7171 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
7172
7173 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
7174 Now auto-generated.
7175 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
7176 Fix typos in explanations of the runtime file.
7177 * bootstrap: Change gettext keyword from YYI18N to YY_.
7178 Use standard Makefile.in.in in runtime-po, since we'll arrange
7179 for backward-compatible bison-runtime.po files in a different way.
7180 * data/glr.c (YY_): New macro, from yacc.c.
7181 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
7182 Translate messages intended for users.
7183 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
7184 the wording in the other skeletons. We don't know that the memory
7185 is virtual.
7186 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
7187 Use same method that yacc.c uses.
7188 Don't translate debugging messages.
7189 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
7190 it doesn't work (yet), and requires C++ expertise to fix.
7191 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
7192 Move defn to a more logical place, to be consistent with other
7193 skeletons.
7194 Don't translate debugging messages.
7195 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
7196 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
7197 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
7198 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
7199
7200 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
7201 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
7202 void, not int.
7203 * tests/glr-regression.at (Badly Collapsed GLR States):
7204 Likewise.
7205 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7206 yylex should return 0 at EOF rather than aborting.
7207
7208 Improve tests for stack overflow in GLR parser.
7209 Problem reported by twlevo@xs4all.nl.
7210 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
7211 All uses removed.
7212 (yyStackOverflow): Just longjmp, but with value 2 so that caller
7213 can handle the problem.
7214 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
7215 (yyparse): New local variable yyresult to record the result.
7216 Use result of setjmp to set it, rather than storing itinto
7217 struct.
7218 (yyDone): Remove label.
7219 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
7220 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
7221 if YYABORT is used).
7222 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
7223 yyparse status; put status > 1 into diagnostic.
7224 Check that status==2 works.
7225 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
7226 Use exit status 3 for failure to open (which shouldn't happen).
7227
72282005-07-17 Paul Eggert <eggert@cs.ucla.edu>
7229
7230 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
7231 1 on syntax error; just let yyparse do its thing.
7232 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
7233 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
7234 (Exploding the Stack Size with Alloca):
7235 (Exploding the Stack Size with Malloc):
7236 Expect exit status 2, not 1, since the parser is supposed to blow
7237 its stack. Problem reported by twlevo@xs4all.nl.
7238
7239 * data/glr.c (yyparse): Don't assume that the initial calls
7240 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
7241 Print a stack-overflow message and fail instead.
7242 Initialize the line-number information before creating the stack,
7243 so that the stack-overflow message can report line zero safely.
7244
72452005-07-14 Paul Eggert <eggert@cs.ucla.edu>
7246
7247 Fix problems reported by twlevo@xs4all.nl.
7248 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
7249 (yyuserMerge): Provide a default case if b4_mergers is empty.
7250 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
7251 * tests/glr-regression.at
7252 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7253 Add casts to pacify C++ compilers.
7254 * tests/glr-regression.at (Improper merging of GLR delayed action
7255 sets): Declare yylex before using it.
7256 * tests/Makefile.am (maintainer-check-g++): Fix a stray
7257 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
7258 test for valgrind; valgrind is independent of g++.
7259 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
7260 for compatibility with POSIX 1003.1-2001 (if running coreutils).
7261 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
7262 Use a destructor, so that we can expand the stack. Change
7263 YYSTYPE to char * so that we can free it. Cast result of malloc.
7264
72652005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7266
7267 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
7268 a valgrind failure. Problem reported by twlevo@xs4all.nl.
7269
72702005-07-13 Paul Eggert <eggert@cs.ucla.edu>
7271
7272 * PACKAGING: New file, suggested by Bruno Haible and taken from
7273 similar wording in gettext's PACKAGING file.
7274 * NEWS: Mention PACKAGING.
7275 * Makefile.am (EXTRA_DIST): Add PACKAGING.
7276
72772005-07-12 Paul Eggert <eggert@cs.ucla.edu>
7278
7279 * NEWS: Document recent i18n improvements.
7280 * bootstrap: Get runtime translations into runtime-po.
7281 Create runtime-po files automatically, if possible.
7282 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
7283 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
7284 does not infringe on the user's name space.
7285 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
7286 * doc/bison.texinfo (Internationalization): Revamp the English
7287 and Texinfo syntax a bit, to try to make it clearer.
7288 (Bison Options, Option Cross Key): Mention --print-localedir.
7289 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
7290 YYENABLE_NLS. Quote a bit more.
7291 * runtime-po/.cvsignore: New file.
7292 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
7293 * runtime-po/Rules-quot: Remove; now created by bootstrap.
7294 * runtime-po/quot.sed: Likewise.
7295 * runtime-po/boldquot.sed: Likewise.
7296 * runtime-po/en@quot.header: Likewise.
7297 * runtime-po/en@boldquot.header: Likewise.
7298 * runtime-po/insert-header.sin: Likewise.
7299 * runtime-po/remove-potcdate.sin: Likewise.
7300 * runtime-po/Makevars: Likewise.
7301 * runtime-po/LINGUAS: Likewise.
7302 * runtime-po/de.po: Likewise; we will rely on the translation project
7303 to maintain this, so "bootstrap" should get it.
7304 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
7305 its value.
7306 * src/main.c (main): Bind the bison-runtime domain, too.
7307
73082005-07-12 Bruno Haible <bruno@clisp.org>
7309
7310 * data/yacc.c: Include <libintl.h> when NLS is enabled.
7311 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
7312 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
7313 * runtime-po: New directory.
7314 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
7315 $(DOMAIN).pot-update rule, so that old messages are never dropped.
7316 * runtime-po/Rules-quot: New file, copied from po/.
7317 * runtime-po/quot.sed: Likewise.
7318 * runtime-po/boldquot.sed: Likewise.
7319 * runtime-po/en@quot.header: Likewise.
7320 * runtime-po/en@boldquot.header: Likewise.
7321 * runtime-po/insert-header.sin: Likewise.
7322 * runtime-po/remove-potcdate.sin: Likewise.
7323 * runtime-po/Makevars: New file.
7324 * runtime-po/POTFILES.in: New file.
7325 * runtime-po/LINGUAS: New file.
7326 * runtime-po/bison-runtime.pot: New file.
7327 * runtime-po/de.po: New file.
7328 * m4/bison.m4: New file.
7329 * Makefile.am (SUBDIRS): Add runtime-po.
7330 (aclocaldir, aclocal_DATA): New variables.
7331 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
7332 Define aclocaldir.
7333 * src/getargs.c (usage): Document --print-localedir option.
7334 (PRINT_LOCALEDIR_OPTION): New enum item.
7335 (long_options): Add --print-localedir option.
7336 (getargs): Handle --print-localedir option.
7337 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
7338 (Internationalization): New section.
7339
73402005-07-12 Akim Demaille <akim@epita.fr>
7341
7342 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
7343 for consistency with the rest of the code.
7344 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
7345 Add separators.
7346
73472005-07-12 Akim Demaille <akim@epita.fr>
7348
7349 * src/parse-gram.y: Use %printer instead of YYPRINT.
7350
73512005-07-12 Akim Demaille <akim@epita.fr>
7352
7353 * src/symtab.h, src/symtab.c (symbol_print): New.
7354 * src/symlist.h, src/symlist.c (symbol_list_print): New.
7355 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
7356
73572005-07-12 Akim Demaille <akim@epita.fr>
7358
7359 * data/glr.c (b4_syncline): Fix (swap) the definitions of
7360 b4_at_dollar and b4_dollar_dollar.
7361
73622005-07-11 Paul Eggert <eggert@cs.ucla.edu>
7363
7364 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
7365 and Pennello's paper.
7366
73672005-07-09 Paul Eggert <eggert@cs.ucla.edu>
7368
7369 * data/yacc.c (yyparse): Undo previous patch. Instead,
7370 set yylsp[0] and yyvsp[0] only if the initial action
7371 sets yylloc and yylval, respectively.
7372
7373 * data/yacc.c (yyparse): In the initial action, set
7374 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
7375 This avoids the use of undefined variables if the initial
7376 action does not set yylloc and/or yylval.
7377
73782005-07-07 Paul Eggert <eggert@cs.ucla.edu>
7379
7380 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
7381 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
7382 Remove from CVS. These files are automatically generated.
7383 * examples/extexi: Clarify that this file is now part of Bison,
7384 not GNU M4, and that it works with any POSIX-compatible Awk.
7385 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
7386 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
7387 so that we also get calc++-parser.yy. Geneate it.
7388 Use $(AWK), not gawk, since any conforming Awk will do.
7389 Put comment before action, since older 'make' can't handle comment
7390 in action.
7391 $(BUILT_SOURCES): List all built sources, not just some of them.
7392 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
7393 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
7394 $($(calc_sources_generated)): Remove unnecessary test for existence
7395 of target. (This had a shell syntax error anyway; a stray "x".)
7396 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
7397 calc++-parser.yy.
7398 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
7399
7400 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
7401 implied by the other modules.
7402
74032005-07-06 Akim Demaille <akim@epita.fr>
7404
7405 Bind examples/calc++ to the package.
7406 * examples/calc++/Makefile: Remove, replaced by...
7407 * examples/calc++/Makefile.am: ... this new file.
7408 * examples/calc++/test: Remove input.
7409 * examples/calc++/compile: Remove.
7410 * examples/Makefile.am: New.
7411 * configure.ac, Makefile.am: Adjust.
7412 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7413
74142005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7415
7416 * data/glr.c (yyFail): Drastically simplify; since the format argument
7417 never had any % directives, we can simply pass it to yyerror.
7418 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7419 be modified later, as that is the usual style in glr.c.
7420 Problems reported by Paul Hilfinger.
7421
7422 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7423 and size overflow errors.
7424 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7425 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7426 (YYSIZEMAX): New macro.
7427 (yystpcpy): New function, taken from yacc.c.
7428 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7429 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7430 so that we don't have to maintain their signatures.
7431 (yyFail): Check for buffer overflow, by using vsnprintf rather
7432 than vsprintf. Allocate a bigger buffer if possible.
7433 Report an error if buffer allocation fails.
7434 (yyStackOverflow): New function.
7435 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7436 the initialization was successful. It might fail if storage was
7437 exhausted.
7438 (yyexpandGLRStack): Add more checks for storage allocation failure.
7439 Use yyStackOverflow to report failures.
7440 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7441 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7442 Don't assume stack number fits in int.
7443 (yysplitStack): Check for storage allocation failure.
7444 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7445 can print diagnostics on storage allocation failure. All callers
7446 changed.
7447 (yyresolveValue): Use yybool for boolean.
7448 (yyreportSyntaxError): Check for size-calculation overflow.
7449 This code is taken from yacc.c.
7450 (yyparse): Check for storage allocation errors when allocating
7451 the initial stack.
7452
74532005-07-05 Akim Demaille <akim@epita.fr>
7454
7455 Extract calc++ from the documentation.
7456 * doc/bison.texinfo (Calc++): Add the extraction marks.
7457 * examples/extexi: New, from the aborted GNU Programming 2E.
7458 Separate the different paragraph of a file with empty lines.
7459 * examples/Makefile: Use it to extract the whole calc++ example.
7460
74612005-06-24 Akim Demaille <akim@epita.fr>
7462
7463 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7464 class typedefs.
7465
74662005-06-22 Akim Demaille <akim@epita.fr>
7467
7468 * doc/bison.texinfo (C++ Language Interface): First stab.
7469 (C++ Parsers): Remove.
7470
74712005-06-22 Akim Demaille <akim@epita.fr>
7472
7473 * data/lalr1.cc (yylex_): Honor %lex-param.
7474
74752005-06-22 Akim Demaille <akim@epita.fr>
7476
7477 Start a set of simple examples.
7478 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7479 * examples/calc++/calc++-driver.hh,
7480 * examples/calc++/calc++-parser.yy,
7481 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7482 * examples/calc++/compile, examples/calc++/test: New.
7483
74842005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7485
7486 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7487 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7488 which stems from the 2005-05-27 patch.
7489
74902005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7491
7492 * data/glr.c: Modify treatment of unused parameters to permit use
7493 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7494
74952005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7496
7497 Fix infringement on user name space reported by Janos Zoltan Szabo.
7498 * data/yacc.c (yyparse): strlen -> yystrlen.
7499
75002005-05-30 Akim Demaille <akim@epita.fr>
7501
7502 * data/lalr1.cc (_): New.
7503 Translate the various messages.
7504
75052005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7506
7507 Fix infringement on user name space reported by Bruno Haible.
7508 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7509 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7510 the user's name space.
7511 (alloca): Include <stdlib.h> to get it, if it's not built in.
7512 (YYMALLOC, YYFREE): Define only if needed.
7513 (malloc, free): Declare, but only if needed, as this infringes on
7514 the user name space.
7515
75162005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7517
7518 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7519 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7520 with %d format.
7521 * lib/ebitset.c (min, max): Undef before defining.
7522 * lib/vbitset.c (min, max): Likewise.
7523 * lib/subpipe.c (create_subpipe): Save local variables in case
7524 vfork clobbers them.
7525
75262005-05-24 Bruno Haible <bruno@clisp.org>
7527
7528 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7529 error message syntax used by gcc-4.0.
7530
75312005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7532
7533 * README: Mention m4 1.4.3. Remove obsolete advice about
7534 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7535
7536 * bootstrap: Remove workaround for problem I encountered with
7537 gettext 0.14.1; it seems to be fixed now.
7538
75392005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7540
7541 * NEWS: Version 2.0a.
7542
7543 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7544 the previous change.
7545
7546 Various maintainer cleanups.
7547 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7548 conftest*, for benefit of CVS commands run at the same time as
7549 "configure". Add build-aux, since "bootstrap" now creates it and
7550 its subfiles.
7551 * Makefile.cfg (move_if_change): Remove.
7552 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7553 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7554 (po_repo, do-po-update, po-update, wget_files, get-targets):
7555 (config.guess-url_prefix, config.sub-url_prefix):
7556 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7557 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7558 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7559 Remove.
7560 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7561 this is now the recommended name.
7562 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7563 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7564 ylwrap. These files now go into build-aux.
7565 * config/move-if-change: Remove.
7566 * config/prev-version.txt: Bump from 1.75 to 2.0.
7567
7568 * bootstrap: Add stdio-safer, unistd-safer modules.
7569 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7570 we don't need it).
7571 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7572 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7573 * lib/subpipe.c: Include "unistd-safer.h".
7574 (create_subpipe): Make sure all the newly-created
7575 file descriptors are > 2, so that diagnostics don't
7576 get sent down them (which might cause Bison to hang, in theory).
7577 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7578 * src/files.c (xfopen): Use fopen_safer, not fopen.
7579
7580 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7581 yesterday's yacc.c fix.
7582
75832005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7584
7585 * data/glr.c, data/lalr1.cc: Update copyright date.
7586
7587 Fix a destructor bug reported by Wolfgang Spraul in
7588 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7589 * data/yacc.c (yyabortlab): Don't call destructor, and
7590 don't set yychar to EMPTY.
7591 (yyoverflowlab): Don't call destructor.
7592 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7593 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7594 since we no longer output the message "discarding lookahead token
7595 end of input ()".
7596
75972005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7598
7599 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7600 fix a small glitch in debugging output.
7601 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7602 after YY_SYMBOL_PRINT where needed.
7603
7604 (struct yyGLRState): Add some comments.
7605 (struct yySemanticOption): Add some comments.
7606 (union yyGLRStackItem): Add comment.
7607
7608 (yymergeOptionSets): Correct this to properly perform the union,
7609 avoiding infinite reported by Michael Rosien.
7610 Update comment.
7611
7612 * tests/glr-regression.at: Add test for GLR merging error reported
7613 by M. Rosien.
7614
76152005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7616
7617 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7618 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7619 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7620 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7621 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7622 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7623 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7624 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7625 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7626 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7627 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7628 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7629 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7630 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7631 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7632 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7633 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7634 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7635 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7636 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7637 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7638 src/output.h, src/parse-gram.c, src/parse-gram.h,
7639 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7640 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7641 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7642 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7643 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7644 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7645 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7646 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7647 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7648 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7649 tests/reduce.at, tests/regression.at, tests/sets.at,
7650 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7651 Update FSF postal mail address.
7652
76532005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7654
7655 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7656 Problem reported by Ralf Menzel.
7657
76582005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7659
7660 * tests/actions.at: Test that stack overflow invokes destructors.
7661 From Marcus Holland-Moritz.
7662 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7663 from here....
7664 (yyreturn): to here. That way, destructors are called properly
7665 even if the stack overflows, or the user calls YYACCEPT or
7666 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7667 (yyoverflowlab): Destroy the lookahead.
7668
76692005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7670
7671 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7672
76732005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7674
7675 * NEWS: Bison-generated C parsers no longer quote literal strings
7676 associated with tokens.
7677 * src/output.c (prepare_symbols): Don't escape strings,
7678 since users don't want to see C escapes.
7679 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7680 in diagnostics.
7681 * tests/input.at (Torturing the Scanner): Likewise.
7682 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7683
76842005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7685
7686 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7687 the data size is known to be too small and we can't increase it.
7688 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7689
76902005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7691
7692 * src/parse-gram.y: Include quotearg.h.
7693 (string_as_id): Quote $1 before using it as a key, since the
7694 lexer no longer quotes it for us.
7695 (string_content): Don't strip quotes, since lexer no longer
7696 quotes it for us.
7697 * src/scan-gram.l: Include quotearg.h.
7698 ("\""): Omit quote.
7699 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7700 a key, since the rest of the lexer doesn't quote it.
7701 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7702 * tests/regression.at (Token definitions): Check for backslashes
7703 in token strings.
7704
7705 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7706 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7707 (yyparse): Revamp code to generate long syntax error message, to
7708 make it easier to translate, and to avoid problems with arithmetic
7709 overflow. Change "virtual memory" to "memory" in diagnostic, since
7710 we don't know whether the memory is virtual.
7711
77122005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7713
7714 * NEWS: Bison-generated C parsers now use the _ macro to
7715 translate strings.
7716 * data/yacc.c (_) [!defined _]: New macro.
7717 All English strings wrapped inside this macro.
7718 * doc/bison.texinfo (Bison Parser): Document _.
7719 * po/POTFILES.in: Include src/parse-gram.c, since it now
7720 includes translateable strings that parse-gram.y doesn't.
7721
77222005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7723
7724 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7725 reverting the 2004-10-11 change to this function.
7726 (symbol_check_alias_consistency): Don't call symbol_type_set
7727 if the type name is already correct.
7728 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7729
77302005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7731
7732 * tests/regression.at (Token definitions): Don't use a token named
7733 c, as that generates a "#define c ..." that runs afoul of buggy
7734 stdlib.h that uses the identifier c as a member of struct
7735 drand48_data. Problem reported by Horst Wente.
7736
77372005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7738
7739 * bootstrap: Change translation URL from
7740 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7741 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7742 redirection glitches. Problem reported by twlevo@xs4all.nl.
7743
77442005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7745
7746 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7747 after operands; POSIX says this isn't portable for the c99 command.
7748
77492005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7750
7751 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7752 immediately if a data overrun has occurred; this may help us track
7753 down what may be a spurious failure on MacOS.
7754
77552005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7756
7757 Respond to problems reported by twlevo@xs4all.nl.
7758
7759 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7760
7761 * src/vcg.h: Comment fix.
7762 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7763 (G_CMAX): Change to -1 instead of INT_MAX.
7764
7765 * data/yacc.c (yyparse): Omit spaces before #line.
7766
77672005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7768
7769 * src/tables.c (state_number_to_vector_number): Put it inside an
7770 "#if 0", since it's not currently used. Problem reported by
7771 Roland McGrath.
7772
77732005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7774
7775 * src/output.c (escaped_output): Renamed from
7776 escaped_file_name_output, since we now use it for symbol tags as
7777 well. All uses changed.
7778 (symbol_destructors_output, symbol_printers_output):
7779 Escape symbol tags too.
7780 Problem reported by Matyas Forstner in
7781 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7782
7783 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7784 not needed.
7785 * src/output.c (user_actions_output, token_definitions_output,
7786 symbol_destructors_output, symbol_printers_output): Likewise.
7787 * src/reader.c (prologue_augment): Likewise.
7788 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7789
7790 * src/vcg.c (output_edge): Don't quote linestyle arg.
7791 Problem reported by twlevo@xs4all.nl.
7792
77932005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7794
7795 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7796 example, reported by Derek M Jones. Also, make the example even
7797 more outrageous, to better illustrate how bad the problem is.
7798
77992005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7800
7801 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7802 putsym. Typo reported by Sebastian Piping.
7803
78042005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7805
7806 * doc/bison.texinfo (Language and Grammar): some -> same
7807 (Epilogue): int he -> in the
7808 Typos reported by Sebastian Piping via Justin Pence.
7809
78102005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7811
7812 * tests/glr-regression.at (Improper handling of embedded actions
7813 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7814 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7815 with dollar signs in test names.
7816 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7817 for a similar reason.
7818
78192005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7820
7821 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7822 wants to redefine G_VIEW.
7823
78242005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7825
7826 * src/vcg.c (get_view_str): Remove case for normal_view.
7827 Problem reported by twlevo@xs4all.nl.
7828
78292005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7830
7831 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7832 Problem reported by twlevo@xs4all.nl.
7833
7834 * doc/bison.texinfo: Change @dircategory from "GNU programming
7835 tools" to "Software development". Requested by Richard Stallman
7836 via Karl Berry.
7837
78382005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7839
7840 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7841 Problem reported by twlevo@xs4all.nl.
7842
78432005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7844
7845 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7846 keyword; it's not needed with modern compilers, and it doesn't
7847 affect correctness with older compilers. Suggested by
7848 twlevo@xs4all.nl.
7849
78502005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7851
7852 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7853 gcc -Wswitch-default.
7854 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7855 * data/yacc.c (yyparse): Likewise.
7856
78572005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7858
7859 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7860 already. Let config.h define any nonstandard values.
7861
78622005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7863
7864 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7865 for the benefit of slower hosts. Problem reported by
7866 Nelson H. F. Beebe.
7867
78682005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7869
7870 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7871 being defined and not used.
7872 * data/lalr1.cc (yyparse): Likewise.
7873 Use "if (false)" rather than "if (0)".
7874
78752005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7876
7877 * TODO: Mention that we should allow NUL bytes in tokens.
7878
78792005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7880
7881 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7882 Problem reported by Hans Aberg.
7883
78842005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7885
7886 * src/getargs.c (version): Happy new year; update overall
7887 program copyright date from 2004 to 2005.
7888
7889 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7890 Problem reported by Hans Aberg.
7891 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7892 (Output file names.): Add a test for the case when standard output
7893 is closed.
7894
78952004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7896
7897 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7898 to fix an oversight in the Bison 2.0 manual.
7899
79002004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7901
7902 * NEWS: Version 2.0. Reformat the existing news items since
7903 1.875, so that related items are grouped together.
7904 * configure.ac (AC_INIT): Bump version to 2.0.
7905 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7906
7907 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7908 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7909 otherwise, we're not testing alloca. Unfortunately there's no
7910 simple way to consult HAVE_ALLOCA here.
7911
7912 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7913 for yymsg, too.
7914
7915 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7916 hand. This avoids a warning about comparing int to size_t when
7917 GCC warnings are enabled.
7918
79192004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7920
7921 * NEWS: Bison-generated parsers no longer default to using the
7922 alloca function (when available) to extend the parser stack, due
7923 to widespread problems in unchecked stack-overflow detection.
7924 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7925 responsibility to set it to a positive value. This lets the user
7926 specify a value that is not a preprocessor constant.
7927 * data/yacc.c (YYMAXDEPTH): Likewise.
7928 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7929 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7930 to be a compile-time constant. However, explain the constraints on it.
7931 Also, explain the constraints on YYINITDEPTH.
7932 (Table of Symbols): Explain that alloca is no longer the default.
7933 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7934 to 1.
7935
7936 * doc/bison.texinfo (Location Default Action): Mention that n must
7937 be zero when k is zero. Suggested by Frank Heckenbach.
7938
79392004-12-22 Akim Demaille <akim@epita.fr>
7940
7941 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7942 (parser::state_type, parser::semantic_type, parser::location_type):
7943 Private, not public.
7944 (parser::parse): Return ints, not bool.
7945 Returning a bool introduces a problem: 0 corresponds to false, and
7946 it seems weird to return false on success. Returning true changes
7947 the conventions for yyparse.
7948 Alternatively we could return void and send an exception.
7949 There is no clear consensus (yet?).
7950 (state_stack, semantic_stack, location_stack): Rename as...
7951 (state_stack_type, semantic_stack_type, location_stack_type): these.
7952 Private, not public.
7953 * tests/c++.at: New.
7954 * tests/testsuite.at, tests/Makefile.am: Adjust.
7955
79562004-12-21 Akim Demaille <akim@epita.fr>
7957
7958 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7959
79602004-12-21 Akim Demaille <akim@epita.fr>
7961
7962 Don't impose std::string for filenames.
7963
7964 * data/lalr1.cc (b4_filename_type): New.
7965 (position::filename): Use it.
7966 (parser.hh): Move the inclusion of stack.hh and location.hh below
7967 the user code, so that needed headers for the filename type can be
7968 included first.
7969 Forward declare them before the user code.
7970 * tests/Makefile.am (check-local, installcheck-local): Pass
7971 TESTSUITEFLAGS to the TESTSUITE.
7972
79732004-12-20 Akim Demaille <akim@epita.fr>
7974
7975 Use more STL like names: my_class instead of MyClass.
7976
7977 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7978 (SemanticStack, SemanticType, StateStack, StateType)
7979 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7980 (Parser::value): Rename as...
7981 (location_stack, location_type, rhs_number_type, semantic_stack)
7982 (semantic_type, state_stack, state_type, token_number_type, stack)
7983 (slice, traits, parser::yylloc, parser::yylval): these.
7984
7985 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7986
79872004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7988
7989 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7990 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7991
79922004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7993
7994 Remove uses of 'short int' and 'unsigned short int'. This raises
7995 some arbitrary limits. It uses more memory but nowadays that's
7996 not much of an issue.
7997
7998 This change does not affect the generated parsers; that's a different
7999 task, as some users will want to conserve memory there.
8000
8001 Ideally we should use size_t to represent all object counts, and
8002 something like ptrdiff_t to represent signed differences of object
8003 counts; but that will require more code-cleanup than I have the
8004 time to do right now.
8005
8006 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
8007 Use size_t, not int or short int, to count objects.
8008 * src/closure.c (nritemset, closure): Likewise.
8009 * src/closure.h (nritemset, closure): Likewise.
8010 * src/nullable.c (nullable_compute): Likewise.
8011 * src/print.c (print_core): Likewise.
8012 * src/print_graph.c (print_core): Likewise.
8013 * src/state.c (state_compare, state_hash): Likewise.
8014 * src/state.h (struct state): Likewise.
8015 * src/tables.c (default_goto, goto_actions): Likewise.
8016
8017 * src/gram.h (rule_number, rule): Use int, not short int.
8018 * src/output.c (prepare_rules): Likewise.
8019 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
8020 errs, reductions): Likewise.
8021 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
8022 Likewise.
8023 * src/tables.c (vector_number, tally, action_number,
8024 ACTION_NUMBER_MINIMUM): Likewise.
8025 * src/output.c (muscle_insert_short_int_table): Remove.
8026
80272004-12-17 Akim Demaille <akim@epita.fr>
8028
8029 * data/lalr1.cc: Extensive Doxygenation.
8030 (error_): Rename as...
8031 (error): this, since it is visible to the user.
8032 Adjust callers.
8033 (Parser::message): Now an automatic variable from...
8034 (Parser::yyreport_syntax_error_): here.
8035 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
8036 Parser::error.
8037 * tests/input.at: Escape $.
8038
80392004-12-16 Paul Eggert <eggert@cs.ucla.edu>
8040
8041 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
8042 Parenthesize rhs to avoid obscure problems with mistakes like
8043 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
8044 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8045 b4_rhs_location): Likewise.
8046 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8047 b4_rhs_location): Likewise.
8048
80492004-12-16 Akim Demaille <akim@epita.fr>
8050
8051 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
8052 yacc.c: be sure to stay within yycheck_.
8053 * tests/actions.at: Re-enable C++ tests.
8054
80552004-12-16 Akim Demaille <akim@epita.fr>
8056
8057 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
8058 real.
8059
80602004-12-16 Akim Demaille <akim@epita.fr>
8061
8062 Use #define to handle the %name-prefix.
8063
8064 * data/glr.c, data/yacc.c: Comment changes.
8065 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
8066 so that one can refer to yylex in the parser file, and have it
8067 renamed, as is the case with other skeletons.
8068
80692004-12-16 Akim Demaille <akim@epita.fr>
8070
8071 Move lalr1.cc internals into yy*.
8072
8073 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
8074 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
8075 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
8076 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
8077 (empty_, final_, terror_, errcode_, ntokens_)
8078 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
8079 (looka_, ilooka_, error_range_, nerrs_):
8080 Rename as...
8081 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
8082 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
8083 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
8084 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
8085 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
8086 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
8087 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
8088 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
8089 these.
8090
80912004-12-15 Paul Eggert <eggert@cs.ucla.edu>
8092
8093 Fix some problems reported by twlevo at xs4all.
8094 * src/symtab.c (symbol_new): Report an error if the input grammar
8095 contains too many symbols. This is better than calling abort() later.
8096 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
8097 (struct node, struct graph):
8098 Rename member expand to stretch. All uses changed.
8099 (struct graph): Remove member layoutalgorithm. All uses removed.
8100 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
8101 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
8102 All uses changed.
8103 (N_STRETCH): Rename from N_EXPAND. All uses changed.
8104
81052004-12-15 Akim Demaille <akim@epita.fr>
8106
8107 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
8108 Add more Doxygen comments.
8109 (symprint_, stack_print_, reduce_print_, destruct_, pop)
8110 (report_syntax_error_, translate_): Rename as...
8111 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
8112 (yypop_, yyreport_syntax_error_, yytranslate_): this.
8113
81142004-12-15 Akim Demaille <akim@epita.fr>
8115
8116 * data/lalr1.cc (lex_): Rename as...
8117 (yylex_): this.
8118 Move the trace here.
8119 Take the %name-prefix into account.
8120 Reported by Alexandre Duret-Lutz.
8121
81222004-12-15 Akim Demaille <akim@epita.fr>
8123
8124 Simplify the C++ parser constructor.
8125
8126 * data/lalr1.cc (debug_): Rename as...
8127 (yydebug_): so that the parser's internals are always in the yy*
8128 pseudo namespace.
8129 Adjust uses.
8130 (b4_parse_param_decl): Remove the leading comma as it is now only
8131 called as unique argument list.
8132 (Parser::Parser): Remove the constructor accepting a location and
8133 an initial debugging level.
8134 Remove from the other ctor the argument for the debugging level.
8135 (debug_level_type, debug_level, set_debug_level): New.
8136
8137 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
8138 constructor calls.
8139
81402004-12-15 Akim Demaille <akim@epita.fr>
8141
8142 Remove b4_root related material: failure experiment
8143 (which goal was to allow to derive from a class).
8144
8145 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
8146 definitions and uses.
8147
81482004-12-14 Paul Eggert <eggert@cs.ucla.edu>
8149
8150 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
8151 not 2, since it's not portable to subtract 1 from the start of an
8152 array. The new item 0 is never set or used. All uses changed.
8153
8154 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
8155 the default definition of YYLLOC_DEFAULT. Problem reported
8156 by Frank Heckenbach.
8157
81582004-12-12 Paul Eggert <eggert@cs.ucla.edu>
8159
8160 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
8161 the normal case and one for the error case. Just use the
8162 first one uniformly. Problem reported by Frank Heckenbach.
8163 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
8164 use exactly the same macro in both places.
8165 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
8166 so that the normal-case YYRHSLOC works for the error case too.
8167 All uses changed.
8168 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
8169 (YYLLOC_DEFAULT): Use the same macro as glr.c.
8170 * doc/bison.texinfo (Location Default Action): Don't claim that
8171 we have an array of locations. Use the same macro for both glr
8172 and lalr parsers. Mention YYRHSLOC. Mention what happens when
8173 the index is 0.
8174
81752004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8176
8177 * HACKING: Update email addresses to send announcements to.
8178
8179 * configure.ac (AC_INIT): Bump version to 1.875f.
8180
81812004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8182
8183 * NEWS: Version 1.875e.
8184 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
8185
8186 * src/scan-skel.l: Include "complain.h", for "fatal".
8187
8188 * src/relation.h (relation_print, relation_digraph):
8189 Relation sizes are of type relation_node, not size_t (this is
8190 merely a doc fix, since the two types are equivalent).
8191 (relation_transpose): Relation sizes are of type relation_node,
8192 not int.
8193 * src/relation.c: Likewise.
8194 (top, infinity): Now of type relation_node, not int.
8195 (traverse, relation_transpose): Use relation_node, not int.
8196
8197 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
8198 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
8199 (yyparse): Remove unused local introduced in 2004-10-25 patch.
8200
8201 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
8202 specifying whether the test should be skipped. Use it tp
8203 specify that the [%defines %skeleton "lalr1.cc"] tests currently
8204 fail on some hosts, and should be skipped.
8205
82062004-12-08 Paul Eggert <eggert@cs.ucla.edu>
8207
8208 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
8209 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
8210 unless otherwise specified below.
8211
8212 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
8213 to allocate kernel_base, kernel_items, kernel_size, since
8214 they needn't be initialized to 0.
8215 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
8216 * src/closure.c (new_closure): Likewise, for itemset.
8217 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
8218 * src/lalr.c (set_goto_map): Likewise, for temp_map.
8219 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
8220 (build_relations): Likewise for edge, states1, includes.
8221 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
8222 * src/reader.c (packgram): Likewise, for ritem, rules.
8223 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
8224 * src/relation.c (relation_digraph): Likewise for VERTICES.
8225 (relation_transpose): Likewise for new_R, end_R.
8226 * src/symtab.c (symbols_token_translations_init): Likewise for
8227 token_translations.
8228 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
8229 (token_actions): Likewise for yydefact, actrow, conflrow,
8230 conflict_list.
8231 (save_column): Likewise for froms[symno], tos[symno].
8232 (goto_actions): Likewise for state_count.
8233 (pack_table): Likewise for base, pos, check.
8234 (tables_generate): Likewise for width.
8235
8236 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
8237 for initial core. Just have a separate core, so we needn't worry
8238 about whether kernel_size and kernel_base are initialized.
8239
8240 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
8241 kernel_size, kernel_items): Remove unnecessary initialization.
8242 * src/conflicts.c (conflicts): Likewise.
8243 * src/derives.c (derives): Likewise.
8244 * src/muscle_tablc (muscle_insert): Likewise.
8245 * src/relation.c (relation_digraph): Likewise.
8246 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
8247 conflrow, conflict_table, conflict_list, table, check):
8248 Likewise.
8249
8250 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
8251 This is because all callers pass unsigned int.
8252 * src/closure.h (new_closure): Likewise.
8253
8254 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
8255 (build_relations): Initialize includes[i] in all cases.
8256 * src/reader.c (packgram): Always initialize rules[ruleno].prec
8257 and rules[ruleno].precsym. Initialize members in order.
8258 * src/relation.c (relation_transpose): Always initialize new_R[i]
8259 and end_R[i].
8260 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
8261
8262 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
8263 conflict_list[0] was always 0, but now it isn't initialized.
8264
8265 * src/table.c (table_grow): When conflict_table grew, the grown
8266 area wasn't cleared. Fix this.
8267
8268 * lib/.cvsignore: Add strdup.c, strdup.h.
8269 * m4/.cvsignore: Add strdup.m4.
8270
82712004-12-07 Paul Eggert <eggert@cs.ucla.edu>
8272
8273 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
8274 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
8275 GOTO_NUMBER_MAXIMUM, since we occasionally compute
8276 ngotos + 1 without checking for overflow.
8277 (build_relations): Use END_NODE, not -1, to denote end of edges.
8278 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
8279 build_relations): Use goto_number, not int, for goto numbers.
8280 * src/tables.c (save_column, default_goto): Likewise.
8281
82822004-11-23 Akim Demaille <akim@epita.fr>
8283
8284 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
8285 of #defining from yystype.
8286 Don't typedef yystype, C++ does not need it.
8287 This lets it possible to forward declare it as union.
8288
82892004-11-23 Paul Eggert <eggert@cs.ucla.edu>
8290
8291 * bootstrap (gnulib_modules): Add extensions.
8292 Problem reported by Jim Meyering.
8293
82942004-11-22 Paul Eggert <eggert@cs.ucla.edu>
8295
8296 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
8297 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
8298 src/system.h, src/tables.c: XFREE -> free, to accommodate
8299 recent change to gnulib xalloc.h.
8300 Problem reported by Jim Meyering.
8301
83022004-11-17 Akim Demaille <akim@epita.fr>
8303
8304 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
8305
83062004-11-17 Akim Demaille <akim@epita.fr>,
8307 Alexandre Duret-Lutz <adl@gnu.org>
8308
8309 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
8310 changes.
8311 (YYCDEBUG): Adjust.
8312 Use it instead of cdebug_.
8313 (Parser::debug_stream, Parser::set_debug_stream): New.
8314 (Parser::symprint_): Define cdebug_ for temporary backward
8315 compatibility.
8316 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
8317 debug_stream ().
8318
83192004-11-17 Akim Demaille <akim@epita.fr>
8320
8321 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
8322 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
8323 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
8324 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8325
83262004-10-27 Paul Eggert <eggert@cs.ucla.edu>
8327
8328 * data/glr.c (yyloc_default): Remove; not used.
8329 Problem reported by Frank Heckenbach.
8330
83312004-10-25 Akim Demaille <akim@epita.fr>
8332
8333 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
8334 Introduce another definition to address simple location arrays.
8335 (yyGLRStack): New member: yyerror_range.
8336 (yyrecoverSyntaxError, yyparse): Update it.
8337 (yyrecoverSyntaxError): Use it when shifting the error token to
8338 have an accurate range, equivalent to the one computed by both
8339 yacc.c and lalr1.cc.
8340 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
8341 that column numbers start at column 0, as per GNU Coding
8342 Standards, the others tests, and the doc.
8343 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
8344 Adjust to the above change (first column is 0).
8345 And adjust the location of the "<error>", now covering the whole
8346 line.
8347
83482004-10-22 Akim Demaille <akim@epita.fr>
8349 and Paul Eggert <eggert@cs.ucla.edu>
8350
8351 Remove some arbitrary limits on goto numbers and relations.
8352 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
8353 initial values, since they're never used.
8354 (set_goto_map): ngotos is now unsigned, so test for overflow
8355 by seeing whether it wraps around to zero.
8356 * src/lalr.h (goto_number): Now size_t, not short int.
8357 (GOTO_NUMBER_MAXIMUM): Remove.
8358 * src/relation.c (relation_print, traverse, relation_transpose):
8359 Check for END_NODE rather than looking at sign.
8360 * src/relation.h (END_NODE): New macro.
8361 (relation_node): Now size_t, not short int.
8362
83632004-10-22 Paul Eggert <eggert@cs.ucla.edu>
8364
8365 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
8366 keyword, not an identifier. Problem reported by Baron Schwartz in
8367 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
8368
83692004-10-11 Akim Demaille <akim@epita.fr>
8370
8371 * src/symtab.c (symbol_check_alias_consistency): Also check
8372 type names, destructors, and printers.
8373 Reported by Alexandre Duret-Lutz.
8374 Recode the handling of associativity and precedence in terms
8375 of symbol_precedence_set.
8376 Accept no redeclaration at all, not even equal to the previous
8377 value.
8378 (redeclaration): New.
8379 Use it to factor redeclaration complaints.
8380 (symbol_make_alias): Don't set the type of the alias, let
8381 symbol_check_alias_consistency do it as for other features.
8382 * src/symtab.h (symbol): Add new member prec_location, and
8383 type_location.
8384 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
8385 * tests/input.at (Incompatible Aliases): New.
8386
83872004-10-09 Paul Eggert <eggert@cs.ucla.edu>
8388
8389 .cvsignore fixes to accommodate gnulib changes,
8390 and the practice of naming build directories "_build".
8391 * .cvsignore: Add "_*". Sort.
8392 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
8393 * m4/.cvsignore: Add "*_gl.m4".
8394
83952004-10-06 Akim Demaille <akim@epita.fr>
8396
8397 * src/parse-gram.y (add_param): Fix the truncation of trailing
8398 spaces.
8399
84002004-10-05 Akim Demaille <akim@epita.fr>
8401
8402 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
8403 whether the reducion was empty or not. This leaves room to
8404 improve the use of YYLLOC_DEFAULT in such a case.
8405 lalr1.cc is still experimental, so changing this is acceptable.
8406 And finally, there are probably not many users who changed the
8407 handling of locations in GLR, so changing is admissible too.
8408
8409 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8410 empty reduction, set @$ to an empty location ending the previously
8411 stacked symbol.
8412 Adjust uses to make sure the code is triggered on empty
8413 reductions.
8414 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8415 expected output: empty reductions have empty locations.
8416
84172004-09-29 Akim Demaille <akim@epita.fr>
8418
8419 * data/lalr1.cc: Move towards a more standard C++ coding style
8420 for templates: Class < T > -> Class<T>.
8421
84222004-09-29 Akim Demaille <akim@epita.fr>
8423
8424 * data/lalr1.cc: Reinstall the former ctor, for sake of
8425 compatibility, but warn it will be removed.
8426 Move towards a more standard C++ coding style (i.e., type *var ->
8427 type* var).
8428
84292004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8430
8431 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8432 since it's less likely to work if NULs are involved in the future.
8433
84342004-09-27 Akim Demaille <akim@epita.fr>
8435
8436 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8437
84382004-09-27 Akim Demaille <akim@epita.fr>
8439
8440 * data/lalr1.cc (b4_parse_param_decl_1): New.
8441 (b4_parse_param_decl): Use it to have different names between attribute
8442 and argument names.
8443 (b4_cc_constructor_call): Likewise.
8444
84452004-09-24 Akim Demaille <akim@epita.fr>
8446
8447 * src/parse-gram.y (add_param): Strip the leading and trailing
8448 blanks from a formal argument declaration.
8449 (YY_LOCATION_PRINT): New.
8450
84512004-09-24 Akim Demaille <akim@epita.fr>
8452
8453 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8454 after the location.
8455
84562004-09-24 Akim Demaille <akim@epita.fr>
8457
8458 * doc/bison.texinfo (Table of Symbols): Sort.
8459
84602004-09-21 Akim Demaille <akim@epita.fr>
8461
8462 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8463 the useless parentheses.
8464 Suggested by Paul Eggert.
8465
84662004-09-20 Akim Demaille <akim@epita.fr>
8467
8468 Let the initial-action act on the look-ahead, and use it for the
8469 "initial push" (corresponding to an hypothetical beginning-of-file).
8470 And let lalr1.cc honor %initial-action.
8471
8472 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8473 example.
8474 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8475 (Parser::Parser): Remove the ctor that used to initialize it.
8476 (Parser::parse): Like in the other skeletons, issue the "starting
8477 parse" message before any action.
8478 Honor %initial-action.
8479 Initialize the stacks with the lookahead.
8480 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8481 look-ahead.
8482 Push them in the stacks.
8483 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8484
84852004-09-20 Akim Demaille <akim@epita.fr>
8486
8487 * doc/bison.texinfo (Initial Action Decl): New.
8488
84892004-09-20 Akim Demaille <akim@epita.fr>
8490
8491 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8492 clearer criterion to define it.
8493 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8494 When reducing on an empty RHS, use the latest stacked location as
8495 location.
8496 yylloc is not always available.
8497 * data/glr.c: Likewise.
8498 Also, honor initial-actions.
8499
85002004-09-20 Akim Demaille <akim@epita.fr>
8501
8502 * data/yacc.c (YY_LOCATION_PRINT): New.
8503 Define when we know YYLTYPE's structure, i.e., when the default
8504 YYLLOC_DEFAULT is used.
8505 * data/c.m4 (b4_yysymprint_generate): Use it.
8506 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8507 value of the result.
8508 (error_start_): Replace with...
8509 (error_range_): this location array.
8510 This allows to replace code relying on the implementation of
8511 locations by portable code.
8512 * data/yacc.c (yylerrsp): Replace with...
8513 (yyerror_range): this.
8514 Every time a token is popped, update yyerror_range[0], to have an
8515 accurate location for the error token.
8516 * data/glr.c (YY_LOCATION_PRINT): New.
8517 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8518 deference a pointer.
8519 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8520 report the location in %printers.
8521
8522 * src/scan-skel.l: Instead of abort, report error messages to ease
8523 understanding skeleton scanning failures.
8524
85252004-09-16 Akim Demaille <akim@epita.fr>
8526
8527 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8528 (iterator, const_iterator): these, to be more in the C++ spirit.
8529 Also, return reverse iterators so that when displaying the stack
8530 we display its bottom first.
8531 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8532 from yacc.c.
8533 We should probably use vector here though.
8534
85352004-09-16 Akim Demaille <akim@epita.fr>
8536
8537 Have more complete shift traces.
8538
8539 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8540 to report Shifts instead of ad hoc YYDPRINTF invocations,
8541 including for the error token.
8542 * data/lalr1.cc (symprint_): Output the location.
8543 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8544 output the location within the %printer.
8545 Activate GLR tests, at least to make sure they compile properly.
8546 They still don't pass though.
8547 * tests/calc.at: Adjust expect verbose output, since now "Entering
8548 state..." is on a different line than the "Shifting" message.
8549
85502004-09-08 Akim Demaille <akim@epita.fr>
8551
8552 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8553 Bison directive from the Bison file to the invocation of this
8554 macro, so that these directives are passed to
8555 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8556 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8557 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8558 the extra Bison directives instead of the whole series.
8559 Change the grammar so that there are recoverable errors, and
8560 unrecoverable errors. Now we can have the parser give up before
8561 consuming the whole input. As a result we now can observe that
8562 the lookahead is freed when needed.
8563 Change the parser source to parse argv[1] instead of a hard coded
8564 string.
8565 Simplify yylex, and give a value and location to EOF.
8566 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8567 passed directives already coded in the file.
8568 Add some tests to check the location of "error".
8569 For some tests, the C++ parser is correct, and not yacc.c.
8570 For other tests, they provide different, but unsatisfying, values,
8571 so keep the C++ value so that at least one parser is "correct"
8572 according to the test suite.
8573 (Actions after errors): Remove, this is subsumed by the
8574 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8575
85762004-09-06 Akim Demaille <akim@epita.fr>
8577
8578 * data/lalr1.cc: Adjust the indentation of the labels.
8579 (Parser::pop): New.
8580 Use it.
8581
85822004-09-06 Akim Demaille <akim@epita.fr>
8583
8584 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8585 argument, an informative message.
8586 Call YY_SYMBOL_PRINT.
8587 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8588 * data/lalr1.cc (destruct_): Likewise.
8589 In addition, no longer depend on b4_yysymprint_generate and
8590 b4_yydestruct_generate to generate these functions, do it "by
8591 hand".
8592
85932004-09-03 Akim Demaille <akim@epita.fr>
8594
8595 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8596 invoked, yydestruct the lookahead.
8597 * tests/calc.at (Calculator $1): Update the expected lengths of
8598 traces: there is an added line for the discarded lookahead.
8599 * doc/bison.texinfo (Destructor Decl): Some rewording.
8600 Define "discarded" symbols.
8601
86022004-09-02 Akim Demaille <akim@epita.fr>
8603
8604 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8605
86062004-09-02 Akim Demaille <akim@epita.fr>
8607
8608 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8609 (YYDSYMPRINTF): Rename as...
8610 (YY_SYMBOL_PRINT): this.
8611 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8612 two.
8613 Use it instead of direct symprint_ calls.
8614 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8615 one.
8616
86172004-09-02 Akim Demaille <akim@epita.fr>
8618
8619 * data/lalr1.cc (b4_yysymprint_generate): New.
8620 (symprint_): New member function, defined when YYDEBUG.
8621 Use it consistently instead of token/nterm debugging output by
8622 hand.
8623 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8624 %printer calls to use cdebug_ when using lalr1.cc.
8625
86262004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8627
8628 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8629 with #ifdef YYDEBUG.
8630
86312004-08-26 Akim Demaille <akim@epita.fr>
8632
8633 * doc/bison.texinfo (Implementing Loops): Rename as...
8634 (Implementing Gotos/Loops): this.
8635
86362004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8637
8638 Adjust to latest gnulib.
8639 * bootstrap (gnulib_modules): Add xalloc-die.
8640 Set LC_ALL=C so that file names sort consistently.
8641 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8642 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8643 uintmax_t.m4, ulonglong.m4.
8644 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8645 po.m4 since we are now using _gl.m4 instead.
8646
86472004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8648
8649 * src/scan-action.l: Remove. Scanning of semantic actions is
8650 handled in scan-gram.l.
8651
86522004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8653
8654 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8655
8656 * src/location.h (struct): The file member is a uniqstr.
8657 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8658
86592004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8660
8661 Fix bug with non-%union parsers that have printers or destructors,
8662 which led to a Bison core dump. Reported by Peter Fales in
8663 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
8664
8665 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8666 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8667 not to our own type.
8668 * src/output.c (symbol_destructors_output, symbol_printers_output):
8669 Don't assume %union.
8670 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8671 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8672 UNION-FLAG. All callers changed.
8673 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8674 Use type char, not unsigned int, when declaring an array of char;
8675 this lets us remove a cast.
8676 (Printers and Destructors): Add non-%union test cases.
8677
86782004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8679
8680 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8681 GLR writeups. E.g., avoid frenchspacing and the future tense,
8682 change "lookahead" to "look-ahead", and change "wrt" to "with
8683 respect to".
8684
86852004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8686
8687 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8688 New sections, split off from the GLR Parsers section. Put the new
8689 Simple GLR Parser near the start of the GLR section, for clarity.
8690 Rewrite connective text.
8691
86922004-06-21 Frank Heckenbach <frank@g-n-u.de>
8693
8694 * doc/bison.texinfo (Simple GLR Parsers): New section.
8695
86962004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8697
8698 * NEWS, TODO, doc/bison.texinfo:
8699 Use "look-ahead" instead of "lookahead", to be consistent.
8700 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8701 while we're fixing "look-ahead".
8702 * src/conflicts.c (shift_set): Renamed from shiftset.
8703 (look_ahead_set): Renamed from lookaheadset.
8704 * src/print.c: Likewise.
8705 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8706 name for "lookahead".
8707 (report_types, usage): Likewise.
8708 * src/getargs.h (report_look_ahead_tokens): Renamed from
8709 report_lookaheads.
8710 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8711 compute_lookaheads.
8712 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8713 (look_ahead_tokens_print): Renamed from lookaheads_print.
8714 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8715 state_rule_lookaheads_print.
8716 * src/state.h: Likewise.
8717 (reductions.look_ahead_tokens): Renamed from lookaheads.
8718 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8719 AT_DATA_LOOKAHEADS_GRAMMAR.
8720
87212004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8722
8723 * README: Update location of patched M4 distribution.
8724
87252004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8726
8727 Don't assume the C++ compiler takes the same arguments as the C compiler
8728 (trivial change).
8729 * configure.ac (O0CXXFLAGS): New var.
8730 * tests/atlocal.in (CXXFLAGS): Use it.
8731
87322004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8733
8734 Fix some "make check" problems with C++ reported by
8735 Albert Chin-A-Young for Tru64 C++ in this thread:
8736 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8737
8738 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8739 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8740 Output to a .cc file for C++, not to a .c file.
8741 * tests/calc.at (AT_CHECK_CALC): Likewise.
8742 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8743 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8744
87452004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8746
8747 * tests/calc.at, tests/actions.at: Workaround for SGI
8748 C++ compiler. (trivial change)
8749
87502004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8751
8752 Spent a few hours checking out which prerequisite versions the
8753 current sources actually require. I went all the way back to
8754 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8755 a seemingly endless set of combinations of versions more recent
8756 than that. The bottom line is that the current sources require
8757 fairly recent versions of the build tools, and it'll be some work
8758 to change this.
8759 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8760 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8761 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8762 Add comments explaining why those particular versions are
8763 currently needed.
8764
8765 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8766 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
8767 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
8768
8769 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8770 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8771
87722004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8773
8774 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8775 0.11.5. Suggested by Bruno Haible.
8776 * bootstrap: Remove gettext version checking.
8777
8778 * doc/bison.texinfo (Decl Summary): Also mention that %union
8779 can depend on prerequisite types. Problem reported by Tim
8780 Van Holder.
8781
87822004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8783
8784 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8785 * README-alpha: Don't tell people not to package this.
8786
8787 * bootstrap: Don't assume $(...) works; use `...` instead.
8788 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8789 gettext better.
8790
8791 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8792 put into the -d output file, and mention what to do if YYSTYPE is
8793 defined as a macro.
8794
87952004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8796
8797 Undo change made earlier today: it caused autopoint to not bring
8798 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8799 autopoint's.
8800
8801 * bootstrap: Check that gettext version matches what's in
8802 configure.ac. Warn users to ignore robots.txt ERROR 404.
8803 * bootstrap: Undo today's earlier change (logged below).
8804 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8805
8806 The gettext version checking is causing more trouble than it's
8807 curing; remove it. Problem reported by Paul Hilfinger.
8808
8809 * bootstrap: Issue a warning that one can expect a message
8810 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8811 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8812
88132004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8814
8815 Ensure that the C++ compiler used for testing actually works on a
8816 simple test program; if not, skip the C++-related tests. Problem
8817 reported by Vin Shelton in:
8818 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8819
8820 * m4/cxx.m4: New file.
8821 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8822 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8823 * tests/local.at (AT_COMPILE_CXX): Use it.
8824
88252004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8826
8827 * data/glr.c (yylloc): Output this macro even if locations are not
8828 being generated, as the GLR parser needs it even in that case.
8829 Problem reported by Troy A. Johnson
8830 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8831
8832 * configure.ac (AC_INIT): Update to 1.875e.
8833
88342004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8835
8836 * NEWS: Version 1.875d.
8837 * configure.ac (AC_INIT): Likewise.
8838 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8839
8840 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8841 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8842 lalr1.cc runs afoul of the first, and the last two are no longer
8843 supported by GCC 3.4.0.
8844 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8845 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8846
88472004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8848
8849 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8850 unsigned int, for compatibility with latest gnulib hash module.
8851 * src/state.c (state_hash, state_hasher): Likewise.
8852 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8853 * src/uniqstr.c (hash_uniqstr): Likewise.
8854
88552004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8856
8857 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8858
8859 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8860 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8861 character and string literals.
8862 (unexpected_end): New function.
8863 (unexpected_eof): Use it.
8864 (unexpected_newline): New function.
8865 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8866 actions.
8867
8868 * NEWS: Document %expect-rr.
8869
8870 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8871 Fix typo by replacing $1 with $option.
8872 Remove more 'intl'-related files.
8873 Don't DEFUN AM_INTL_SUBDIR twice.
8874
8875 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8876 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8877 strtoul.c.
8878 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8879 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8880 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8881 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8882 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8883 * src/.cvsignore: Add *.output.
8884
8885 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8886 gets copied to the output file.
8887
88882004-04-28 Paul Eggert <eggert@twinsun.com>
8889
8890 Get files from the gnulib and po repositories, instead of relying
8891 on them being in our CVS. Upgrade to latest versions of gnulib
8892 and Automake.
8893
8894 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8895 * bootstrap: Bootstrap from gnulib and po repositories.
8896 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8897 * README-cvs: Document these changes. Remove version numbers from
8898 mentions of build tools, since they change so often. Mention Flex.
8899
8900 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8901 (gl_USE_SYSTEM_EXTENSIONS): Add.
8902 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8903 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
8904 does this for us.
8905 (AC_ISC_POSIX): Remove; we no longer support this
8906 ancient OS, as it gets in the way of latest Autoconf & gnulib.
8907 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8908 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8909 Do not check for C89 headers, except for locale.h which is used
8910 by the Yacc library and must port to K&R hosts.
8911 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8912 Do not check for C89 functions, except for setlocale which is
8913 used by the Yacc library.
8914 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8915 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8916 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8917 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8918 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8919 AM_GNU_GETTEXT): Remove; now done by:
8920 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8921 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8922 for us.
8923
8924 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8925 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8926 Define to empty, as gnulib.mk will do the rest for us.
8927 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8928 for us.
8929 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8930 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8931
8932 * src/files.c: Include gnulib's xstrndup.h.
8933
8934 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8935 (REALLOC): Use xnrealloc, for likewise.
8936 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8937 (strnlen, memrchr): Remove decls; functions no longer used.
8938 Include <stpcpy.h>.
8939
8940 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8941 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8942 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8943 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8944 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8945 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8946 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8947 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8948 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8949 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8950 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8951 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8952 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8953 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8954 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8955 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8956 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8957 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8958 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8959 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8960 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8961 Remove, as these files are now generated automatically
8962 by bootstrap or automake.
8963
8964 * po/ChangeLog: Remove: all but one entry was a duplicate
8965 of this file, and I moved that 2000-11-02 entry here.
8966
8967 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8968 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8969 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8970 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8971 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8972 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8973 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8974 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8975 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8976 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8977 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8978 xstrndup.h.
8979 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8980 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8981 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8982 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8983 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8984 * src/.cvsignore: Remove *_.c.
8985
8986
8987 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8988 support it. (The latest stable gzip doesn't.)
8989
89902004-04-27 Paul Eggert <eggert@twinsun.com>
8991
8992 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8993 case, as stos_ is now used by destructors due to the 2004-02-09
8994 change.
8995
8996 Remove more K&R C support.
8997 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8998 * lib/subpipe.c (errno): Remove decl.
8999 Include <stdlib.h> unconditionally.
9000 (EXIT_FAILURE): Remove macro.
9001 * src/complain.c (vfprintf, strerror): Remove.
9002 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
9003 unconditionally.
9004 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
9005 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
9006 (strchr, strspn, memchr): Remove decls.
9007 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
9008 unconditionally. Do not declare perror.
9009 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
9010 unconditionally.
9011
9012 * src/complain.c (_): Remove useless defn, as system.h defines this.
9013
9014 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
9015 with latest obstack.h.
9016 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
9017 to procedure types, as obstack.h now does that for us.
9018 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
9019
9020 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
9021 so that this include file can stand alone.
9022 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
9023 does this now. Include subpipe.h first after config.h, to
9024 test whether it can stand alone.
9025
9026 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
9027 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
9028 unused declaration.
9029
9030 * tests/synclines.at (%union synch line): Put a dummy member in
9031 the union, because empty unions aren't allowed in C. Caught
9032 by GCC 3.4.0.
9033
90342004-04-13 Jim Meyering <jim@meyering.net>
9035
9036 * src/conflicts.c (conflicts_print): Correct format string typo:
9037 use `%%' to produce literal `%'. (trivial change)
9038
90392004-03-30 Paul Eggert <eggert@twinsun.com>
9040
9041 * src/getargs.c (version): Update copyright year to 2004.
9042
9043 * data/c.m4 (b4_int_type): Use 'short int' rather than
9044 'short', and similarly for 'long', 'unsigned', etc.
9045 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
9046 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
9047 yy_yypstack, yydumpstack): Likewise.
9048 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
9049 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
9050 Likewise.
9051 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
9052 yy_stack_print, yyparse): Likewise.
9053 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
9054 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
9055 * lib/bitset.c (bitset_print): Likewise.
9056 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
9057 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9058 * lib/bitsetv.c (bitsetv_dump): Likewise.
9059 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
9060 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
9061 Likewise.
9062 * src/LR0.c (allocate_itemsets): Likewise.
9063 * src/gram.h (rule_number, rule): Likewise.
9064 * src/lalr.h (goto_number): Likewise.
9065 * src/nullable.c (nullable_compute): Likewise.
9066 * src/output.c (prepare_rules): Likewise.
9067 * src/relation.c (relation_print, relation_digraph): Likewise.
9068 * src/relation.h (relation_node): Likewise.
9069 * src/state.h (state_number, transitions, errs, reductions,
9070 struct state): Likewise.
9071 * src/symtab.h (symbol_number, struct symbol): Likewise.
9072 * src/tables.c (vector_number, tally, action_number,
9073 default_goto, goto_actions): Likewise.
9074 * tests/existing.at (GNU Cim Grammar): Likewise.
9075 * tests/regression.at (Web2c Actions): Likewise.
9076
9077 * src/output.c (muscle_insert_short_int_table): Renamed from
9078 muscle_insert_short_table. All uses changed.
9079
90802004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9081
9082 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
9083 (declaration): Replace expected_conflicts with expected_sr_conflicts.
9084 Add %expect-rr rule.
9085
9086 * src/scan-gram.l: Recognize %expect-rr.
9087
9088 * src/conflicts.h (expected_sr_conflicts): Rename from
9089 expected_conflicts.
9090 (expected_rr_conflicts): Declare.
9091
9092 * src/conflicts.c (expected_sr_conflicts): Rename from
9093 expected_conflicts.
9094 (expected_rr_conflicts): Define.
9095 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
9096 for GLR parsers.
9097 Use expected_sr_conflicts in place of expected_conflicts.
9098 Warn if expected_rr_conflicts used in non-GLR parser.
9099
9100 * doc/bison.texinfo: Add documentation for %expect-rr.
9101
91022004-03-08 Paul Eggert <eggert@gnu.org>
9103
9104 Add support for hex token numbers. Suggested by Odd Arild Olsen in
9105 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
9106
9107 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
9108 in lalr1.cc.
9109 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
9110 * src/scan-gram.l (scan_integer): New function.
9111 ({int}): Use it.
9112 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
9113 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
9114 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
9115 Say "long int", not "long", for uniformity with GNU style.
9116
91172004-02-25 Paul Eggert <eggert@twinsun.com>
9118
9119 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
9120 compilers. This fixes a problem with Intel's C++ compiler being
9121 chatty, reported by Guido Trentalancia in
9122 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
9123
91242004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
9125
9126 Support %destructor and merge error locations in lalr1.cc.
9127
9128 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
9129 (Parser::stos_): Define unconditionally.
9130 (Parser::destruct_): New method. Generate its body with
9131 b4_yydestruct_generate.
9132 (Parser::error_start_): New attribute.
9133 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
9134 token which are discarded.
9135 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
9136 error_start_ when erroneous token are discarded.
9137 (Parser::parse) <yyerrlab1>: Compute the location of the error
9138 token so that it covers all the discarded tokens.
9139 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
9140 it can be called with `%skeleton "lalr1.cc"', and do that.
9141
91422004-02-02 Paul Eggert <eggert@twinsun.com>
9143
9144 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
9145 $(top_srcdir)/lib and ../lib. This fixes a bug reported
9146 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
9147 There's no need to mention top_builddir since Automake does that
9148 for us.
9149 (INCLUDES): Remove, as Automake says it's obsolescent.
9150 Contents migrated into AM_CPPFLAGS as described above.
9151 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
9152
91532004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9154
9155 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
9156 (yyreportSyntaxError): Handle case where lookahead token is
9157 YYEMPTY.
9158
91592004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9160
9161 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
9162 resulting parsers are compilable with C++.
9163
91642003-12-23 Paul Eggert <eggert@twinsun.com>
9165
9166 * config/depcomp, config/install-sh: Sync with Automake 1.8.
9167 * src/output.c (output_skeleton): Rename local var.
9168 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
9169 Bison tokens, as this runs afoul of the 2003-10-07 change that
9170 disallowed NUL bytes in character constants or string literals.
9171
9172 * tests/local.at: Require Autoconf 2.59's Autotest.
9173 * tests/testsuite.at: Don't include local.at, since we now assume
9174 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
9175 including it.
9176 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
9177 multiple inclusion warnings.
9178
91792003-12-02 Akim Demaille <akim@epita.fr>
9180
9181 * doc/bison.texinfo (How Can I Reset the Parser): More about start
9182 conditions.
9183 From Bruno Haible.
9184
91852003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
9186
9187 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
9188
91892003-10-07 Paul Eggert <eggert@twinsun.com>
9190
9191 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
9192 if testsuite doesn't exist.
9193
9194 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
9195 literals, unfortunately.
9196 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
9197 Complain about NUL bytes in character constants or string literals.
9198
91992003-10-05 Paul Eggert <eggert@twinsun.com>
9200
9201 * NEWS: Don't document %no-default-prec, as it's still
9202 too experimental.
9203 * doc/bison.texinfo: Document %no-default-prec only if
9204 the defaultprec flag is set. Normally it's not.
9205
92062003-10-04 Paul Eggert <eggert@twinsun.com>
9207
9208 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
9209 non-modifiable lvalue, instead of a modifiable one.
9210 * doc/bison.texinfo (Actions): Document that $$ can
9211 be assigned to. Do not claim that $$ and $N are
9212 array element references: user code should not rely on this.
9213
92142003-10-01 Paul Eggert <eggert@twinsun.com>
9215
9216 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
9217 (grammar_declaration): Use it.
9218 * src/scan-gram.l: New token %no-default-prec.
9219 * tests/conflicts.at: Revamp tests to use %no-default-prec.
9220 * NEWS, doc/bison.texinfo: Document the above.
9221
92222003-10-01 Akim Demaille <akim@epita.fr>
9223
9224 VCG no longer supports long_straight_phase.
9225
9226 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
9227 * src/print_graph.c (print_graph): Adjust.
9228
92292003-09-30 Frank Heckenbach <frank@g-n-u.de>
9230 and Paul Eggert <eggert@twinsun.com>
9231
9232 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
9233 Table of Symbols): Document %default-prec.
9234 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
9235 (grammar_declaration): Set default_prec on %default-prec.
9236 * src/scan-gram.l (%default-prec): New token.
9237 * src/reader.h (default_prec): New flag.
9238 * src/reader.c: Likewise.
9239 (packgram): Handle it.
9240 * tests/conflicts.at (%default-prec without %prec,
9241 %default-prec with %prec, %default-prec 1): New tests.
9242
92432003-09-30 Paul Eggert <eggert@twinsun.com>
9244
9245 * tests/testsuite.at: Include local.at, not input.at, fixing
9246 a typo in the 2003-08-25 patch.
9247
92482003-08-27 Akim Demaille <akim@epita.fr>
9249
9250 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
9251 GCC warnings.
9252
92532003-08-26 Akim Demaille <akim@epita.fr>
9254
9255 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
9256 "<\#" to avoid magic from Gnus when posting parts of this script.
9257
92582003-08-26 Akim Demaille <akim@epita.fr>
9259
9260 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
9261 (Parser::parse): here.
9262 Adjust: nerrs and errstatus is now replaced by...
9263 (Parser::nerrs_, Parser::errstatus_): New.
9264
92652003-08-25 Akim Demaille <akim@epita.fr>
9266
9267 * config/announce-gen, Makefile.cfg: New.
9268 * Makefile.am: Adjust.
9269 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
9270 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
9271
92722003-08-25 Akim Demaille <akim@epita.fr>
9273
9274 When reducing initial empty rules, Bison parser read an initial
9275 location that is not defined. This results in garbage, and that
9276 affects Bison's own parser. Therefore we need (i) to extend Bison
9277 to support a means to initialize this location, and (ii) to use
9278 this CVS Bison to fix CVS Bison's parser.
9279
9280 * src/reader.h, reader.c (epilogue_augment): Remove, replace
9281 with...
9282 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
9283 * src/parse-gram.y: Adjust.
9284 (%initial-action): New.
9285 (%error-verbose): Since we require CVS Bison, there is no reason
9286 not to use it.
9287 * src/scan-gram.l: Adjust.
9288 * src/Makefile.am (YACC): New, to make sure we use our own parser.
9289 * data/yacc.c (yyparse): Use b4_initial_action.
9290
92912003-08-25 Akim Demaille <akim@epita.fr>
9292
9293 * doc/bison.texinfo: Don't promote stdout for error messages.
9294
92952003-08-25 Akim Demaille <akim@epita.fr>
9296
9297 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
9298 From Alexandre Duret-Lutz.
9299
93002003-08-25 Akim Demaille <akim@epita.fr>
9301
9302 Version 1.875c.
9303
93042003-08-25 Akim Demaille <akim@epita.fr>
9305
9306 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
9307 Use them.
9308
93092003-08-25 Akim Demaille <akim@epita.fr>
9310
9311 * data/lalr1.cc (Parser::reduce_print_): New.
9312 Use it.
9313
93142003-08-25 Akim Demaille <akim@epita.fr>
9315
9316 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
9317 error recovery loops. This patch is based on
9318 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
9319 Also, augment the similarity between lalr1.cc and yacc.c.
9320 Note: the locations of error recovery rules are not correct yet.
9321
9322 * data/lalr1.cc: Comment changes to augment the similarity between
9323 lalr1.cc and yacc.c.
9324 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
9325 (yyerrlab1): Remove, but where it used to be (now the bottom part of
9326 yyerrlab), when hitting EOF, pop the whole stack here instead of
9327 merely falling thru the default error handling mechanism.
9328 (yyerrorlab): New label, with the old contents of YYERROR,
9329 plus the following change: pop the stack of rhs corresponding
9330 to the production that invoked YYERROR. That is how Yacc
9331 behaves (required by POSIX).
9332 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
9333 fail.
9334
93352003-08-25 Akim Demaille <akim@epita.fr>
9336
9337 Tune local.at so that people can "autom4te -l autotest calc.at -o
9338 calc" for instance, to extract a sub test suite.
9339
9340 * tests/testsuite.at: Move the initialization, Autotest version
9341 requirement, and AT_TESTED invocation into...
9342 * tests/local.at: here.
9343 * tests/testsuite.at: Include it for compatibility with Autoconf
9344 2.57.
9345 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
9346 be ignore.
9347
93482003-08-04 Paul Eggert <eggert@twinsun.com>
9349
9350 Rework code slightly to avoid gcc -Wtraditional warnings.
9351 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
9352 The returned value is now stored in *YY0. All callers changed.
9353 * src/output.c (merge_output): Adjust to the above change.
9354
93552003-07-26 Paul Eggert <eggert@twinsun.com>
9356
9357 * data/glr.c (YYASSERT): New macro.
9358 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
9359 yyresolveStates, yyprocessOneStack):
9360 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
9361 Derived from a suggestion by Frank Heckenbach.
9362
93632003-07-25 Paul Eggert <eggert@twinsun.com>
9364
9365 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
9366 for portability to K&R C (after ansi2knr, presumably). See
9367 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
9368 by Frank Heckenbach, though I have omitted the structure-initialization
9369 part of his glr-knr.diff patch since I recall that the Portable
9370 C Compiler didn't require that change.
9371
9372 Let the user specify how to allocate and free memory.
9373 Derived from a suggestion by Frank Heckenbach in
9374 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
9375 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
9376 All uses of free, malloc, realloc changed to use these macros,
9377 and unnecessary casts removed.
9378 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
9379
93802003-07-06 Matthias Mann <MatthiasMann@gmx.de>
9381
9382 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
9383 use s.empty() rather than s == "" to test for empty string; see
9384 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
9385 (trivial change)
9386
93872003-06-25 Akim Demaille <akim@epita.fr>
9388
9389 * config/depcomp, config/install-sh: Update from masters.
9390
93912003-06-20 Paul Eggert <eggert@twinsun.com>
9392
9393 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
9394 and return properly parenthesized result.
9395 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
9396 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9397 Remove unnecessary parentheses from uses.
9398 * doc/bison.texinfo (Location Default Action): Describe the
9399 conventions for parentheses.
9400
94012003-06-19 Paul Eggert <eggert@twinsun.com>
9402
9403 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
9404 yyreportTree): Do not assume that size_t is the same width as int,
9405 when printing sizes. Print sizes using an unsigned format.
9406 Problem reported by Frank Heckenbach in
9407 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
9408
9409 Port to Forte Developer 7 C compiler.
9410 * data/glr.c (struct YYLTYPE): If locations are not being used,
9411 declare a single dummy member, as empty structs do not conform
9412 to the C standard.
9413 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9414 the Forte Developer 7 C compiler complains that end-of-loop
9415 code is not reached.
9416
94172003-06-17 Paul Eggert <eggert@twinsun.com>
9418
9419 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9420 avoid warnings from picky compilers about redefinition of PARAMS.
9421
94222003-06-17 Paul Eggert <eggert@twinsun.com>
9423
9424 Version 1.875b.
9425
9426 * NEWS: Document 1.875b.
9427
9428 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9429 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9430 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9431 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9432 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9433 per recent gettext manual's suggestion.
9434 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9435 Use prototypes, not old-style definitions.
9436 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9437 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9438 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9439 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9440 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9441 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9442 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9443 vbitset_or_and_cmp, vbitset_copy): Likewise.
9444
9445 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9446 Do not include <stdlib.h>.
9447 (PARAMS): Define unconditionally for C89.
9448 (ATTRIBUTE_NORETURN): Remove.
9449 (ATTRIBUTE_UNUSED): Define unconditionally.
9450
9451 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
9452 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
9453 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9454 * lib/vbitset.c, lib/vbitset.h: New files.
9455 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9456 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9457 from libbitset.
9458
9459 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9460 `How Can I Reset @code{yyparse}', since texinfo does not allow
9461 arbitrary @ in node names.
9462
9463 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9464 shouldn't be needed according to the gettext 0.12.1 documentation
9465 but which seem to be needed anyway: codeset.m4 glibc21.m4
9466 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
9467 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
9468 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
9469
9470 * lib/.cvsignore: Add stdbool.h.
9471 * m4/.cvsignore: Add nls.m4, po.m4.
9472
9473 Upgrade to CVS gnulib.
9474 * stdbool_.h: File renamed from stdbool.h.in.
9475 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9476 AC_HEADER_STDBOOL.
9477 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9478 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9479 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9480 (MOSTLYCLEANFILES): New var.
9481 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9482 (stdbool.h): New rule.
9483 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9484 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9485 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9486 m4/quote.m4: Upgrade to today's gnulib.
9487
9488 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9489 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9490 the tests right now.
9491 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9492 yyerror are declared before use; C99 requires this.
9493
94942003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9495
9496 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9497 first.
9498 (yyrecoverSyntaxError): Correct the logic for setting and testing
9499 yyerrState.
9500 Correct comment on handling EOF.
9501 Allow states with only a default reduction, rather than failing
9502 (I can't quite reconstruct why these were not allowed before).
9503
9504 Fixes to avoid problem that $-N rules in GLR parsers can cause
9505 buffer overruns, corrupting state.
9506
9507 * src/output.c (prepare_rules): Output max_left_semantic_context
9508 definition.
9509 * src/reader.h (max_left_semantic_context): New variable declaration.
9510 * src/scan-gram.l (max_left_semantic_context): Define.
9511 (handle_action_dollar): Update max_left_semantic_context.
9512 * data/glr.c (YYMAXLEFT): New definition.
9513 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9514 (yyresolveAction): Ditto.
9515
9516 Fixes to problems with location handling in GLR parsers reported by
9517 Frank Heckenbach (2003/06/05).
9518
9519 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9520 (YYRHSLOC): Add parentheses, and define only if locations used.
9521 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9522 locations not used.
9523 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9524 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
9525
9526 * tests/cxx-type.at: Exercise location information; update tests
9527 to differentiate output with and without locations.
9528 Remove forward declarations of yylex and yyerror---caused errors
9529 because default YYLTYPE not yet defined.
9530 Change semantic actions to compute strings, rather than printing
9531 them directly (to test proper passing of semantics values). Change
9532 output to prefix notation and update test data and expected results.
9533 (yylex): Track locations.
9534 (stmtMerge): Return value rather than printing, and include arguments
9535 in value.
9536
95372003-06-03 Paul Eggert <eggert@twinsun.com>
9538
9539 Avoid warnings generated by GCC 2.95.4 when Bison is
9540 configured with --enable-gcc-warnings.
9541 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9542 yy::]b4_parser_class_name[::translate_,
9543 yy::Stack::operator[] (unsigned),
9544 yy::Stack::operator[] (unsigned) const,
9545 yy::Slice::operator[] (unsigned),
9546 yy::Slice::operator[] (unsigned) const):
9547 Rename local vars to avoid warnings.
9548 * tests/glr-regression.at (Improper handling of embedded actions
9549 and $-N in GLR parsers): Remove unused local variable from yylex.
9550 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9551 (void) as arg when not pure, since we now assume C89 when building
9552 Bison. Pacify GCC by using parameter.
9553
95542003-06-02 Paul Eggert <eggert@twinsun.com>
9555
9556 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9557 yy::Location::lines, yy::Location::columns): Rename arguments
9558 to avoid shadowing; this removes a warning generated by GCC 3.3.
9559
95602003-06-01 Paul Eggert <eggert@twinsun.com>
9561
9562 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9563 to g++, as GCC 3.3 complains if you do it.
9564 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9565 everything that WARNING_CFLAGS has, except omit warnings
9566 not suitable for C++.
9567 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9568 * tests/atlocal.in (CXXFLAGS): New var.
9569 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9570
9571 Fix a GLR parser bug I reported in February; see
9572 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
9573 The problem was that GLR parsers did not conform to the C standard,
9574 because actions like { $1 = $2 + $3; } expanded to expressions
9575 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9576 to a local variable. The C standard says that expressions
9577 like (var = f ()) + (var = f ()) have undefined behavior.
9578 Another problem was that GCC sometimes issues warnings that
9579 yyfill and its parameters are unused.
9580
9581 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9582 as possibly unused.
9583 (yyfill): New function.
9584 (YYFILL): Use it.
9585 (yyuserAction): Change type of yynormal to bool, so that it matches
9586 the new yyfill signature. Mark it as possibly unused.
9587
9588
9589 Follow up on a bug I reported in February, where a Bison-generated
9590 parser can loop. Provide a test case and a fix for yacc.c. I
9591 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9592 The original bug report is in:
9593 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
9594
9595 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9596 macro's size was becoming unwieldy.
9597 (yyerrlab): Do not discard an empty lookahead symbol, as this
9598 might destroy garbage.
9599 (yyerrorlab): New label, with the old contents of YYERROR,
9600 plus the following change: pop the stack of rhs corresponding
9601 to the production that invoked YYERROR. That is how Yacc
9602 behaves, and POSIX requires this behavior.
9603 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9604 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9605 Define 'alarm' to do nothing if unistd.h is not available.
9606 Add a new rule "exp: '-' error;" to test the above change to
9607 data/yacc.c. Use 'alarm' to abort any test taking longer than
9608 10 seconds, as it's probably looping.
9609 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9610 Also, the new yacc.c generates two fewer diagnostics for an
9611 existing test.
9612
96132003-05-24 Paul Eggert <eggert@twinsun.com>
9614
9615 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9616 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9617 This fixes a problem reported by John Bowman when the Compaq/HP
9618 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9619 -ansi -Wall -gall).
9620 * data/yacc.c (union yyalloc): Likewise.
9621 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
9622
9623 Switch from 'int' to 'bool' where that makes sense.
9624
9625 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9626 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9627 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9628 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9629 Return or accept bool, not int. All callers changed.
9630 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9631 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9632 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9633 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9634 bitset_or_and_cmp_): Likewise.
9635 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9636 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9637 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9638 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9639 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9640 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9641 bitset_stats_or_and_cmp): Likewise.
9642 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9643 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9644 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9645 ebitset_xor_cmp): Likewise.
9646 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9647 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9648 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9649 lbitset_xor_cmp): Likewise.
9650 * lib/bbitset.h: Include <stdbool.h>.
9651 (struct bitset_vtable): The following members now return bool, not
9652 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9653 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9654 or_and_cmp).
9655 * src/conflicts.c (count_rr_conflicts): Likewise.
9656 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9657 All uses changed.
9658 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9659 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9660 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9661 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9662 graph_flag): Likewise.
9663 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9664 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9665 graph_flag): Likewise.
9666 * src/output.c (error_verbose): Likewise.
9667 * src/output.h (error_verbose): Likewise.
9668 * src/reader.c (start_flag, typed): Likewise.
9669 * src/reader.h (typed): Likewise.
9670 * src/getargs.c (LOCATIONS_OPTION): New constant.
9671 (long_options, getargs): Use it.
9672 * src/lalr.c (build_relations): Use bool, not int.
9673 * src/nullable.c (nullable_compute): Likewise.
9674 * src/print.c (print_reductions): Likewise.
9675 * src/tables.c (action_row, pack_vector): Likewise.
9676 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9677 * src/output.c (prepare): Use it.
9678 * src/output.c (token_definitions_output,
9679 symbol_destructors_output, symbol_destructors_output): Use string,
9680 not boolean integer, to keep track of whether to output separator.
9681 * src/print_graph.c (print_core): Likewise.
9682 * src/state.c (state_rule_lookaheads_print): Likewise.
9683
9684 * config/install-sh: Sync from automake 1.7.5.
9685
96862003-05-14 Paul Eggert <eggert@twinsun.com>
9687
9688 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9689 semicolon after a grammar declaration, in the interest of possible
9690 future changes to the Bison input language.
9691 Do not allow a stray semicolon at the start of the grammar.
9692 (rhses.1): Allow one or more semicolons after any rule, including
9693 just before "|" as required by POSIX.
9694 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9695 grammar.
9696
96972003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9698
9699 %parse-param support for lalr1.cc.
9700
9701 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9702 b4_cc_constructor_calls, b4_cc_constructor_call,
9703 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9704 definitions.
9705 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9706 parse-param arguments.
9707 (yy::b4_parser_class_name): Declare instance variables to
9708 hold parse-param arguments.
9709 * tests/calc.at: s/value/semantic_value/ because value clashes
9710 with a member of yy::b4_parser_class_name. Adjust C++ code
9711 to handle %parse-param. Enable %parse-param test in C++.
9712
97132003-05-12 Paul Eggert <eggert@twinsun.com>
9714
9715 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9716 English a bit. Fix fclose typo. Change "const char" to "char
9717 const", and use ANSI C rather than K&R for "main". Suggest
9718 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9719 and suggest yy_switch_to_buffer.
9720
97212003-05-05 Paul Eggert <eggert@twinsun.com>
9722
9723 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9724 C89. This avoids a diagnostic on compilers that define __STDC__
9725 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
9726 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9727
97282003-05-03 Paul Eggert <eggert@twinsun.com>
9729
9730 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9731 Do not overrun array bounds.
9732 This should fix a bug reported today by Olatunji Oluwabukunmi in
9733 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
9734
97352003-04-29 Akim Demaille <akim@epita.fr>
9736
9737 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9738 * src/getargs.c, src/getargs.h: here, as bool, not int.
9739 (nondeterministic_parser): New.
9740 * src/parse-gram.y, src/scan-gram.l: Support
9741 %nondeterministic-parser.
9742 * src/output.c (prepare): Use nondeterministic_parser instead
9743 of glr_parser where appropriate.
9744 * src/tables.c (conflict_row, action_row, save_row)
9745 (token_actions, token_actions, pack_vector): Ditto.
9746
97472003-04-29 Akim Demaille <akim@epita.fr>
9748
9749 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9750
97512003-04-29 Akim Demaille <akim@epita.fr>
9752
9753 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9754 with %pure-parser and %locations to exercise the patch from Yakov
9755 Markovitch below.
9756
97572003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9758
9759 * data/yacc.c: (b4_lex_param): Corrected for the case where
9760 %lex-param is provided and %pure-parser isn't.
9761
97622003-04-27 Paul Eggert <eggert@twinsun.com>
9763
9764 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
9765 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
9766 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9767 if it is not defined.
9768 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9769
97702003-04-26 Paul Eggert <eggert@twinsun.com>
9771
9772 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9773 Declare to be of type suitable for the ninf value itself, not of
9774 type suitable for the corresponding table, since the latter might
9775 be unsigned but the ninf value might be negative. This fixes a
9776 bug reported by Alexandre Duret-Lutz in
9777 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
9778
9779 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9780 invokes it. We shouldn't invoke it twice because it will attempt
9781 to put error.o in the archive twice. This fixes a glitch reported
9782 by Martin Mokrejs in
9783 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9784
97852003-04-21 Paul Eggert <eggert@twinsun.com>
9786
9787 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9788 to gnulib.
9789
97902003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9791
9792 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9793 Fix obvious typo that results in uncompilable GLR parsers
9794 when both %pure-parser and %locations are used. (trivial change)
9795
97962003-04-17 Paul Eggert <eggert@twinsun.com>
9797
9798 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9799 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9800 Do not insert the expected token via unput, as this runs afoul
9801 of a POSIX-compatibility bug in flex 2.5.31.
9802 All uses changed to BEGIN the parent state,
9803 since we no longer insert the expected token via unput.
9804 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9805 that is no longer emitted after the above change.
9806
9807 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9808 the first one. This change is from Paul Hilfinger, and it fixes
9809 regression reported by Werner Lemberg in
9810 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9811
9812 (resolve_sr_conflict): Don't invoke state_errs_set
9813 unless one or more tokens have been explicitly made errors.
9814 Otherwise, the above change causes Bison to abort.
9815
9816 * tests/existing.at (GNU pic Grammar): New test case, taken from
9817 Lemberg's email.
9818
98192003-03-31 Akim Demaille <akim@epita.fr>
9820
9821 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9822
98232003-03-31 Akim Demaille <akim@epita.fr>
9824
9825 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9826 output.
9827
98282003-03-31 Akim Demaille <akim@epita.fr>
9829
9830 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9831 From Paul Hilfinger.
9832
98332003-03-29 Akim Demaille <akim@epita.fr>
9834
9835 * m4/error.m4: Do not put under dynamic conditions some code which
9836 expansion is under static control.
9837
98382003-03-29 Akim Demaille <akim@epita.fr>
9839
9840 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9841
98422003-03-29 Akim Demaille <akim@epita.fr>
9843
9844 * doc/bison.texinfo (Strings are Destroyed): New.
9845
98462003-03-13 Paul Eggert <eggert@twinsun.com>
9847
9848 * .cvsignore: Add configure.lineno.
9849 * src/.cvsignore: Add yacc.
9850 * tests/.cvsignore: Add testsuite.log.
9851 * doc/fdl.texi: Sync with latest FSF version.
9852
98532003-03-12 Paul Eggert <eggert@twinsun.com>
9854
9855 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9856 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9857 cursor, instead of leaving it undefined. This fixes a bug
9858 reported by Tim Van Holder in
9859 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9860 * tests/input.at (Torturing the Scanner): Test the scanner on
9861 an empty input file, which was Tim Van Holder's test case.
9862
9863 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9864 <sys/resource.h> can be included, include sys/time.h and
9865 sys/times.h first, if available. This works around the SunOS
9866 4.1.4 porting bug reported by Bruce Becker in
9867 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
9868
9869 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9870 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9871 AC_HEADER_SYS_WAIT.
9872
9873 Merge changes from gnulib. This was prompted because the CVS
9874 snapshot didn't build on Solaris 7 due to strnlen problems.
9875
9876 These changes need to be merged back into gnulib:
9877 * lib/hash.c: Include <stdbool.h> unconditionally.
9878 * m4/onceonly.m4 (m4_quote): New macro.
9879 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9880 Quote AC_FOREACH variable-expansions properly.
9881 The 2003-01-03 obstack.h change also needs merging.
9882 {end of changes requiring merging}
9883
9884 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9885 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9886 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9887 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9888 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9889 New files, imported from gnulib.
9890 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9891 above.
9892
9893 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9894 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9895 gnulib sources.
9896
9897 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9898 Add.
9899 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9900 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9901 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9902 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9903 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9904 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9905 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9906 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9907 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9908 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9909 (jm_PREREQ_ARGMATCH): Remove.
9910 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9911 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9912
9913 * src/system.h: Include <stdbool.h> unconditionally.
9914
9915 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9916 assuming at least C89 in the bitset code for some time now.
9917
99182003-03-03 Akim Demaille <akim@epita.fr>
9919
9920 * ro.po: New.
9921
99222003-03-02 Akim Demaille <akim@epita.fr>
9923
9924 * doc/bison.texinfo (Table of Symbols): Reactivate the
9925 documentation for %lex-param, and %parse-param.
9926
99272003-03-02 Akim Demaille <akim@epita.fr>
9928
9929 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9930 generate verbose error messages.
9931 Use the number of tokens as an upper bound in yytname, as it
9932 cannot be a non terminal.
9933
99342003-03-02 Akim Demaille <akim@epita.fr>
9935
9936 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9937 message.
9938
99392003-03-02 Akim Demaille <akim@epita.fr>
9940
9941 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9942 Use them to exercise yycheck overrun.
9943 Based on Andrew Suffield's grammar.
9944
99452003-03-02 Akim Demaille <akim@epita.fr>
9946
9947 Create tests/local.at for Bison generic testing macros.
9948
9949 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9950 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9951 This new file.
9952 * tests/calc.at (AT_CHECK_CALC): Adjust.
9953 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9954 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9955 * tests/local.at: here.
9956 (AT_COMPILE_CXX): Tags the tests using it as c++.
9957 Ignore the test if CXX is not functional.
9958
99592003-03-01 Paul Eggert <eggert@twinsun.com>
9960
9961 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9962 not loc->end, since loc->end might contain garbage and this leads
9963 to undefined behavior on some platforms.
9964 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9965 depend on *loc, so that the reader doesn't give the the false
9966 impression that *loc is initialized.
9967 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9968 does not survive the return.
9969
99702003-03-01 Akim Demaille <akim@epita.fr>
9971
9972 * src/scan-gram.l (code_start): Always initialize it when entering
9973 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9974 yylex invocation. An alternative would be making it static, but
9975 then it starts with the second %%'s beginning, instead of its end.
9976
99772003-02-28 Paul Eggert <eggert@twinsun.com>
9978
9979 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9980 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9981 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9982
99832003-02-26 Paul Eggert <eggert@twinsun.com>
9984
9985 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9986 Remove Sequent/Pyramid discussion (nobody uses them any more).
9987 Merge VMS and MS-DOS discussion; these ports may well be dead
9988 but let's keep mentioning them for now. Put <> around email
9989 addresses. Add copyright notice.
9990
99912003-02-24 Paul Eggert <eggert@twinsun.com>
9992
9993 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9994 to avoid collision with flex use of yylineno.
9995 Problem reported by Bruce Lilly in
9996 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9997 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9998 * data/yacc.c (yy_reduce_print): Likewise.
9999
10000 * config/depcomp: Sync with Automake 1.7.3.
10001
100022003-02-21 Akim Demaille <akim@epita.fr>
10003
10004 * data/lalr1.cc: Use temporary variables instead of casts to
10005 change integer types.
10006 Suggested by Paul Eggert.
10007
100082003-02-21 Akim Demaille <akim@epita.fr>
10009
10010 * doc/bison.texinfo: Use "location" consistently to refer to @n,
10011 to avoid confusions with lalr1.cc's notion of Position.
10012 Suggested by Paul Eggert.
10013
100142003-02-20 Akim Demaille <akim@epita.fr>
10015
10016 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
10017 before initial_columns.
10018 (location.hh): Use consistent variable names when defining the
10019 operator<<.
10020 Use "last" so that we subtract from Positions, not from unsigned.
10021
100222003-02-20 Akim Demaille <akim@epita.fr>
10023
10024 * data/lalr1.cc (position.hh): New subfile, including the extended
10025 and Doxygen'ed documentation of class Position.
10026 (location.hh): Use it.
10027 Document a` la Doxygen.
10028 With the help of Benoit Perrot.
10029
100302003-02-20 Akim Demaille <akim@epita.fr>
10031
10032 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
10033 AT_YACC_IF.
10034 Redefine AT_YYERROR_SEES_LOC_IF using it.
10035 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
10036 not defined.
10037 Don't use the location in yy::Parser::error_ and
10038 yy::Parser::print_ when not %locations.
10039 Activate more lalr1.cc tests.
10040
100412003-02-19 Akim Demaille <akim@epita.fr>
10042
10043 * data/lalr1.cc: When displaying a line number, be sure to make it
10044 an int.
10045
100462003-02-19 Akim Demaille <akim@epita.fr>
10047
10048 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
10049 Remove, useless.
10050 (YYABORT, YYACCEPT, YYERROR): New.
10051 * tests/calc.at: Renable the lalr1.cc test.
10052
100532003-02-19 Akim Demaille <akim@epita.fr>
10054
10055 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
10056 error recovery, mixing with/without pops and discarding of the
10057 lookahead.
10058 Exercise YYERROR.
10059 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
10060
100612003-02-17 Paul Eggert <eggert@twinsun.com>
10062
10063 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
10064 * tests/testsuite.at (AT_COMPILE): Use them.
10065 This fixes the testsuite problem reported by Robert Lentz in
10066 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
10067
100682003-02-12 Paul Eggert <eggert@twinsun.com>
10069
10070 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
10071 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
10072 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
10073 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
10074 Check for malloc failure, for consistency with yacc.c.
10075 (yytname_size): Remove, for consistency with yacc.c.
10076
10077 The bug still remains in data/lalr1.cc, as I didn't have time
10078 to fix it there.
10079
100802003-02-06 Akim Demaille <akim@epita.fr>
10081
10082 * configure.ac (GXX): Rename as...
10083 (CXX): this, to keep the original Autoconf semantics.
10084 Require 2.57.
10085 * data/lalr1.cc: Fix b4_copyright invocations.
10086 If YYDEBUG is not defined, don't depend upon name_ being defined.
10087 (location.hh): Include string and iostream.
10088 (Position::filename): New member.
10089 (Position::Position ()): New.
10090 (operator<< (Position)): New.
10091 (operator- (Position, int)): New.
10092 (Location::first, Location::last): Rename as...
10093 (Location::begin, Location::end): these, to mock the conventional
10094 iterator names.
10095 (operator<< (Location)): New.
10096 * tests/atlocal.in (CXX): New.
10097 * tests/testsuite.at (AT_COMPILE_CXX): New.
10098 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
10099 locations in a more synthetic way.
10100 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
10101 lalr1.cc is used.
10102 Adjust the C locations to match those from Emacs: first column is
10103 column 0.
10104 Change all the expected results.
10105 Conform to the GCS: simplify the locations when applicable.
10106 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
10107 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
10108 these CPP macros with the m4 macros new defined by...
10109 (AT_CHECK_PUSHDEFS): this, i.e.:
10110 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
10111 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
10112 New macros.
10113 (AT_CHECK_POPDEFS): Undefine them.
10114 (AT_CHECK_CALC_LALR1_CC): New.
10115 Use it for the first lalr1.cc test.
10116
101172003-02-04 Akim Demaille <akim@epita.fr>
10118
10119 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
10120 Location as is defined.
10121
101222003-02-04 Akim Demaille <akim@epita.fr>
10123
10124 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
10125 name_ being defined.
10126
101272003-02-03 Paul Eggert <eggert@twinsun.com>
10128
10129 * src/gram.h (start_symbol): Remove unused decl.
10130
10131 Use more-consistent naming conventions for local vars.
10132
10133 * src/derives.c (derives_compute): Change type of local var from
10134 int to rule_number.
10135 * src/gram.c (grammar_rules_partial_print): Likewise.
10136 * src/print.c (print_core): Likewise.
10137 * src/reduce.c (reduce_grammar_tables): Likewise.
10138
10139 * src/gram.c (grammar_dump): Change name of item_number *
10140 local var from r to rp.
10141 * src/nullable.c (nullable_compute): Likewise.
10142
10143 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
10144
10145 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
10146 for symbol or symbol_number var.
10147 * src/reader.c (grammar_start_symbol_set): Likewise.
10148 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
10149 Likewise.
10150 * src/state.c (transitions_to): Likewise.
10151 * src/state.h: Likewise.
10152 * src/tables.c (symbol_number_to_vector_number): Likewise.
10153
10154 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
10155 char * var.
10156
10157 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
10158 var.
10159
10160 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
10161 var.
10162
10163 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
10164 Use str, not s, for char * var. Use ch, not c, for character var.
10165 Use size for size var.
10166
10167 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
10168 char * var.
10169 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
10170 uniqstr var.
10171 * src/uniqstr.h: Likewise.
10172
10173 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10174 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10175 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
10176 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
10177 param to have same name as that of enum, so that we don't use
10178 "s" to stand for a non-state.
10179
101802003-02-02 Akim Demaille <akim@epita.fr>
10181
10182 * src/scan-skel.l: Scan more than one inert character per yylex
10183 invocation.
10184
101852003-02-01 Paul Eggert <eggert@twinsun.com>
10186
10187 Version 1.875a.
10188
10189 * po/LINGUAS: Add ms.
10190
101912003-01-30 Akim Demaille <akim@epita.fr>
10192
10193 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
10194
101952003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10196
10197 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
10198 of $1.
10199
10200 Changes in response to error report by S. Eken: GLR mode does not
10201 handle negative $ indices or $ indices in embedded rules correctly.
10202 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
10203
10204 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
10205 (b4_rhs_location): Ditto.
10206 (yyfill): New function to copy from stack tree into array
10207 incrementally.
10208 (yyuserAction): Modify to allow incremental move of semantic values
10209 to rhs array when in GLR mode.
10210 Define YYFILL to use in user-defined actions to fill semantic array
10211 as needed.
10212 Remove dummy use of yystack, as there is now a guaranteed use.
10213 (yydoAction): Modify to allow incremental move of semantic values
10214 to rhs array when in GLR mode.
10215 (yyresolveAction): Ditto.
10216 (yyglrShiftDefer): Update comment.
10217 (yyresolveStates): Use X == NULL for pointers, not !X.
10218 (yyglrReduce): Ditto.
10219 (yydoAction): Ditto
10220
10221 * tests/glr-regr1.at: Rename to ...
10222 * tests/glr-regression.at: Add new regression test for the problems
10223 described above (adapted from S. Eken).
10224 Update copyright notice.
10225 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
10226 * tests/Makefile.am: Ditto.
10227
102282003-01-28 Paul Eggert <eggert@twinsun.com>
10229
10230 * data/lalr1.cc: Do not use @output_header_name@ unless
10231 b4_defines_flag is set. This fixes two bugs reported by
10232 Tim Van Holder in
10233 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
10234 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
10235
102362003-01-21 Paul Eggert <eggert@twinsun.com>
10237
10238 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
10239 we don't need to worry about yyerrlab1 being reported as an
10240 "unused label" by non-GCC C compilers. The downside is that if
10241 locations are used then a couple of statements are duplicated each
10242 time YYERROR is invoked, but the upside is that the warnings
10243 should vanish.
10244 (yyerrlab1): Move code to YERROR.
10245 (yyerrlab2): Remove. Change uses back to yyerrlab1.
10246 This reverts some of the 2002-12-27 change.
10247
102482003-01-17 Paul Eggert <eggert@twinsun.com>
10249
10250 * src/output.c (symbol_printers_output): Fix typo that led
10251 to core dump. Problem reported by Antonio Rus in
10252 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
10253
102542003-01-13 Akim Demaille <akim@epita.fr>,
10255 Quoc Peyrot <chojin@lrde.epita.fr>,
10256 Robert Anisko <anisko_r@lrde.epita.fr>
10257
10258 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
10259 when the stacks contain one element, as the loop would otherwise
10260 free the last state, and then use the top state (the one we just
10261 popped). This means that the initial elements will not be freed
10262 explicitly, as is the case in yacc.c; it is not a problem, as
10263 these elements have fake values.
10264
102652003-01-11 Paul Eggert <eggert@twinsun.com>
10266
10267 * NEWS: %expect-violations are now just warnings, reverting
10268 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
10269 bootstrapping problem reported by Matthias Klose; see
10270 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
10271 * src/conflicts.c (conflicts_print): Likewise.
10272 * tests/conflicts.at (%expect not enough, %expect too much,
10273 %expect with reduce conflicts): Likewise.
10274 * doc/bison.texinfo (Expect Decl): Document this. Also mention
10275 that the warning is enabled if the number of conflicts changes
10276 (not necessarily increases).
10277
10278 * src/getargs.c (version): Update copyright year.
10279
102802003-01-09 Akim Demaille <akim@epita.fr>
10281
10282 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
10283
102842003-01-08 Paul Eggert <eggert@twinsun.com>
10285
10286 * Makefile.maint (WGETFLAGS):
10287 New macro, containing "-C off" to disable proxy caches.
10288 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
10289 (rel-check): Use $(WGET) instead of wget.
10290
102912003-01-06 Paul Eggert <eggert@twinsun.com>
10292
10293 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
10294 the GLR paper of Scott, Johnstone and Hussain.
10295
102962003-01-04 Paul Eggert <eggert@twinsun.com>
10297
10298 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
10299 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
10300 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
10301 (EXTRA_LIBRARIES): New var, for liby.a.
10302 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
10303 (EXTRA_SCRIPTS): New var, for yacc.
10304
10305 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
10306 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
10307 Problem reported by Nelson H. F. Beebe.
10308
103092003-01-03 Paul Eggert <eggert@twinsun.com>
10310
10311 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
10312 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
10313 when compiling Bison 1.875's `bitset bset = obstack_alloc
10314 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
10315
10316 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
10317 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
10318 grow to a huge size with typical invocation.
10319
10320 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
10321 Use the pattern recommended by Autoconf 2.57, except also protect
10322 against double-definition.
10323 * src/system.h: Likewise.
10324 Portability issues reported by Nelson H. F. Beebe.
10325
10326 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
10327 All uses changed. Provide a definition in both C and C++.
10328 (yytrue, yyfalse): Define even if defined (__cplusplus).
10329
10330 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
10331 Reported by Nelson H. F. Beebe.
10332
10333 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
10334
103352003-01-02 Paul Eggert <eggert@twinsun.com>
10336
10337 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
10338 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
10339 Bug reported by Nelson H. F. Beebe.
10340
103412003-01-01 Paul Eggert <eggert@twinsun.com>
10342
10343 * Version 1.875.
10344
103452002-12-30 Paul Eggert <eggert@twinsun.com>
10346
10347 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
10348 Moved here from...
10349 (<INITIAL>","): Here. This causes stray "," to be treated
10350 more uniformly.
10351
10352 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
10353 last brace in braced code when not in Yacc mode, for compatibility
10354 with Bison 1.35. This resurrects the 2001-12-15 patch to
10355 src/reader.c.
10356
10357 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
10358 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
10359
103602002-12-28 Paul Eggert <eggert@twinsun.com>
10361
10362 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
10363 that of SYM's type. This fixes Debian bug 168069, reported by
10364 Thomas Olsson.
10365
103662002-12-28 Paul Eggert <eggert@twinsun.com>
10367
10368 Version 1.75f.
10369
10370 Switch back to the Yacc style of conflict reports, undoing some
10371 of the 2002-07-30 change.
10372 * doc/bison.texinfo (Understanding): Use Yacc style for
10373 conflict reports. Also, use new way of locating rules.
10374 * src/conflicts.c (conflict_report):
10375 Renamed from conflict_report_yacc, removing the old
10376 'conflict_report'. Translate the entire conflict report at once,
10377 so that we don't assume that "," has the same interpretation in
10378 all languages.
10379 (conflicts_output): Use Yacc-style conflict report for each state,
10380 instead of our more-complicated style.
10381 (conflicts_print): Use Yacc-style conflict report, except print
10382 the input file name when not emulating Yacc.
10383 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
10384 Conflicted Reduction, %expect not enough, %expect too much,
10385 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
10386 * tests/existing.at (GNU Cim Grammar): Likewise.
10387 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
10388
10389 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
10390 fatal): Don't invoke fflush; it's not needed and it might even be
10391 harmful for stdout, as stdout might not be open.
10392 * src/reduce.c (reduce_print): Likewise.
10393
103942002-12-27 Paul Eggert <eggert@twinsun.com>
10395
10396 Fix a bug where error locations were not being recorded correctly.
10397 This problem was originally reported by Paul Hilfinger in
10398 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
10399
10400 * data/yacc.c (yyparse): New local var yylerrsp, to record the
10401 top of the location stack's error locations.
10402 (yyerrlab): Set it. When discarding a token, push its location
10403 onto yylerrsp so that we don't lose track of the error's end.
10404 (yyerrlab1): Now is only the target of YYERROR, so that we can
10405 properly record the location of the action that failed. For GCC
10406 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10407 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10408 (yyerrlab2): New label, which yyerrlab now falls through to.
10409 Compute the error's location by applying YYLLOC_DEFAULT to
10410 the locations of all the symbols that went into the error.
10411 * doc/bison.texinfo (Location Default Action): Mention that
10412 YYLLOC_DEFAULT is also invoked for syntax errors.
10413 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10414 Error locations include the locations of all the tokens that were
10415 discarded, not just the last token.
10416
104172002-12-26 Paul Eggert <eggert@twinsun.com>
10418
10419 * src/files.c: Include quote.h.
10420 (compute_output_file_names): Warn if we detect conflicting
10421 outputs to the same file. This should catch the misunderstanding
10422 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10423
10424 * src/conflicts.c (conflicts_print): If the user specifies
10425 "%expect N", report an error if there are any reduce/reduce
10426 conflicts. This is what the manual says should happen.
10427 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10428 * tests/conflicts.at (%expect with reduce conflicts): New test.
10429
10430 Don't use m4_include on relative file names, as it doesn't work as
10431 desired if there happens to be a file with that name under ".".
10432
10433 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10434 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10435 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10436 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10437 * src/output.c (output_skeleton): Use full path names when
10438 specifying a file to include; don't rely on include path, as
10439 it's unreliable when the working file contains a file with
10440 that name.
10441
104422002-12-25 Paul Eggert <eggert@twinsun.com>
10443
10444 Remove obsolete references to bison.simple and bison.hairy.
10445 Problem mentioned by Aubin Mahe in
10446 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
10447 * data/glr.c: Comment fix.
10448 * doc/bison.1: Remove references. Also, mention "yacc".
10449
10450 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10451 with -g option.
10452
10453 * src/parse-gram.y (declaration): Use enum "report_states" rather
10454 than its numeric value 1.
10455
10456 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10457 opening a new one. This fixes Debian bug 165349, reported by
10458 Bruce Stephens.
10459
104602002-12-24 Paul Eggert <eggert@twinsun.com>
10461
10462 Version 1.75e.
10463
10464 * Makefile.maint (cvs-update): Don't assume that the shell
10465 supports $(...), as Solaris sh doesn't.
10466
10467 * src/parse-gram.y (lloc_default): Remove test for empty
10468 nonterminals at the end, since it didn't change the result.
10469
104702002-12-24 Paul Eggert <eggert@twinsun.com>
10471
10472 If the user does not define YYSTYPE as a macro, Bison now declares it
10473 using typedef instead of defining it as a macro. POSIX requires this.
10474 For consistency, YYLTYPE is also declared instead of defined.
10475
10476 %union directives can now have a tag before the `{', e.g., the
10477 directive `%union foo {...}' now generates the C code
10478 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10479 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10480 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10481 instead of `yyltype'.
10482
10483 `yystype' and `yyltype' are now obsolescent macros instead of being
10484 typedefs or tags; they are no longer documented and will be
10485 withdrawn in a future release.
10486
10487 * data/glr.c (b4_location_type): Remove.
10488 (YYSTYPE): Renamed from yystype.
10489 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10490 (struct YYLTYPE): Renamed from struct yyltype.
10491 (YYLTYPE): Renamed from yyltype.
10492 (yyltype, yystype): New (and obsolescent) macros,
10493 for backward compatibility.
10494 * data/yacc.c: Likewise.
10495
10496 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10497 does not specify a union tag. This is for compatibility with
10498 Solaris 9 yacc.
10499
10500 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10501 const *, since it is now modified by stripping surrounding { }.
10502 (current_braced_code): Remove.
10503 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10504 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10505 trailing " {...}". Now of type <chars>.
10506 (grammar_declaration): Adjust to bundled tokens.
10507 (code_content): Remove; stripping is now done by add_param.
10508 (print_token_value): Print contents of bundled tokens.
10509 (token_name): New function.
10510
10511 * src/reader.h (braced_code, current_braced_code): Remove.
10512 (token_name): New decl.
10513
10514 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10515 token_type, not braced_code code_kind. All uses changed.
10516 (SC_PRE_CODE): New state, for scanning after a keyword that
10517 has (or usually has) an immediately-following braced code.
10518 (token_type): New local var, to keep track of which token type
10519 to return when scanning braced code.
10520 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
10521 <INITIAL>"%parse-param", <INITIAL>"%printer",
10522 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10523 instead of returning a token type immediately.
10524 (<INITIAL>"{"): Set token type.
10525 (<SC_BRACED_CODE>"}"): Use it.
10526 (handle_action_dollar, handle_action_at): Now returns bool
10527 indicating success. Fail if ! current_rule; this prevents a core dump.
10528 (handle_symbol_code_dollar, handle_symbol_code_at):
10529 Remove; merge body into caller.
10530 (handle_dollar, handle_at): Complain in invalid contexts.
10531
10532 * NEWS, doc/bison.texinfo: Document the above.
10533 * NEWS: Fix years and program names in copyright notice.
10534
105352002-12-17 Paul Eggert <eggert@twinsun.com>
10536
10537 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10538 Reporting, Table of Symbols): Omit mentions of %lex-param and
10539 %parse-param from the documentation for now.
10540
105412002-12-15 Paul Eggert <eggert@twinsun.com>
10542
10543 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10544 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10545 lookahead symbol, and which sets yychar in parser actions) and it
10546 disagreed with the Bison documentation. Bug
10547 reported by Andrew Walrond.
10548
10549 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10550 as the caller now does that.
10551 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10552 (YYEMPTY): Parenthesize right hand side, since others use it.
10553 (yyparse): Don't assume that our generated code is the only code
10554 that sets yychar.
10555
105562002-12-13 Paul Eggert <eggert@twinsun.com>
10557
10558 Version 1.75d.
10559
10560 POSIX requires a "yacc" command.
10561 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10562 (MOSTLYCLEANFILES): Add yacc.
10563 (yacc): New rule.
10564 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
10565 as an alias for bison y.
10566
10567 * po/LINGUAS: Add da.
10568
10569 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10570 problem with latest <getopt.h>.
10571 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10572
10573 * doc/fdl.texi: Upgrade to 1.2.
10574 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10575 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10576 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10577 gnulib.
10578 * config/install-sh: Sync with autotools.
10579
10580 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
10581 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10582 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10583 locations are requested.
10584 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10585 locations are requested.
10586
105872002-12-12 Paul Eggert <eggert@twinsun.com>
10588
10589 Remove unportable casts and storage allocation tricks.
10590 While we're at it, remove almost all casts, since they
10591 usually aren't needed and are a sign of trouble.
10592
10593 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10594
10595 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10596 the pointer DSET returned by malloc; this isn't portable.
10597 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10598 Similarly for DERIVES.
10599 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10600 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10601 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10602
10603 * src/derives.c (derives_compute): Do not bother invoking
10604 int_of_rule_number, since rule numbers are integers.
10605
10606 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10607 rather than XMALLOC (char, N).
10608
10609 * src/files.c (filename_split): Rewrite to avoid cast.
10610
10611 * src/gram.h (symbol_number_as_item_number,
10612 item_number_as_symbol_number, rule_number_as_item_number,
10613 item_number_as_rule_number):
10614 Now inline functions rather than macros, to avoid casts.
10615 * src/state.h (state_number_as_int): Likewise.
10616 * src/tables.c (state_number_to_vector_number,
10617 symbol_number_to_vector_number): Likewise.
10618
10619 * src/gram.h (int_of_rule_number): Remove; no longer used.
10620
10621 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10622 since the resulting storage is always stored into.
10623
10624 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10625 where it's needed.
10626
10627 * src/muscle_tab.c (muscle_m4_output):
10628 Now inline. Return bool, not int.
10629 * src/state.c (state_compare): Likewise.
10630 * src/symtab.c (symbol_check_defined,
10631 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10632 hash_compare_symbol, hash_symbol):
10633 Likewise.
10634 * src/uniqstr.c (uniqstr_print): Likewise.
10635 * src/muscle_tab.c (muscle_m4_output_processor):
10636 New function, to avoid casts.
10637 * src/state.c (state_comparator, stage_hasher): Likewise.
10638 * src/symtab.c (symbol_check_defined_processor,
10639 symbol_check_alias_consistency_processor, symbol_pack_processor,
10640 symbol_translation_processor, hash_symbol_comparator,
10641 hash_symbol_hasher): Likewise.
10642 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10643 * src/muscle_tab.c (muscles_m4_output):
10644 Use new functions instead of casting old functions unportably.
10645 * src/state.c (state_hash_new): Likewise.
10646 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10647 symbols_token_translations_init):
10648 Likewise.
10649 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10650
10651 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10652 var instead of casting to long, to avoid casts.
10653 (prepare_states): Use MALLOC rather than alloca, so that we don't
10654 have to worry about alloca.
10655 * src/state.c (state_hash_lookup): Likewise.
10656
10657 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10658 local var instead of casting to unsigned char, to avoid casts.
10659
10660 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10661 STATE_ALLOC): Remove.
10662 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10663 rather than calloc, and use offsetof to avoid allocating slightly
10664 too much storage.
10665 (state_new): Initialize all members.
10666
10667 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10668
10669 * src/symtab.c (symbol_free): Remove; unused.
10670 (symbol_get): Remove cast in lhs of assignment.
10671 (symbols_do): Now static. Accept generic arguments, not
10672 hashing-related ones.
10673
10674 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10675 (symbol_processor): Remove.
10676 (symbols_do): Remove decl; now static.
10677
10678 * src/system.h (alloca): Remove; decl no longer needed.
10679 (<stddef.h>): Include, for offsetof.
10680 (<inttypes.>, <stdint.h>): Include if available.
10681 (uintptr_t): New type, if system lacks it.
10682 (CALLOC, MALLOC, REALLOC): New macros.
10683 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10684 new macros.
10685
10686 * src/tables.c (table_size): Now int, to pacify GCC.
10687 (table_grow, table_ninf_remap): Use signed table size.
10688 (save_row): Don't bother initializing locals when not needed.
10689 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10690 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10691
10692 * src/vcg.h: Correct misspellings.
10693
10694 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10695
10696
10697 * src/getargs.c (getargs): Don't assume EOF == -1.
10698
106992002-12-09 Paul Eggert <eggert@twinsun.com>
10700
10701 Change identifier spellings to avoid collisions with names
10702 that are reserved by POSIX.
10703
10704 Don't use names ending in _t, since POSIX reserves them.
10705 For consistency, remove _e and _s endings -- they're weren't
10706 needed to remove ambiguity. All uses changed.
10707 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10708 turn was just renamed from struniq_t.
10709 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10710 which in turn was just renamed from struniq_processor_t.
10711 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10712 in turn was renamed from hash_compare_struniq_t.
10713 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10714 (state_list): Renamed from state_list_t.
10715 * src/assoc.h (assoc): Renamed from assoc_t.
10716 * src/conflicts.c (enum conflict_resolution): Renamed from
10717 enum conflict_resolution_e.
10718 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10719 (rule_list): Renamed from rule_list_t.
10720 * src/getargs.h (enum trace): Renamed from enum trace_e.
10721 (enum report): Renamed from enum report_e.
10722 * src/gram.h (item_number): Renamed from item_number_t.
10723 (rule_number): Renamed from rule_number_t.
10724 (struct rule_s): Remove the "rule_s" part; not used.
10725 (rule): Renamed from rule_t.
10726 (rule_filter): Renamed from rule_filter_t.
10727 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10728 (goto_list): Renamed from goto_list_t.
10729 * src/lalr.h (goto_number): Renamed from goto_number_t.
10730 * src/location.h (location): Renamed from location_t.
10731 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10732 and moved here from:
10733 * src/muscle_tab.h (muscle_entry_t): here.
10734 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10735 (rule_list): Renamed from rule_list_t.
10736 * src/print_graph.c (static_graph): Renamed from graph.
10737 * src/reader.h (braced_code): Renamed from braced_code_t.
10738 Remove brace_code_e tag.
10739 * src/relation.h (relation_node): Renamed from relation_node_t.
10740 (relation_nodes): Renamed from relation_nodes_t.
10741 (relation): Renamed from relation_t.
10742 * src/state.h (state_number): Renamed from state_number_t.
10743 (struct state): Renamed from struct state_s.
10744 (state): Renamed from state_t.
10745 (transitions): Renamed from transitions_t. Unused (and
10746 misspelled) transtion_s tag removed.
10747 (errs): Renamed from errs_t. Unused errs_s tag removed.
10748 (reductions): Renamed from reductions_t. Unused tag
10749 reductions_s removed.
10750 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10751 (struct symbol_list): Renamed from struct symbol_list_s.
10752 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10753 (struct symbol): Renamed from struct symbol_s.
10754 (symbol): Renamed from symbol_t.
10755 * src/tables.c (vector_number): Renamed from vector_number_t.
10756 (action_number): Renamed from action_t.
10757 * src/tables.h (base_number): Renamed from base_t.
10758 * src/vcg.h (enum color): Renamed from enum color_e.
10759 (enum textmode): Renamed from enum textmode_e.
10760 (enum shape): Renamed from enum shape_e.
10761 (struct colorentry): Renamed from struct colorentry_s.
10762 (struct classname): Renamed from struct classname_s.
10763 (struct infoname): Renamed from struct infoname_s.
10764 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10765 (enum decision): Renamed from enum decision_e.
10766 (enum orientation): Renamed from enum orientation_e.
10767 (enum alignment): Renamed from enum alignment_e.
10768 (enum arrow_mode): Renamed from enum arrow_mode_e.
10769 (enum crossing_type): Renamed from enum crossing_type_e.
10770 (enum view): Renamed from enum view_e.
10771 (struct node): Renamed from struct node_s.
10772 (node): Renamed from node_t.
10773 (enum linestyle): Renamed from enum linestyle_e.
10774 (enum arrowstyle): Renamed from enum arrowstyle_e.
10775 (struct edge): Renamed from struct edge.
10776 (edge): Renamed from edge_t.
10777 (struct graph): Renamed from struct graph_s.
10778 (graph): Renamed from graph_t.
10779 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10780 Rename value_t -> value.
10781 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10782 value_t_as_yystype -> value_as_yystype.
10783
10784 Don't include <errno.h> in the mainstream code, since it
10785 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10786 * lib/get-errno.c, lib/get-errno.h: New files.
10787 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10788 get-errno.c.
10789 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10790 * src/output.c (output_skeleton): Likewise.
10791 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10792 instead of errno.
10793 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10794 Likewise.
10795 (handle_action_dollar, handle_action_at): Likewise.
10796 * src/system.h: Do not include <errno.h>.
10797 (TAB_EXT): Renamed from EXT_TAB.
10798 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10799
10800 Avoid str[a-z]*, since <string.h> reserves that name space.
10801 Change all instances of "struniq" in names to "uniqstr", and
10802 likewise for "STRUNIQ" and "UNIQSTR".
10803 * src/uniqstr.c: Renamed from src/struniq.c.
10804 * src/uniqstr.h: Renamed from src/struniq.h.
10805 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10806 * src/files.c (strsuffix): Remove; unused.
10807 (concat2): Renamed from stringappend. Now static.
10808 * src/files.h (strsuffix, stringappend): Remove; unused.
10809 * src/parse-gram.y (<chars>): Renamed from <string>.
10810 (<uniqstr>): Renamed from <struniq>.
10811 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10812 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10813 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10814 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10815 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10816 (N_EXPAND): Renamed from N_STRETCH.
10817
10818 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10819 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10820 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10821 Remove; unused.
10822 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10823 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10824 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10825 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10826 (BASE_MAXIMUM): Renamed from BASE_MAX.
10827 (BASE_MINIMUM): Renamed from BASE_MIN.
10828 (ACTION_MAX): Remove; unused.
10829 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10830 Unnecessary casts removed from above defines.
10831
10832
10833 Fix misspelling in names.
10834 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10835 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10836 G_NODE_ALIGNEMENT.
10837
10838
10839 * lib/timevar.c (timevar_report): Renamed from time_report,
10840 for consistency with other names.
10841 * lib/timevar.h (timevar_report): New decl.
10842 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10843
10844
10845 Sort include-file uses.
10846
10847 Reorder all include files under src to be in the order "system.h".
10848 then the ../lib include files in angle brackets (alphabetized),
10849 then the . include files in double-quotes (alphabetized). Fix
10850 dependency breakages encountered in this process, as follows:
10851 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10852 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10853 * src/state.h: Include "symtab.h".
10854
108552002-12-08 Paul Eggert <eggert@twinsun.com>
10856
10857 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10858 since this causes problems when __file__ contains character
10859 sequences like "@" that are treated specially by src/scan-skel.l.
10860 Instead, just use the file's basename. This fixes the bug
10861 reported by Martin Mokrejs in
10862 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10863
108642002-12-06 Paul Eggert <eggert@twinsun.com>
10865
10866 Add support for rules that do not have trailing semicolons, as
10867 POSIX requires. Improve the quality of locations in Bison
10868 diagnostics.
10869
10870 * src/location.c: Include <quotearg.h>.
10871 (empty_location): Now const.
10872 (location_print): New function. Follow the recommendation of the
10873 GNU Coding Standards for locations that span file boundaries.
10874 * src/location.h: Do not include <quotearg.h>; no longer needed.
10875 (boundary): New type.
10876 (location_t): Use it. This allows locations to span file boundaries.
10877 All member uses changed: file -> start.file or end.file (as needed),
10878 first_line -> start.line, first_column -> start.column,
10879 last_line -> end.line, last_column -> end.column.
10880 (equal_boundaries): New function.
10881 (LOCATION_RESET, LOCATION_STEP): Remove.
10882 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10883 (empty_location): Now const.
10884 (location_print): New decl.
10885 * src/parse-gram.y (lloc_default): New function, which handles
10886 empty locations more accurately.
10887 (YYLLOC_DEFAULT): Use it.
10888 (%token COLON): Remove.
10889 (%token ID_COLON): New token.
10890 (rules): Use it.
10891 (declarations, rules): Remove trailing semicolon.
10892 (declaration, rules_or_grammar_declaration):
10893 Allow empty (";") declaration.
10894 (symbol_def): Remove empty actions; no longer needed.
10895 (rules_or_grammar_declaration): Remove trailing semicolon.
10896 (semi_colon.opt): Remove.
10897 * src/reader.h: Include location.h.
10898 (scanner_cursor): New decl.
10899 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10900 rolling our own.
10901 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10902 of *loc.
10903 (STEP): Remove. No longer needed, now that adjust_location does
10904 the work. All uses removed.
10905 (scanner_cursor): New var.
10906 (adjust_location): Renamed from extend_location. It now sets
10907 *loc and adjusts the scanner cursor. All uses changed.
10908 Don't bother testing for CR.
10909 (handle_syncline): Remove location arg; now updates scanner cursor.
10910 All callers changed.
10911 (unexpected_end_of_file): Now accepts start boundary of token or
10912 comment, not location. All callers changed. Update scanner cursor,
10913 not the location.
10914 (SC_AFTER_IDENTIFIER): New state.
10915 (context_state): Renamed from c_context. All uses changed.
10916 (id_loc, code_start, token_start): New local vars.
10917 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10918 processing of Yacc white space and equivalents here.
10919 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10920 instead of returning ID immediately, since we need to search for
10921 a subsequent colon.
10922 (<INITIAL>"'", "\""): Save token_start.
10923 (<INITIAL>"%{", "{", "%%"): Save code_start.
10924 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10925 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10926 BEGIN context_state at end, not INITIAL.
10927 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10928 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10929 Return correct token start.
10930 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10931 the start of a character, string or multiline comment is found.
10932 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10933 Reduction): Adjust reported locations to match the more-precise
10934 results now expected.
10935 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10936 * tests/reduce.at (Useless Rules, Reduced Automaton,
10937 Underivable Rules): Likewise.
10938 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10939 or "|"' now that so many other tokens are allowed by the new grammar.
10940
10941 * src/complain.h (current_file): Remove duplicate decl;
10942 current_file is now owned by files.h.
10943 * src/complain.c, src/scan-gram.l: Include files.h.
10944
109452002-12-06 Paul Eggert <eggert@twinsun.com>
10946
10947 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10948 promotes to int; it might be unsigned int.
10949 * data/yacc.c (yy_reduce_print): Likewise.
10950
10951 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10952 be #defined in the prologue, not in the Bison declarations.
10953 This fixes Debian Bug 102878, reported by Shaul Karl.
10954
109552002-12-02 Paul Eggert <eggert@twinsun.com>
10956
10957 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10958 * lib/strtoul.c: New file, from gnulib.
10959 This fixes a porting bug reported by Peter Klein in
10960 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10961
109622002-11-30 Paul Eggert <eggert@twinsun.com>
10963
10964 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10965 and put only a forward declaration in the prologue. This is for
10966 consistency with the other scanner helper functions.
10967
10968 Type clashes now generate warnings, not errors, since it
10969 appears that POSIX may allow some grammars with type clashes.
10970 * src/reader.c (grammar_current_rule_check): Warn about
10971 type clashes instead of complaining.
10972 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10973
10974 Add Yacc library, since POSIX requires it.
10975 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10976 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10977 * lib/main.c, lib/yyerror.c: New files.
10978
10979 gram_error can be static; it need not be extern.
10980 * src/reader.h (gram_error): Remove decl.
10981 * src/parse-gram.y (gram_error): Now static. Add static decl.
10982 (print_token_value): Omit parameter names from forward decl,
10983 for consistency.
10984
109852002-11-29 Paul Eggert <eggert@twinsun.com>
10986
10987 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10988 be declared before being used. E.g., one should typically
10989 declare them in the prologue. Use GNU coding style in examples.
10990 Put "const" consistently after the type it modifies. Mention
10991 that C99 supports "inline". Mention that yyerror traditionally
10992 returns "int".
10993
10994 %parse-param and %lex-param now take just one argument, the
10995 declaration; the argument name is deduced from the declaration.
10996
10997 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10998 Reporting, Table of Symbols): Document this.
10999 * src/parse-gram.y (add_param): New function.
11000 (COMMA): Remove.
11001 (declaration): Implement new rule for %parse-param and %lex-param.
11002 * src/scan-gram.l: "," now elicits a warning, rather than being
11003 a token; this is more compatible with byacc.
11004 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
11005
110062002-11-27 Paul Eggert <eggert@twinsun.com>
11007
11008 Rename identifiers to avoid real and potential collisions.
11009
11010 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
11011 to avoid collision with lex macro described by Bruce Lilly in
11012 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
11013 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11014 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
11015 * src/parse-gram.y (print_token_value): Renamed from yyprint.
11016 All uses changed.
11017 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
11018 The name "yycontrol" violates the name space rules, and this stuff
11019 wasn't being used anyway.
11020 (input): Remove action; this stuff wasn't being used.
11021 (gram_error): Rename local variable yylloc -> loc.
11022 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
11023 (YY_DECL): Don't use "yy" at start of local variables.
11024 All uses changed, e.g., yylloc -> loc.
11025 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
11026 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
11027 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
11028 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
11029
11030 * src/parse-gram.y (gram_error): loc is now const *.
11031 * src/reader.h (gram_error): Likewise.
11032
110332002-11-24 Paul Eggert <eggert@twinsun.com>
11034
11035 Version 1.75c.
11036
11037 * tests/actions.at (Actions after errors): Use an output format
11038 more similar to that of the Printers and Destructors test.
11039 Test the position of the ';' token too.
11040 (Printers and Destructors): Likewise.
11041 (Printers and Destructors: %glr-parser): Remove for now, to avoid
11042 unnecessarily alarming people when the test fails.
11043
11044 * data/yacc.c (yyerrlab1): Move this label down, so that the
11045 parser does not discard the lookahead token if the user code
11046 invokes YYERROR. This change is required for POSIX conformance.
11047
11048 * lib/error.c: Sync with gnulib.
11049
110502002-11-22 Paul Eggert <eggert@twinsun.com>
11051
11052 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
11053 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
11054 * lib/xmalloc.c: Likewise.
11055
110562002-11-20 Paul Eggert <eggert@twinsun.com>
11057
11058 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
11059
110602002-11-20 Paul Eggert <eggert@twinsun.com>
11061
11062 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
11063 should use `if (! x) abort ();' rather than `assert (x);', and
11064 anyway it's one less thing to worry about configuring.
11065
11066 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
11067 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
11068 and replace all instances of assert with abort.
11069 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11070 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
11071
11072 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
11073 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
11074 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
11075 hash_find_entry, hash_rehash, hash_insert): Likewise.
11076 * src/conflicts.c (resolve_sr_conflict): Likewise.
11077 * src/lalr.c (set_goto_map, map_goto): Likewise.
11078 * src/nullable.c (nullable_compute): Likewise.
11079 * src/output.c (prepare_rules, token_definitions_output): Likewise.
11080 * src/reader.c (packgram, reader): Likewise.
11081 * src/state.c (state_new, state_free, state_transitions_set,
11082 state_reduction_find): Likewise.
11083 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
11084 symbol_pack): Likewise.
11085 * src/tables.c (conflict_row, pack_vector): Likewise.
11086 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11087 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11088 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
11089 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
11090
11091 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
11092 (ARGMATCH_CONSTRAINT): New macro.
11093 (ARGMATCH_ASSERT): Use it.
11094
11095 * src/system.h (verify): New macro.
11096 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
11097 rather than assert.
11098 * src/tables.c (tables_generate): Likewise.
11099
11100 * src/struniq.c (struniq_assert): Now returns void, and aborts
11101 if the assertion is false.
11102 (struniq_assert_p): Remove.
11103 * src/struniq.h: Likewise.
11104
111052002-11-18 Paul Eggert <eggert@twinsun.com>
11106
11107 * data/glr.c (yygetLRActions): Replace `yyindex' with
11108 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
11109 This fixes the regression with Sun ONE Studio 7 cc that I reported in
11110 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
11111
111122002-11-18 Akim Demaille <akim@epita.fr>
11113
11114 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
11115 space.
11116 From Tim Van Holder.
11117
111182002-11-17 Paul Eggert <eggert@twinsun.com>
11119
11120 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
11121 to "SyntaxError" for consistency with my 2002-11-15 change.
11122
11123 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
11124 not define to {}, since this breaks the common use of `YYDPRINTF
11125 ((...));' if a single statement is desired (e.g. before `else').
11126 Work around GCC warnings by surrounding corresponding calls with
11127 {} if needed.
11128 (yyhasResolvedValue): Remove unused function.
11129 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
11130 loop body.
11131 (yyreportSyntaxError): Renamed from yyreportParseError.
11132 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
11133 All uses changed.
11134 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
11135 extern when possible. Remove unused initializations.
11136
111372002-11-16 Akim Demaille <akim@epita.fr>
11138
11139 Augment the similarity between GLR and LALR traces.
11140
11141 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
11142 (YY_REDUCE_PRINT): New.
11143 (yyparse): Use them.
11144 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
11145 YYDPRINT here.
11146 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
11147 state reached after the reduction/recovery, since...
11148 (yyparse, yyprocessOneStack): Report the state we are entering in.
11149
111502002-11-16 Akim Demaille <akim@epita.fr>
11151
11152 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
11153 Add support for --trace=skeleton.
11154 * src/scan-skel.l: %option debug.
11155 Scan strings of non-@ or \n instead of character by character.
11156 (scan_skel): Handle trace_skeleton.
11157 (QPUTS): New.
11158 (@output_parser_name@, @output_header_name@): ``Restore'' their
11159 support (used to be M4 macros).
11160 * data/yacc.c: Quote larger chunks, a la glr.c.
11161 * data/lalr1.cc: Likewise.
11162 The header guards are no longer available, so use some other
11163 string than `YYLSP_NEEDED'.
11164
111652002-11-16 Akim Demaille <akim@epita.fr>
11166
11167 Make the ``Printers and Destructors'' test more verbose, taking
11168 `yacc.c''s behavior as (possibly wrong) reference.
11169
11170 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
11171 instead of fprint on stdout.
11172 Set and report the last_line of the symbols.
11173 Consistently display values and locations.
11174
111752002-11-16 Paul Eggert <eggert@twinsun.com>
11176
11177 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
11178
111792002-11-15 Paul Eggert <eggert@twinsun.com>
11180
11181 * tests/actions.at (Actions after errors): New test case.
11182
11183 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
11184 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
11185 tests/action.at, tests/calc.at, tests/conflicts.at,
11186 tests/cxx-type.at, tests/regression.at:
11187 "parse error" -> "syntax error" for POSIX compatibility.
11188 "parsing stack overflow..." -> "parser stack overflow" so
11189 that code matches Bison documentation.
11190
111912002-11-15 Akim Demaille <akim@epita.fr>
11192
11193 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
11194 take two BRACED_CODE, not two string_content.
11195 Free the scanner's obstack when we are done.
11196 (code_content): New.
11197 * tests/calc.at: Adjust.
11198 * doc/bison.texinfo: Adjust.
11199 Also, make sure to include the `,' for these declarations.
11200
112012002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
11202
11203 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
11204 definition; avoids potential autoreconf problems.
11205
112062002-11-15 Akim Demaille <akim@epita.fr>
11207
11208 Always check the value returned by yyparse.
11209
11210 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
11211 returned by yyparse.
11212 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
11213 Adjust calls.
11214 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
11215 returned by yyparse.
11216
112172002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11218
11219 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
11220 on input.at test.
11221
112222002-11-14 Paul Eggert <eggert@twinsun.com>
11223
11224 * src/output.c (output_skeleton): Call xfopen instead of
11225 duplicating xfopen's body.
11226
11227 Fix bugs reported by Nelson H. F. Beebe in
11228 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
11229
11230 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
11231 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
11232 Group compiler. Instead, use "$CC -E bar.c". Include the .h
11233 file twice in the grammar, as an extra check.
11234
11235 * tests/input.at (Torturing the Scanner): Surround the
11236 backslash-newline tests with "#if 0", to make it less likely that
11237 we'll run into compiler bugs. Bring back solitary \ inside
11238 comment, but add a closing comment to work around HP C bug. Don't
11239 test backslash-newline in C character constant.
11240
112412002-11-14 Akim Demaille <akim@epita.fr>
11242
11243 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
11244 status of the compiler.
11245 Calling `exit 1' is no longer needed.
11246 Reported by Nelson H. F. Beebe.
11247
112482002-11-14 Akim Demaille <akim@epita.fr>
11249
11250 * tests/atlocal.in (CPPFLAGS): We have config.h.
11251 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
11252 New.
11253 * tests/actions.at, tests/calc.at, tests/conflicts.at,
11254 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
11255 * tests/regression.at, tests/torture.at: Use them for all the
11256 grammars that are to be compiled.
11257 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
11258 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
11259 * doc/bison.texinfo (GLR Parsers): Document `inline'.
11260
112612002-11-14 Akim Demaille <akim@epita.fr>
11262
11263 * doc/bison.texinfo: Various formatting changes (alignments in
11264 samples, additional @group/@end group, GCS in samples.
11265 Use @deffn instead of simple @table to define the directives,
11266 macros, variables etc.
11267
112682002-11-13 Paul Eggert <eggert@twinsun.com>
11269
11270 Fix some bugs reported by Albert Chin-A-Young in
11271 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
11272
11273 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
11274 -o c"; the HP C compiler chatters during compilation.
11275 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
11276 * tests/headers.at (export YYLTYPE): Likewise.
11277
11278 * tests/input.at (Torturing the Scanner): Remove lines containing
11279 solitary backslashes, as they tickle a bug in the HP C compiler.
11280
11281 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
11282 comments, since they're not portable. Use GNU coding style.
11283
112842002-11-13 Akim Demaille <akim@epita.fr>
11285
11286 * data/yacc.c: Leave bigger chunks of quoted text.
11287 (YYDSYMPRINTF): New.
11288 Use it to report symbol activities.
11289 * data/glr.c (YYDSYMPRINTF): New.
11290 Use it.
11291
112922002-11-12 Paul Eggert <eggert@twinsun.com>
11293
11294 Version 1.75b.
11295
11296 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
11297 (yyglrReduce): Return yyok, not 0.
11298 This should avoid the enumerated-type warnings reported
11299 by Nelson H. F. Beebe in
11300 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
11301
11302 * lib/bbitset.h (BITSET_INLINE): Remove.
11303 * lib/bitset.h [! BITSET_INLINE]: Remove.
11304 (bitset_set, bitset_reset, bitset_test): Rename local vars
11305 to avoid shadowing warnings by GCC.
11306
11307 * data/glr.c (inline): Remove #define. It's the user's
11308 responsibility to #define it away, just like 'const'.
11309 This fixes one of the bugs reported by Nelson H. F. Beebe in
11310 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
11311
11312 * Makefile.maint (po-check): Scan .l and .y files instead of the
11313 .c and the .h files that they generate. This fixes the bug
11314 reported by Tim Van Holder in:
11315 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
11316 Look for N_ as well as for _. Try to avoid matching #define for
11317 N_ and _.
11318 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
11319 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
11320 * src/scan-gram.l: Revamp regular expressions so that " and '
11321 do not confuse xgettext.
11322
11323 * src/struniq.h (struniq_new): Do not declare the return type
11324 to be 'const'; this violates the C standard.
11325 * src/struniq.c (struniq_new): Likewise.
11326
113272002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
11328
11329 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
11330 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
11331 linker.
11332
113332002-11-12 Akim Demaille <akim@epita.fr>
11334
11335 * Makefile.maint: Sync with Autoconf:
11336 (local_updates): New.
11337
113382002-11-12 Akim Demaille <akim@epita.fr>
11339
11340 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
11341
113422002-11-12 Akim Demaille <akim@epita.fr>
11343
11344 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
11345 locations.
11346
113472002-11-12 Akim Demaille <akim@epita.fr>
11348
11349 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
11350 not yyvalue.
11351
113522002-11-12 Akim Demaille <akim@epita.fr>
11353
11354 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
11355 Use it to test the GLR parser.
11356
113572002-11-12 Akim Demaille <akim@epita.fr>
11358
11359 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
11360 defines it.
11361 * data/glr.c (yystos): New.
11362 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
11363 (YYDSYMPRINT): New.
11364 (yyval): Don't define it, it is handled via M4.
11365 (yyrecoverParseError): Free verbosely the discarded symbols.
11366 * data/yacc.c (yysymprint): Remove, rather...
11367 (b4_yysymprint_generate): invoke.
11368 * data/c.m4 (b4_yysymprint_generate): New.
11369 Accept pointers as arguments, as opposed to the version from
11370 yacc.c.
11371 (b4_yydestruct_generate): Likewise.
11372 * tests/cations.at (Printers and Destructors): Use Bison directives
11373 instead of CPP macros.
11374 Don't rely on internal details.
11375
113762002-11-12 Akim Demaille <akim@epita.fr>
11377
11378 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
11379 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
11380 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
11381 it against YYEMPTY and so forth), work on yytoken (i.e., set
11382 it to YYEMPTY etc.).
11383 (yydestruct): Replace with a b4_yydestruct_generate invocation.
11384 (b4_symbol_actions): Remove.
11385 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
11386 for 0, end-of-input.
11387
113882002-11-12 Akim Demaille <akim@epita.fr>
11389
11390 * doc/bison.texinfo (Destructor Decl): New.
11391
113922002-11-12 Akim Demaille <akim@epita.fr>
11393
11394 * src/tables.c (tables_generate): Use free for pointers that
11395 cannot be NULL, not XFREE.
11396 (pack_vector): Use assert, not fatal, for bound violations.
11397 * src/state.c (state_new): Likewise.
11398 * src/reader.c (reader): Likewise.
11399 * src/lalr.c (set_goto_map): Likewise.
11400 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
11401 the file name.
11402
114032002-11-12 Akim Demaille <akim@epita.fr>
11404
11405 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11406 Restore.
11407 * src/scan-gram.l (last_string): Is global to the file, not to
11408 yylex.
11409 * src/parse-gram.y (input): Don't append the epilogue here,
11410 (epilogue.opt): do it here, and free the scanner's obstack.
11411 * src/reader.c (epilogue_set): Rename as...
11412 (epilogue_augment): this.
11413 * data/c.m4 (b4_epilogue): Defaults to empty.
11414
114152002-11-12 Akim Demaille <akim@epita.fr>
11416
11417 * src/getargs.c (long_options): Remove duplicates.
11418 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11419 Remove.
11420 * doc/bison.rnh: Remove.
11421 * doc/bison.texinfo (VMS Invocation): Remove.
11422
114232002-11-12 Akim Demaille <akim@epita.fr>
11424
11425 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11426 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11427
11428 Use struniq for symbols.
11429
11430 * src/symtab.h (symbol_t): The tag member is a struniq.
11431 (symbol_type_set): Adjust.
11432 * src/symtab.c (symbol_new): Takes a struniq.
11433 (symbol_free): Don't free the tag member.
11434 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11435 (hash_compare_symbol, hash_symbol): these.
11436 Use the fact that tags as struniqs.
11437 (symbol_get): Use struniq_new.
11438 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11439 Returns a strniq.
11440 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11441 and type members are struniqs.
11442 * src/reader.c (get_merge_function)
11443 (grammar_current_rule_merge_set): Adjust.
11444 (TYPE, current_type): Are struniq.
11445
11446 Use struniq for file names.
11447
11448 * src/files.h, src/files.c (infile): Split into...
11449 (grammar_file, current_file): these.
11450 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11451 * src/reduce.c (reduce_print): Likewise.
11452 * src/getargs.c (getargs): Likewise.
11453 * src/complain.h, src/complain.c: Likewise.
11454 * src/main.c (main): Call struniqs_new early enough to use it for
11455 file names.
11456 Don't free the input file name.
11457
114582002-11-12 Akim Demaille <akim@epita.fr>
11459
11460 * src/symtab.c (symbol_free): Remove dead deactivated code:
11461 type_name are properly removed.
11462 Don't use XFREE to free items that cannot be NULL.
11463 * src/struniq.h, src/struniq.c: New.
11464 * src/main.c (main): Initialize/free struniqs.
11465 * src/parse-gram.y (%union): Add astruniq member.
11466 (yyprint): Adjust.
11467 * src/scan-gram.l (<{tag}>): Return a struniq.
11468 Free the obstack bit that used to store it.
11469 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11470
114712002-11-11 Paul Eggert <eggert@twinsun.com>
11472
11473 Revamp to fix many (but not all) of the C- and M4-related quoting
11474 problems. Among other things, this fixes the Bison bug reported
11475 by Jan Hubicka when processing the Bash grammar; see:
11476 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
11477
11478 Use new @ escapes consistently. Represent brackets with @{ and @}
11479 rather than @<:@ and @:>@, since this works a bit better with dumb
11480 editors like vi. Represent @ with @@, since @ is now consistently
11481 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11482 __ofile__, to avoid unexpected expansions. Similarly, use @output
11483 rather than #output.
11484
11485 * data/c.m4 (b4_copyright): Omit file name from comment, since
11486 the file name could contain "*/".
11487 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11488 be quoted. All uses changed.
11489
11490 * data/glr.c: Use new @ escapes consistently.
11491 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11492 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11493 Remove, since they couldn't handle arbitrary characters in file
11494 names.
11495 * data/lalr1.cc: Likewise.
11496 * data/yacc.c: Likewise.
11497
11498 * src/files.c (output_infix): Remove; all uses removed.
11499 * src/files.h: Likewise.
11500
11501 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11502 mishandled funny characters in file names, and anyway it isn't
11503 needed any more.
11504 * data/yacc.c: Likewise.
11505 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11506
11507 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11508 * data/yacc.c: Likewise.
11509
11510 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11511 strings now.
11512 (muscle_init): Quote filename as a C string.
11513 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11514 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11515 * src/output.c (escaped_file_name_output): New function.
11516 (prepare_symbols): Quote tokens for M4.
11517 (prepare): Don't insert output_infix, output_prefix,
11518 output_parser_name, output_header_name; this is now down by scan-skel.
11519 Insert skeleton as a C string.
11520
11521 * src/output.c (user_actions_output, symbol_destructors_output,
11522 symbol_printers_output): Quote filenames for C and M4.
11523 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11524
11525 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11526 escapes other than \\ and \'; this simplifies the code.
11527 (<SC_STRING>): Likewise, for \\ and \".
11528 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11529 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11530 Use new escapes @{ and @} for [ and ].
11531
11532 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11533 them with auto vars.
11534 Switch to new escape scheme, where @ is the escape character uniformly.
11535 Abort if a stray escape character is found. Avoid unbounded input
11536 buffer when parsing non-escaped text.
11537
11538 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11539 __oline__, #output, $@, and @{ do not have unintended meanings.
11540
115412002-11-09 Paul Eggert <eggert@twinsun.com>
11542
11543 Fix the test failure due to GCC warnings described in
11544 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
11545 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11546 evaluate to 0 if it's impossible for NINF to be in the respective
11547 table.
11548 (yygetLRActions, yyrecoverParseError): Use them.
11549
11550 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11551 counted in the token inserted at end of file. Now takes
11552 location_t *, not location_t, so that the location can be
11553 adjusted. All uses changed.
11554
11555 * tests/regression.at (Invalid inputs): Adjust wording in
11556 diagnostic to match the new behavior.
11557
11558 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11559 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11560 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11561 abort ();'. This reduces the runtime of the "Many lookaheads"
11562 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11563 GCC 3.2.
11564
115652002-11-07 Paul Eggert <eggert@twinsun.com>
11566
11567 * src/parse-gram.y (CHARACTER): Remove unused token.
11568 All uses removed.
11569
11570 * src/scan-gram.l: Remove stack option. We no longer use the
11571 stack, since the stack was never deeper than 1; instead, use the
11572 new auto var c_context to record the stacked value.
11573
11574 Remove nounput option. At an unexpected end of file, we now unput
11575 the minimal input necessary to end cleanly; this simplifies the
11576 code.
11577
11578 Avoid unbounded token sizes where this is easy.
11579
11580 (unexpected_end_of_file): New function.
11581 Use it to systematize the error message on unexpected EOF.
11582 (last-string): Now auto, not static.
11583 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11584 (scanner_last_string_free): Remove; not used.
11585 (percent_percent_count): Move decl to just before use.
11586 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11587 not the (never otherwised-used) CHARACTER.
11588
115892002-11-07 Akim Demaille <akim@epita.fr>
11590
11591 Let yyerror always receive the msg as last argument, so that
11592 yyerror can be variadic.
11593
11594 * data/yacc.c (b4_yyerror_args): New.
11595 Use it when calling yyerror.
11596 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11597 Use it when calling yyerror.
11598 * doc/bison.texinfo (Error Reporting): Adjust.
11599 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11600 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11601
116022002-11-06 Akim Demaille <akim@epita.fr>
11603
11604 #line should have quoted strings.
11605 Ideally, this should be done by m4_quotearg.
11606
11607 * src/scan-skel.l: Include quotearg.h.
11608 Quote __ofile__.
11609 * src/output.c (symbol_printers_output)
11610 (symbol_destructors_output): Quote the file name.
11611
116122002-11-06 Akim Demaille <akim@epita.fr>
11613
11614 * tests/regression.at (Invalid inputs): Adjust to the recent
11615 messages.
11616
116172002-11-06 Akim Demaille <akim@epita.fr>
11618
11619 Restore --no-lines.
11620 Reported by Jim Kent.
11621
11622 * data/c.m4 (b4_syncline): New.
11623 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11624 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11625 * src/output.c (user_actions_output): Likewise.
11626 (prepare): Define 'b4_synclines_flag'.
11627 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
11628
116292002-11-06 Akim Demaille <akim@epita.fr>
11630
11631 * src/main.c (main): Free `infile'.
11632 * src/scan-gram.l (handle_syncline): New.
11633 Recognize `#line'.
11634 * src/output.c (user_actions_output, symbol_destructors_output)
11635 (symbol_printers_output): Use the location's file name, not
11636 infile.
11637 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11638
116392002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11640
11641 * src/tables.c (matching_state): Don't allow states to match if
11642 either has GLR conflict entries.
11643
116442002-11-05 Paul Eggert <eggert@twinsun.com>
11645
11646 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11647 "integer out of range" rather than "invalid value".
11648 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11649 accordingly.
11650
11651 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11652 Also, remove one static variable in the scanner.
11653
11654 * src/scan-gram.l (braces_level): Now auto, not static.
11655 Initialize to zero if the compiler is being picky.
11656 (INITIAL): Clear braces_level instead of incrementing it.
11657 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11658 as POSIX 1003.1-2001 requires.
11659 * src/system.h (IF_LINT): New macro, taken from coreutils.
11660 * configure.ac: Define "lint" if --enable-gcc-warnings.
11661
116622002-11-05 Akim Demaille <akim@epita.fr>
11663
11664 * src/scan-gram.l: When it starts with `%', complain about the
11665 whole directive, not just that `invalid character: %'.
11666
116672002-11-04 Akim Demaille <akim@epita.fr>
11668
11669 * Makefile.maint: Update from Autoconf.
11670 (update, cvs-update, po-update, do-po-update): New.
11671
116722002-11-04 Akim Demaille <akim@epita.fr>
11673
11674 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11675 and yyerror.
11676 Have yyerror `use' its arguments.
11677 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11678 returns true when location & yacc & pure & parse-param.
11679 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11680
116812002-11-04 Akim Demaille <akim@epita.fr>
11682
11683 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11684 clashes.
11685 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11686 font-lock-mode.
11687 Use complain_at.
11688 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11689 slot 0.
11690
116912002-11-03 Paul Eggert <eggert@twinsun.com>
11692
11693 * src/reader.c (get_merge_function, grammar_current_rule_check):
11694 Use consistent diagnostics for reporting type name clashes.
11695 Quote the types with <>, for consistency with Yacc.
11696 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11697
116982002-11-03 Akim Demaille <akim@epita.fr>
11699
11700 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11701 New.
11702 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11703 (b4_parse_param): Remove.
11704 Use b4_identification.
11705 Propagate b4_pure_args where needed to pass them to yyerror.
11706 * data/glr.m4 (b4_parse_param): Remove.
11707 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11708 (b4_lpure_formals): New.
11709 Use b4_identification.
11710 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11711 b4_user_formals and b4_user_args.
11712 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11713 (yyreportAmbiguity): When using a pure parser, also need
11714 the location, and the parse-params.
11715 Adjust callers.
11716 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11717 When using a pure parser, also need the parse-params.
11718 Adjust callers.
11719 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11720 (%pure-parser + %parse-param) LALR and GLR parsers.
11721 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11722 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11723 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11724 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11725 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11726 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11727 * doc/bison.texinfo: Untabify the whole file.
11728 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11729 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11730 (Error Reporting): Adjust to these new directives.
11731 Document %error-verbose, deprecate YYERROR_VERBOSE.
11732
117332002-11-03 Akim Demaille <akim@epita.fr>
11734
11735 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11736 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11737 command line options.
11738 * tests/cxx-type.at: Formatting changes.
11739
117402002-11-03 Paul Eggert <eggert@twinsun.com>
11741
11742 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11743 to count columns correctly, and to check for invalid inputs.
11744
11745 Use mbsnwidth to count columns correctly. Account for tabs, too.
11746 Include mbswidth.h.
11747 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11748 (extend_location): New function.
11749 (YY_LINES): Remove.
11750
11751 Handle CRLF in C code rather than in Lex code.
11752 (YY_INPUT): New macro.
11753 (no_cr_read): New function.
11754
11755 Scan UCNs, even though we don't fully handle them yet.
11756 (convert_ucn_to_byte): New function.
11757
11758 Handle backslash-newline correctly in C code.
11759 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11760 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11761 all uses changed.
11762 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11763 Use {splice} wherever C allows backslash-newline.
11764 YY_STEP after space, newline, vertical-tab.
11765 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
11766
11767 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11768
11769 ({int}, handle_action_dollar, handle_action_at): Check for integer
11770 overflow.
11771
11772 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11773
11774 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11775 as well as \000. Check for UCHAR_MAX, not 255.
11776 Allow \x with an arbitrary positive number of digits, as in C.
11777 Check for overflow here.
11778 Allow \? and UCNs, for compatibility with C.
11779
11780 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11781 with quote slot used by complain_at.
11782
11783 * tests/input.at: Add tests for backslash-newline, m4 quotes
11784 in symbols, long literals, and funny escapes in strings.
11785
11786 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11787 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11788 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11789 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11790 * m4/mbswidth.m4: New file, from GNU coreutils.
11791
11792 * doc/bison.texinfo (Grammar Outline): Document // comments.
11793 (Symbols): Document that trigraphs have no special meaning in Bison,
11794 nor is backslash-newline allowed.
11795 (Actions): Document that trigraphs have no special meaning.
11796
11797 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11798 no longer used.
11799
118002002-11-02 Paul Eggert <eggert@twinsun.com>
11801
11802 * src/reader.c: Don't include quote.h; not needed.
11803 (get_merge_function): Reword warning to be consistent with
11804 type clash diagnostic in grammar_current_rule_check.
11805
11806 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11807 bug in trigraph handling.
11808
11809 * src/output.c (prepare_symbols): When printing token names,
11810 escape "[" as "@<:@" and likewise for "]".
11811
11812 * src/system.h (errno): Remove declaration, as we are now
11813 assuming C89 or better, and C89 guarantees errno.
11814
118152002-10-30 Paul Eggert <eggert@twinsun.com>
11816
11817 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11818 Check for close failures.
11819 * src/files.h (xfclose): Return void, not int, since it always
11820 returned zero.
11821 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11822 indicates one.
11823 * src/output.c (output_skeleton): Use xfclose rather than fclose
11824 and ferror. xfclose now checks ferror.
11825
11826 * data/glr.c (YYLEFTMOST_STATE): Remove.
11827 (yyreportTree): Use a stack-based leftmost state. This avoids
11828 our continuing battles with bogus warnings about initializers.
11829
118302002-10-30 Akim Demaille <akim@epita.fr>
11831
11832 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11833 #if.
11834
118352002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11836
11837 * tests/glr-regr1.at: New test for reported regressions.
11838 * tests/testsuite.at: Add glr-regr1.at test.
11839 * tests/Makefile.am: Add glr-regr1.at test.
11840
118412002-10-24 Paul Eggert <eggert@twinsun.com>
11842
11843 Version 1.75a.
11844
11845 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11846 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11847 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11848 Don't assume strdup exists; POSIX says its an XSI extension.
11849 Check for buffer overflow on input.
11850
118512002-10-24 Akim Demaille <akim@epita.fr>
11852
11853 * src/output.c (output_skeleton): Don't disable M4sugar comments
11854 too soon: it results in comments being expanded.
11855 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11856 first output.
11857
118582002-10-24 Akim Demaille <akim@epita.fr>
11859
11860 * data/yacc.c (m4_int_type): New.
11861 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11862 char' as only yacc.c wants K&R portability.
11863 * data/glr.c (yysigned_char): Remove.
11864 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11865 Reported by Quoc Peyrot.
11866
118672002-10-23 Paul Eggert <eggert@twinsun.com>
11868
11869 * src/main.c (main): With --trace=time, report times even if a
11870 non-fatal error occurs. Formerly, the times were reported in some
11871 such cases but not in others.
11872 * src/reader.c (reader): Just return if a complaint has been issued,
11873 instead of exiting, so that 'main' can report times.
11874
118752002-10-22 Akim Demaille <akim@epita.fr>
11876
11877 * src/system.h: Include sys/types.
11878 Reported by Bert Deknuydt.
11879
118802002-10-23 Paul Eggert <eggert@twinsun.com>
11881
11882 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11883 Suggested by Art Haas.
11884
118852002-10-22 Paul Eggert <eggert@twinsun.com>
11886
11887 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11888 decl; not needed any more.
11889 * src/main.c (main): Use return to exit, undoing yesterday's change.
11890 The last OS that we could find where this wouldn't work is
11891 SunOS 3.5, and that's too old to worry about now.
11892
11893 * data/glr.c (struct yyltype): Define members even when not
11894 doing locations. This is more consistent with yacc.c, and it
11895 works around the following bug reports:
11896 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11897 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
11898
11899 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11900 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11901 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11902
119032002-10-22 Akim Demaille <akim@epita.fr>
11904
11905 * data/README: New.
11906
119072002-10-21 Paul Eggert <eggert@twinsun.com>
11908
11909 Be consistent about 'bool'; the old code used an enum in one
11910 module and an int in another, and this violates the C standard.
11911 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11912 * configure.ac (AC_HEADER_STDBOOL): Add.
11913 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11914 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11915 * src/symtab.c (hash_compare_symbol_t): Likewise.
11916 * src/system.h (bool, false, true): Use a definition consistent
11917 with ../lib/hash.c. All uses changed.
11918
11919 * src/complain.c (warning_issued): Renamed from warn_message_count,
11920 so that we needn't worry about integer overflow (!).
11921 Now of type bool. All uses changed.
11922 (complaint_issued): Renamed from complain_message_count; likewise.
11923
11924 * src/main.c (main): Use exit to exit with failure.
11925
11926 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11927 rather than 1 and 0.
11928 * src/main.c (main): Likewise.
11929 * src/getargs.c (getargs): Likewise.
11930 * src/reader.c (reader): Likewise.
11931
11932 * src/getarg.c (getargs): Remove duplicate code for
11933 "Try `bison --help'".
11934
11935 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11936 What was that "2" for?
11937
11938 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11939 * src/getargs.c (usage): Likewise.
11940
11941 * src/getargs.c (getargs): When there are too few operands, report
11942 the last one. When there are too many, report the first extra
11943 one. This is how diffutils does it.
11944
119452002-10-20 Paul Eggert <eggert@twinsun.com>
11946
11947 Remove K&R vestiges.
11948 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11949 * src/complain.c (VA_START): Remove. Assume prototypes.
11950 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11951 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11952 fatal): Assume prototypes.
11953 * src/complain.h: Assume prototypes.
11954 * src/system.h (PARAMS): Remove.
11955 Include <limits.h> unconditionally, since it's guaranteeed even
11956 for a freestanding C89 compiler.
11957 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11958 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11959
119602002-10-20 Akim Demaille <akim@epita.fr>
11961
11962 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11963 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11964 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11965 (yyresolveStates, yyresolveAction, yyresolveStack)
11966 (yyprocessOneStack): Use them.
11967 (yy_reduce_print): New.
11968 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11969
119702002-10-20 Akim Demaille <akim@epita.fr>
11971
11972 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11973 arguments and output `void'.
11974 (b4_c_function): Rename as...
11975 (b4_c_function_def): this.
11976 (b4_c_function_decl, b4_c_ansi_function_def)
11977 (b4_c_ansi_function_decl): New.
11978 Change the interpretation of the arguments: before `int, foo', now
11979 `int foo, foo'.
11980 * data/yacc.c (yyparse): Prototype and define thanks to these.
11981 Adjust b4_c_function_def uses.
11982 * data/glr.c (yyparse): Likewise, but ANSI only.
11983
119842002-10-20 Akim Demaille <akim@epita.fr>
11985
11986 * src/output.c (prepare): Move the definition of `tokens_number',
11987 `nterms_number', `undef_token_number', `user_token_number_max'
11988 to...
11989 (prepare_tokens): Here.
11990 (prepare_tokens): Rename as...
11991 (prepare_symbols): this.
11992 (prepare): Move the definition of `rules_number' to...
11993 (prepare_rules): here.
11994 (prepare): Move the definition of `last', `final_state_number',
11995 `states_number' to...
11996 (prepare_states): here.
11997 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11998
119992002-10-20 Akim Demaille <akim@epita.fr>
12000
12001 * src/tables.h, src/tables.c, src/output.c: Comment changes.
12002
120032002-10-20 Akim Demaille <akim@epita.fr>
12004
12005 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
12006 * data/c.m4: here.
12007
120082002-10-20 Akim Demaille <akim@epita.fr>
12009
12010 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
12011 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
12012 `pair'.
12013 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
12014 `name' to...
12015 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
12016 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
12017 These.
12018
120192002-10-19 Paul Eggert <eggert@twinsun.com>
12020
12021 Do not create a temporary file, as that involves security and
12022 cleanup headaches. Instead, use a pair of pipes.
12023 Derived from a suggestion by Florian Krohm.
12024 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
12025 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
12026 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
12027 (BISON_PREREQ_SUBPIPE): Add.
12028 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
12029 Add subpipe.h, subpipe.c.
12030 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
12031 * po/POTFILES.in: Add lib/subpipe.c.
12032 * src/output.c: Include "subpipe.h".
12033 (m4_invoke): Remove decl.
12034 (scan_skel): New decl.
12035 (output_skeleton): Use pipe rather than temporary file for m4 input.
12036 Check that m4sugar.m4 is readable, to avoid deadlock.
12037 Check for pipe I/O error.
12038 * src/scan-skel.l (readpipe): Remove decl.
12039 (scan_skel): New function, to be used in place of m4_invoke.
12040 Read from stream rather than file.
12041
12042 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
12043 float, as this generates a warning on Solaris 8 + GCC 3.2 with
12044 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
12045 this generates a more-accurate value anyway.
12046
12047 * lib/timevar.c (timervar_accumulate): Rename locals to
12048 avoid confusion with similarly-named more-global.
12049 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
12050
12051 * src/output.c (prepare): Use xstrdup to convert char const *
12052 to char *, to avoid GCC warning.
12053
120542002-10-19 Akim Demaille <akim@epita.fr>
12055
12056 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
12057 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
12058 Use them to have `calc.y' ready for %pure-parser.
12059 * data/yacc.c (YYLEX): Pass a yylex return type to
12060 b4_c_function_call.
12061
120622002-10-19 Akim Demaille <akim@epita.fr>
12063
12064 Prototype support of %lex-param and %parse-param.
12065
12066 * src/parse-gram.y: Add the definition of the %lex-param and
12067 %parse-param tokens, plus their rules.
12068 Drop the `_' version of %glr-parser.
12069 Add the "," token.
12070 * src/scan-gram.l (INITIAL): Scan them.
12071 * src/muscle_tab.c: Comment changes.
12072 (muscle_insert, muscle_find): Rename `pair' as `probe'.
12073 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
12074 (muscle_entry_s): The `value' member is no longer const.
12075 Adjust all dependencies.
12076 * src/muscle_tab.c (muscle_init): Adjust: use
12077 MUSCLE_INSERT_STRING.
12078 Initialize the obstack earlier.
12079 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
12080 (muscle_pair_list_grow): New.
12081 * data/c.m4 (b4_c_function_call, b4_c_args): New.
12082 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
12083 * tests/calc.at: Use %locations, not --locations.
12084 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
12085
120862002-10-19 Akim Demaille <akim@epita.fr>
12087
12088 * src/getargs.c (usage): Take status as argument and exit
12089 accordingly.
12090 Report the traditional `Try ... --help' message when status != 0.
12091 (usage, version): Don't take a FILE * as arg, it is pointless.
12092 (getargs): When there is an incorrect number of arguments, make it
12093 an error, and report it GNUlically thanks to `usage ()'.
12094
120952002-10-18 Paul Eggert <eggert@twinsun.com>
12096
12097 * data/glr.c (yyreportParseError): Don't assume that sprintf
12098 yields the length of the printed string, as this is not true
12099 on SunOS 4.1.4. Reported by Peter Klein.
12100
12101 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
12102 * tests/conflicts.at (%nonassoc and eof): Likewise.
12103 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
12104
121052002-10-17 Akim Demaille <akim@epita.fr>
12106
12107 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
12108 * src/getargs.c (trace_types, trace_args): Adjust.
12109 * src/reader.c (grammar_current_rule_prec_set)
12110 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
12111 Standardize error messages.
12112 And s/@prec/%prec/!
12113 (reader): Use trace_flag to enable scanner/parser debugging,
12114 instead of an adhoc scheme.
12115 * src/scan-gram.l: Remove trailing debugging code.
12116
121172002-10-16 Paul Eggert <eggert@twinsun.com>
12118
12119 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
12120 MUSCLE_TAB_H.
12121
12122 * NEWS: Officially drop support for building Bison with K&R C,
12123 since it didn't work anyway and it's not worth worrying about.
12124 * Makefile.maint (wget_files): Remove ansi2knr.c.
12125 (ansi2knr.c-url_prefix): Remove.
12126 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
12127 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12128 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12129
121302002-10-15 Paul Eggert <eggert@twinsun.com>
12131
12132 Stop using the "enum_" trick for K&R-style function definitions;
12133 it confused me, and I was the author! Instead, assume that people
12134 who want to use K&R C compilers (when using these modules in GCC,
12135 perhaps?) will run ansi2knr.
12136
12137 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
12138 All uses of "enum_" changed to "enum ".
12139 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12140 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12141
12142 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
12143 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
12144 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
12145 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
12146 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
12147 abitset_not, abitset_ones, abitset_or, abitset_or_and,
12148 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
12149 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
12150 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
12151 Use function prototypes; this removes the need for declaring
12152 static functions simply to provide their prototypes.
12153 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
12154 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
12155 bitset_count_, bitset_create, bitset_dump, bitset_first,
12156 bitset_free, bitset_init, bitset_last, bitset_next,
12157 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
12158 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
12159 bitset_print, bitset_release_memory, bitset_toggle_,
12160 bitset_type_choose, bitset_type_get, bitset_type_name_get,
12161 debug_bitset): Likewise.
12162 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
12163 * lib/bitset_stats.c (bitset_log_histogram_print,
12164 bitset_percent_histogram_print, bitset_stats_and,
12165 bitset_stats_and_cmp, bitset_stats_and_or,
12166 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
12167 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
12168 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
12169 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
12170 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
12171 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
12172 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
12173 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
12174 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
12175 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
12176 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
12177 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
12178 bitset_stats_zero): Likewise.
12179 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12180 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12181 bitsetv_dump, debug_bitsetv): Likewise.
12182 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
12183 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
12184 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
12185 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
12186 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
12187 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
12188 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
12189 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
12190 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
12191 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
12192 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
12193 Likewise.
12194 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
12195 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
12196 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
12197 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
12198 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
12199 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
12200 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
12201 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
12202 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
12203 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
12204 lbitset_xor_cmp, lbitset_zero): Likewise.
12205
122062002-10-14 Akim Demaille <akim@epita.fr>
12207
12208 Version 1.75.
12209
122102002-10-14 Akim Demaille <akim@epita.fr>
12211
12212 * tests/Makefile.am (maintainer-check-posix): New.
12213
122142002-10-14 Akim Demaille <akim@epita.fr>
12215
12216 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
12217 member.
12218
122192002-10-14 Akim Demaille <akim@epita.fr>
12220
12221 * src/tables.c (table_ninf_remap): base -> tab.
12222 Reported by Matt Rosing.
12223
122242002-10-14 Paul Eggert <eggert@twinsun.com>
12225
12226 * tests/action.at, tests/calc.at, tests/conflicts.at,
12227 tests/cxx-type.at, tests/headers.at, tests/input.at,
12228 tests/regression.at, tests/synclines.at, tests/torture.at:
12229 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
12230 so that the tests still work even if POSIXLY_CORRECT is set.
12231 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
12232
12233 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
12234 for portability to K&R hosts. Fix typo: signed char is guaranteed
12235 only to 127, not to 128.
12236 * data/glr.c (yysigned_char): New type.
12237 * data/yacc.c (yysigned_char): Likewise.
12238 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
12239
122402002-10-13 Paul Eggert <eggert@twinsun.com>
12241
12242 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
12243 true due to limited range of data type" warning from GCC.
12244
12245 * data/c.m4 (b4_token_defines): Protect against double-inclusion
12246 by wrapping enum yytokentype's definition inside #ifndef
12247 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
12248
122492002-10-13 Akim Demaille <akim@epita.fr>
12250
12251 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
12252 Un yy- yyrhs to avoid the name clash with the global YYRHS.
12253
122542002-10-13 Akim Demaille <akim@epita.fr>
12255
12256 * Makefile.maint: Update from Autoconf 2.54.
12257 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
12258
122592002-10-13 Akim Demaille <akim@epita.fr>
12260
12261 * src/print.c (print_state): Separate the list of solved conflicts
12262 from the other items.
12263 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
12264
122652002-10-13 Akim Demaille <akim@epita.fr>
12266
12267 Let nondeterministic skeletons be usable with deterministic
12268 tables.
12269
12270 With the patch, GAWK compiled by GCC without -O2 passes its test
12271 suite using a GLR parser driven by LALR tables. It fails with -O2
12272 because `struct stat' gives two different answers on my machine:
12273 88 (definition of an auto var) and later 96 (memset on this var).
12274 Hence the stack is badly corrumpted. The headers inclusion is to
12275 blame: if I move the awk.h inclusion before GLR's system header
12276 inclusion, the two struct stat have the same size.
12277
12278 * src/tables.c (pack_table): Always create conflict_table.
12279 (token_actions): Always create conflict_list.
12280 * data/glr.c (YYFLAG): Remove, unused.
12281
122822002-10-13 Akim Demaille <akim@epita.fr>
12283
12284 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
12285 (O0FLAGS): New.
12286 (VALGRIND, GXX): New.
12287 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
12288 * tests/bison.in: Run $PREBISON a pre-command.
12289 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
12290 (maintainer-check-g++): New.
12291 * Makefile.am (maintainer-check): New.
12292
122932002-10-13 Akim Demaille <akim@epita.fr>
12294
12295 * data/glr.c: Formatting changes.
12296 Tweak some trace messages to match yacc.c's.
12297
122982002-10-13 Akim Demaille <akim@epita.fr>
12299
12300 GLR parsers sometimes raise parse errors instead of performing the
12301 default reduction.
12302 Reported by Charles-Henry de Boysson.
12303
12304 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
12305 check the length of the traces when %glr.
12306 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
12307 GLR's traces.
12308 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
12309 Test GLR parsers.
12310 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
12311 (yyltype): Remove the yy prefix from the member names.
12312 (yytable): Complete its comment.
12313 (yygetLRActions): Map error action number from YYTABLE from
12314 YYTABLE_NINF to 0.
12315 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
12316 (which was a bug: it should have been YYTABEL_NINF, and yet it was
12317 not satisfying as we could compare an YYACTION computed from
12318 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
12319 only value for error actions.
12320 (yyreportParseError): In verbose parse error messages, don't issue
12321 `error' in the list of expected tokens.
12322 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
12323 next action to perform to match glr.c's decoding.
12324 (yytable): Complete its comment.
12325
123262002-10-13 Paul Eggert <eggert@twinsun.com>
12327
12328 Fix problem reported by Henrik Grubbstroem in
12329 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
12330 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
12331 because the Bison parser reads the second action before reducing
12332 the first one.
12333 * src/scan-gram.l (rule_length): New static var.
12334 Use it to keep track of the rule length in the scanner, since
12335 we can't expect the parser to be in lock-step sync with the scanner.
12336 (handle_action_dollar, handle_action_at): Use this var.
12337 * tests/actions.at (Exotic Dollars): Test for the problem.
12338
123392002-10-12 Paul Eggert <eggert@twinsun.com>
12340
12341 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
12342 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
12343 Include <sys/time.h> when checking for clock_t and struct tms.
12344 Use same include order as source.
12345 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
12346 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
12347
12348 * lib/timevar.c: Update copyright date and clarify comments.
12349 (get_time) [IN_GCC]: Keep the GCC version for reference.
12350
12351 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
12352 GCC version as of today, then merge Bison's changes.
12353 Change "GCC" to "Bison" in copyright notice. timevar.def's
12354 author is Akim, so change that too.
12355
12356 * src/reader.c (grammar_current_rule_check):
12357 Don't worry about the default action if $$ is untyped.
12358 Prevents bogus warnings reported by Jim Gifford in
12359 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
12360
12361 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
12362 * data/glr.c, data/lalr1.cc, data/yacc.c:
12363 Output token definitions before the first part of user declarations.
12364 Fixes compatibility problem reported by Jim Gifford for kbd in
12365 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
12366
123672002-10-11 Paul Eggert <eggert@twinsun.com>
12368
12369 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
12370 (yyparse): here. This undoes some of the 2002-07-25 change.
12371 Compatibility problem reported by Ralf S. Engelschall with
12372 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
12373
123742002-10-11 Akim Demaille <akim@epita.fr>
12375
12376 * tests/regression.at Characters Escapes): New.
12377 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
12378 characters.
12379 Reported by Jan Nieuwenhuizen.
12380
123812002-10-11 Akim Demaille <akim@epita.fr>
12382
12383 * po/id.po: New.
12384
123852002-10-10 Paul Eggert <eggert@twinsun.com>
12386
12387 Portability fixes for bitsets; this also avoids several GCC
12388 warnings.
12389
12390 * lib/abitset.c: Include <stddef.h>, for offsetof.
12391 * lib/lbitset.c: Likewise.
12392
12393 * lib/abitset.c (abitset_bytes): Return a size that is aligned
12394 properly for vectors of objects. Do not assume that adding a
12395 header size to a multiple of a word size yields a value that is
12396 properly aligned for the whole union.
12397 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12398
12399 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
12400 unique names for structures.
12401 * lib/ebitset.c (ebitset_bytes): Likewise.
12402 * lib/lbitset.c (lbitset_bytes): Likewise.
12403
12404 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12405 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12406 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12407 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12408 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12409 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12410 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12411 to improve the type-checking that GCC can do.
12412 * lib/bitset.c (bitset_op4_cmp): Likewise.
12413 * lib/bitset_stats.c (bitset_stats_count,
12414 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12415 bitset_stats_copy, bitset_stats_disjoint_p,
12416 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12417 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12418 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12419 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12420 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12421 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12422 bitset_stats_or_and_cmp): Likewise.
12423 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12424 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12425 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12426 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12427
12428 * lib/abitset.h: Include bitset.h, not bbitset.h.
12429 * lib/ebitset.h: Likewise.
12430 * lib/lbitset.h: Likewise.
12431
12432 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12433 All instances of parameters of type enum bitset_opts are now of
12434 type enum_bitset_opts, to conform to the C Standard, and similarly
12435 for enum_bitset_type.
12436 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12437 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12438
12439 Do not use "struct bitset_struct" to mean different things in
12440 different modules. Not only is this confusing, it violates
12441 the C Standard, which requires that structure types in different
12442 modules must be compatible if one is to be passed to the other.
12443 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12444 All instances of "struct bitset_struct *" replaced with "bitset".
12445 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12446 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12447 struct lbitset_struct, struct bitset_stats_struct): New types.
12448 All uses of struct bitset_struct changed to union bitset_union,
12449 etc.
12450 * lib/abitset.c (struct abitset_struct, abitset,
12451 struct bitset_struct): Remove.
12452 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12453 struct bitset_struct): Remove.
12454 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12455 bitset_struct): Remove.
12456 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12457 Likewise.
12458
12459 Do not call a function of type T using a call that assumes the
12460 function is of a different type U. Standard C requires that a
12461 function must be called with a type that is compatible with its
12462 definition.
12463 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12464 New decls.
12465 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12466 New functions.
12467 * lib/ebitset.c (PFV): Remove.
12468 * lib/lbitset.c (PFV): Likewise.
12469 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12470 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12471 decls.
12472 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12473 (ebitset_vtable): Use them.
12474 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12475 lbitset_xor): New functions.
12476 (lbitset_vtable): Use them.
12477
12478 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12479 Declare.
12480
12481 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12482 GCC warning.
12483 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12484 Use offsetof, for simplicity.
12485
124862002-10-06 Paul Eggert <eggert@twinsun.com>
12487
12488 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12489 the same width as int. This reapplies a hunk of the 2002-08-12 patch
12490 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
12491 which was inadvertently undone by the 2002-09-30 patch.
12492 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12493 the same width as int.
12494
124952002-10-04 Paul Eggert <eggert@twinsun.com>
12496
12497 Version 1.50.
12498
12499 * configure.ac (AC_INIT), NEWS: Increment version number.
12500
12501 * doc/bison.texinfo: Minor spelling, grammar, and white space
12502 fixes.
12503 (Symbols): Mention that any negative value returned from yylex
12504 signifies end-of-input. Warn about negative chars. Mention
12505 the portable Standard C character set.
12506
12507 The GNU coding standard says CFLAGS and YFLAGS are reserved
12508 for the installer to set.
12509 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12510 * src/Makefile.am (AM_CFLAGS): Likewise.
12511 (AM_YFLAGS): Renamed from YFLAGS.
12512
12513 Fix some MAX and MIN problems.
12514 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12515 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12516 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12517 * src/reader.c (reader): Use it.
12518
12519 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12520 POSIX 1003.1-2001 has removed fgrep.
12521
125222002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12523
12524 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12525 interpreted as signed.
12526 * lib/ebitset.c (ebitset_list): Fix bug.
12527
125282002-10-01 Paul Eggert <eggert@twinsun.com>
12529
12530 More fixes for 64-bit hosts and large bitsets.
12531
12532 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12533 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12534 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12535 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12536 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12537 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12538 bitset_count_): Likewise.
12539 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12540 bitset_first, bitset_last): Likewise.
12541 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12542 bitset_stats_list_reverse, bitset_stats_size,
12543 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12544 Likewise.
12545 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12546 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12547 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12548 bitsetv_reflexive_transitive_closure): Likewise.
12549 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12550 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12551 Likewise.
12552 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12553 Likewise.
12554
12555 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12556 Use size_t, not unsigned int, to count bytes.
12557 * lib/abitset.h (abitset_bytes): Likewise.
12558 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12559 Likewise.
12560 * lib/bitset.h (bitset_bytes): Likewise.
12561 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12562 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12563 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12564 * lib/ebitset.c (ebitset_bytes): Likewise.
12565 * lib/ebitset.h (ebitset_bytes): Likewise.
12566 * lib/lbitset.c (lbitset_bytes): Likewise.
12567 * lib/lbitset.h (lbitset_bytes): Likewise.
12568
12569 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12570 abitset_subset_p, abitset_disjoint_p, abitset_and,
12571 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12572 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12573 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12574 abitset_or_and, abitset_or_and_cmp):
12575 Use bitset_windex instead of unsigned int.
12576 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12577 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12578 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12579 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12580 Likewise.
12581 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
12582
12583 * lib/bitset.c (bitset_print):
12584 Use proper printf formats for widths of integer types.
12585 * lib/bitset_stats.c (bitset_percent_histogram_print,
12586 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12587 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12588 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12589 * lib/lbitset.c (lbitset_bytes): Likewise.
12590
12591 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12592 BITSET_SIZE_MAX): New macros.
12593 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12594 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12595 to BITSET_WINDEX_MAX.
12596
12597 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12598 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12599 since we now return the bitset_bindex type (not int).
12600
12601 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12602 when computing sizes.
12603 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12604
12605 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12606 and avoid cast to unsigned.
12607
126082002-09-30 Akim Demaille <akim@epita.fr>
12609
12610 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12611 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12612 Updates from Michael Hayes.
12613
126142002-09-30 Art Haas <ahaas@neosoft.com>
12615
12616 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12617 invocations.
12618 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12619 defined.
12620
126212002-09-27 Akim Demaille <akim@epita.fr>
12622
12623 Version 1.49c.
12624
126252002-09-27 Akim Demaille <akim@epita.fr>
12626
12627 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12628 (Because of AC_LIBSOURCE).
12629
126302002-09-27 Akim Demaille <akim@epita.fr>
12631
12632 Playing with Autoscan.
12633
12634 * configure.ac: Remove the old LIBOBJ tweaks.
12635 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12636 * lib/strrchr.c: New.
12637 * lib/strtol.c: New, from the Coreutils 4.5.1.
12638
126392002-09-27 Akim Demaille <akim@epita.fr>
12640
12641 Playing with Autoscan.
12642
12643 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12644 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12645 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12646 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12647 Coreutils 4.5.1.
12648
126492002-09-24 Akim Demaille <akim@epita.fr>
12650
12651 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12652 (Frequently Asked Questions, Parser Stack Overflow): New.
12653
126542002-09-13 Akim Demaille <akim@epita.fr>
12655
12656 Playing with autoscan.
12657
12658 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12659 * src/files.c (skeleton_find): Remove, unused.
12660 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12661 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12662
126632002-09-13 Akim Demaille <akim@epita.fr>
12664
12665 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12666 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12667
126682002-09-13 Akim Demaille <akim@epita.fr>
12669
12670 * configure.ac: Require 2.54.
12671 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12672 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12673 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12674 Remove, provided by Autoconf macros.
12675
126762002-09-12 Akim Demaille <akim@epita.fr>
12677
12678 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12679
126802002-09-12 Akim Demaille <akim@epita.fr>
12681
12682 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12683 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12684 Reported by Martin Mokrejs.
12685
126862002-09-10 Akim Demaille <akim@epita.fr>
12687
12688 * src/parse-gram.y: Associate a human readable string to each
12689 token type.
12690 * tests/regression.at (Invalid inputs): Adjust.
12691
126922002-09-10 Gary V. Vaughan <gary@gnu.org>
12693
12694 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12695 with an Autoconf-2.5x style configure.ac.
12696
126972002-09-06 Paul Eggert <eggert@twinsun.com>
12698
12699 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12700 exception applies only to yacc.c. This is a modification of a
12701 patch originally suggested by Akim Demaille.
12702
127032002-09-06 Akim Demaille <akim@epita.fr>
12704
12705 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12706 here to...
12707 * data/yacc.c: here.
12708
12709 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12710 LocationType.
12711 (b4_ltype): Default to yy::Location from location.hh.
12712
127132002-09-04 Jim Meyering <jim@meyering.net>
12714
12715 * data/yacc.c: Guard the declaration of yytoknum also with
12716 `#ifdef YYPRINT', so it is declared only when used.
12717
127182002-09-04 Akim Demaille <akim@epita.fr>
12719
12720 * configure.in: Rename as...
12721 * configure.ac: this.
12722 Bump to 1.49c.
12723
127242002-09-04 Akim Demaille <akim@epita.fr>
12725
12726 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12727 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12728 translate maintainer only messages.
12729
127302002-08-12 Paul Eggert <eggert@twinsun.com>
12731
12732 Version 1.49b.
12733
12734 * Makefile.am (SUBDIRS): Remove intl.
12735 (DISTCLEANFILES): Remove.
12736 * NEWS: Mention that GNU M4 is now required. Clarify what is
12737 meant by "larger grammars". Mention the pt_BR translation.
12738 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12739 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12740 Bump version from 0.11.2 to 0.11.5.
12741 (BISON_PREREQ_STAGE): Remove.
12742 (AM_GNU_GETTEXT): Use external gettext.
12743 (AC_OUTPUT): Remove intl/Makefile.
12744
12745 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12746
12747 * data/glr.c: Include string.h, for strlen.
12748 (yyreportParseError): Use size_t for yysize.
12749 (yy_yypstack): No longer nested inside yypstates, as nested
12750 functions are not portable. Do not assume size_t is the
12751 same width as int.
12752 (yypstates): Do not assume that ptrdiff_t is the same width
12753 as int, and similarly for yyposn and YYINDEX.
12754
12755 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12756
12757 * lib/Makefile.am (INCLUDES): Do not include from the intl
12758 directory, which has been removed.
12759 * src/Makefile.am (INCLUDES): Likewise.
12760
12761 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12762 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12763 New vars.
12764
12765 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12766 * tests/Makefile.am (EXTRA_DIST): Likewise.
12767
12768 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12769 Do not assume that bitset_windex is the same width as unsigned.
12770
12771 * lib/abitset.c (abitset_unused_clear): Do not assume that
12772 bitset_word is the same width as int.
12773 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12774 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12775 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12776 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12777 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12778
12779 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12780 portability to one's complement hosts!).
12781 * lib/ebitset.c (ebitset_op1): Likewise.
12782 * lib/lbitset.c (lbitset_op1): Likewise.
12783
12784 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12785 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12786 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12787 Sync with fileutils.
12788 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12789 lib/gettext.h: Sync with diffutils.
12790
12791 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12792 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12793
12794 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12795 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12796 check for void *.
12797
12798 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12799 size_t; the old version tried to do this but casted improperly.
12800 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12801 (bitset_test): Now returns int, not unsigned long.
12802
12803 * lib/bitset_stats.c: Include "gettext.h".
12804 (_): New macro.
12805 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12806 name locals "index", as it generates unnecessary warnings on some
12807 hosts that have an "index" function.
12808
12809 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12810 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12811 they need translation.
12812 * src/LR0.c (state_list_append, new_itemsets, get_state,
12813 append_states, generate_states): Likewise.
12814 * src/assoc.c (assoc_to_string): Likewise.
12815 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12816 * src/gram.c (grammar_dump): Likewise.
12817 * src/injections.c (injections_compute): Likewise.
12818 * src/lalr.c (lookaheads_print): Likewise.
12819 * src/relation.c (relation_transpose): Likewise.
12820 * src/scan-gram.l: Likewise.
12821 * src/tables.c (table_grow, pack_vector): Likewise.
12822
12823 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12824 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12825 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12826 * m4/mbstate_t.m4: Sync with fileutils.
12827 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12828
12829 * po/LINGUAS: Add pt_BR.
12830 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12831 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12832 lib/timevar.c.
12833 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12834 manual recommends.
12835 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12836
12837 * src/complain.c (strerror_r): Remove decl; not needed.
12838 (strerror): Use same pattern as ../lib/error.c.
12839
12840 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12841
12842 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12843
12844 * src/main.c (main): Cast result of bindtextdomain and textdomain
12845 to void, to avoid a GCC warning when --disable-nls is in effect.
12846
12847 * src/scan-gram.l: Use strings rather than escapes when possible,
12848 to minimize the number of warnings from xgettext.
12849 (handle_action_dollar, handle_action_at): Don't use isdigit,
12850 as it mishandles negative chars and it may not work as expected
12851 outside the C locale.
12852
12853 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12854 this is a GCC extension and is not portable to other compilers.
12855
12856 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12857 Do not include <ctype.h>; no longer needed.
12858 Do not include <malloc.h>; no longer needed (and generates
12859 warnings on OpenBSD 3.0).
12860
12861 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12862 it's not portable.
12863
12864 * tests/regression.at: Do not use 'cc -c input.c -o input';
12865 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12866
12867 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12868 exit status as failure, not just exit status 1. Sun C exits
12869 with status 2 sometimes.
12870
12871 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12872 Use it for the two large tests.
12873
128742002-08-02 Akim Demaille <akim@epita.fr>
12875
12876 * src/conflicts.c (conflicts_output): Don't output rules never
12877 reduced here, since anyway that computation doesn't work.
12878 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12879 (rule_useless_p, rule_never_reduced_p): New.
12880 (grammar_rules_partial_print): Use a filter instead of a range.
12881 Display the title only if needed.
12882 (grammar_rules_print): Adjust.
12883 (grammar_rules_never_reduced_report): New.
12884 * src/tables.c (action_row): Move the computation of rules never
12885 reduced to...
12886 (token_actions): here.
12887 * src/main.c (main): Make the parser before making the report, so
12888 that rules never reduced are computed.
12889 Call grammar_rules_never_reduced_report.
12890 * src/print.c (print_results): Report rules never reduced.
12891 * tests/conflicts.at, tests/reduce.at: Adjust.
12892
128932002-08-01 Akim Demaille <akim@epita.fr>
12894
12895 Instead of attaching lookaheads and duplicating the rules being
12896 reduced by a state, attach the lookaheads to the reductions.
12897
12898 * src/state.h (state_t): Remove the `lookaheads',
12899 `lookaheads_rule' member.
12900 (reductions_t): Add a `lookaheads' member.
12901 Use a regular array for the `rules'.
12902 * src/state.c (reductions_new): Initialize the lookaheads member
12903 to 0.
12904 (state_rule_lookaheads_print): Adjust.
12905 * src/state.h, src/state.c (state_reductions_find): New.
12906 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12907 (count_rr_conflicts): Adjust.
12908 * src/lalr.c (LArule): Remove.
12909 (add_lookback_edge): Adjust.
12910 (state_lookaheads_count): New.
12911 (states_lookaheads_initialize): Merge into...
12912 (initialize_LA): this.
12913 (lalr_free): Adjust.
12914 * src/main.c (main): Don't free nullable and derives too early: it
12915 is used by --verbose.
12916 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12917
129182002-08-01 Akim Demaille <akim@epita.fr>
12919
12920 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12921 `rule_number_t**'.
12922 (set_derives, free_derives): Rename as...
12923 (derives_compute, derives_free): this.
12924 Adjust all dependencies.
12925 * src/nullable.c (set_nullable, free_nullable): Rename as...
12926 (nullable_compute, nullable_free): these.
12927 (rule_list_t): Store rule_t *, not rule_number_t.
12928 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12929 pointers, instead of their numbers.
12930 * src/main.c (main): Call nullable_free, and derives_free earlier,
12931 as they were lo longer used.
12932
129332002-08-01 Akim Demaille <akim@epita.fr>
12934
12935 * lib/timevar.c (get_time): Include children time.
12936 * src/lalr.h (LA, LArule): Don't export them: used with the
12937 state_t.
12938 * src/lalr.c (LA, LArule): Static.
12939 * src/lalr.h, src/lalr.c (lalr_free): New.
12940 * src/main.c (main): Call it.
12941 * src/tables.c (pack_vector): Check whether loc is >= to the
12942 table_size, not >.
12943 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12944 (tables_generate): do it, since that's also it which allocates
12945 them.
12946 Don't free LA and LArule, main does.
12947
129482002-07-31 Akim Demaille <akim@epita.fr>
12949
12950 Separate parser tables computation and output.
12951
12952 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12953 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12954 (yydefgoto, yydefact, high): Move to...
12955 * src/tables.h, src/tables.c: here.
12956 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12957 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12958 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12959 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12960 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12961 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12962 (action_row, save_row, token_actions, save_column, default_goto)
12963 (goto_actions, sort_actions, matching_state, pack_vector)
12964 (table_ninf_remap, pack_table, prepare_actions): Move to...
12965 * src/tables.c: here.
12966 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12967 * src/output.c (token_actions, output_base, output_conflicts)
12968 (output_check): Merge into...
12969 (prepare_actions): this.
12970 (actions_output): Rename as...
12971 (user_actions_output): this.
12972 * src/main.c (main): Call tables_generate and tables_free.
12973
129742002-07-31 Akim Demaille <akim@epita.fr>
12975
12976 Steal GCC's --time-report support.
12977
12978 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12979 stolen/adjusted from GCC.
12980 * m4/stage.m4: Remove time related checks.
12981 * m4/timevar.m4: New.
12982 * configure.in: Adjust.
12983 * src/system.h: Adjust to using timevar.h.
12984 * src/getargs.h, src/getargs.c: Support trace_time for
12985 --trace=time.
12986 * src/main.c (stage): Remove.
12987 (main): Replace `stage' invocations with timevar calls.
12988 * src/output.c: Insert pertinent timevar calls.
12989
129902002-07-31 Akim Demaille <akim@epita.fr>
12991
12992 Let --trace have arguments.
12993
12994 * src/getargs.h (enum trace_e): New.
12995 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12996 (long_options, short_options): --trace/-T takes an optional
12997 argument.
12998 Change all the uses of trace_flag to reflect the new flags.
12999 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
13000
13001 Strengthen `stage' portability.
13002
13003 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
13004 * configure.in: Use it.
13005 Don't check for malloc.h and sys/times.h.
13006 * src/system.h: Include them when appropriate.
13007 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
13008 times and struct tms are available.
13009
130102002-07-30 Akim Demaille <akim@epita.fr>
13011
13012 In verbose parse error message, don't report `error' as an
13013 expected token.
13014 * tests/actions.at (Printers and Destructors): Adjust.
13015 * tests/calc.at (Calculator $1): Adjust.
13016 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
13017 error message, do not report the parser accepts the error token in
13018 that state.
13019
130202002-07-30 Akim Demaille <akim@epita.fr>
13021
13022 Normalize conflict related messages.
13023
13024 * src/complain.h, src/complain.c (warn, complain): New.
13025 * src/conflicts.c (conflicts_print): Use them.
13026 (conflict_report_yacc): New, extracted from...
13027 (conflicts_print): here.
13028 * tests/conflicts.at, tests/existing.at: Adjust.
13029
130302002-07-30 Akim Demaille <akim@epita.fr>
13031
13032 Report rules which are never reduced by the parser: those hidden
13033 by conflicts.
13034
13035 * src/LR0.c (save_reductions): Don't make the final state too
13036 different: save its reduction (accept) instead of having a state
13037 without any action (no shift or goto, no reduce).
13038 Note: the final state is now a ``regular'' state, i.e., the
13039 parsers now contain `reduce 0' as default reduction.
13040 Nevertheless, since they decide to `accept' when yystate =
13041 final_state, they still will not reduce rule 0.
13042 * src/print.c (print_actions, print_reduction): Adjust.
13043 * src/output.c (action_row): Track reduced rules.
13044 (token_actions): Report rules never reduced.
13045 * tests/conflicts.at, tests/regression.at: Adjust.
13046
130472002-07-30 Akim Demaille <akim@epita.fr>
13048
13049 `stage' was accidently included in a previous patch.
13050 Initiate its autoconfiscation.
13051
13052 * configure.in: Look for malloc.h and sys/times.h.
13053 * src/main.c (stage): Adjust.
13054 Report only when trace_flag.
13055
130562002-07-29 Akim Demaille <akim@epita.fr>
13057
13058 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
13059 state_number_t.
13060 (errs_t): symbol_t*, not symbol_number_t.
13061 (reductions_t): rule_t*, not rule_number_t.
13062 (FOR_EACH_SHIFT): New.
13063 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
13064 * src/print.c, src/print_graph.c: Adjust.
13065
130662002-07-29 Akim Demaille <akim@epita.fr>
13067
13068 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
13069
13070 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
13071 (endtoken, accept): these.
13072 * src/reader.c (reader): Set endtoken's default tag to "$end".
13073 Set undeftoken's tag to "$undefined" instead of "$undefined.".
13074 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
13075 Adjust.
13076
130772002-07-29 Akim Demaille <akim@epita.fr>
13078
13079 * src/reduce.c (reduce_grammar): When the language is empty,
13080 complain about the start symbol, not the axiom.
13081 Use its location.
13082 * tests/reduce.at (Empty Language): New.
13083
130842002-07-26 Akim Demaille <akim@epita.fr>
13085
13086 * src/reader.h, src/reader.c (gram_error): ... can't get
13087 yycontrol without making too strong assumptions on the parser
13088 itself.
13089 * src/output.c (prepare_tokens): Use the real 0th value of
13090 token_translations instead of `0'.
13091 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
13092 visible here.
13093 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
13094 for the time being: %locations ought to provide it to yyerror.
13095
130962002-07-25 Akim Demaille <akim@epita.fr>
13097
13098 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
13099 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
13100 * tests/regression.at (Web2c Actions): Adjust.
13101
131022002-07-25 Akim Demaille <akim@epita.fr>
13103
13104 Stop storing rules from 1 to nrules + 1.
13105
13106 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
13107 * src/nullable.c, src/output.c, src/print.c, src/reader.c
13108 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
13109 Iterate from 0 to nrules.
13110 Use rule_number_as_item_number and item_number_as_rule_number.
13111 Adjust to `derive' now containing possibly 0.
13112 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
13113 Handle the `- 1' part in rule numbers from/to item numbers.
13114 * src/conflicts.c (log_resolution): Fix the message which reversed
13115 shift and reduce.
13116 * src/output.c (action_row): Initialize default_rule to -1.
13117 (token_actions): Adjust.
13118 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
13119 expected output.
13120 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
13121
131222002-07-25 Akim Demaille <akim@epita.fr>
13123
13124 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
13125 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
13126 (b4_c_knr_arg_decl): New.
13127 * data/yacc.c: Use it to define yysymprint, yydestruct, and
13128 yyreport_parse_error.
13129
131302002-07-25 Akim Demaille <akim@epita.fr>
13131
13132 * data/yacc.c (yyreport_parse_error): New, extracted from...
13133 (yyparse): here.
13134 (yydestruct, yysymprint): Move above yyparse.
13135 Be K&R compliant.
13136
131372002-07-25 Akim Demaille <akim@epita.fr>
13138
13139 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
13140 replace...
13141 (b4_sint_type, b4_uint_type): these.
13142 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
13143 * tests/regression.at (Web2c Actions): Adjust.
13144
131452002-07-25 Akim Demaille <akim@epita.fr>
13146
13147 * src/gram.h (TIEM_NUMBER_MAX): New.
13148 (item_number_of_rule_number, rule_number_of_item_number): Rename
13149 as...
13150 (rule_number_as_item_number, item_number_as_rule_number): these.
13151 Adjust dependencies.
13152 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13153 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13154 (symbol_number_to_vector_number): New.
13155 (order): Of vector_number_t* type.
13156 (base_t, BASE_MAX, BASE_MIN): New.
13157 (froms, tos, width, pos, check): Of base_t type.
13158 (action_number_t, ACTION_MIN, ACTION_MAX): New.
13159 (actrow): Of action_number_t type.
13160 (conflrow): Of unsigned int type.
13161 (table_ninf, base_ninf): New.
13162 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
13163 (muscle_insert_int_table, muscle_insert_base_table)
13164 (muscle_insert_rule_number_table): New.
13165 (prepare_tokens): Output `toknum' as int_table.
13166 (action_row): Returns a rule_number_t.
13167 Use ACTION_MIN, not SHRT_MIN.
13168 (token_actions): yydefact is rule_number_t*.
13169 (table_ninf_remap): New.
13170 (pack_table): Use it for `base' and `table'.
13171 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
13172 replaced with...
13173 (YYPACT_NINF, YYTABLE_NINF): these.
13174 (yypact, yytable): Compute their types instead of hard-coded
13175 `short'.
13176 * tests/regression.at (Web2c Actions): Adjust.
13177
131782002-07-19 Akim Demaille <akim@epita.fr>
13179
13180 * src/scan-gram.l (id): Can start with an underscore.
13181
131822002-07-16 Akim Demaille <akim@epita.fr>
13183
13184 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
13185 Adjust all former `associativity' dependencies.
13186 * src/symtab.c (symbol_new): Default associativity is `undef', not
13187 `right'.
13188 (symbol_check_alias_consistence): Adjust.
13189
131902002-07-09 Akim Demaille <akim@epita.fr>
13191
13192 * doc/bison.texinfo: Properly set the ``header'' part.
13193 Use @dircategory ``GNU programming tools'' as per Texinfo's
13194 documentation.
13195 Use @copying.
13196
131972002-07-09 Akim Demaille <akim@epita.fr>
13198
13199 * lib/quotearg.h: Protect against multiple inclusions.
13200 * src/location.h (location_t): Add a `file' member.
13201 (LOCATION_RESET, LOCATION_PRINT): Adjust.
13202 * src/complain.c (warn_at, complain_at, fatal_at): Drop
13203 `error_one_per_line' support.
13204
132052002-07-09 Akim Demaille <akim@epita.fr>
13206
13207 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
13208 * src/reader.c (lineno): Remove.
13209 Adjust all dependencies.
13210 (get_merge_function): Take a location and use complain_at.
13211 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
13212 * tests/regression.at (Invalid inputs, Mixing %token styles):
13213 Adjust.
13214
132152002-07-09 Akim Demaille <akim@epita.fr>
13216
13217 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
13218 recovery rule, and forbid extensions when --yacc.
13219 (gram_error): Use complain_at.
13220 * src/reader.c (reader): Exit if there were parse errors.
13221
132222002-07-09 Akim Demaille <akim@epita.fr>
13223
13224 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
13225 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
13226 Reported by R Blake <blakers@mac.com>.
13227
132282002-07-09 Akim Demaille <akim@epita.fr>
13229
13230 * data/yacc.c: Output the copyright notive in the header.
13231
132322002-07-03 Akim Demaille <akim@epita.fr>
13233
13234 * src/output.c (froms, tos): Are state_number_t.
13235 (save_column): sp, sp1, and sp2 are state_number_t.
13236 (prepare): Rename `final' as `final_state_number', `nnts' as
13237 `nterms_number', `nrules' as `rules_number', `nstates' as
13238 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
13239 unused.
13240 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
13241 * data/lalr1.cc (nsym_): Remove, unused.
13242
132432002-07-03 Akim Demaille <akim@epita.fr>
13244
13245 * src/lalr.h, src/lalr.c (goto_number_t): New.
13246 * src/lalr.c (goto_list_t): New.
13247 Propagate them.
13248 * src/nullable.c (rule_list_t): New.
13249 Propagate.
13250 * src/types.h: Remove.
13251
132522002-07-03 Akim Demaille <akim@epita.fr>
13253
13254 * src/closure.c (print_fderives): Use rule_rhs_print.
13255 * src/derives.c (print_derives): Use rule_rhs_print.
13256 (rule_list_t): New, replaces `shorts'.
13257 (set_derives): Add comments.
13258 * tests/sets.at (Nullable, Firsts): Adjust.
13259
132602002-07-03 Akim Demaille <akim@epita.fr>
13261
13262 * src/output.c (prepare_actions): Free `tally' and `width'.
13263 (prepare_actions): Allocate and free `order'.
13264 * src/symtab.c (symbols_free): Free `symbols'.
13265 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
13266 * src/output.c (m4_invoke): Move to...
13267 * src/scan-skel.l: here.
13268 (<<EOF>>): Close yyout, and free its name.
13269
132702002-07-03 Akim Demaille <akim@epita.fr>
13271
13272 Fix some memory leaks, and fix a bug: state 0 was examined twice.
13273
13274 * src/LR0.c (new_state): Merge into...
13275 (state_list_append): this.
13276 (new_states): Merge into...
13277 (generate_states): here.
13278 (set_states): Don't ensure a proper `errs' state member here, do it...
13279 * src/conflicts.c (conflicts_solve): here.
13280 * src/state.h, src/state.c: Comment changes.
13281 (state_t): Rename member `shifts' as `transitions'.
13282 Adjust all dependencies.
13283 (errs_new): For consistency, also take the values as argument.
13284 (errs_dup): Remove.
13285 (state_errs_set): New.
13286 (state_reductions_set, state_transitions_set): Assert that no
13287 previous value was assigned.
13288 (state_free): New.
13289 (states_free): Use it.
13290 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
13291 temporary storage: use `errs' and `nerrs' as elsewhere.
13292 (set_conflicts): Allocate and free this `errs'.
13293
132942002-07-02 Akim Demaille <akim@epita.fr>
13295
13296 * lib/libiberty.h: New.
13297 * lib: Update the bitset implementation from upstream.
13298 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
13299 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
13300 * src/main.c: Adjust bitset stats calls.
13301
133022002-07-01 Paul Eggert <eggert@twinsun.com>
13303
13304 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
13305 char, so that negative chars don't collide with $.
13306
133072002-06-30 Akim Demaille <akim@epita.fr>
13308
13309 Have the GLR tests be `warning' checked, and fix the warnings.
13310
13311 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
13312 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
13313 (yyremoveDeletes): `yyi' and `yyj' are size_t.
13314 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
13315 (yyaddDeferredAction): static.
13316 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
13317 (yyreportParseError): yyprefix is const.
13318 yytokenp is used only when verbose.
13319 (yy__GNUC__): Replace with __GNUC__.
13320 (yypdumpstack): yyi is size_t.
13321 (yypreference): Un-yy local variables and arguments, to avoid
13322 clashes with `yyr1'. Anyway, we are not in the user name space.
13323 (yytname_size): be an int, as is compared with ints.
13324 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
13325 Use them.
13326 * tests/cxx-gram.at: Use quotation to protect $1.
13327 Use AT_COMPILE to enable warnings hunts.
13328 Prototype yylex and yyerror.
13329 `Use' argc.
13330 Include `string.h', not `strings.h'.
13331 Produce and prototype stmtMerge only when used.
13332 yylex takes a location.
13333
133342002-06-30 Akim Demaille <akim@epita.fr>
13335
13336 We spend a lot of time in quotearg, in particular when --verbose.
13337
13338 * src/symtab.c (symbol_get): Store a quoted version of the key.
13339 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
13340 Adjust all callers.
13341
133422002-06-30 Akim Demaille <akim@epita.fr>
13343
13344 * src/state.h (reductions_t): Rename member `nreds' as num.
13345 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
13346 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
13347
133482002-06-30 Akim Demaille <akim@epita.fr>
13349
13350 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
13351 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
13352 (shifts_to): Rename as...
13353 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
13354 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
13355 (TRANSITION_IS_DISABLED, transitions_to): these.
13356
133572002-06-30 Akim Demaille <akim@epita.fr>
13358
13359 * src/print.c (print_shifts, print_gotos): Merge into...
13360 (print_transitions): this.
13361 (print_transitions, print_errs, print_reductions): Align the
13362 lookaheads columns.
13363 (print_core, print_transitions, print_errs, print_state,
13364 print_grammar): Output empty lines separator before, not after.
13365 (state_default_rule_compute): Rename as...
13366 (state_default_rule): this.
13367 * tests/conflicts.at (Defaulted Conflicted Reduction),
13368 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
13369 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
13370
133712002-06-30 Akim Demaille <akim@epita.fr>
13372
13373 Display items as we display rules.
13374
13375 * src/gram.h, src/gram.c (rule_lhs_print): New.
13376 * src/gram.c (grammar_rules_partial_print): Use it.
13377 * src/print.c (print_core): Likewise.
13378 * tests/conflicts.at (Defaulted Conflicted Reduction),
13379 (Unresolved SR Conflicts): Adjust.
13380 (Unresolved SR Conflicts): Adjust and rename as...
13381 (Resolved SR Conflicts): this, as was meant.
13382 * tests/regression.at (Web2c Report): Adjust.
13383
133842002-06-30 Akim Demaille <akim@epita.fr>
13385
13386 * src/print.c (state_default_rule_compute): New, extracted from...
13387 (print_reductions): here.
13388 Pessimize, but clarify the code.
13389 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
13390
133912002-06-30 Akim Demaille <akim@epita.fr>
13392
13393 * src/output.c (action_row): Let default_rule be always a rule
13394 number.
13395
133962002-06-30 Akim Demaille <akim@epita.fr>
13397
13398 * src/closure.c (print_firsts, print_fderives, closure):
13399 Use BITSET_EXECUTE.
13400 * src/lalr.c (lookaheads_print): Likewise.
13401 * src/state.c (state_rule_lookaheads_print): Likewise.
13402 * src/print_graph.c (print_core): Likewise.
13403 * src/print.c (print_reductions): Likewise.
13404 * src/output.c (action_row): Likewise.
13405 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13406
134072002-06-30 Akim Demaille <akim@epita.fr>
13408
13409 * src/print_graph.c: Use report_flag.
13410
134112002-06-30 Akim Demaille <akim@epita.fr>
13412
13413 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13414 to...
13415 * src/relation.h, src/relation.c (traverse, relation_digraph)
13416 (relation_print, relation_transpose): New.
13417
134182002-06-30 Akim Demaille <akim@epita.fr>
13419
13420 * src/state.h, src/state.c (shifts_to): New.
13421 * src/lalr.c (build_relations): Use it.
13422
134232002-06-30 Akim Demaille <akim@epita.fr>
13424
13425 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13426 (item_number_of_rule_number, rule_number_of_item_number): New.
13427 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13428 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13429 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13430 Propagate their use.
13431 Much remains to be done, in particular wrt `shorts' from types.h.
13432
134332002-06-30 Akim Demaille <akim@epita.fr>
13434
13435 * src/symtab.c (symbol_new): Initialize the `printer' member.
13436
134372002-06-30 Akim Demaille <akim@epita.fr>
13438
13439 * src/LR0.c (save_reductions): Remove, replaced by...
13440 * src/state.h, src/state.c (state_reductions_set): New.
13441 (reductions, errs): Rename as...
13442 (reductions_t, errs_t): these.
13443 Adjust all dependencies.
13444
134452002-06-30 Akim Demaille <akim@epita.fr>
13446
13447 * src/LR0.c (state_list_t, state_list_append): New.
13448 (first_state, last_state): Now symbol_list_t.
13449 (this_state): Remove.
13450 (new_itemsets, append_states, save_reductions): Take a state_t as
13451 argument.
13452 (set_states, generate_states): Adjust.
13453 (save_shifts): Remove, replaced by...
13454 * src/state.h, src/state.c (state_shifts_set): New.
13455 (shifts): Rename as...
13456 (shifts_t): this.
13457 Adjust all dependencies.
13458 * src/state.h (state_t): Remove the `next' member.
13459
134602002-06-30 Akim Demaille <akim@epita.fr>
13461
13462 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13463 escaped in slot 0.
13464
134652002-06-30 Akim Demaille <akim@epita.fr>
13466
13467 Use hash.h for the state hash table.
13468
13469 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13470 (allocate_storage): Use state_hash_new.
13471 (free_storage): Use state_hash_free.
13472 (new_state, get_state): Adjust.
13473 * src/lalr.h, src/lalr.c (states): Move to...
13474 * src/states.h (state_t): Remove the `link' member, no longer
13475 used.
13476 * src/states.h, src/states.c: here.
13477 (state_hash_new, state_hash_free, state_hash_lookup)
13478 (state_hash_insert, states_free): New.
13479 * src/states.c (state_table, state_compare, state_hash): New.
13480 * src/output.c (output_actions): Do not free states now, since we
13481 still need to know the final_state number in `prepare', called
13482 afterwards. Do it...
13483 * src/main.c (main): here: call states_free after `output'.
13484
134852002-06-30 Akim Demaille <akim@epita.fr>
13486
13487 * src/state.h, src/state.c (state_new): New, extracted from...
13488 * src/LR0.c (new_state): here.
13489 * src/state.h (STATE_ALLOC): Move to...
13490 * src/state.c: here.
13491 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13492 * src/state.h, src/state.c: here.
13493
134942002-06-30 Akim Demaille <akim@epita.fr>
13495
13496 * src/reader.c (gensym): Rename as...
13497 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13498 (getsym): Rename as...
13499 (symbol_get): this.
13500
135012002-06-30 Akim Demaille <akim@epita.fr>
13502
13503 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13504 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13505 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13506 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13507
135082002-06-30 Akim Demaille <akim@epita.fr>
13509
13510 Make the test suite pass with warnings checked.
13511
13512 * tests/actions.at (Printers and Destructors): Improve.
13513 Avoid unsigned vs. signed issues.
13514 * tests/calc.at: Don't exercise the scanner here, do it...
13515 * tests/input.at (Torturing the Scanner): here.
13516
135172002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13518
13519 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
13520 reorganize first lines parallel to yacc.c.
13521
135222002-06-28 Akim Demaille <akim@epita.fr>
13523
13524 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13525 (b4_token_enum, b4_token_defines): New, factored from...
13526 * data/lalr1.cc, data/yacc.c, glr.c: here.
13527
135282002-06-28 Akim Demaille <akim@epita.fr>
13529
13530 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13531 unused variables.
13532 * src/output.c (merger_output): static.
13533
135342002-06-28 Akim Demaille <akim@epita.fr>
13535
13536 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
13537 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13538 pacify GCC.
13539 * src/output.c (save_row): Initialize all the variables to pacify GCC.
13540
135412002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13542
13543 Accumulated changelog for new GLR parsing features.
13544
13545 * src/conflicts.c (count_total_conflicts): Change name to
13546 conflicts_total_count.
13547 * src/conflicts.h: Ditto.
13548 * src/output.c (token_actions): Use the new name.
13549 (output_conflicts): Change conflp => conflict_list_heads, and
13550 confl => conflict_list for better readability.
13551 * data/glr.c: Use the new names.
13552 * NEWS: Add self to GLR announcement.
13553
13554 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13555
13556 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13557 Akim Demaille.
13558
13559 * data/bison.glr: Change name to glr.c
13560 * data/glr.c: Renamed from bison.glr.
13561 * data/Makefile.am: Add glr.c
13562
13563 * src/getargs.c:
13564
13565 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
13566 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
13567
13568 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13569
13570 * data/bison.glr: Be sure to restore the
13571 current #line when returning to the skeleton contents after having
13572 exposed the input file's #line.
13573
13574 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13575
13576 * data/bison.glr: Bring up to date with changes to bison.simple.
13577
13578 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13579
13580 * data/bison.glr: Correct definitions that use b4_prefix.
13581 Various reformatting.
13582 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13583 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13584 yytokenp argument; now part of stack.
13585 (yychar): Define to behave as documented.
13586 (yyclearin): Ditto.
13587
13588 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13589
13590 * src/reader.h: Add declaration for free_merger_functions.
13591
13592 * src/reader.c (merge_functions): New variable.
13593 (get_merge_function): New function.
13594 (free_merger_functions): New function.
13595 (readgram): Check for %prec that is not followed by a symbol.
13596 Handle %dprec and %merge declarations.
13597 (packgram): Initialize dprec and merger fields in rules array.
13598
13599 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13600 conflict_list_cnt, conflict_list_free): New variables.
13601 (table_grow): Also grow conflict_table.
13602 (prepare_rules): Output dprec and merger tables.
13603 (conflict_row): New function.
13604 (action_row): Output conflict lists for GLR parser. Don't use
13605 default reduction in conflicted states for GLR parser so that there
13606 are spaces for the conflict lists.
13607 (save_row): Also save conflict information.
13608 (token_actions): Allocate conflict list.
13609 (merger_output): New function.
13610 (pack_vector): Pack conflict table, too.
13611 (output_conflicts): New function to output yyconflp and yyconfl.
13612 (output_check): Allocate conflict_tos.
13613 (output_actions): Output conflict tables, also.
13614 (output_skeleton): Output b4_mergers definition.
13615 (prepare): Output b4_max_rhs_length definition.
13616 Use 'bison.glr' as default skeleton for GLR parsers.
13617
13618 * src/gram.c (glr_parser): New flag.
13619 (grammar_free): Call free_merger_functions.
13620
13621 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13622 all pairs of conflicting reductions, rather than just all tokens
13623 causing conflicts. Needed to size conflict tables.
13624 (conflicts_output): Modify call to count_rr_conflicts for new
13625 interface.
13626 (conflicts_print): Ditto.
13627 (count_total_conflicts): New function.
13628
13629 * src/reader.h (merger_list): New type.
13630 (merge_functions): New variable.
13631
13632 * src/lex.h (tok_dprec, tok_merge): New token types.
13633
13634 * src/gram.h (rule_s): Add dprec and merger fields.
13635 (glr_parser): New flag.
13636
13637 * src/conflicts.h (count_total_conflicts): New function.
13638
13639 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13640
13641 * doc/bison.texinfo (Generalized LR Parsing): New section.
13642 (GLR Parsers): New section.
13643 (Language and Grammar): Mention GLR parsing.
13644 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13645 Correct typo ("tge" -> "the").
13646
13647 * data/bison.glr: New skeleton for GLR parsing.
13648
13649 * tests/cxx-gram.at: New tests for GLR parsing.
13650
13651 * tests/testsuite.at: Include cxx-gram.at.
13652
13653 * tests/Makefile.am: Add cxx-gram.at.
13654
13655 * src/parse-gram.y:
13656
13657 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13658
13659 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
13660
136612002-06-27 Akim Demaille <akim@epita.fr>
13662
13663 * src/options.h, src/options.c: Remove.
13664 * src/getargs.c (short_options, long_options): New.
13665
136662002-06-27 Akim Demaille <akim@epita.fr>
13667
13668 * data/bison.simple, data/bison.c++: Rename as...
13669 * data/yacc.c, data/lalr1.cc: these.
13670 * doc/bison.texinfo (Environment Variables): Remove.
13671
136722002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13673
13674 * src/getargs.c (report_argmatch): Initialize strtok().
13675
136762002-06-20 Akim Demaille <akim@epita.fr>
13677
13678 * data/bison.simple (b4_symbol_actions): New, replaces...
13679 (b4_symbol_destructor, b4_symbol_printer): these.
13680 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13681 user token numbers.
13682
136832002-06-20 Akim Demaille <akim@epita.fr>
13684
13685 * data/bison.simple (yydestructor): Rename as...
13686 (yydestruct): this.
13687
136882002-06-20 Akim Demaille <akim@epita.fr>
13689
13690 * src/symtab.h, src/symtab.c (symbol_type_set)
13691 (symbol_destructor_set, symbol_precedence_set): The location is
13692 the last argument.
13693 Adjust all callers.
13694
136952002-06-20 Akim Demaille <akim@epita.fr>
13696
13697 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13698 internals.
13699 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13700 Takes a location.
13701 * src/symtab.h, src/symtab.c (symbol_class_set)
13702 (symbol_user_token_number_set): Likewise.
13703 Adjust all callers.
13704 Promote complain_at.
13705 * tests/input.at (Type Clashes): Adjust.
13706
137072002-06-20 Akim Demaille <akim@epita.fr>
13708
13709 * data/bison.simple (YYLEX): Fix the declaration when
13710 %pure-parser.
13711
137122002-06-20 Akim Demaille <akim@epita.fr>
13713
13714 * data/bison.simple (yysymprint): Don't print the token number,
13715 just its name.
13716 * tests/actions.at (Destructors): Rename as...
13717 (Printers and Destructors): this.
13718 Also exercise %printer.
13719
137202002-06-20 Akim Demaille <akim@epita.fr>
13721
13722 * data/bison.simple (YYDSYMPRINT): New.
13723 Use it to remove many of the #if YYDEBUG/if (yydebug).
13724
137252002-06-20 Akim Demaille <akim@epita.fr>
13726
13727 * src/symtab.h, src/symtab.c (symbol_t): printer and
13728 printer_location are new members.
13729 (symbol_printer_set): New.
13730 * src/parse-gram.y (PERCENT_PRINTER): New token.
13731 Handle its associated rule.
13732 * src/scan-gram.l: Adjust.
13733 (handle_destructor_at, handle_destructor_dollar): Rename as...
13734 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13735 * src/output.c (symbol_printers_output): New.
13736 (output_skeleton): Call it.
13737 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13738 since there are already many grammar files with a user `yyprint'.
13739 Replace the calls to YYPRINT to calls to yysymprint.
13740 * tests/calc.at: Adjust.
13741 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13742 taking advantage of parser very internal details (stack size!).
13743
137442002-06-20 Akim Demaille <akim@epita.fr>
13745
13746 * src/scan-gram.l: Complete the scanner with the missing patterns
13747 to pacify Flex.
13748 Use `quote' and `symbol_tag_get' where appropriate.
13749
137502002-06-19 Akim Demaille <akim@epita.fr>
13751
13752 * tests/actions.at (Destructors): Augment to test locations.
13753 * data/bison.simple (yydestructor): Pass it the current location
13754 if locations are enabled.
13755 Prototype only when __STDC__ or C++.
13756 Change the argument names to move into the yy name space: there is
13757 user code here.
13758
137592002-06-19 Akim Demaille <akim@epita.fr>
13760
13761 * data/bison.simple (b4_pure_if): New.
13762 Use it instead of #ifdef YYPURE.
13763
137642002-06-19 Akim Demaille <akim@epita.fr>
13765
13766 * data/bison.simple (b4_location_if): New.
13767 Use it instead of #ifdef YYLSP_NEEDED.
13768
137692002-06-19 Akim Demaille <akim@epita.fr>
13770
13771 Prepare @$ in %destructor, but currently don't bind it in the
13772 skeleton, as %location use is not cleaned up yet.
13773
13774 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13775 (handle_action_at): New.
13776 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13777 a braced_code_t and a location as additional arguments.
13778 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13779 unquote one when outputting `b4_dollar_dollar'.
13780 Adjust callers.
13781 * data/bison.simple (b4_eval): Remove.
13782 (b4_symbol_destructor): Adjust.
13783 * tests/input.at (Invalid @n): Adjust.
13784
137852002-06-19 Zack Weinberg <zack@codesourcery.com>
13786
13787 * doc/bison.texinfo: Document ability to have multiple
13788 prologue sections.
13789
137902002-06-18 Akim Demaille <akim@epita.fr>
13791
13792 * src/files.c (compute_base_names): When computing the output file
13793 names from the input file name, strip the directory part.
13794
137952002-06-18 Akim Demaille <akim@epita.fr>
13796
13797 * data/bison.simple.new: Comment changes.
13798 Reported by Andreas Schwab.
13799
138002002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13801
13802 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13803 there are no `label `yyoverflowlab' defined but not used' warnings
13804 when yyoverflow is defined.
13805
138062002-06-18 Akim Demaille <akim@epita.fr>
13807
13808 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13809 new member.
13810 (symbol_destructor_set): Adjust.
13811 * src/output.c (symbol_destructors_output): Output the destructor
13812 locations.
13813 Output the symbol name.
13814 * data/bison.simple (b4_symbol_destructor): Adjust.
13815
138162002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13817 and Akim Demaille <akim@epita.fr>
13818
13819 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13820 what's left on the stack when the error recovery hits EOF.
13821 * tests/actions.at (Destructors): Complete to exercise this case.
13822
138232002-06-17 Akim Demaille <akim@epita.fr>
13824
13825 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13826 arguments is really empty, not only equal to `[]'.
13827 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13828 member.
13829 (symbol_destructor_set): New.
13830 * src/output.c (symbol_destructors_output): New.
13831 * src/reader.h (brace_code_t, current_braced_code): New.
13832 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13833 (handle_dollar): Rename as...
13834 (handle_action_dollar): this.
13835 (handle_destructor_dollar): New.
13836 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13837 (grammar_declaration): Use it.
13838 * data/bison.simple (yystos): Is always defined.
13839 (yydestructor): New.
13840 * tests/actions.at (Destructors): New.
13841 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13842
138432002-06-17 Akim Demaille <akim@epita.fr>
13844
13845 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13846 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13847 rule_length only when needed.
13848 * src/output.c (actions_output, token_definitions_output): Output
13849 the full M4 block.
13850 * src/symtab.c: Don't access directly to the symbol tag, use
13851 symbol_tag_get.
13852 * src/parse-gram.y: Use symbol_list_free.
13853
138542002-06-17 Akim Demaille <akim@epita.fr>
13855
13856 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13857 (symbol_list_prepend, get_type_name): Move to...
13858 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13859 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13860 Adjust all callers.
13861 (symbol_list_free): New.
13862 * src/scan-gram.l (handle_dollar): Takes a location.
13863 * tests/input.at (Invalid $n): Adjust.
13864
138652002-06-17 Akim Demaille <akim@epita.fr>
13866
13867 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13868 (symbol_list_prepend): New.
13869 * src/parse-gram.y (%union): `list' is a new member.
13870 (symbols.1): New, replaces...
13871 (terms_to_prec.1, nterms_to_type.1): these.
13872 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13873 Take a location as additional argument.
13874 Adjust all callers.
13875
138762002-06-15 Akim Demaille <akim@epita.fr>
13877
13878 * src/parse-gram.y: Move %token in the declaration section so that
13879 we don't depend upon CVS Bison.
13880
138812002-06-15 Akim Demaille <akim@epita.fr>
13882
13883 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13884 * src/print.c (print_core): Use it.
13885
138862002-06-15 Akim Demaille <akim@epita.fr>
13887
13888 * src/conflicts.c (log_resolution): Accept the rule involved in
13889 the sr conflicts instead of the lookahead number that points to
13890 that rule.
13891 (flush_reduce): Accept the current lookahead vector as argument,
13892 instead of the index in LA.
13893 (resolve_sr_conflict): Accept the current number of lookahead
13894 bitset to consider for the STATE, instead of the index in LA.
13895 (set_conflicts): Adjust.
13896 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13897
138982002-06-15 Akim Demaille <akim@epita.fr>
13899
13900 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13901 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13902 Adjust all dependencies.
13903 * src/lalr.c (initialize_lookaheads): Split into...
13904 (states_lookaheads_count, states_lookaheads_initialize): these.
13905 (lalr): Adjust.
13906
139072002-06-15 Akim Demaille <akim@epita.fr>
13908
13909 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13910 out of...
13911 (grammar_rules_print): here.
13912 * src/reduce.c (reduce_output): Use it.
13913 * tests/reduce.at (Useless Rules, Reduced Automaton)
13914 (Underivable Rules): Adjust.
13915
139162002-06-15 Akim Demaille <akim@epita.fr>
13917
13918 Copy BYacc's nice way to report the grammar.
13919
13920 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13921 New.
13922 Don't print the rules' location, it is confusing and useless.
13923 (rule_print): Use grammar_rhs_print.
13924 * src/print.c (print_grammar): Use grammar_rules_print.
13925
139262002-06-15 Akim Demaille <akim@epita.fr>
13927
13928 Complete and rationalize `useless thing' warnings.
13929
13930 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13931 (symbol_tag_print): New.
13932 Use them everywhere in place of accessing directly the tag member.
13933 * src/gram.h, src/gram.c (rule_print): New.
13934 Use it where a rule used to be printed `by hand'.
13935 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13936 (reduce_grammar_tables): Report the useless rules.
13937 (reduce_print): Useless things are a warning, not an error.
13938 Report it as such.
13939 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13940 (Reduced Automaton, Underivable Rules): Adjust.
13941 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13942 * tests/conflicts.at (Unresolved SR Conflicts)
13943 (Solved SR Conflicts): Adjust.
13944
139452002-06-15 Akim Demaille <akim@epita.fr>
13946
13947 Let symbols have a location.
13948
13949 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13950 (getsym): Adjust.
13951 Adjust all callers.
13952 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13953 Use location_t, not int.
13954 * src/symtab.c (symbol_check_defined): Take advantage of the
13955 location.
13956 * tests/regression.at (Invalid inputs): Adjust.
13957
139582002-06-15 Akim Demaille <akim@epita.fr>
13959
13960 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13961 (input): Don't try to initialize yylloc here, do it in the
13962 scanner.
13963 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13964 * src/gram.h (rule_t): Change line and action_line into location
13965 and action_location, of location_t type.
13966 Adjust all dependencies.
13967 * src/location.h, src/location.c (empty_location): New.
13968 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13969 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13970 (grammar_current_rule_symbol_append)
13971 (grammar_current_rule_action_append): Expect a location as argument.
13972 * src/reader.c (grammar_midrule_action): Adjust to attach an
13973 action's location as dummy symbol location.
13974 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13975 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13976 the line numbers.
13977
139782002-06-14 Akim Demaille <akim@epita.fr>
13979
13980 Grammar declarations may be found in the grammar section.
13981
13982 * src/parse-gram.y (rules_or_grammar_declaration): New.
13983 (declarations): Each declaration may end with a semicolon, not
13984 just...
13985 (grammar_declaration): `"%union"'.
13986 (grammar): Branch to rules_or_grammar_declaration.
13987
139882002-06-14 Akim Demaille <akim@epita.fr>
13989
13990 * src/main.c (main): Invoke scanner_free.
13991
139922002-06-14 Akim Demaille <akim@epita.fr>
13993
13994 * src/output.c (m4_invoke): Extracted from...
13995 (output_skeleton): here.
13996 Free tempfile.
13997
139982002-06-14 Akim Demaille <akim@epita.fr>
13999
14000 * src/parse-gram.y (directives, directive, gram)
14001 (grammar_directives, precedence_directives, precedence_directive):
14002 Rename as...
14003 (declarations, declaration, grammar, grammar_declaration)
14004 (precedence_declaration, precedence_declarator): these.
14005 (symbol_declaration): New.
14006
140072002-06-14 Akim Demaille <akim@epita.fr>
14008
14009 * src/files.c (action_obstack): Remove, unused.
14010 (output_obstack): Remove it, and all its dependencies, as it is no
14011 longer needed.
14012 * src/reader.c (epilogue_set): Build the epilogue in the
14013 muscle_obstack.
14014 * src/output.h, src/output.c (muscle_obstack): Move to...
14015 * src/muscle_tab.h, src/muscle_tab.h: here.
14016 (muscle_init): Initialize muscle_obstack.
14017 (muscle_free): New.
14018 * src/main.c (main): Call it.
14019
140202002-06-14 Akim Demaille <akim@epita.fr>
14021
14022 * src/location.h: New, extracted from...
14023 * src/reader.h: here.
14024 * src/Makefile.am (noinst_HEADERS): Merge into
14025 (bison_SOURCES): this.
14026 Add location.h.
14027 * src/parse-gram.y: Use location_t instead of Bison's.
14028 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
14029 Use location_t instead of ints.
14030
140312002-06-14 Akim Demaille <akim@epita.fr>
14032
14033 * data/bison.simple, data/bison.c++: Be sure to restore the
14034 current #line when returning to the skeleton contents after having
14035 exposed the input file's #line.
14036
140372002-06-12 Akim Demaille <akim@epita.fr>
14038
14039 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
14040 eager.
14041 * tests/actions.at (Exotic Dollars): New.
14042
140432002-06-12 Akim Demaille <akim@epita.fr>
14044
14045 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
14046 ['"/] too eagerly.
14047 * tests/input.at (Torturing the Scanner): New.
14048
140492002-06-11 Akim Demaille <akim@epita.fr>
14050
14051 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
14052 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
14053 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
14054 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
14055 * src/reader.c (reader): Use it.
14056
140572002-06-11 Akim Demaille <akim@epita.fr>
14058
14059 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
14060 Adjust all callers.
14061 (scanner_last_string_free): New.
14062
140632002-06-11 Akim Demaille <akim@epita.fr>
14064
14065 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
14066 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
14067 (last_string, YY_OBS_FREE): New.
14068 Use them when returning an ID.
14069
140702002-06-11 Akim Demaille <akim@epita.fr>
14071
14072 Have Bison grammars parsed by a Bison grammar.
14073
14074 * src/reader.c, src/reader.h (prologue_augment): New.
14075 * src/reader.c (copy_definition): Remove.
14076
14077 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
14078 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
14079 (grammar_current_rule_prec_set, grammar_current_rule_check)
14080 (grammar_current_rule_symbol_append)
14081 (grammar_current_rule_action_append): Export.
14082 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
14083 (symbol_list_action_append): Remove.
14084 Hook the routines from reader.
14085 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
14086 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
14087
14088 * src/reader.c (read_declarations): Remove, unused.
14089
14090 * src/parse-gram.y: Handle the epilogue.
14091 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
14092 (grammar_start_symbol_set): this.
14093 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
14094 * src/reader.c (readgram): Remove, unused.
14095 (reader): Adjust to insert eoftoken and axiom where appropriate.
14096
14097 * src/reader.c (copy_dollar): Replace with...
14098 * src/scan-gram.h (handle_dollar): this.
14099 * src/parse-gram.y: Remove `%thong'.
14100
14101 * src/reader.c (copy_at): Replace with...
14102 * src/scan-gram.h (handle_at): this.
14103
14104 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
14105 New.
14106
14107 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
14108 time being.
14109
14110 * src/reader.h, src/reader.c (grammar_rule_end): New.
14111
14112 * src/parse.y (current_type, current_class): New.
14113 Implement `%nterm', `%token' support.
14114 Merge `%term' into `%token'.
14115 (string_as_id): New.
14116 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
14117 type name.
14118
14119 * src/parse-gram.y: Be sure to handle properly the beginning of
14120 rules.
14121
14122 * src/parse-gram.y: Handle %type.
14123 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
14124
14125 * src/parse-gram.y: More directives support.
14126 * src/options.c: No longer handle source directives.
14127
14128 * src/parse-gram.y: Fix %output.
14129
14130 * src/parse-gram.y: Handle %union.
14131 Use the prologue locations.
14132 * src/reader.c (parse_union_decl): Remove.
14133
14134 * src/reader.h, src/reader.c (epilogue_set): New.
14135 * src/parse-gram.y: Use it.
14136
14137 * data/bison.simple, data/bison.c++: b4_stype is now either not
14138 defined, then default to int, or to the contents of %union,
14139 without `union' itself.
14140 Adjust.
14141 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
14142
14143 * src/output.c (actions_output): Don't output braces, as they are
14144 already handled by the scanner.
14145
14146 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
14147 characters to themselves.
14148
14149 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
14150 that the epilogue has a proper #line.
14151
14152 * src/parse-gram.y: Handle precedence/associativity.
14153
14154 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
14155 a terminal.
14156 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
14157 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
14158 at all to define terminals that cannot be emitted.
14159
14160 * src/scan-gram.l: Escape M4 characters.
14161
14162 * src/scan-gram.l: Working properly with escapes in user
14163 strings/characters.
14164
14165 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
14166 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
14167 grammar.
14168 Use more modest sizes, as for the time being the parser does not
14169 release memory, and therefore the process swallows a huge amount
14170 of memory.
14171
14172 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
14173 stricter %token grammar.
14174
14175 * src/symtab.h (associativity): Add `undef_assoc'.
14176 (symbol_precedence_set): Do nothing when passed an undef_assoc.
14177 * src/symtab.c (symbol_check_alias_consistence): Adjust.
14178
14179 * tests/regression.at (Invalid %directive): Remove, as it is now
14180 meaningless.
14181 (Invalid inputs): Adjust to the new error messages.
14182 (Token definitions): The new grammar doesn't allow too many
14183 eccentricities.
14184
14185 * src/lex.h, src/lex.c: Remove.
14186 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
14187 (copy_character, copy_string2, copy_string, copy_identifier)
14188 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
14189 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
14190 (parse_action): Remove.
14191 * po/POTFILES.in: Adjust.
14192
141932002-06-11 Akim Demaille <akim@epita.fr>
14194
14195 * src/reader.c (parse_action): Don't store directly into the
14196 rule's action member: return the action as a string.
14197 Don't require `rule_length' as an argument: compute it.
14198 (grammar_current_rule_symbol_append)
14199 (grammar_current_rule_action_append): New, eved out from
14200 (readgram): here.
14201 Remove `action_flag', `rulelength', unused now.
14202
142032002-06-11 Akim Demaille <akim@epita.fr>
14204
14205 * src/reader.c (grammar_current_rule_prec_set).
14206 (grammar_current_rule_check): New, eved out from...
14207 (readgram): here.
14208 Remove `xaction', `first_rhs': useless.
14209 * tests/input.at (Type clashes): New.
14210 * tests/existing.at (GNU Cim Grammar): Adjust.
14211
142122002-06-11 Akim Demaille <akim@epita.fr>
14213
14214 * src/reader.c (grammar_midrule_action): New, Eved out from
14215 (readgram): here.
14216
142172002-06-11 Akim Demaille <akim@epita.fr>
14218
14219 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
14220 New.
14221 (readgram): Use them as replacement of inlined code, crule and
14222 crule1.
14223
142242002-06-11 Akim Demaille <akim@epita.fr>
14225
14226 * src/reader.c (grammar_end, grammar_symbol_append): New.
14227 (readgram): Use them.
14228 Make the use of `p' as local as possible.
14229
142302002-06-10 Akim Demaille <akim@epita.fr>
14231
14232 GCJ's parser requires the tokens to be defined before the prologue.
14233
14234 * data/bison.simple: Output the token definition before the user's
14235 prologue.
14236 * tests/regression.at (Braces parsing, Duplicate string)
14237 (Mixing %token styles): Check the output from bison.
14238 (Early token definitions): New.
14239
142402002-06-10 Akim Demaille <akim@epita.fr>
14241
14242 * src/symtab.c (symbol_user_token_number_set): Don't complain when
14243 assigning twice the same user number to a token, so that we can
14244 use it in...
14245 * src/lex.c (lex): here.
14246 Also use `symbol_class_set' instead of hand written code.
14247 * src/reader.c (parse_assoc_decl): Likewise.
14248
142492002-06-10 Akim Demaille <akim@epita.fr>
14250
14251 * src/symtab.c, src/symtab.c (symbol_class_set)
14252 (symbol_user_token_number_set): New.
14253 * src/reader.c (parse_token_decl): Use them.
14254 Use a switch instead of ifs.
14255 Use a single argument.
14256
142572002-06-10 Akim Demaille <akim@epita.fr>
14258
14259 Remove `%thong' support as it is undocumented, unused, duplicates
14260 `%token's job, and creates useless e-mail traffic with people who
14261 want to know what it is, why it is undocumented, unused, and
14262 duplicates `%token's job.
14263
14264 * src/reader.c (parse_thong_decl): Remove.
14265 * src/options.c (option_table): Remove "thong".
14266 * src/lex.h (tok_thong): Remove.
14267
142682002-06-10 Akim Demaille <akim@epita.fr>
14269
14270 * src/symtab.c, src/symtab.c (symbol_type_set)
14271 (symbol_precedence_set): New.
14272 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
14273 (value_components_used): Remove, unused.
14274
142752002-06-09 Akim Demaille <akim@epita.fr>
14276
14277 Move symbols handling code out of the reader.
14278
14279 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
14280 (axiom): Move to...
14281 * src/symtab.h, src/symtab.c: here.
14282
14283 * src/gram.c (start_symbol): Remove: use startsymbol->number.
14284 * src/reader.c (startval): Rename as...
14285 * src/symtab.h, src/symtab.c (startsymbol): this.
14286 * src/reader.c: Adjust.
14287
14288 * src/reader.c (symbol_check_defined, symbol_make_alias)
14289 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14290 (token_translations_init)
14291 Move to...
14292 * src/symtab.c: here.
14293 * src/reader.c (packsymbols): Move to...
14294 * src/symtab.h, src/symtab.c (symbols_pack): here.
14295 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
14296 argument.
14297
142982002-06-03 Akim Demaille <akim@epita.fr>
14299
14300 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
14301 then statements.
14302
143032002-06-03 Akim Demaille <akim@epita.fr>
14304
14305 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
14306 structs with non literals.
14307 * src/scan-skel.l: never-interactive.
14308 * src/conflicts.c (enum conflict_resolution_e): No trailing
14309 comma.
14310 * src/getargs.c (usage): Split long literal strings.
14311 Reported by Hans Aberg.
14312
143132002-05-28 Akim Demaille <akim@epita.fr>
14314
14315 * data/bison.c++: Use C++ ostreams.
14316 (cdebug_): New member.
14317
143182002-05-28 Akim Demaille <akim@epita.fr>
14319
14320 * src/output.c (output_skeleton): Be sure to allocate enough room
14321 for `/' _and_ for `\0' in full_skeleton.
14322
143232002-05-28 Akim Demaille <akim@epita.fr>
14324
14325 * data/bison.c++: Catch up with bison.simple:
14326 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14327 and Paul Eggert <eggert@twinsun.com>: `error' handing.
14328 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
14329 and popping traces.
14330
143312002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14332
14333 * src/output.c (output_skeleton): Put an explicit path in front of
14334 the skeleton file name, rather than relying on the -I directory,
14335 to partially alleviate effects of having a skeleton file lying around
14336 in the current directory.
14337
143382002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14339
14340 * src/conflicts.c (log_resolution): Correct typo:
14341 obstack_printf should be obstack_fgrow1.
14342
143432002-05-26 Akim Demaille <akim@epita.fr>
14344
14345 * src/state.h (state_t): `solved_conflicts' is a new member.
14346 * src/LR0.c (new_state): Set it to 0.
14347 * src/conflicts.h, src/conflicts.c (print_conflicts)
14348 (free_conflicts, solve_conflicts): Rename as...
14349 (conflicts_print, conflicts_free, conflicts_solve): these.
14350 Adjust callers.
14351 * src/conflicts.c (enum conflict_resolution_e)
14352 (solved_conflicts_obstack): New, used by...
14353 (log_resolution): this.
14354 Adjust to attach the conflict resolution to each state.
14355 Complete the description with the precedence/associativity
14356 information.
14357 (resolve_sr_conflict): Adjust.
14358 * src/print.c (print_state): Output its solved_conflicts.
14359 * tests/conflicts.at (Unresolved SR Conflicts)
14360 (Solved SR Conflicts): Exercise --report=all.
14361
143622002-05-26 Akim Demaille <akim@epita.fr>
14363
14364 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14365 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14366 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
14367 (token_number_t, item_number_as_token_number)
14368 (token_number_as_item_number, muscle_insert_token_number_table):
14369 Rename as...
14370 (symbol_number_t, item_number_as_symbol_number)
14371 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
14372 these, since it is more appropriate.
14373
143742002-05-26 Akim Demaille <akim@epita.fr>
14375
14376 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
14377 `Error:' lines.
14378 * data/bison.simple (yystos) [YYDEBUG]: New.
14379 (yyparse) [YYDEBUG]: Display the symbols which are popped during
14380 error recovery.
14381 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
14382
143832002-05-25 Akim Demaille <akim@epita.fr>
14384
14385 * doc/bison.texinfo (Debugging): Split into...
14386 (Tracing): this new section, its former contents, and...
14387 (Understanding): this new section.
14388 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
14389 by...
14390 (report_flag): this.
14391 Adjust all dependencies.
14392 (report_args, report_types, report_argmatch): New.
14393 (usage, getargs): Report/support -r, --report.
14394 * src/options.h
14395 (struct option_table_struct): Rename as..,
14396 (struct option_table_s): this.
14397 Rename the `set_flag' member to `flag' to match with getopt_long's
14398 struct.
14399 * src/options.c (option_table): Split verbose into an entry for
14400 %verbose, and another for --verbose.
14401 Support --report/-r, so remove -r from the obsolete --raw.
14402 * src/print.c: Attach full item sets and lookaheads reports to
14403 report_flag instead of trace_flag.
14404 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14405
144062002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14407 and Paul Eggert <eggert@twinsun.com>
14408
14409 * data/bison.simple (yyparse): Correct error handling to conform to
14410 POSIX and yacc. Specifically, after syntax error is discovered,
14411 do not reduce further before shifting the error token.
14412 Clean up the code a bit by removing the labels yyerrdefault,
14413 yyerrhandle, yyerrpop.
14414 * NEWS: Document the above.
14415
144162002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14417
14418 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14419 type; it isn't always big enough, since it doesn't necessarily
14420 include non-terminals.
14421 (yytranslate): Expand definition of yy_token_number_type, so that
14422 the latter can be removed.
14423 (yy_token_number_type): Remove, only one use.
14424 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14425 don't use TokenNumberType as element type.
14426
14427 * tests/regression.at: Modify expected output to agree with change
14428 to yyr1 and yytranslate.
14429
144302002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14431
14432 * src/reader.c (parse_action): Use copy_character instead of
14433 obstack_1grow.
14434
144352002-05-13 Akim Demaille <akim@epita.fr>
14436
14437 * tests/regression.at (Token definitions): Prototype yylex and
14438 yyerror.
14439
144402002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14441
14442 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
14443 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14444 32-bit arithmetic.
14445 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14446
144472002-05-07 Akim Demaille <akim@epita.fr>
14448
14449 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14450 avoid GCC warnings.
14451
144522002-05-07 Akim Demaille <akim@epita.fr>
14453
14454 Kill GCC warnings.
14455
14456 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14457 over the RHS of each rule.
14458 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14459 * src/state.h (state_t): Member `nitems' is unsigned short.
14460 * src/LR0.c (get_state): Adjust.
14461 * src/reader.c (packgram): Likewise.
14462 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14463 `Type'.
14464 (muscle_insert_int_table): Remove, unused.
14465 (prepare_rules): Remove `max'.
14466
144672002-05-06 Akim Demaille <akim@epita.fr>
14468
14469 * src/closure.c (print_firsts): Display of the symbol tags.
14470 (bitmatrix_print): Move to...
14471 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14472 here.
14473 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14474
144752002-05-06 Akim Demaille <akim@epita.fr>
14476
14477 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14478 hash_do_for_each.
14479
144802002-05-06 Akim Demaille <akim@epita.fr>
14481
14482 * src/LR0.c (new_state, get_state): Instead of using the global
14483 `kernel_size' and `kernel_base', have two new arguments:
14484 `core_size' and `core'.
14485 Adjust callers.
14486
144872002-05-06 Akim Demaille <akim@epita.fr>
14488
14489 * src/reader.c (packgram): No longer end `ritem' with a 0
14490 sentinel: it is not used.
14491
144922002-05-05 Akim Demaille <akim@epita.fr>
14493
14494 New experimental feature: display the lookaheads in the report and
14495 graph.
14496
14497 * src/print (print_core): When --trace-flag, display the rules
14498 lookaheads.
14499 * src/print_graph.c (print_core): Likewise.
14500 Swap the arguments.
14501 Adjust caller.
14502
145032002-05-05 Akim Demaille <akim@epita.fr>
14504
14505 * tests/torture.at (Many lookaheads): New test.
14506
145072002-05-05 Akim Demaille <akim@epita.fr>
14508
14509 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14510 (GENERATE_MUSCLE_INSERT_TABLE): this.
14511 (output_int_table, output_unsigned_int_table, output_short_table)
14512 (output_token_number_table, output_item_number_table): Replace with...
14513 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14514 (muscle_insert_short_table, muscle_insert_token_number_table)
14515 (muscle_insert_item_number_table): these.
14516 Adjust all callers.
14517 (prepare_tokens): Don't free `translations', since...
14518 * src/reader.h, src/reader.c (grammar_free): do it.
14519 Move to...
14520 * src/gram.h, src/gram.c (grammar_free): here.
14521 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14522 b4_translate_max.
14523
145242002-05-05 Akim Demaille <akim@epita.fr>
14525
14526 * src/output.c (output_unsigned_int_table): New.
14527 (prepare_rules): `i' is unsigned.
14528 `prhs', `rline', `r2' are unsigned int.
14529 Rename muscle `rhs_number_max' as `rhs_max'.
14530 Output muscles `prhs_max', `rline_max', and `r2_max'.
14531 Free rline and r1.
14532 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14533 to compute types instead of constant types.
14534 * tests/regression.at (Web2c Actions): Adjust.
14535
145362002-05-04 Akim Demaille <akim@epita.fr>
14537
14538 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14539 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14540 Adjust dependencies.
14541 * src/output.c (token_definitions_output): Be sure not to output a
14542 `#define 'a'' when fed with `%token 'a' "a"'.
14543 * tests/regression.at (Token definitions): New.
14544
145452002-05-03 Paul Eggert <eggert@twinsun.com>
14546
14547 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14548 for K&R C.
14549
145502002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14551
14552 * Makefile.am (SUBDIRS): Remove intl.
14553 (EXTRA_DIST): Add config/config.rpath.
14554
145552002-05-03 Akim Demaille <akim@epita.fr>
14556
14557 * data/bison.simple (m4_if): Don't output empty enums.
14558 And actually, output valid enum definitions :(.
14559
145602002-05-03 Akim Demaille <akim@epita.fr>
14561
14562 * configure.bat: Remove, completely obsolete.
14563 * Makefile.am (EXTRA_DIST): Adjust.
14564 Don't distribute config.rpath...
14565 * config/Makefile.am (EXTRA_DIST): Do it.
14566
145672002-05-03 Akim Demaille <akim@epita.fr>
14568
14569 * configure.in (GETTEXT_VERSION): New.
14570 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14571
145722002-05-03 Akim Demaille <akim@epita.fr>
14573
14574 * data/bison.simple (b4_token_enum): New.
14575 (b4_token_defines): Use it to output tokens both as #define and
14576 enums.
14577 Suggested by Paul Eggert.
14578 * src/output.c (token_definitions_output): Don't output spurious
14579 white spaces.
14580
145812002-05-03 Akim Demaille <akim@epita.fr>
14582
14583 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14584
145852002-05-02 Robert Anisko <robert@lrde.epita.fr>
14586
14587 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14588 Update the stack class, give a try to deque as the default container.
14589
145902002-05-02 Akim Demaille <akim@epita.fr>
14591
14592 * data/bison.simple (yyparse): Do not implement @$ = @1.
14593 (YYLLOC_DEFAULT): Adjust to do it.
14594 * doc/bison.texinfo (Location Default Action): Fix.
14595
145962002-05-02 Akim Demaille <akim@epita.fr>
14597
14598 * src/reader.c (parse_braces): Merge into...
14599 (parse_action): this.
14600
146012002-05-02 Akim Demaille <akim@epita.fr>
14602
14603 * configure.in (ALL_LINGUAS): Remove.
14604 * po/LINGUAS, hr.po: New.
14605
146062002-05-02 Akim Demaille <akim@epita.fr>
14607
14608 Remove the so called hairy (semantic) parsers.
14609
14610 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14611 * src/gram.h, src/gram.c (semantic_parser): Remove.
14612 (rule_t): Remove the guard and guard_line members.
14613 * src/lex.h (token_t): remove tok_guard.
14614 * src/options.c (option_table): Remove %guard and %semantic_parser
14615 support.
14616 * src/output.c, src/output.h (guards_output): Remove.
14617 (prepare): Adjust.
14618 (token_definitions_output): Don't output the `T'
14619 tokens (???).
14620 (output_skeleton): Don't output the guards.
14621 * src/files.c, src/files.c (attrsfile): Remove.
14622 * src/reader.c (symbol_list): Remove the guard and guard_line
14623 members.
14624 Adjust dependencies.
14625 (parse_guard): Remove.
14626 * data/bison.hairy: Remove.
14627 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14628 BISON_HAIRY.
14629
146302002-05-02 Akim Demaille <akim@epita.fr>
14631
14632 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14633 (parse_guard): Rename the formal argument `stack_offset' as
14634 `rule_length', which is more readable.
14635 Adjust callers.
14636 (copy_at, copy_dollar): Instead of outputting the hard coded
14637 values of $$, $n and so forth, output invocation to b4_lhs_value,
14638 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
14639 Note: this patch partially drops `semantic-parser' support: it
14640 always does `rule_length - n', where semantic parsers ought to
14641 always use `-n'.
14642 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14643 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14644
146452002-05-02 Akim Demaille <akim@epita.fr>
14646
14647 * configure.in (AC_INIT): Bump to 1.49b.
14648 (AM_INIT_AUTOMAKE): Short invocation.
14649
146502002-05-02 Akim Demaille <akim@epita.fr>
14651
14652 Version 1.49a.
14653
146542002-05-01 Akim Demaille <akim@epita.fr>
14655
14656 * src/skeleton.h: Remove.
14657
146582002-05-01 Akim Demaille <akim@epita.fr>
14659
14660 * src/skeleton.h: Fix the #endif.
14661 Reported by Magnus Fromreide.
14662
146632002-04-26 Paul Eggert <eggert@twinsun.com>
14664
14665 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14666 Define if we define YYSTYPE and YYLTYPE, respectively.
14667 (YYCOPY): Fix [] quoting problem in the non-GCC case.
14668
146692002-04-25 Robert Anisko <robert@lrde.epita.fr>
14670
14671 * src/scan-skel.l: Postprocess quadrigraphs.
14672
14673 * src/reader.c (copy_character): New function, used to output
14674 single characters while replacing `[' and `]' with quadrigraphs, to
14675 avoid troubles with M4 quotes.
14676 (copy_comment): Output characters with copy_character.
14677 (read_additionnal_code): Likewise.
14678 (copy_string2): Likewise.
14679 (copy_definition): Likewise.
14680
14681 * tests/calc.at: Exercise M4 quoting.
14682
146832002-04-25 Akim Demaille <akim@epita.fr>
14684
14685 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14686 between `!' and the command.
14687 Reported by Paul Eggert.
14688
146892002-04-24 Robert Anisko <robert@lrde.epita.fr>
14690
14691 * tests/calc.at: Exercise prologue splitting.
14692
14693 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14694 `b4_post_prologue' instead of `b4_prologue'.
14695
14696 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14697 muscles.
14698 (output): Free pre_prologue_obstack and post_prologue_obstack.
14699 * src/files.h, src/files.c (attrs_obstack): Remove.
14700 (pre_prologue_obstack, post_prologue_obstack): New.
14701 * src/reader.c (copy_definition): Add a parameter to specify the
14702 obstack to fill, instead of using attrs_obstack unconditionally.
14703 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14704 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14705
147062002-04-23 Paul Eggert <eggert@twinsun.com>
14707
14708 * data/bison.simple: Remove unnecessary commentary and white
14709 space differences from 1_29-branch.
14710 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14711
14712 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14713 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14714 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14715 constructors or destructors.
14716
14717 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14718
147192002-04-23 Akim Demaille <akim@epita.fr>
14720
14721 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14722 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14723 location with columns.
14724 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14725 All reported by Paul Eggert.
14726
147272002-04-22 Akim Demaille <akim@epita.fr>
14728
14729 * src/reduce.c (dump_grammar): Move to...
14730 * src/gram.h, src/gram.c (grammar_dump): here.
14731 Be sure to separate long item numbers.
14732 Don't read the members of a rule's prec if its nil.
14733
147342002-04-22 Akim Demaille <akim@epita.fr>
14735
14736 * src/output.c (table_size, table_grow): New.
14737 (MAXTABLE): Remove, replace uses with table_size.
14738 (pack_vector): Instead of dying when the table is too big, grow it.
14739
147402002-04-22 Akim Demaille <akim@epita.fr>
14741
14742 * data/bison.simple (yyr1): Its type is that of a token number.
14743 * data/bison.c++ (r1_): Likewise.
14744 * tests/regression.at (Web2c Actions): Adjust.
14745
147462002-04-22 Akim Demaille <akim@epita.fr>
14747
14748 * src/reader.c (token_translations_init): 256 is now the default
14749 value for the error token, i.e., it will be assigned another
14750 number if the user assigned 256 to one of her tokens.
14751 (reader): Don't force 256 to error.
14752 * doc/bison.texinfo (Symbols): Adjust.
14753 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14754 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14755 etc. instead of 10, 20, 30 (which was used to `jump' over error
14756 (256) and undefined (2)).
14757
147582002-04-22 Akim Demaille <akim@epita.fr>
14759
14760 Propagate more token_number_t.
14761
14762 * src/gram.h (token_number_as_item_number)
14763 (item_number_as_token_number): New.
14764 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14765 Use it to create output_item_number_table and
14766 output_token_number_table.
14767 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14768 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14769 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14770 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14771
147722002-04-22 Akim Demaille <akim@epita.fr>
14773
14774 * src/output.h, src/output.c (get_lines_number): Remove.
14775
147762002-04-19 Akim Demaille <akim@epita.fr>
14777
14778 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14779 as Lex/Flex'.
14780 (Debugging): More details about enabling the debugging features.
14781 (Table of Symbols): Describe $$, $n, @$, and @n.
14782 Suggested by Tim Josling.
14783
147842002-04-19 Akim Demaille <akim@epita.fr>
14785
14786 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14787
147882002-04-10 Akim Demaille <akim@epita.fr>
14789
14790 * src/system.h: Rely on HAVE_LIMITS_H.
14791 Suggested by Paul Eggert.
14792
147932002-04-09 Akim Demaille <akim@epita.fr>
14794
14795 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14796 full stderr, and strip it according to the bison options, instead
14797 of composing the error message from different bits.
14798 This makes it easier to check for several error messages.
14799 Adjust all the invocations.
14800 Add an invocation exercising the error token.
14801 Add an invocation demonstrating a stupid error message.
14802 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14803 Adjust the tests.
14804 Error message are for stderr, not stdout.
14805
148062002-04-09 Akim Demaille <akim@epita.fr>
14807
14808 * src/gram.h, src/gram.c (error_token_number): Remove, use
14809 errtoken->number.
14810 * src/reader.c (reader): Don't specify the user token number (2)
14811 for $undefined, as it uselessly prevents using it.
14812 * src/gram.h (token_number_t): Move to...
14813 * src/symtab.h: here.
14814 (state_t.number): Is a token_number_t.
14815 * src/print.c, src/reader.c: Use undeftoken->number instead of
14816 hard coded 2.
14817 (Even though this 2 is not the same as above: the number of the
14818 undeftoken remains being 2, it is its user token number which
14819 might not be 2).
14820 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14821 `user_token_number_max'.
14822 Output `undef_token_number'.
14823 * data/bison.simple, data/bison.c++: Use them.
14824 Be sure to map invalid yylex return values to
14825 `undef_token_number'. This saves us from gratuitous SEGV.
14826
14827 * tests/conflicts.at (Solved SR Conflicts)
14828 (Unresolved SR Conflicts): Adjust.
14829 * tests/regression.at (Web2c Actions): Adjust.
14830
148312002-04-08 Akim Demaille <akim@epita.fr>
14832
14833 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14834 Adding #line.
14835 Remove the duplicate `typedefs'.
14836 (RhsNumberType): Fix the declaration and various other typos.
14837 Use __ofile__.
14838 * data/bison.simple: Use __ofile__.
14839 * src/scan-skel.l: Handle __ofile__.
14840
148412002-04-08 Akim Demaille <akim@epita.fr>
14842
14843 * src/gram.h (item_number_t): New, the type of item numbers in
14844 RITEM. Note that it must be able to code symbol numbers as
14845 positive number, and the negation of rule numbers as negative
14846 numbers.
14847 Adjust all dependencies (pretty many).
14848 * src/reduce.c (rule): Remove this `short *' pointer: use
14849 item_number_t.
14850 * src/system.h (MINSHORT, MAXSHORT): Remove.
14851 Include `limits.h'.
14852 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14853 (shortcpy): Remove.
14854 (MAXTABLE): Move to...
14855 * src/output.c (MAXTABLE): here.
14856 (prepare_rules): Use output_int_table to output rhs.
14857 * data/bison.simple, data/bison.c++: Adjust.
14858 * tests/torture.at (Big triangle): Move the limit from 254 to
14859 500.
14860 * tests/regression.at (Web2c Actions): Ajust.
14861
14862 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14863 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14864 passes, but produces negative #line number, once fixed, GCC is
14865 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14866 C), it passes.
14867 * src/state.h (state_h): Code input lines on ints, not shorts.
14868
148692002-04-08 Akim Demaille <akim@epita.fr>
14870
14871 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14872 and then the grammar.
14873
148742002-04-08 Akim Demaille <akim@epita.fr>
14875
14876 * src/system.h: No longer using strndup.
14877
148782002-04-07 Akim Demaille <akim@epita.fr>
14879
14880 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14881 * src/output.c (output_table_data): Return the longest number.
14882 (prepare_tokens): Output `token_number_max').
14883 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14884 New.
14885 Use them to define yy_token_number_type/TokenNumberType.
14886 Use this type for yytranslate.
14887 * tests/torture.at (Big triangle): Push the limit from 124 to
14888 253.
14889 * tests/regression.at (Web2c Actions): Adjust.
14890
148912002-04-07 Akim Demaille <akim@epita.fr>
14892
14893 * tests/torture.at (Big triangle): New.
14894 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14895 * tests/existing.at: here.
14896
148972002-04-07 Akim Demaille <akim@epita.fr>
14898
14899 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14900 nritems.
14901 Adjust dependencies.
14902
149032002-04-07 Akim Demaille <akim@epita.fr>
14904
14905 * src/reader.c: Normalize increments to prefix form.
14906
149072002-04-07 Akim Demaille <akim@epita.fr>
14908
14909 * src/reader.c, symtab.c: Remove debugging code.
14910
149112002-04-07 Akim Demaille <akim@epita.fr>
14912
14913 Rename all the `bucket's as `symbol_t'.
14914
14915 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14916 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14917 * src/symtab.c, src/symtab.h (bucket): Rename as...
14918 (symbol_t): this.
14919 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14920 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14921 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14922 (buckets_new, buckets_free, buckets_do): Rename as...
14923 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14924 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14925 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14926 (symbols_new, symbols_free, symbols_do): these.
14927
149282002-04-07 Akim Demaille <akim@epita.fr>
14929
14930 Use lib/hash for the symbol table.
14931
14932 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14933 EOF.
14934 * src/lex.c (lex): Set the `number' member of new terminals.
14935 * src/reader.c (bucket_check_defined, bucket_make_alias)
14936 (bucket_check_alias_consistence, bucket_translation): New.
14937 (reader, grammar_free, readgram, token_translations_init)
14938 (packsymbols): Adjust.
14939 (reader): Number the predefined tokens.
14940 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14941 for predefined tokens.
14942 * src/symtab.h (bucket): Remove all the hash table related
14943 members.
14944 * src/symtab.c (symtab): Replace by...
14945 (bucket_table): this.
14946 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14947 (buckets_new, buckets_do): New.
14948
149492002-04-07 Akim Demaille <akim@epita.fr>
14950
14951 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14952 (start_symbol, max_user_token_number, semantic_parser)
14953 (error_token_number): Initialize.
14954 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14955 Initialize.
14956 (reader): Don't.
14957 (errtoken, eoftoken, undeftoken, axiom): Extern.
14958
149592002-04-07 Akim Demaille <akim@epita.fr>
14960
14961 * src/gram.h (rule_s): prec and precsym are now pointers
14962 to the bucket giving the priority/associativity.
14963 Member `associativity' removed: useless.
14964 * src/reduce.c, src/conflicts.c: Adjust.
14965
149662002-04-07 Akim Demaille <akim@epita.fr>
14967
14968 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14969 Properly escape the symbols' TAG when outputting them.
14970
149712002-04-07 Akim Demaille <akim@epita.fr>
14972
14973 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14974
149752002-04-07 Akim Demaille <akim@epita.fr>
14976
14977 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14978 (LArule): this, which is an array to rule_t*.
14979 * src/print.c, src/conflicts.c: Adjust.
14980
149812002-04-07 Akim Demaille <akim@epita.fr>
14982
14983 * src/gram.h (rule_t): Rename `number' as `user_number'.
14984 `number' is a new member.
14985 Adjust dependencies.
14986 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14987
149882002-04-07 Akim Demaille <akim@epita.fr>
14989
14990 As a result of the previous patch, it is no longer needed
14991 to reorder ritem itself.
14992
14993 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14994
149952002-04-07 Akim Demaille <akim@epita.fr>
14996
14997 Be sure never to walk through RITEMS, but use only data related to
14998 the rules themselves. RITEMS should be banished.
14999
15000 * src/output.c (output_token_translations): Rename as...
15001 (prepare_tokens): this.
15002 In addition to `translate', prepare the muscles `tname' and
15003 `toknum', which were handled by...
15004 (output_rule_data): this.
15005 Remove, and move the remainder of its outputs into...
15006 (prepare_rules): this new routines, which also merges content from
15007 (output_gram): this.
15008 (prepare_rules): Be sure never to walk through RITEMS.
15009 (output_stos): Rename as...
15010 (prepare_stos): this.
15011 (output): Always invoke prepare_states, after all, just don't use it
15012 in the output if you don't need it.
15013
150142002-04-07 Akim Demaille <akim@epita.fr>
15015
15016 * src/LR0.c (new_state): Display `nstates' as the name of the
15017 newly created state.
15018 Adjust to initialize first_state and last_state if needed.
15019 Be sure to distinguish the initial from the final state.
15020 (new_states): Create the itemset of the initial state, and use
15021 new_state.
15022 * src/closure.c (closure): Now that the initial state has its
15023 items properly set, there is no need for a special case when
15024 creating `ruleset'.
15025
15026 As a result, now the rule 0, reducing to $axiom, is visible in the
15027 outputs. Adjust the test suite.
15028
15029 * tests/conflicts.at (Solved SR Conflicts)
15030 (Unresolved SR Conflicts): Adjust.
15031 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
15032 * tests/conflicts.at (S/R in initial): New.
15033
150342002-04-07 Akim Demaille <akim@epita.fr>
15035
15036 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
15037 the RHS of the rules.
15038 * src/output.c (output_gram): Likewise.
15039
150402002-04-07 Akim Demaille <akim@epita.fr>
15041
15042 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
15043 bucket.
15044 Adjust all dependencies.
15045 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
15046 `number' of the buckets too.
15047 * src/gram.h: Include `symtab.h'.
15048 (associativity): Move to...
15049 * src/symtab.h: here.
15050 No longer include `gram.h'.
15051
150522002-04-07 Akim Demaille <akim@epita.fr>
15053
15054 * src/gram.h, src/gram.c (rules_rhs_length): New.
15055 (ritem_longest_rhs): Use it.
15056 * src/gram.h (rule_t): `number' is a new member.
15057 * src/reader.c (packgram): Set it.
15058 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
15059 the end of `rules', and count them out of `nrules'.
15060 (reduce_output, dump_grammar): Adjust.
15061 * src/print.c (print_grammar): It is no longer needed to check for
15062 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
15063 * tests/reduce.at (Reduced Automaton): New test.
15064
150652002-04-07 Akim Demaille <akim@epita.fr>
15066
15067 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
15068 lacking `+ 1' to nrules, Bison reported as useless a token if it
15069 was used solely to set the precedence of the last rule...
15070
150712002-04-07 Akim Demaille <akim@epita.fr>
15072
15073 * data/bison.c++, data/bison.simple: Don't output the current file
15074 name in #line, to avoid useless diffs between two identical
15075 outputs under different names.
15076
150772002-04-07 Akim Demaille <akim@epita.fr>
15078
15079 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
15080 Normalize loops to using `< nrules + 1', not `<= nrules'.
15081
150822002-04-07 Akim Demaille <akim@epita.fr>
15083
15084 * TODO: Update.
15085
150862002-04-07 Akim Demaille <akim@epita.fr>
15087
15088 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
15089 bucket.value as bucket.number.
15090
150912002-04-07 Akim Demaille <akim@epita.fr>
15092
15093 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
15094 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15095 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
15096 RHS, instead of being an index in RITEMS.
15097
150982002-04-04 Paul Eggert <eggert@twinsun.com>
15099
15100 * doc/bison.texinfo: Update copyright date.
15101 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
15102 (Symbols): Warn about running Bison in one character set,
15103 but compiling and/or running in an incompatible one.
15104 Warn about character code 256, too.
15105
151062002-04-03 Paul Eggert <eggert@twinsun.com>
15107
15108 * src/bison.data (YYSTACK_ALLOC): Depend on whether
15109 YYERROR_VERBOSE is nonzero, not whether it is defined.
15110
15111 Merge changes from bison-1_29-branch.
15112
151132002-03-20 Paul Eggert <eggert@twinsun.com>
15114
15115 Merge fixes from Debian bison_1.34-1.diff.
15116
15117 * configure.in (AC_PREREQ): 2.53.
15118
151192002-03-20 Akim Demaille <akim@epita.fr>
15120
15121 * src/conflicts.c (log_resolution): Argument `resolution' is const.
15122
151232002-03-19 Paul Eggert <eggert@twinsun.com>
15124
15125 * src/bison.simple (YYCOPY): New macro.
15126 (YYSTACK_RELOCATE): Use it.
15127 Remove Type arg; no longer needed. All callers changed.
15128 (yymemcpy): Remove; no longer needed.
15129
15130 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
15131 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15132
151332002-03-19 Akim Demaille <akim@epita.fr>
15134
15135 Test and fix the #line outputs.
15136
15137 * tests/atlocal.at (GCC): New.
15138 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
15139 (Prologue synch line, %union synch line, Postprologue synch line)
15140 (Action synch line, Epilogue synch line): New tests.
15141 * src/reader.c (parse_union_decl): Define the muscle stype_line.
15142 * data/bison.simple, data/bison.c++: Use it.
15143
151442002-03-19 Akim Demaille <akim@epita.fr>
15145
15146 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
15147 (Solved SR Conflicts, %expect not enough, %expect right)
15148 (%expect too much): Move to...
15149 * tests/conflicts.at: this new file.
15150
151512002-03-19 Akim Demaille <akim@epita.fr>
15152
15153 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15154 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
15155 that we can move to enums for instance.
15156 * src/output.c (token_definitions_output): Output a list of
15157 `token-name, token-number' instead of the #define.
15158 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
15159
151602002-03-14 Akim Demaille <akim@epita.fr>
15161
15162 Use Gettext 0.11.1.
15163
151642002-03-09 Robert Anisko <robert@lrde.epita.fr>
15165
15166 * data/bison.c++: Make the user able to add members to the generated
15167 parser by subclassing.
15168
151692002-03-05 Robert Anisko <robert@lrde.epita.fr>
15170
15171 * src/reader.c (read_additionnal_code): `c' should be an integer, not
15172 a character.
15173 Reported by Nicolas Tisserand and Nicolas Burrus.
15174
151752002-03-04 Robert Anisko <robert@lrde.epita.fr>
15176
15177 * src/reader.c: Warn about lacking semi-colons, do not complain.
15178
151792002-03-04 Robert Anisko <robert@lrde.epita.fr>
15180
15181 * data/bison.c++: Remove a debug line.
15182
151832002-03-04 Robert Anisko <robert@lrde.epita.fr>
15184
15185 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
15186 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
15187 provide a default implementation.
15188
151892002-03-04 Akim Demaille <akim@epita.fr>
15190
15191 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
15192 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
15193 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
15194 * tests/semantic.at (Parsing Guards): Similarly.
15195 * src/reader.at (readgram): Complain if the last rule is not ended
15196 with a semi-colon.
15197
151982002-03-04 Akim Demaille <akim@epita.fr>
15199
15200 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
15201 * src/closure.c: here.
15202 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
15203 RTC.
15204 * src/warshall.h, src/warshall.c: Remove.
15205 * tests/sets.at (Broken Closure): Adjust.
15206
152072002-03-04 Akim Demaille <akim@epita.fr>
15208
15209 * src/output.c (output_skeleton): tempdir is const.
15210 bytes_read is unused.
15211
152122002-03-04 Akim Demaille <akim@epita.fr>
15213
15214 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15215 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
15216 Update.
15217 From Michael Hayes.
15218
152192002-03-04 Akim Demaille <akim@epita.fr>
15220
15221 * src/closure.c (closure): `r' is unused.
15222
152232002-03-04 Akim Demaille <akim@epita.fr>
15224
15225 * tests/sets.at (Broken Closure): Add the ending `;'.
15226 * src/reader.at (readgram): Complain if a rule is not ended with a
15227 semi-colon.
15228
152292002-03-04 Akim Demaille <akim@epita.fr>
15230
15231 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
15232 (count_sr_conflicts): Use bitset_count.
15233 * src/reduce.c (inaccessable_symbols): Ditto.
15234 (bits_size): Remove.
15235 * src/warshall.h, src/warshall.c: Convert to bitsetv.
15236
152372002-03-04 Akim Demaille <akim@epita.fr>
15238
15239 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
15240 * src/reduce.c: Remove the `bitset_zero's following the
15241 `bitset_create's, as now it is performed by the latter.
15242
152432002-03-04 Akim Demaille <akim@epita.fr>
15244
15245 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
15246 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
15247 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
15248 latest sources from Michael.
15249
152502002-03-04 Akim Demaille <akim@epita.fr>
15251
15252 * src/output.c (output): Don't free the grammar.
15253 * src/reader.c (grammar_free): New.
15254 * src/main.c (main): Call it and don't free symtab here.
15255
152562002-03-04 Akim Demaille <akim@epita.fr>
15257
15258 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
15259 before returning.
15260 Reported by Benoit Perrot.
15261
152622002-03-04 Akim Demaille <akim@epita.fr>
15263
15264 Use bitset operations when possible, not loops over bits.
15265
15266 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
15267 bitset_or.
15268 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
15269 * src/reduce.c (useless_nonterminals): Formatting changes.
15270 * src/warshall.c (TC): Use bitset_or.
15271
152722002-03-04 Akim Demaille <akim@epita.fr>
15273
15274 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
15275 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
15276 Ditto.
15277
152782002-03-04 Akim Demaille <akim@epita.fr>
15279
15280 * src/lalr.c (F): Now a bitset*.
15281 Adjust all dependencies.
15282
152832002-03-04 Akim Demaille <akim@epita.fr>
15284
15285 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
15286 Adjust all dependencies.
15287
152882002-03-04 Akim Demaille <akim@epita.fr>
15289
15290 * src/L0.c, src/LR0.h (nstates): Be size_t.
15291 Adjust comparisons (signed vs unsigned).
15292 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
15293 bitset*.
15294 Adjust all dependencies.
15295
152962002-03-04 Akim Demaille <akim@epita.fr>
15297
15298 * src/closure.c (firsts): Now, also a bitset.
15299 Adjust all dependencies.
15300 (varsetsize): Remove, now unused.
15301 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
15302
153032002-03-04 Akim Demaille <akim@epita.fr>
15304
15305 * src/print.c: Convert to use bitset.h, not hand coded iterations
15306 over ints.
15307
153082002-03-04 Akim Demaille <akim@epita.fr>
15309
15310 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
15311
153122002-03-04 Akim Demaille <akim@epita.fr>
15313
15314 * src/closure.c (ruleset): Be a bitset.
15315 (rulesetsize): Remove.
15316
153172002-03-04 Akim Demaille <akim@epita.fr>
15318
15319 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15320 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
15321 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
15322 * src/closure.c (fderives): Be an array of bitsets.
15323
153242002-02-28 Robert Anisko <robert@lrde.epita.fr>
15325
15326 * data/bison.c++: Merge the two generated headers. Insert a copyright
15327 notice in each output file.
15328
153292002-02-28 Akim Demaille <akim@epita.fr>
15330
15331 * data/bison.c++: Copy the prologue of bison.simple to fetch
15332 useful M4 definitions, such as b4_header_guard.
15333
153342002-02-25 Akim Demaille <akim@epita.fr>
15335
15336 * src/getargs.c (version): Give the name of the authors, and use a
15337 translator friendly scheme for the bgr
15338 copyright notice.
15339
153402002-02-25 Akim Demaille <akim@epita.fr>
15341
15342 * src/output.c (header_output): Remove, now handled completely via
15343 M4.
15344
153452002-02-25 Akim Demaille <akim@epita.fr>
15346
15347 * m4/m4.m4: New, from CVS Autoconf.
15348 * configure.in: Invoke it.
15349 * src/output.c (output_skeleton): Use its result instead of the
15350 hard coded name.
15351
153522002-02-25 Akim Demaille <akim@epita.fr>
15353
15354 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
15355 Fileutils 4.1.5.
15356 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
15357 * src/output.c (output_skeleton): Use mkstemp to create a real
15358 temporary file.
15359 Move the filling of `skeleton' and its muscle to...
15360 (prepare): here.
15361 (output): Move the definition of the prologue muscle to...
15362 (prepare): here.
15363 * src/system.h (DEFAULT_TMPDIR): New.
15364
153652002-02-14 Paul Eggert <eggert@twinsun.com>
15366
15367 Remove the support for C++ namespace cleanliness; it was
15368 causing more problems than it was curing, since it didn't work
15369 properly on some nonstandard C++ compilers. This can wait
15370 for a proper C++ parser.
15371
15372 * NEWS: Document this.
15373 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
15374 of C++, as it's treated like C now.
15375 * src/bison.simple (YYSTD): Remove.
15376 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
15377 Treat C++ just like Standard C instead of trying to support
15378 namespace cleanliness.
15379
153802002-02-14 Akim Demaille <akim@epita.fr>
15381
15382 * tests/regression.at (else): Adjust to Andreas' change.
15383
153842002-02-14 Akim Demaille <akim@epita.fr>
15385
15386 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
15387
153882002-02-13 Andreas Schwab <schwab@suse.de>
15389
15390 * src/output.c (output_rule_data): Don't output NULL, it might
15391 not be defined yet.
15392
153932002-02-11 Robert Anisko <robert@lrde.epita.fr>
15394
15395 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
15396 (Copyright notice): Update.
15397
153982002-02-11 Akim Demaille <akim@epita.fr>
15399
15400 * tests/regression.at (%nonassoc and eof): Don't include
15401 nonportable headers.
15402
154032002-02-08 Robert Anisko <robert@lrde.epita.fr>
15404
15405 * data/bison.c++: Correct error recovery. Make the user able to
15406 initialize the starting location.
15407
154082002-02-07 Akim Demaille <akim@epita.fr>
15409
15410 * tests/input.at: New.
15411
154122002-02-07 Robert Anisko <robert@lrde.epita.fr>
15413
15414 * data/bison.c++: Replace some direct m4 expansions by constants. Be
15415 more consistent when naming methods and variables. Put preprocessor
15416 directives around tables only needed for debugging.
15417
154182002-02-07 Robert Anisko <robert@lrde.epita.fr>
15419
15420 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15421 C++ parsers.
15422 (yy::b4_name::parse): Use print_.
15423
154242002-02-07 Robert Anisko <robert@lrde.epita.fr>
15425
15426 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15427
154282002-02-07 Robert Anisko <robert@lrde.epita.fr>
15429
15430 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15431 C++ parsers.
15432 (yy::b4_name::parse): Build verbose error messages, and use error_.
15433
154342002-02-06 Robert Anisko <robert@lrde.epita.fr>
15435
15436 * data/bison.c++: Fix m4 quoting in comments.
15437
154382002-02-06 Robert Anisko <robert@lrde.epita.fr>
15439
15440 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15441 not expanded by m4.
15442
154432002-02-05 Akim Demaille <akim@epita.fr>
15444
15445 * data/bison.c++: Adjust to the M4 back end.
15446 More is certainly needed.
15447
154482002-02-05 Akim Demaille <akim@epita.fr>
15449
15450 Give a try to M4 as a back end.
15451
15452 * lib/readpipe.c: New, from wdiff.
15453 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15454 BISON_HAIRY.
15455 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15456 specific values. Now it is m4 that performs the lookup.
15457 * src/parse-skel.y: Remove.
15458 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15459 * src/output.c (actions_output, guards_output)
15460 (token_definitions_output): No longer keeps track of the output
15461 line number, hence remove the second argument.
15462 (guards_output): Check against the guard member of a rule, not the
15463 action member.
15464 Adjust callers.
15465 (output_skeleton): Don't look for the skeleton location, let m4 do
15466 that.
15467 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15468 file will be used.
15469 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15470 (prepare): Given that for the time being changesyntax is not
15471 usable in M4, rename the muscles using `-' to `_'.
15472 Define `defines_flag', `output_parser_name' and `output_header_name'.
15473 * src/output.h (actions_output, guards_output)
15474 (token_definitions_output): Adjust prototypes.
15475 * src/scan-skel.l: Instead of scanning the skeletons, it now
15476 processes the output of m4: `__oline__' and `#output'.
15477 * data/bison.simple: Adjust to be used by M4(sugar).
15478 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15479 to date.
15480 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15481 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15482 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15483 shamelessly stolen from CVS Autoconf.
15484
154852002-02-05 Akim Demaille <akim@epita.fr>
15486
15487 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15488 * configure.in: Check for the declarations of free and malloc.
15489 * src/muscle_tab.c: Adjust.
15490
154912002-02-05 Akim Demaille <akim@epita.fr>
15492
15493 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15494 which have no values.
15495
154962002-02-05 Akim Demaille <akim@epita.fr>
15497
15498 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15499 * data/: here.
15500
155012002-01-29 Paul Eggert <eggert@twinsun.com>
15502
15503 * src/bison.simple (YYSIZE_T): Do not define merely because
15504 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15505 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15506
155072002-01-27 Akim Demaille <akim@epita.fr>
15508
15509 Fix `%nonassoc and eof'.
15510
15511 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15512 which were not properly copied! Replace
15513 memcpy (res->errs, src->errs, src->nerrs);
15514 with
15515 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15516 !!!
15517 * tests/regression.at (%nonassoc and eof): Adjust to newest
15518 Autotest: `.' is not in the PATH.
15519
155202002-01-27 Akim Demaille <akim@epita.fr>
15521
15522 * tests/sets.at (AT_EXTRACT_SETS): New.
15523 (Nullable): Use it.
15524 (Firsts): New.
15525
155262002-01-26 Akim Demaille <akim@epita.fr>
15527
15528 * tests/actions.at, tests/calc.at, tests/headers.at,
15529 * tests/torture.at: Adjust to the newest Autotest which no longer
15530 forces `.' in the PATH.
15531
155322002-01-25 Akim Demaille <akim@epita.fr>
15533
15534 * tests/regression.at (%nonassoc and eof): New.
15535 Suggested by Robert Anisko.
15536
155372002-01-24 Akim Demaille <akim@epita.fr>
15538
15539 Bison dumps core when trying to complain about broken input files.
15540 Reported by Cris van Pelt.
15541
15542 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15543 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15544 into...
15545 (Invalid inputs): Strengthen: exercise parse_percent_token.
15546
155472002-01-24 Robert Anisko <robert.anisko@epita.fr>
15548
15549 * src/Makefile.am: Add bison.c++.
15550 * src/bison.c++: New skeleton.
15551
155522002-01-21 Paolo Bonzini <bonzini@gnu.org>
15553
15554 * po/it.po: New.
15555
155562002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15557
15558 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15559
155602002-01-20 Marc Autret <marc@gnu.org>
15561
15562 * src/files.c (compute_output_file_names): Fix
15563
155642002-01-20 Marc Autret <marc@gnu.org>
15565
15566 * tests/output.at: New test.
15567 * src/files.c (compute_base_names): Don't map extensions when
15568 the YACC flag is set, use defaults.
15569 Reported by Evgeny Stambulchik.
15570
155712002-01-20 Marc Autret <marc@gnu.org>
15572
15573 * src/system.h: Need to define __attribute__ away for non-GCC
15574 compilers as well (i.e., the vendor C compiler).
15575 Suggested by Albert Chin-A-Young.
15576
155772002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15578
15579 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15580 canonical definition.
15581 * src/system.h: Use the canonical definition for PARAMS (avoids
15582 a conflict with the macro from lib/hash.h).
15583
155842002-01-11 Akim Demaille <akim@epita.fr>
15585
15586 * configure.in: Use AC_FUNC_STRNLEN.
15587 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
15588
155892002-01-09 Akim Demaille <akim@epita.fr>
15590
15591 * src/files.c, src/files.h (output_infix): New.
15592 (tab_extension): Remove.
15593 (compute_base_names): Compute the former, drop the latter.
15594 * src/output.c (prepare): Insert the muscles `output-infix', and
15595 `output-suffix'.
15596 * src/parse-skel.y (string, string.1): New.
15597 (section.header): Use it.
15598 (section.yacc): Remove.
15599 (prefix): Remove too.
15600 * src/scan-skel.l: Adjust.
15601 * src/bison.simple, src/bison.hairy: Adjust.
15602
156032002-01-09 Akim Demaille <akim@epita.fr>
15604
15605 * configure.in (WERROR_CFLAGS): Compute it.
15606 * src/Makefile.am (CFLAGS): Pass it.
15607 * tests/atlocal.in (CFLAGS): Idem.
15608 * src/files.c: Fix a few warnings.
15609 (get_extension_index): Remove, unused.
15610
156112002-01-08 Akim Demaille <akim@epita.fr>
15612
15613 * src/getargs.c (AS_FILE_NAME): New.
15614 (getargs): Use it to convert DOSish file names.
15615 * src/files.c (base_name): Rename as full_base_name to avoid
15616 clashes with `base_name ()'.
15617 (filename_split): New.
15618 (compute_base_names): N-th rewrite, using filename_split.
15619
156202002-01-08 Akim Demaille <akim@epita.fr>
15621
15622 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15623 New, stolen from the Fileutils 4.1.
15624 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15625 * configure.in: Check for the presence of memrchr, and of its
15626 prototype.
15627
156282002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15629
15630 * lib/hash.h (__P): Added definition for this macro.
15631 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15632 BUILT_SOURCES, to ensure they are generated first.
15633 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15634 %error-verbose to allow bootstrapping with bison 1.30x.
15635
156362002-01-06 Akim Demaille <akim@epita.fr>
15637
15638 * src/reader.c (parse_braces): Don't fetch the next char, the
15639 convention is to fetch on entry.
15640 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15641 'switch' without a following semicolon.
15642 * tests/regression.at (braces parsing): New.
15643
156442002-01-06 Akim Demaille <akim@epita.fr>
15645
15646 Bison is dead wrong in its RR conflict reports.
15647
15648 * tests/torture.at (GNU Cim Grammar): New.
15649 * src/conflicts.c (count_rr_conflicts): Fix.
15650
156512002-01-06 Akim Demaille <akim@epita.fr>
15652
15653 Creating package.m4 from configure.ac causes too many problems.
15654
15655 * tests/Makefile.am (package.m4): Create it by hand,
15656 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15657
156582002-01-06 Akim Demaille <akim@epita.fr>
15659
15660 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15661 skeleton.h.
15662
156632002-01-04 Paul Eggert <eggert@twinsun.com>
15664
15665 * doc/bison.texinfo (Debugging):
15666 Remove YYSTDERR; it's no longer defined or used.
15667 Also, s/cstdio.h/cstdio/.
15668
156692002-01-03 Akim Demaille <akim@epita.fr>
15670
15671 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15672
156732002-01-03 Akim Demaille <akim@epita.fr>
15674
15675 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15676 tracing code to --trace, wait for a better --trace option, with
15677 args.
15678
156792002-01-03 Akim Demaille <akim@epita.fr>
15680
15681 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15682 The ISO C++ standard is extremely clear about it: stderr is
15683 considered a macro, not a regular symbol (see table 94 `Header
15684 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15685 Therefore std:: does not apply to it. It still does with fprintf.
15686 Also, s/cstdio.h/cstdio/.
15687
156882002-01-03 Akim Demaille <akim@epita.fr>
15689
15690 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15691 for non system headers.
15692
156932002-01-02 Akim Demaille <akim@epita.fr>
15694
15695 Equip the skeleton chain with location tracking, runtime trace,
15696 pure parser and scanner.
15697
15698 * src/parse-skel.y: Request a pure parser, locations, and prefix
15699 renaming.
15700 (%union): Having several members with the same type does not help
15701 type mismatches, simplify.
15702 (YYPRINT, yyprint): New.
15703 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15704 (skel_error): this.
15705 Handle locations.
15706 * src/scan-skel.l: Adjust to these changes.
15707 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15708 (LOCATION_PRINT, skel_control_t): New.
15709
157102001-12-30 Akim Demaille <akim@epita.fr>
15711
15712 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15713 replace `gb' with BLANKS.
15714 * src/scan-skel.l: Adjust.
15715
157162001-12-30 Akim Demaille <akim@epita.fr>
15717
15718 * src/system.h: We don't need nor want bcopy.
15719 Throw away MS-DOS crap: we don't need getpid.
15720 * configure.in: We don't need strndup. It was even causing
15721 problems: because Flex includes the headers *before* us,
15722 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15723 not visible.
15724 * lib/xstrndup.c: New.
15725 * src/scan-skel.l: Use it.
15726 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15727 * src/parse-skel.y: Use %directives instead of #defines.
15728
157292001-12-30 Akim Demaille <akim@epita.fr>
15730
15731 * src/skeleton.h: New.
15732 * src/output.c (output_parser, output_master_parser): Remove, dead
15733 code.
15734 * src/output.h (get_lines_number, actions_output, guards_output)
15735 (token_definitions_output): Prototype them.
15736 * src/parse-skel.y: Add the license notice.
15737 Include output.h and skeleton.h.
15738 (process_skeleton): Returns void, and takes a single parameter.
15739 * src/scan-skel.l: Add the license notice.
15740 Include skeleton.h.
15741 Don't use %option yylineno: it seems that then Flex imagines
15742 REJECT has been used, and therefore it won't reallocate its
15743 buffers (which makes no other sense to me than a bug). It results
15744 in warnings for `unused: yy_flex_realloc'.
15745
157462001-12-30 Robert Anisko <robert.anisko@epita.fr>
15747
15748 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15749 (MUSCLE_INSERT_PREFIX): ...to there.
15750 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15751 (MUSCLE_INSERT_PREFIX): Move from here...
15752
15753 * src/bison.hairy: Add a section directive. Put braces around muscle
15754 names. This parser skeleton is still broken, but Bison should not
15755 choke on a bad muscle 'syntax'.
15756 * src/bison.simple: Add a section directive. Put braces around muscle
15757 names.
15758
15759 * src/files.h (strsuffix, stringappend): Add declarations.
15760 (tab_extension): Add declaration.
15761 (short_base_name): Add declaration.
15762
15763 * src/files.c (strsuffix, stringappend): No longer static. These
15764 functions are used in the skeleton parser.
15765 (tab_extension): New.
15766 (compute_base_names): Use the computations done in this function
15767 to guess if the generated parsers should have '.tab' in their
15768 names.
15769 (short_base_name): No longer static.
15770
15771 * src/output.c (output_skeleton): New.
15772 (output): Disable call to output_master_parser, and give a try to
15773 a new skeleton handling system.
15774 (guards_output, actions_output): No longer static.
15775 (token_definitions_output, get_lines_number): No longer static.
15776
15777 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15778
15779 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
15780 parse-skel.y.
15781
15782 * src/parse-skel.y: New file.
15783 * src/scan-skel.l: New file.
15784
157852001-12-29 Akim Demaille <akim@epita.fr>
15786
15787 %name-prefix is broken.
15788
15789 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15790 Adjust all dependencies.
15791 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15792 %name-prefix.
15793
15794 Renaming yylval but not yylloc is not consistent. Now we do.
15795
15796 * src/bison.simple: Prefix yylloc if used.
15797 * doc/bison.texinfo (Decl Summary): Document that.
15798
157992001-12-29 Akim Demaille <akim@epita.fr>
15800
15801 * doc/bison.texinfo: Promote `%long-directive' over
15802 `%long_directive'.
15803 Remove all references to fixed-output-files, yacc is enough.
15804
158052001-12-29 Akim Demaille <akim@epita.fr>
15806
15807 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15808 user prologue. These are defaults.
15809 * tests/actions.at (Mid-rule actions): Make sure the user can
15810 define YYDEBUG and YYERROR_VERBOSE.
15811
158122001-12-29 Akim Demaille <akim@epita.fr>
15813
15814 * src/output.c (header_output): Don't forget to export YYLTYPE and
15815 yylloc.
15816 * tests/headers.at (export YYLTYPE): New, make sure it does.
15817 * tests/regression.at (%union and --defines, Invalid CPP headers):
15818 Move to...
15819 * tests/headers.at: here.
15820
158212001-12-29 Akim Demaille <akim@epita.fr>
15822
15823 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15824
158252001-12-29 Akim Demaille <akim@epita.fr>
15826
15827 * tests/actions.at (Mid-rule actions): Output on a single line
15828 instead of several.
15829
158302001-12-29 Akim Demaille <akim@epita.fr>
15831
15832 * doc/bison.texinfo: Formatting changes.
15833
158342001-12-29 Akim Demaille <akim@epita.fr>
15835
15836 Don't store the token defs in a muscle, just be ready to output it
15837 on command. Now possible via `symbols'. Fixes a memory leak.
15838
15839 * src/output.c (token_definitions_output): New.
15840 (output_parser, header_output): Use it.
15841 * src/reader.c (symbols_save): Remove.
15842
158432001-12-29 Akim Demaille <akim@epita.fr>
15844
15845 * src/bison.simple: Do not provide a default for YYSTYPE and
15846 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15847 default.
15848
158492001-12-29 Akim Demaille <akim@epita.fr>
15850
15851 Mid-rule actions are simply... ignored!
15852
15853 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15854 the empty-rule associated to the dummy symbol, not to the host
15855 rule.
15856 * tests/actions.at (Mid-rule actions): New.
15857
158582001-12-29 Akim Demaille <akim@epita.fr>
15859
15860 Memory leak.
15861
15862 * src/reader.c (reader): Free grammar.
15863
158642001-12-29 Akim Demaille <akim@epita.fr>
15865
15866 Memory leak.
15867
15868 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15869 since it allocates it for each state, although only one is needed.
15870 (allocate_storage): Do it here.
15871
158722001-12-29 Akim Demaille <akim@epita.fr>
15873
15874 * src/options.h, src/options.c (create_long_option_table): Rename
15875 as...
15876 (long_option_table_new): this, with a clearer prototype.
15877 (percent_table): Remove, unused,
15878 * src/getargs.c (getargs): Adjust.
15879
158802001-12-29 Akim Demaille <akim@epita.fr>
15881
15882 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15883 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15884 as states.
15885
158862001-12-29 Akim Demaille <akim@epita.fr>
15887
15888 * src/lalr.c (build_relations): Rename `states' as `states1'.
15889 Sorry, I don't understand exactly what it is, no better name...
15890
158912001-12-29 Akim Demaille <akim@epita.fr>
15892
15893 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15894 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15895 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15896 as rules.
15897
158982001-12-29 Akim Demaille <akim@epita.fr>
15899
15900 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15901 ago.
15902
159032001-12-29 Akim Demaille <akim@epita.fr>
15904
15905 * src/reader.c, src/reader.h (user_toknums): Remove.
15906 Adjust all users to use symbols[i]->user_token_number.
15907
159082001-12-29 Akim Demaille <akim@epita.fr>
15909
15910 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15911 Adjust all users to use symbols[i]->prec or ->assoc.
15912
159132001-12-29 Akim Demaille <akim@epita.fr>
15914
15915 * src/reader.c, src/reader.h (tags): Remove.
15916 Adjust all users to use symbols[i]->tag.
15917
159182001-12-29 Akim Demaille <akim@epita.fr>
15919
15920 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15921 and rule_table.
15922 * src/reader.c (packsymbols): Fill this table.
15923 Drop sprec.
15924 * src/conflicts.c (resolve_sr_conflict): Adjust.
15925 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15926 single table.
15927 Use symbols[i]->tag instead of tags[i].
15928
159292001-12-29 Akim Demaille <akim@epita.fr>
15930
15931 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15932 In addition, put a comment in there, to replace...
15933 * tests/regression.at (%union and C comments): Remove.
15934
159352001-12-29 Akim Demaille <akim@epita.fr>
15936
15937 * tests/regression.at (Web2c Actions): Blindly move the actual
15938 output as expected output. The contents *seem* right to me, but I
15939 can't pretend reading perfectly parser tables... Nonetheless, all
15940 the other tests pass correctly, the table look OK, even though the
15941 presence of `$axiom' is to be noted: AFAICS it is useless (but
15942 harmless).
15943
159442001-12-29 Akim Demaille <akim@epita.fr>
15945
15946 * src/reader.c (readgram): Don't add the rule 0 if there were no
15947 rules read. In other words, add it _after_ having performed
15948 grammar sanity checks.
15949 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15950
159512001-12-29 Akim Demaille <akim@epita.fr>
15952
15953 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15954 visible, and some states have now a different number.
15955
159562001-12-29 Akim Demaille <akim@epita.fr>
15957
15958 * src/reader.c (readgram): Bind the initial rule's lineno to that
15959 of the first rule.
15960 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15961 (Solved SR Conflicts): Adjust rule 0's line number.
15962
159632001-12-29 Akim Demaille <akim@epita.fr>
15964
15965 Fix the `GAWK Grammar' failure.
15966
15967 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15968 the reductions of the first state which was mistakenly confused
15969 with the final state because precisely final_state was initialized
15970 to 0.
15971 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15972 now noticed by Bison.
15973 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15974 have a reduction on $default.
15975
159762001-12-29 Akim Demaille <akim@epita.fr>
15977
15978 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15979 rule line numbers.
15980 * src/closure.c (print_closure): Likewise.
15981 * src/derives.c (print_derives): Likewise.
15982 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15983 now.
15984
159852001-12-29 Akim Demaille <akim@epita.fr>
15986
15987 * src/lalr.c (lookaheads_print): New.
15988 (lalr): Call it when --trace-flag.
15989 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15990 are dumped.
15991
159922001-12-29 Akim Demaille <akim@epita.fr>
15993
15994 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15995 when walking through ritem, even via rule->rhs.
15996 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15997 (useful_production, useless_nonterminals): Likewise.
15998 (reduce_grammar_tables): Likewise, plus update nritems.
15999 * src/nullable.c (set_nullable): Likewise.
16000 * src/lalr.c (build_relations): Likewise.
16001 * tests/sets.at (Nullable): Adjust.
16002 Fortunately, now, the $axiom is no longer nullable.
16003
160042001-12-29 Akim Demaille <akim@epita.fr>
16005
16006 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
16007 the 0-sentinel.
16008 * src/gram.c (ritem_longest_rhs): Likewise.
16009 * src/reduce.c (nonterminals_reduce): Likewise.
16010 * src/print_graph.c (print_graph): Likewise.
16011 * src/output.c (output_rule_data): Likewise.
16012 * src/nullable.c (set_nullable): Likewise.
16013
160142001-12-29 Akim Demaille <akim@epita.fr>
16015
16016 * src/output.c: Comment changes.
16017
160182001-12-27 Paul Eggert <eggert@twinsun.com>
16019
16020 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
16021 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
16022 Sparc, as they were causing more porting problems than the
16023 (minor) performance improvement was worth.
16024
16025 Also, catch up with 1.31's YYSTD.
16026
160272001-12-27 Akim Demaille <akim@epita.fr>
16028
16029 * src/output.c (output_gram): Rely on nritems, not the
16030 0-sentinel. See below.
16031 Use -1 as separator, not 0.
16032 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
16033 Rely on -1 as separator in yyrhs, instead of 0.
16034 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
16035 twice `Now at end of input', therefore there are two lines less to
16036 expect.
16037
160382001-12-27 Akim Demaille <akim@epita.fr>
16039
16040 * tests/regression.at (Unresolved SR Conflicts):
16041 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
16042 below.
16043
160442001-12-27 Akim Demaille <akim@epita.fr>
16045
16046 * src/LR0.c (new_state): Recognize the final state by the fact it
16047 is reached by eoftoken.
16048 (insert_start_shifting_state, insert_eof_shifting_state)
16049 (insert_accepting_state, augment_automaton): Remove, since now
16050 these states are automatically computed from the initial state.
16051 (generate_states): Adjust.
16052 * src/print.c: When reporting a rule number to the user, substract
16053 1, so that the axiom rule is rule 0, and the first user rule is 1.
16054 * src/reduce.c: Likewise.
16055 * src/print_graph.c (print_core): For the time being, just as for
16056 the report, depend upon --trace-flags to dump the full set of
16057 items.
16058 * src/reader.c (readgram): Once the grammar read, insert the rule
16059 0: `$axiom: START-SYMBOL $'.
16060 * tests/set.at: Adjust: rule 0 is now displayed, and since the
16061 number of the states has changed (the final state is no longer
16062 necessarily the last), catch up.
16063
160642001-12-27 Akim Demaille <akim@epita.fr>
16065
16066 Try to make the use of the eoftoken valid. Given that its value
16067 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
16068 is used instead of > 0 where appropriate, (ii), depend upon nritems
16069 instead of the 0-sentinel.
16070
16071 * src/gram.h, src/gram.c (nritems): New.
16072 Expected to be duplication of nitems, but for the time being...
16073 * src/reader.c (packgram): Assert nritems and nitems are equal.
16074 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
16075 * src/closure.c (print_closure, print_fderives): Likewise.
16076 * src/gram.c (ritem_print): Likewise.
16077 * src/print.c (print_core, print_grammar): Likewise.
16078 * src/print_graph.c: Likewise.
16079
160802001-12-27 Akim Demaille <akim@epita.fr>
16081
16082 * src/main.c (main): If there are complains after grammar
16083 reductions, then output the report anyway if requested, then die.
16084 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
16085 * src/reader.c (eoftoken): New.
16086 (parse_token_decl): If the token being defined has value `0', it
16087 is the eoftoken.
16088 (packsymbols): No longer hack `tags' to insert `$' by hand.
16089 Be sure to preserve the value of the eoftoken.
16090 (reader): Make sure eoftoken is defined.
16091 Initialize nsyms to 0: now eoftoken is created just like the others.
16092 * src/print.c (print_grammar): Don't special case the eof token.
16093 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
16094 lie anyway, albeit pleasant.
16095 * tests/calc.at: Exercise error messages with eoftoken.
16096 Change the grammar so that empty input is invalid.
16097 Adjust expectations.
16098 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
16099
161002001-12-27 Akim Demaille <akim@epita.fr>
16101
16102 * configure.in: Check the protos of strchr ans strspn.
16103 Replace strchr if needed.
16104 * src/system.h: Provide the protos of strchr, strspn and memchr if
16105 missing.
16106 * lib/strchr.c: New.
16107 * src/reader.c (symbols_save): Use strchr.
16108
161092001-12-27 Akim Demaille <akim@epita.fr>
16110
16111 * src/print.c, src/print_graph.c (escape): New.
16112 Use it to quote the TAGS outputs.
16113 * src/print_graph.c (print_state): Now errors are in red, and
16114 reductions in green.
16115 Prefer high to wide: output the state number on a line of its own.
16116
161172001-12-27 Akim Demaille <akim@epita.fr>
16118
16119 * src/state.h, src/state.c (reductions_new): New.
16120 * src/LR0.c (set_state_table): Let all the states have a
16121 `reductions', even if reduced to 0.
16122 (save_reductions): Adjust.
16123 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
16124 * src/print.c (print_reductions, print_actions): Adjust.
16125 * src/output.c (action_row): Adjust.
16126
161272001-12-27 Akim Demaille <akim@epita.fr>
16128
16129 * src/state.h, src/state.c (errs_new, errs_dup): New.
16130 * src/LR0.c (set_state_table): Let all the states have an errs,
16131 even if reduced to 0.
16132 * src/print.c (print_errs, print_reductions): Adjust.
16133 * src/output.c (output_actions, action_row): Adjust.
16134 * src/conflicts.c (resolve_sr_conflict): Adjust.
16135
161362001-12-27 Akim Demaille <akim@epita.fr>
16137
16138 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
16139
161402001-12-27 Akim Demaille <akim@epita.fr>
16141
16142 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
16143 * src/print.c: here.
16144 (lookaheadset, shiftset): New, used as additional storage by
16145 print_reductions.
16146 (print_results): Adjust.
16147 (print_shifts, print_gotos, print_errs): New, extracted from...
16148 (print_actions): here.
16149 * src/print_graph.c (print_actions): Remove dead code.
16150
161512001-12-27 Akim Demaille <akim@epita.fr>
16152
16153 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
16154 `$n' and `@n'.
16155
161562001-12-27 Akim Demaille <akim@epita.fr>
16157
16158 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
16159 (build_relations): Adjust.
16160
161612001-12-27 Akim Demaille <akim@epita.fr>
16162
16163 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
16164 duplication.
16165
161662001-12-27 Akim Demaille <akim@epita.fr>
16167
16168 * src/reader.c (packgram): Catch nitems overflows.
16169
161702001-12-27 Akim Demaille <akim@epita.fr>
16171
16172 * src/files.c, src/files.h (guard_obstack): Remove.
16173 * src/output.c (output): Adjust.
16174 * src/reader.c (parse_braces): New, factoring...
16175 (copy_action, copy_guard): these two which are renamed as...
16176 (parse_action, parse_guard): these.
16177 As a voluntary consequence, using braces around guards is now
16178 mandatory.
16179
161802001-12-27 Akim Demaille <akim@epita.fr>
16181
16182 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
16183 * src/reader.c (symbol_list): `guard' and `guard_line' are new
16184 members.
16185 (symbol_list_new): Adjust.
16186 (copy_action): action_line is the first line, not the last.
16187 (copy_guard): Just as for actions, store the `action' only, not
16188 the switch/case/break flesh.
16189 Don't parse the user action that might follow the guard, let...
16190 (readgram): do it, i.e., now, there can be an action after a
16191 guard.
16192 In other words the guard is just explicitly optional.
16193 (packgram): Adjust.
16194 * src/output.c (guards_output): New.
16195 (output_parser): Call it when needed.
16196 (output): Also free the guard and attrs obstacks.
16197 * src/files.c, src/files.h (obstack_save): Remove.
16198 (output_files): Remove.
16199 As a result, if one needs the former `.act' file, using an
16200 appropriate skeleton which requires actions and guards is now
16201 required.
16202 * src/main.c (main): Adjust.
16203 * tests/semantic.at: New.
16204 * tests/regression.at: Use `input.y' as input file name.
16205 Avoid 8+3 problems by requiring input.c when the test needs the
16206 parser.
16207
162082001-12-27 Akim Demaille <akim@epita.fr>
16209
16210 * src/reader.c (symbol_list_new): Be sure to initialize all the
16211 fields.
16212
162132001-12-27 Akim Demaille <akim@epita.fr>
16214
16215 All the hacks using a final pseudo state are now useless.
16216
16217 * src/LR0.c (set_state_table): state_table holds exactly nstates.
16218 * src/lalr.c (nLA): New.
16219 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
16220 instead of lookaheadsp from the pseudo state (nstate + 1).
16221
162222001-12-27 Akim Demaille <akim@epita.fr>
16223
16224 * src/output.c (action_row, token_actions): Use a state_t instead
16225 of a integer, and nlookaheads instead of the following state's
16226 lookaheadsp.
16227
162282001-12-27 Akim Demaille <akim@epita.fr>
16229
16230 * src/conflicts.c (log_resolution, flush_shift)
16231 (resolve_sr_conflict, set_conflicts, solve_conflicts)
16232 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
16233 (conflicts_print, print_reductions): Use a state_t instead of an
16234 integer when referring to a state.
16235 As much as possible, depend upon nlookaheads, instead of the
16236 `lookaheadsp' member of the following state (since lookaheads of
16237 successive states are successive, the difference between state n + 1
16238 and n served as the number of lookaheads for state n).
16239 * src/lalr.c (add_lookback_edge): Likewise.
16240 * src/print.c (print_core, print_actions, print_state)
16241 (print_results): Likewise.
16242 * src/print_graph.c (print_core, print_actions, print_state)
16243 (print_graph): Likewise.
16244 * src/conflicts.h: Adjust.
16245
162462001-12-27 Akim Demaille <akim@epita.fr>
16247
16248 * src/bison.hairy: Formatting/comment changes.
16249 ANSIfy.
16250 Remove `register' indications.
16251 Add plenty of `static'.
16252
162532001-12-27 Akim Demaille <akim@epita.fr>
16254
16255 * src/output.c (prepare): Drop the muscle `ntbase' which
16256 duplicates ntokens.
16257 * src/bison.simple: Formatting/comment changes.
16258 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
16259 is an undocumented synonym.
16260
162612001-12-22 Akim Demaille <akim@epita.fr>
16262
16263 * src/output.c (output_table_data): Change the prototype to use
16264 `int' for array ranges: some invocations do pass an int, not a
16265 short.
16266 Reported by Wayne Green.
16267
162682001-12-22 Akim Demaille <akim@epita.fr>
16269
16270 Some actions of web2c.y are improperly triggered.
16271 Reported by Mike Castle.
16272
16273 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
16274 * tests/regression.at (Web2c): Rename as...
16275 (Web2c Report): this.
16276 (Web2c Actions): New.
16277
162782001-12-22 Akim Demaille <akim@epita.fr>
16279
16280 Reductions in web2c.y are improperly reported.
16281 Reported by Mike Castle.
16282
16283 * src/conflicts.c (print_reductions): Fix.
16284 * tests/regression.at (Web2c): New.
16285
162862001-12-18 Akim Demaille <akim@epita.fr>
16287
16288 Some host fail on `assert (!"foo")', which expands to
16289 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
16290 Reported by Nelson Beebee.
16291
16292 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
16293 `#define it_succeeded 0' and `assert (it_succeeded)'.
16294
162952001-12-17 Marc Autret <autret_m@epita.fr>
16296
16297 * src/bison.simple: Don't hard code the skeleton line and filename.
16298 * src/output.c (output_parser): Rename 'line' as 'output_line'.
16299 New line counter 'skeleton_line' (skeleton-line muscle).
16300
163012001-12-17 Paul Eggert <eggert@twinsun.com>
16302
16303 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
16304 YYDEBUG must be defined to a nonzero value.
16305
16306 * src/bison.simple (yytname): Do not assume that the user defines
16307 YYDEBUG to a properly parenthesized expression.
16308
163092001-12-17 Akim Demaille <akim@epita.fr>
16310
16311 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
16312 nlookaheads is a new member.
16313 Adjust all users.
16314 * src/lalr.h (nlookaheads): Remove this orphan declaration.
16315 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
16316 state.
16317
163182001-12-17 Akim Demaille <akim@epita.fr>
16319
16320 * src/files.h, src/files.c (open_files, close_files): Remove.
16321 * src/main.c (main): Don't open/close files, nor invoke lex_free,
16322 let...
16323 * src/reader.c (reader): Do it.
16324
163252001-12-17 Akim Demaille <akim@epita.fr>
16326
16327 * src/conflicts.c (print_reductions): Formatting changes.
16328
163292001-12-17 Akim Demaille <akim@epita.fr>
16330
16331 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
16332 (flush_reduce): New.
16333 (resolve_sr_conflict): Adjust.
16334
163352001-12-17 Akim Demaille <akim@epita.fr>
16336
16337 * src/output.c (output_obstack): Be static and rename as...
16338 (format_obstack): this, to avoid any confusion with files.c's
16339 output_obstack.
16340 * src/reader.h (muscle_obstack): Move to...
16341 * src/output.h: here, since it's defined in output.c.
16342
163432001-12-17 Akim Demaille <akim@epita.fr>
16344
16345 * src/output.c (action_row, save_column, default_goto)
16346 (sort_actions, matching_state, pack_vector): Better variable
16347 locality.
16348
163492001-12-17 Akim Demaille <akim@epita.fr>
16350
16351 * src/output.c: Various formatting changes.
16352
163532001-12-17 Akim Demaille <akim@epita.fr>
16354
16355 * src/files.c (output_files): Free the output_obstack.
16356 * src/main.c (main): Call print and print_graph conditionally.
16357 * src/print.c (print): Work unconditionally.
16358 * src/print_graph.c (print_graph): Work unconditionally.
16359 * src/conflicts.c (log_resolution): Output only if verbose_flag.
16360
163612001-12-16 Marc Autret <autret_m@epita.fr>
16362
16363 * src/output.c (actions_output): Fix. When we use %no-lines,
16364 there is one less line per action.
16365
163662001-12-16 Marc Autret <autret_m@epita.fr>
16367
16368 * src/bison.simple: Remove a useless #line directive.
16369 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
16370 * src/output.c (get_lines_number): New.
16371 (output_parser): Adjust, now takes care about the lines of a
16372 output muscles.
16373 Fix line numbering.
16374 (actions_output): Computes the number of lines taken by actions.
16375 (output_master_parser): Insert new skeleton which is the name of
16376 the output parser file name.
16377
163782001-12-15 Marc Autret <autret_m@epita.fr>
16379
16380 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
16381
163822001-12-15 Marc Autret <autret_m@epita.fr>
16383
16384 * src/output.c (output_gram): Keep track of the hairy one.
16385
163862001-12-15 Akim Demaille <akim@epita.fr>
16387
16388 Make `make distcheck' work.
16389
16390 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
16391 system.h which uses libgettext.h.
16392
163932001-12-15 Akim Demaille <akim@epita.fr>
16394
16395 * src/nullable.c (set_nullable): Useless rules must be skipped,
16396 otherwise, since we range over their symbols, we might look at a
16397 nonterminal which no longer ``exists'', i.e., it is not counted in
16398 `nvars', hence we overflow our arrays.
16399
164002001-12-15 Akim Demaille <akim@epita.fr>
16401
16402 The header can also be produced directly, without any obstack!
16403 Yahoo!
16404
16405 * src/files.c, src/files.h (defines_obstack): Remove.
16406 (compute_header_macro): Global.
16407 (defines_obstack_save): Remove.
16408 * src/reader.c (parse_union_decl): No longer output to
16409 defines_obstack: its content can be found in the `stype' muscle
16410 anyway.
16411 (output_token_translations): Merge into...
16412 (symbols_output): this.
16413 Rename as...
16414 (symbols_save): this.
16415 (reader): Adjust.
16416 * src/output.c (header_output): New.
16417 (output): Call it.
16418
164192001-12-15 Akim Demaille <akim@epita.fr>
16420
16421 * src/reader.c (parse_union_decl): Instead of handling two obstack
16422 simultaneously, use one to define the `stype' muscle, and use the
16423 value of the latter to fill defines_obstack.
16424 (copy_comment): Remove.
16425 (copy_comment2): Work for a single obstack.
16426 Rename as...
16427 (copy_comment): this.
16428
164292001-12-15 Akim Demaille <akim@epita.fr>
16430
16431 * src/lex.c, src/lex.h (xgetc): No longer static.
16432 * src/reader.c (parse_union_decl): Revamp.
16433
164342001-12-15 Akim Demaille <akim@epita.fr>
16435
16436 Still making progress in separating Bison into (i) input, (ii)
16437 process, (iii) output: now we can directly output the parser file
16438 without using table_obstack at all.
16439
16440 * src/files.c, src/files.h (table_obstack): Bye bye.
16441 (parser_file_name): New.
16442 * src/files.c (compute_output_file_names): Compute it.
16443 * src/output.c (actions_output, output_parser)
16444 (output_master_parser): To a file instead of an obstack.
16445
164462001-12-15 Akim Demaille <akim@epita.fr>
16447
16448 Attach actions to rules, instead of pre-outputting them to
16449 actions_obstack.
16450
16451 * src/gram.h (rule_t): action and action_line are new members.
16452 * src/reader.c (symbol_list): Likewise.
16453 (copy_action): Save the actions within the rule.
16454 (packgram): Save them in rule_table.
16455 * src/output.c (actions_output): New.
16456 (output_parser): Use it on `%%actions'.
16457 (output_rule_data): Don't free rule_table.
16458 (output): Do it.
16459 (prepare): Don't save the `action' muscle.
16460 * src/bison.simple: s/%%action/%%actions/.
16461
164622001-12-15 Akim Demaille <akim@epita.fr>
16463
16464 * src/reader.c (copy_action): When --yacc, don't append a `;'
16465 to the user action: let it fail if lacking.
16466 Suggested by Arnold Robbins and Tom Tromey.
16467
164682001-12-14 Akim Demaille <akim@epita.fr>
16469
16470 * src/lex.c (literalchar): Simply return the char you decoded, non
16471 longer mess around with obstacks and int pointers.
16472 Adjust all callers.
16473
164742001-12-14 Akim Demaille <akim@epita.fr>
16475
16476 * src/lex.c (literalchar): Don't escape the special characters,
16477 just decode them, and keep them as char (before, eol was output as
16478 the 2 char string `\n' etc.).
16479 * src/output.c (output_rule_data): Use quotearg to output the
16480 token strings.
16481
164822001-12-13 Paul Eggert <eggert@twinsun.com>
16483
16484 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16485 Do not infringe on the global user namespace when using C++.
16486 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16487 All uses of `fprintf' and `stderr' changed.
16488
16489 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16490
164912001-12-13 Akim Demaille <akim@epita.fr>
16492
16493 The computation of nullable is broken: it doesn't handle empty
16494 RHS's properly.
16495
16496 * tests/torture.at (GNU AWK Grammar): New.
16497 * tests/sets.at (Nullable): New.
16498 * src/nullable.c (set_nullable): Instead of blindly looping over
16499 `ritems', loop over the rules, and then over their rhs's.
16500
16501 Work around Autotest bugs.
16502
16503 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16504 frame, because Autotest understand lines starting with a `+' as
16505 traces from the shell. Then, they are not processed properly.
16506 Admittedly an Autotest bug, but we don't have time to wait for
16507 Autotest to catch up.
16508 * tests/regression.at (Broken Closure): Adjust to the new table
16509 frames.
16510 Move to...
16511 * tests/sets.at: here.
16512
165132001-12-13 Akim Demaille <akim@epita.fr>
16514
16515 * src/closure.c (closure): Use nrules instead of playing tricks
16516 with BITS_PER_WORD.
16517
165182001-12-13 Akim Demaille <akim@epita.fr>
16519
16520 * src/print.c (print_actions): Output the handling of `$' as the
16521 traces do: shifting the token EOF. Before EOF was treated as a
16522 nonterminal.
16523 * tests/regression.at: Adjust some tests.
16524 * src/print_graph.c (print_core): Complete the set of items via
16525 closure. The next-to-final and final states are still unsatisfying,
16526 but that's to be addressed elsewhere.
16527 No longer output the rule numbers, but do output the state number.
16528 A single loop for the shifts + gotos is enough, but picked a
16529 distinct color for each.
16530 (print_graph): Initialize and finalize closure.
16531
165322001-12-13 Akim Demaille <akim@epita.fr>
16533
16534 * src/reader.c (readgram): Remove dead code, an strip useless
16535 braces.
16536 (get_type): Remove, unused.
16537
165382001-12-12 Akim Demaille <akim@epita.fr>
16539
16540 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16541 on that of lib/error.c.
16542
165432001-12-12 Akim Demaille <akim@epita.fr>
16544
16545 Some hosts don't like `/' in includes.
16546
16547 * src/system.h: Include libgettext.h without qualifying the path.
16548 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16549 $(top_srcdir).
16550
165512001-12-11 Marc Autret <autret_m@epita.fr>
16552
16553 * src/output.c (output_parser): Remove useless muscle.
16554
165552001-12-11 Marc Autret <autret_m@epita.fr>
16556
16557 * src/bison.simple: Remove #line just before %%epilogue. It
16558 is now handled in ...
16559 * src/reader.c (read_additionnal_code): Add the output of a
16560 #line for the epilogue.
16561
165622001-12-10 Marc Autret <autret_m@epita.fr>
16563
16564 * src/reader.c (copy_definition): Re-use CPP-outed code which
16565 replace precedent remove.
16566 * src/bison.simple: Remove #line before %%prologue because
16567 %%input-line is wrong at this time.
16568
165692001-12-10 Marc Autret <autret_m@epita.fr>
16570
16571 * src/reader.c (symbols_output): Clean up.
16572 * src/output.c (output_gram, output): Clean up.
16573
165742001-12-10 Akim Demaille <akim@epita.fr>
16575
16576 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16577 * src/LR0.c (set_state_table): here.
16578 * src/lalr.c (lalr): Call it.
16579
165802001-12-10 Akim Demaille <akim@epita.fr>
16581
16582 * src/state.h (shifts): Remove the `number' member: shifts are
16583 attached to state, hence no longer need to be labelled with a
16584 state number.
16585
165862001-12-10 Akim Demaille <akim@epita.fr>
16587
16588 Now that states have a complete set of members, the linked list of
16589 shifts is useless: just fill directly the state's shifts member.
16590
16591 * src/state.h (shifts): Remove the `next' member.
16592 * src/LR0.c (first_state, last_state): Remove.
16593 Adjust the callers.
16594 (augment_automaton): Don't look for the shifts that must be added
16595 a shift on EOF: it is those of the state we looked for! But now,
16596 since shifts are attached, it is no longer needed to looking
16597 merely by its id: its number.
16598
165992001-12-10 Akim Demaille <akim@epita.fr>
16600
16601 * src/LR0.c (augment_automaton): Better variable locality.
16602 Remove an impossible branch: if there is a state corresponding to
16603 the start symbol being shifted, then there is shift for the start
16604 symbol from the initial state.
16605
166062001-12-10 Akim Demaille <akim@epita.fr>
16607
16608 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16609 only when appropriate: when insert_start_shifting_state' is not
16610 invoked.
16611 * tests/regression.at (Rule Line Numbers): Adjust.
16612
166132001-12-10 Akim Demaille <akim@epita.fr>
16614
16615 * src/LR0.c (augment_automaton): Now that all states have shifts,
16616 merge the two cases addition shifts to the initial state.
16617
166182001-12-10 Akim Demaille <akim@epita.fr>
16619
16620 * src/lalr.c (set_state_table): Move to...
16621 * src/LR0.c: here.
16622 * src/lalr.c (lalr): Don't call it...
16623 * src/LR0.c (generate_states): do it.
16624 * src/LR0.h (first_state): Remove, only the table is used.
16625
166262001-12-10 Akim Demaille <akim@epita.fr>
16627
16628 * src/LR0.h (first_shift, first_reduction): Remove.
16629 * src/lalr.c: Don't use first_shift: find shifts through the
16630 states.
16631
166322001-12-10 Akim Demaille <akim@epita.fr>
16633
16634 * src/LR0.c: Attach shifts to states as soon as they are
16635 computed.
16636 * src/lalr.c (set_state_table): Instead of assigning shifts to
16637 state, just assert that the mapping was properly done.
16638
166392001-12-10 Akim Demaille <akim@epita.fr>
16640
16641 * src/LR0.c (insert_start_shift): Rename as...
16642 (insert_start_shifting_state): this.
16643 (insert_eof_shifting_state, insert_accepting_state): New.
16644 (augment_automaton): Adjust.
16645 Better locality of the variables.
16646 When looking if the start_symbol is shifted from the initial
16647 state, using `while (... symbol != start_symbol ...)' sounds
16648 better than `while (... symbol < start_symbol ...)': If fail
16649 to see how the order between symbols could be relevant!
16650
166512001-12-10 Akim Demaille <akim@epita.fr>
16652
16653 * src/getargs.h: Don't declare `spec_name_prefix' and
16654 `spec_file_prefix', declared by src/files.h.
16655 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16656 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16657 * src/output.c (prepare): Adjust.
16658 * src/reader.c (symbols_output): Likewise.
16659 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16660
166612001-12-10 Akim Demaille <akim@epita.fr>
16662
16663 * src/muscle_tab.c (muscle_init): NULL is a better default than
16664 `"0"'.
16665
166662001-12-10 Akim Demaille <akim@epita.fr>
16667
16668 * src/reader.c (reader): Calling symbols_output once is enough.
16669
166702001-12-10 Akim Demaille <akim@epita.fr>
16671
16672 Now that states have a complete set of members, the linked list of
16673 reductions is useless: just fill directly the state's reductions
16674 member.
16675
16676 * src/state.h (struct reductions): Remove member `number' and
16677 `next'.
16678 * src/LR0.c (first_reduction, last_reduction): Remove.
16679 (save_reductions): Don't link the new reductions, store them in
16680 this_state.
16681 * src/lalr.c (set_state_table): No need to attach reductions to
16682 states, it's already done.
16683 * src/output.c (output_actions): No longer free the shifts, then
16684 the reductions, then the states: free all the states and their
16685 members.
16686
166872001-12-10 Akim Demaille <akim@epita.fr>
16688
16689 * src/options.c (OPTN, DRTV, BOTH): New.
16690 (option_table): Use them.
16691
16692 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16693 the job of system.h.
16694 * src/options.c: Don't include stdio.h and xalloc.h for the same
16695 reasons.
16696
166972001-12-10 Akim Demaille <akim@epita.fr>
16698
16699 * src/output.c (output, prepare): Make sure the values of the
16700 muscles `action' and `prologue' are 0-terminated.
16701
167022001-12-10 Akim Demaille <akim@epita.fr>
16703
16704 Clean up GCC warnings.
16705
16706 * src/reader.c (copy_action): `buf' is not used.
16707 (parse_skel_decl): Be static.
16708 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16709 * src/options.h (create_long_option_table): Have a real prototype.
16710 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16711 (hash_delete_at): Return const void *.
16712 Adjust casts to preserve the const.
16713
167142001-12-10 Akim Demaille <akim@epita.fr>
16715
16716 * configure.in: Require 2.52g.
16717 M4 is not needed, but AUTOM4TE is.
16718 * m4/m4.m4: Remove.
16719 * tests/Makefile.am: Adjust.
16720
167212001-12-10 Akim Demaille <akim@epita.fr>
16722
16723 One structure for states is enough, even though theoretically
16724 there are LR(0) states and LALR(1) states.
16725
16726 * src/lalr.h (state_t): Remove.
16727 (state_table): Be state_t **, not state_t *.
16728 * src/state.h (core, CORE_ALLOC): Rename as...
16729 (state_t, STATE_ALLOC): this.
16730 Add the LALR(1) members: shifts, reductions, errs.
16731 * src/LR0.c (state_table): Rename as...
16732 (state_hash): this, to avoid name clashes with the global
16733 `state_table'.
16734 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16735 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16736
167372001-12-10 Akim Demaille <akim@epita.fr>
16738
16739 Bison dumps core on bash.y.
16740 Reported by Pascal Bart.
16741
16742 * src/warshall.c (bitmatrix_print): New.
16743 (TC): Use it.
16744 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
16745 j must be the outer loop.
16746 * tests/regression.at (Broken Closure): New.
16747
167482001-12-05 Akim Demaille <akim@epita.fr>
16749
16750 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16751 its argument.
16752 Reported by Peter Hamorsky.
16753
167542001-12-05 Akim Demaille <akim@epita.fr>
16755
16756 * src/conflicts.c (err_table): Remove.
16757 (resolve_sr_conflict): Adjust.
16758 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16759 Rename as...
16760 (state_t.reductions, state_t.shifts): this.
16761
167622001-12-05 Akim Demaille <akim@epita.fr>
16763
16764 * src/reduce.c (reduce_grammar_tables): No longer disable the
16765 removal of useless rules via CPP but via `if (0)', so that the
16766 compiler still check the code is valid.
16767 For instance, it should have noticed `rline' no longer exists: use
16768 the `line' member of rule_t.
16769 * src/gram.c (dummy, rline): Remove, unused.
16770
167712001-12-05 Akim Demaille <akim@epita.fr>
16772
16773 * src/output.c (pack_vector): Use assert, not berror.
16774 * src/main.c (berror): Remove, unused.
16775
167762001-12-05 Akim Demaille <akim@epita.fr>
16777
16778 New experimental feature: if --verbose --trace output all the
16779 items of a state, not only its kernel.
16780
16781 * src/print.c (print_core): If `trace_flag', then invoke closure
16782 before outputting the items of the state (print_core is no longer
16783 a correct name them).
16784 (print_results): Invoke new_closure/free_closure if needed.
16785
167862001-12-05 Akim Demaille <akim@epita.fr>
16787
16788 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16789 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16790 (nitemset): for consistency with the rest of the project.
16791
167922001-12-05 Akim Demaille <akim@epita.fr>
16793
16794 * src/closure.c (print_closure): Improve.
16795 (closure): Use it for printing input and output.
16796
167972001-12-05 Akim Demaille <akim@epita.fr>
16798
16799 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16800 indexed by nonterminals.
16801
168022001-12-05 Akim Demaille <akim@epita.fr>
16803
16804 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16805 what it was!).
16806 * src/warshall.h: Remove accidental duplication of the content.
16807
168082001-12-05 Akim Demaille <akim@epita.fr>
16809
16810 * src/closure.c (set_fderives): De-obfuscate.
16811
168122001-12-05 Akim Demaille <akim@epita.fr>
16813
16814 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16815
168162001-12-05 Akim Demaille <akim@epita.fr>
16817
16818 * src/closure.c (set_firsts): De-obfuscate.
16819
168202001-12-05 Akim Demaille <akim@epita.fr>
16821
16822 * src/output.c (action_row): De-obfuscate
16823 using the good o' techniques: arrays not pointers, variable
16824 locality, BITISSET, RESETBIT etc.
16825
168262001-12-05 Akim Demaille <akim@epita.fr>
16827
16828 Pessimize the code to simplify it: from now on, all the states
16829 have a valid SHIFTS, which NSHIFTS is possibly 0.
16830
16831 * src/LR0.c (shifts_new): Be global and move to..
16832 * src/state.c, src/state.h: here.
16833 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16834 * src/print_graph: Adjust.
16835
168362001-12-05 Akim Demaille <akim@epita.fr>
16837
16838 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16839 * src/conflicts.c: Use it.
16840 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16841 incorrectly ``simplified''.
16842
168432001-12-05 Akim Demaille <akim@epita.fr>
16844
16845 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16846 using the good o' techniques: arrays not pointers, variable
16847 locality, BITISSET, RESETBIT etc.
16848
168492001-12-05 Akim Demaille <akim@epita.fr>
16850
16851 * src/state.h (SHIFT_SYMBOL): New.
16852 * src/conflicts.c: Use it to deobfuscate.
16853
168542001-12-05 Akim Demaille <akim@epita.fr>
16855
16856 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16857 (print_reductions): De-obfuscate using the good o' techniques:
16858 arrays not pointers, variable locality, BITISSET.
16859
168602001-12-05 Akim Demaille <akim@epita.fr>
16861
16862 * src/conflicts.c (print_reductions): Arrays, not pointers.
16863 Use BITISSET.
16864
168652001-12-05 Akim Demaille <akim@epita.fr>
16866
16867 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16868
168692001-12-05 Akim Demaille <akim@epita.fr>
16870
16871 * src/conflicts.c (print_reductions): Improve variable locality.
16872
168732001-12-05 Akim Demaille <akim@epita.fr>
16874
16875 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16876
168772001-12-05 Akim Demaille <akim@epita.fr>
16878
16879 * src/conflicts.c (print_reductions): Improve variable locality.
16880
168812001-12-05 Akim Demaille <akim@epita.fr>
16882
16883 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16884 * src/lalr.c: Use them.
16885
168862001-12-05 Akim Demaille <akim@epita.fr>
16887
16888 * src/LR0.c (augment_automaton): Formatting changes.
16889 Better variable locality.
16890
168912001-12-05 Akim Demaille <akim@epita.fr>
16892
16893 * src/lalr.c (matrix_print): New.
16894 (transpose): Use it.
16895 Use arrays instead of pointers.
16896
168972001-12-05 Akim Demaille <akim@epita.fr>
16898
16899 * src/lalr.c (maxrhs): Move to...
16900 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16901 * src/lalr.c (build_relations): Adjust.
16902
169032001-12-05 Akim Demaille <akim@epita.fr>
16904
16905 * src/lalr.c (transpose): Free the memory allocated to the
16906 argument, as it is replaced by the results by the unique caller.
16907 (build_relations): Merely invoke transpose: it handles the memory
16908 deallocation.
16909 Improve variable locality.
16910 Avoid variables used as mere abbreviations.
16911 (compute_lookaheads): Use arrays instead of pointers.
16912
169132001-12-05 Akim Demaille <akim@epita.fr>
16914
16915 * src/lalr.c (initialize_F): Improve variable locality.
16916 Avoid variables used as mere abbreviations.
16917
169182001-12-05 Akim Demaille <akim@epita.fr>
16919
16920 * src/derives.c (print_derives): Display the ruleno.
16921 * src/lalr.c (initialize_F, transpose): Better variable locality
16922 to improve readability.
16923 Avoid variables used as mere abbreviations.
16924
169252001-12-05 Akim Demaille <akim@epita.fr>
16926
16927 * src/lalr.c (traverse): Use arrays instead of pointers.
16928
169292001-12-05 Akim Demaille <akim@epita.fr>
16930
16931 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16932 the handling of squeue.
16933 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16934
169352001-12-05 Akim Demaille <akim@epita.fr>
16936
16937 Because useless nonterminals are now kept alive (instead of being
16938 `destroyed'), we now sometimes examine them, and store information
16939 related to them. Hence we need to know their number, and adjust
16940 memory allocations.
16941
16942 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16943 static.
16944 * src/LR0.c (allocate_itemsets): The memory allocated to
16945 `symbol_count' was used for two different purpose: once to count
16946 the number of occurrences of each symbol, and later reassigned to
16947 `shift_symbol', containing the symbol that can be shifted from a
16948 given state.
16949 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16950 only, and...
16951 (new_itemsets): Allocate `shift_symbol' here.
16952 (allocate_itemsets): symbol_count includes useless nonterminals.
16953 Make room for them.
16954 (free_storage): Use `free', not `XFREE', for pointers that cannot
16955 be null.
16956
169572001-12-05 Akim Demaille <akim@epita.fr>
16958
16959 * src/nullable.c (set_nullable): Deobfuscate the handling of
16960 ritem.
16961 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16962
169632001-12-05 Akim Demaille <akim@epita.fr>
16964
16965 * src/gram.c, src/gram.h (ritem_print): New.
16966 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16967 (This useless function was defined only to work around VMS linkers
16968 that can't handle compilation units with variables only).
16969 * src/reduce.c (dump_grammar): Use it to trace the construction of
16970 ritem.
16971
169722001-12-04 Paul Eggert <eggert@twinsun.com>
16973
16974 * src/bison.simple (union yyalloc): Change member names
16975 to be the same as the stack names.
16976 (yyparse): yyptr is now union yyalloc *, not char *.
16977 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16978 and may generate better code on some machines.
16979 (yystpcpy): Use prototype if __STDC__ is defined, not just
16980 if __cplusplus is defined.
16981
169822001-11-30 Akim Demaille <akim@epita.fr>
16983
16984 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16985 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16986 Gettext doesn't compile cleanly, and dies with -Werror.
16987 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16988 Include WARNING_CFLAGS here.
16989 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16990 before being defined.
16991
169922001-11-27 Paul Eggert <eggert@twinsun.com>
16993
16994 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16995 First arg is int, not unsigned.
16996 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16997 (SIZE_MAX, UINT_MAX): New macros.
16998 (quotearg_n_options): Abort if N is negative.
16999 Avoid overflow check on hosts where size_t is 64 bits and int
17000 is 32 bits, as overflow is impossible there.
17001 Fix off-by-one typo that caused unnecessary reallocation.
17002
170032001-11-29 Paul Eggert <eggert@twinsun.com>
17004
17005 Name space cleanup in generated parser.
17006
17007 * doc/bison.texinfo (Bison Parser): Discuss system headers
17008 and their effect on the user name space.
17009
17010 * src/bison.simple:
17011 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
17012 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
17013 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
17014
17015 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
17016 on user names when possible.
17017
17018 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
17019 Simplify test for whather <alloca.h> exists.
17020
17021 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
17022
17023 (<stdio.h>): Include if YYDEBUG.
17024
17025 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
17026 ! defined (yyoverflow) && ! defined (yymemcpy).
17027
17028 (yymemcpy, yyparse): Rename local variables as needed so that
17029 they all begin with 'yy'.
17030
17031 (yystrlen, yystpcpy): New functions.
17032
17033 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
17034 All uses changed.
17035
17036 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
17037 instead of relying on string.h functions. Use YYSTACK_ALLOC
17038 and YYSTACK_FREE instead of malloc and free.
17039
170402001-11-30 Akim Demaille <akim@epita.fr>
17041
17042 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
17043 before their first uses.
17044 (YYBISON, YYPURE): Move to the top of the output.
17045
170462001-11-30 Akim Demaille <akim@epita.fr>
17047
17048 * tests/reduce.at (Useless Nonterminals): Fix.
17049
170502001-11-30 Akim Demaille <akim@epita.fr>
17051
17052 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
17053 if body instead of `;' to pacify GCC's warnings.
17054
170552001-11-30 Akim Demaille <akim@epita.fr>
17056
17057 Instead of mapping the LHS of unused rules to -1, keep the LHS
17058 valid, but flag the rules as invalid.
17059
17060 * src/gram.h (rule_t): `useful' is a new member.
17061 * src/print.c (print_grammar): Adjust.
17062 * src/derives.c (set_derives): Likewise.
17063 * src/reader.c (packgram, reduce_output): Likewise.
17064 * src/reduce.c (reduce_grammar_tables): Likewise.
17065 * tests/reduce.at (Underivable Rules, Useless Rules): New.
17066
170672001-11-30 Akim Demaille <akim@epita.fr>
17068
17069 * src/reduce.c (reduce_output): Formatting changes.
17070 * src/print.c (print_results, print_grammar): Likewise.
17071 * tests/regression.at (Rule Line Numbers)
17072 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
17073
170742001-11-30 Akim Demaille <akim@epita.fr>
17075
17076 * src/reduce.c (nonterminals_reduce): Instead of throwing away
17077 useless nonterminals, move them at the end of the symbol arrays.
17078 (reduce_output): Adjust.
17079 * tests/reduce.at (Useless Nonterminals): Adjust.
17080
170812001-11-30 Akim Demaille <akim@epita.fr>
17082
17083 * src/reduce.c: Various comment/formatting changes.
17084 (nonterminals_reduce): New, extracted from...
17085 (reduce_grammar_tables): here.
17086 (reduce_grammar): Call nonterminals_reduce.
17087
170882001-11-29 Paul Eggert <eggert@twinsun.com>
17089
17090 * src/bison.simple (YYSTACK_REALLOC): Remove.
17091 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
17092 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
17093 New macros.
17094 (union yyalloc): New type.
17095 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
17096 an arbitrary restriction on hosts where size_t is wider than int.
17097
17098 (yyparse): Don't dump core if alloca or malloc fails; instead, report
17099 a parser stack overflow. Allocate just one block of memory for all
17100 three stacks, instead of allocating three blocks; this typically is
17101 faster and reduces fragmentation.
17102
17103 Do not limit the number of items in the stack to a value that fits
17104 in 'int', as this is an arbitrary limit on hosts with 64-bit
17105 size_t and 32-bit int.
17106
171072001-11-29 Marc Autret <autret_m@epita.fr>
17108
17109 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
17110 of defining YYERROR_VERBOSE.
17111 [AT_DATA]: $4 is now out of C declarations in the prologue.
17112
171132001-11-28 Marc Autret <autret_m@epita.fr>
17114
17115 * src/reader.c (parse_dquoted_param): New.
17116 (parse_skel_decl): Use it.
17117 * src/lex.h: Add its prototype.
17118 * src/lex.c (literalchar): Become not static.
17119
171202001-11-28 Marc Autret <autret_m@epita.fr>
17121
17122 * src/output.h: And put its extern declaration here.
17123 * src/output.c (error_verbose): Define here.
17124 (prepare): Echo name modification.
17125 * src/getargs.h: Clean its extern declaration.
17126 * src/getargs.c (error_verbose_flag): Remove.
17127 (getargs): Remove case 'e'.
17128 * src/options.c (option_table): 'error-verbose' is now seen as simple
17129 percent option.
17130 Include output.h.
17131
17132 * src/reader.c (read_declarations): Remove case tok_include.
17133 (parse_include_decl): Remove.
17134 * src/lex.h (token_t): Remove tok_include.
17135 * src/options.c (option_table): 'include' is now a simple command line
17136 option.
17137
171382001-11-28 Marc Autret <autret_m@epita.fr>
17139
17140 * src/bison.simple: Adjust muscle names.
17141 * src/muscle_tab.c (muscle_init): Also rename the muscles.
17142 * src/output.c (prepare): s/_/-/ for the muscles names.
17143 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
17144
171452001-11-28 Marc Autret <autret_m@epita.fr>
17146
17147 * src/bison.simple: Fix debug.
17148 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
17149
171502001-11-28 Akim Demaille <akim@epita.fr>
17151
17152 * src/LR0.c (shifts_new): New.
17153 (save_shifts, insert_start_shift, augment_automaton): Use it.
17154
171552001-11-28 Akim Demaille <akim@epita.fr>
17156
17157 * src/closure.c (closure): `b' and `ruleno' denote the same value:
17158 keep ruleno only.
17159
171602001-11-28 Akim Demaille <akim@epita.fr>
17161
17162 * src/closure.c (closure): Instead of looping over word in array
17163 then bits in words, loop over bits in array.
17164
171652001-11-28 Akim Demaille <akim@epita.fr>
17166
17167 * src/closure.c (closure): No longer optimize the special case
17168 where all the bits of `ruleset[r]' are set to 0, to make the code
17169 clearer.
17170
171712001-11-28 Akim Demaille <akim@epita.fr>
17172
17173 * src/closure.c (closure): `r' and `c' are new variables, used to
17174 de-obfuscate accesses to RULESET and CORE.
17175
171762001-11-28 Akim Demaille <akim@epita.fr>
17177
17178 * src/reduce.c (reduce_print): Use ngettext.
17179 (dump_grammar): Improve the trace accuracy.
17180
171812001-11-28 Akim Demaille <akim@epita.fr>
17182
17183 * src/reduce.c (dump_grammar): Don't translate trace messages.
17184
171852001-11-28 Akim Demaille <akim@epita.fr>
17186
17187 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
17188 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
17189 as all tags are free'ed afterwards.
17190 From Enrico Scholz.
17191
171922001-11-27 Paul Eggert <eggert@twinsun.com>
17193
17194 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
17195 use alloca when we didn't want to, and vice versa.
17196
171972001-11-27 Marc Autret <autret_m@epita.fr>
17198
17199 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
17200 initialization.
17201 * src/output.c (prepare): Remove its update.
17202
172032001-11-27 Marc Autret <autret_m@epita.fr>
17204
17205 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
17206 Use %error-verbose.
17207
172082001-11-27 Marc Autret <autret_m@epita.fr>
17209
17210 * src/bison.simple: Remove YYERROR_VERBOSE using.
17211 Use %%error_verbose.
17212 (yyparse): Likewise.
17213 * src/output.c (prepare): Give its final value.
17214 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
17215 * src/getargs.h: Add its extern declaration.
17216 * src/getargs.c (error_verbose_flag): New int.
17217 (getargs): Update to catch new case.
17218 * src/options.c (option_table): 'error-verbose' is a new option.
17219 (shortopts): Update.
17220
172212001-11-27 Akim Demaille <akim@epita.fr>
17222
17223 * src/system.h: Use intl/libgettext.h.
17224 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
17225
172262001-11-27 Akim Demaille <akim@epita.fr>
17227
17228 * tests/torture.at (Exploding the Stack Size with Malloc):
17229 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
17230
172312001-11-27 Akim Demaille <akim@epita.fr>
17232
17233 * src/files.c: Include error.h.
17234 Reported by Hans Aberg.
17235
172362001-11-26 Marc Autret <autret_m@epita.fr>
17237
17238 * src/reader.c (parse_include_decl): New, not yet implemented.
17239 (read_declarations): Add case tok_include.
17240 * src/getargs.h (include): Add its extern definition.
17241 * src/getargs.c (include): New const char *.
17242 (getargs): Add case '-I'.
17243 * src/options.c (option_table): Add include as command line and
17244 percent option.
17245 * src/lex.h (token_t): Add tok_include.
17246
172472001-11-26 Akim Demaille <akim@epita.fr>
17248
17249 * src/reader.c (readgram): Make sure rules for mid-rule actions
17250 have a lineno equal to that of their host rule.
17251 Reported by Hans Aberg.
17252 * tests/regression.at (Rule Line Numbers): New.
17253
172542001-11-26 Akim Demaille <akim@epita.fr>
17255
17256 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
17257 size_ts.
17258
172592001-11-26 Akim Demaille <akim@epita.fr>
17260
17261 * src/complain.c, src/complain.h (error): Remove, provided by
17262 lib/error.[ch].
17263
172642001-11-26 Akim Demaille <akim@epita.fr>
17265
17266 * src/reader.c (read_declarations): Don't abort on tok_illegal,
17267 issue an error message.
17268 * tests/regression.at (Invalid %directive): New.
17269 Reported by Hans Aberg.
17270
172712001-11-26 Akim Demaille <akim@epita.fr>
17272
17273 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
17274 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17275
172762001-11-26 Akim Demaille <akim@epita.fr>
17277
17278 * src/conflicts.c (conflicts_print): Don't complain at all when
17279 there are no reduce/reduce conflicts, and as many shift/reduce
17280 conflicts as expected.
17281 * tests/regression.at (%expect right): Adjust.
17282
172832001-11-23 Akim Demaille <akim@epita.fr>
17284
17285 * lib/alloca.c: Update, from fileutils.
17286
172872001-11-23 Akim Demaille <akim@epita.fr>
17288
17289 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
17290
172912001-11-23 Akim Demaille <akim@epita.fr>
17292
17293 * src/system.h: Include alloca.h.
17294 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
17295
172962001-11-23 Akim Demaille <akim@epita.fr>
17297
17298 * src/print_graph.c (print_actions): Remove `rule', unused.
17299 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
17300 pacify GCC's signed < unsigned warnings.
17301 * src/closure.c (itemsetsize): Likewise.
17302 * src/reader.c (symbol_list_new): Static.
17303
173042001-11-23 Akim Demaille <akim@epita.fr>
17305
17306 Attaching lineno to buckets is stupid, since only one copy of each
17307 symbol is kept, only the line of the first occurrence is kept too.
17308
17309 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
17310 * src/reader.c (rline_allocated): Remove, unused.
17311 (symbol_list): Have a `line' member.
17312 (symbol_list_new): New.
17313 (readgram): Use it.
17314 * src/print.c (print_grammar): Output the rule line numbers.
17315 * tests/regression.at (Solved SR Conflicts)
17316 (Unresolved SR Conflicts): Adjust.
17317 Reported by Hans Aberg.
17318
173192001-11-22 Marc Autret <autret_m@epita.fr>
17320
17321 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
17322
173232001-11-22 Marc Autret <autret_m@epita.fr>
17324
17325 * src/muscle_tab.c (muscle_init): Remove initialization of
17326 skeleton muscle.
17327 * src/output.c (output_master_parser): Do it here.
17328
173292001-11-20 Akim Demaille <akim@epita.fr>
17330
17331 * po/sv.po: New.
17332 * configure.in (ALL_LINGUAS): Adjust.
17333 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
17334 longer contains strings to translate.
17335
173362001-11-19 Akim Demaille <akim@epita.fr>
17337
17338 * src/conflicts.c (conflicts_print): Add a missing \n.
17339
173402001-11-19 Akim Demaille <akim@epita.fr>
17341
17342 * src/nullable.c (nullable_print): New.
17343 (set_nullable): Call it when tracing.
17344 Better locality of variables.
17345
173462001-11-19 Akim Demaille <akim@epita.fr>
17347
17348 * src/print.c (print_actions): Better locality of variables.
17349
173502001-11-19 Akim Demaille <akim@epita.fr>
17351
17352 * src/derives.c (print_derives): Fix and enrich.
17353 * src/closure.c (print_fderives): Likewise.
17354
173552001-11-19 Akim Demaille <akim@epita.fr>
17356
17357 * src/closure.c (itemsetend): Remove, replaced with...
17358 (itemsetsize): new.
17359
173602001-11-19 Akim Demaille <akim@epita.fr>
17361
17362 * src/LR0.c (kernel_end): Remove, replaced with...
17363 (kernel_size): new.
17364
173652001-11-19 Akim Demaille <akim@epita.fr>
17366
17367 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
17368 to clarify.
17369
173702001-11-19 Akim Demaille <akim@epita.fr>
17371
17372 * src/closure.c (closure): Use arrays instead of pointers to clarify.
17373
173742001-11-19 Akim Demaille <akim@epita.fr>
17375
17376 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
17377 trace messages.
17378 * src/LR0.c: Likewise.
17379 (allocate_itemsets): Use arrays instead of pointers to clarify.
17380
173812001-11-19 Akim Demaille <akim@epita.fr>
17382
17383 * src/getargs.c (statistics_flag): Replace with...
17384 (trace_flag): New.
17385 (longopts): Accept --trace instead of --statistics.
17386 * src/getargs.h, src/options.c: Adjust.
17387 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
17388 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
17389
173902001-11-19 Akim Demaille <akim@epita.fr>
17391
17392 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
17393 pointers to clarify the code.
17394 (save_reductions, save_shifts): Factor common parts of alternatives.
17395
173962001-11-19 Akim Demaille <akim@epita.fr>
17397
17398 * src/LR0.c (new_state, get_state): Complete TRACE code.
17399 * src/closure.c: Include `reader.h' to get `tags', needed by the
17400 trace code.
17401 Rename the conditional DEBUG as TRACE.
17402 Output consistently TRACEs to stderr, not stdout.
17403 * src/derives.c: Likewise.
17404 * src/reduce.c: (inaccessable_symbols): Using if is better style
17405 than goto.
17406 Use `#if TRACE' instead of `#if 0' for tracing code.
17407
174082001-11-19 Akim Demaille <akim@epita.fr>
17409
17410 * src/system.h (LIST_FREE, shortcpy): New.
17411 * src/LR0.c: Use them.
17412 * src/output.c (free_itemsets, free_reductions, free_shifts):
17413 Remove, replaced by LIST_FREE.
17414
174152001-11-19 Akim Demaille <akim@epita.fr>
17416
17417 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17418 (REDUCTIONS_ALLOC): New.
17419 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17420 allocation.
17421
174222001-11-19 Akim Demaille <akim@epita.fr>
17423
17424 * src/LR0.c (new_state): Complete trace code.
17425 * src/nullable.c (set_nullable): Don't translate traces.
17426
174272001-11-19 Akim Demaille <akim@epita.fr>
17428
17429 * src/print_graph.c (print_core): Better locality of variables.
17430 * src/print.c (print_core): Likewise.
17431
174322001-11-19 Akim Demaille <akim@epita.fr>
17433
17434 * src/vcg.c: You do the output, so you are responsible of the
17435 handling of VCG syntax, in particular: use quotearg.
17436 * src/print_graph.c: Don't.
17437 (print_actions): Don't output the actions as part of the nodes,
17438 since that's the job of the edges.
17439 (print_state): Don't output by hand: fill the node description,
17440 and ask for its output.
17441
174422001-11-19 Akim Demaille <akim@epita.fr>
17443
17444 * src/bison.simple (yyparse): When verbosely reporting an error,
17445 no longer put additional quotes around token names.
17446 * tests/calc.at: Adjust.
17447
174482001-11-19 Akim Demaille <akim@epita.fr>
17449
17450 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17451 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17452 * src/output.c: Adjust.
17453
174542001-11-19 Akim Demaille <akim@epita.fr>
17455
17456 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17457 (rule_t): this.
17458 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17459
174602001-11-19 Akim Demaille <akim@epita.fr>
17461
17462 * src/gram.h (rule_t): New.
17463 (rule_table): New.
17464 (rrhs, rlhs): Remove, part of state_t.
17465 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17466 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17467 * src/reader.c, src/reduce.c: Adjust.
17468
174692001-11-19 Akim Demaille <akim@epita.fr>
17470
17471 * src/reader.c (symbols_output): New, extracted from...
17472 (packsymbols): Here.
17473 (reader): Call it.
17474
174752001-11-19 Akim Demaille <akim@epita.fr>
17476
17477 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17478 (maxrhs): this new function.
17479
174802001-11-19 Akim Demaille <akim@epita.fr>
17481
17482 * src/lalr.c (F): New macro to access the variable F.
17483 Adjust.
17484
174852001-11-19 Akim Demaille <akim@epita.fr>
17486
17487 * src/lalr.h (LA): New macro to access the variable LA.
17488 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17489 * src/lalr.c: Adjust.
17490
174912001-11-19 Akim Demaille <akim@epita.fr>
17492
17493 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17494 (set_state_table): handle the `lookaheads' members.
17495
174962001-11-19 Akim Demaille <akim@epita.fr>
17497
17498 * src/lalr.h (lookaheads): Removed array, whose contents is now
17499 a member of...
17500 (state_t): this structure.
17501 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17502 Adjust.
17503
175042001-11-19 Akim Demaille <akim@epita.fr>
17505
17506 * src/lalr.h (consistent): Removed array, whose contents is now
17507 a member of...
17508 (state_t): this structure.
17509 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17510 Adjust.
17511
175122001-11-19 Akim Demaille <akim@epita.fr>
17513
17514 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17515 contents are now members of...
17516 (state_t): this structure.
17517 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17518 Adjust.
17519
175202001-11-19 Akim Demaille <akim@epita.fr>
17521
17522 * src/lalr.h (state_t): New.
17523 (state_table): Be a state_t * instead of a core **.
17524 (accessing_symbol): Remove, part of state_t.
17525 * src/lalr.c: Adjust.
17526 (set_accessing_symbol): Merge into...
17527 (set_state_table): this.
17528 * src/print_graph.c, src/conflicts.c: Adjust.
17529
175302001-11-14 Akim Demaille <akim@epita.fr>
17531
17532 * tests/calc.at, tests/output.at, tests/regression.at,
17533 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17534 now the tests are run in private dirs, therefore AC_CLEANUP and
17535 family can be simplified to 0-ary.
17536 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17537 use abs. path to find config.h.
17538 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17539 stderr, there can be way too much random noise.
17540 Instead pass -Werror to GCC and rely on the exit status.
17541 Reported by Wolfram Wagner.
17542
175432001-11-14 Akim Demaille <akim@epita.fr>
17544
17545 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17546 defined only if yyoverflow is defined, to avoid `warning: unused
17547 variable `yyvs1''.
17548 Reported by The Test Suite.
17549
175502001-11-14 Akim Demaille <akim@epita.fr>
17551
17552 * src/print.c: Include reduce.h.
17553 Reported by Hans Aberg.
17554
175552001-11-14 Akim Demaille <akim@epita.fr>
17556
17557 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17558 Revert a previous patch: these are really const.
17559 * src/conflicts.c (conflict_report): Additional useless pair of
17560 braces to pacify GCC's warnings for `if () if () {} else {}'.
17561 * src/lex.c (parse_percent_token): Replace equal_offset with
17562 arg_offset.
17563 arg is const.
17564 Be sure to strdup `arg' when used, since there is no reason for
17565 token_buffer not to change.
17566
175672001-11-14 Akim Demaille <akim@epita.fr>
17568
17569 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17570 definition.
17571 * src/main.c (main): Use them.
17572 Suggested by Hans Aberg.
17573
175742001-11-12 Akim Demaille <akim@epita.fr>
17575
17576 * src/system.h (ngettext): Now that we use ngettext, be sure to
17577 provide a default definition when NLS are not used.
17578
175792001-11-12 Akim Demaille <akim@epita.fr>
17580
17581 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17582 Use @kbd to denote user input.
17583 (Language and Grammar): ANSIfy the example.
17584 Adjust its layout for info/notinfo.
17585 (Location Tracking Calc): Output error messages to stderr.
17586 Output locations in a more GNUtically correct way.
17587 Fix a couple of Englishos.
17588 Adjust @group/@end group pairs.
17589
175902001-11-12 Akim Demaille <akim@epita.fr>
17591
17592 %expect was not functioning at all.
17593
17594 * src/conflicts.c (expected_conflicts): Set to -1.
17595 (conflict_report): Use ngettext.
17596 (conflicts_print): Check %expect and make its violation an error.
17597 * doc/bison.texinfo (Expect Decl): Adjust.
17598 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17599 * tests/regression.at (%expect not enough, %expect right)
17600 (%expect too much): New.
17601
176022001-11-12 Akim Demaille <akim@epita.fr>
17603
17604 * tests/regression.at (Conflicts): Rename as...
17605 (Unresolved SR Conflicts): this.
17606 (Solved SR Conflicts): New.
17607
176082001-11-12 Akim Demaille <akim@epita.fr>
17609
17610 * src/reduce.c (print_results): Rename as...
17611 (reduce_output): This.
17612 Output to OUT, passed as argument, instead of output_obstack.
17613 (dump_grammar): Likewise.
17614 (reduce_free): New.
17615 Also free V1.
17616 (reduce_grammar): No longer call reduce_output, since...
17617 * src/print.c (print_results): do it.
17618 * src/main.c (main): Call reduce_free;
17619
176202001-11-12 Akim Demaille <akim@epita.fr>
17621
17622 * src/conflicts.c (print_reductions): Accept OUT as argument.
17623 Output to it, not to output_obstack.
17624 * src/print.c (print_actions): Adjust.
17625
176262001-11-12 Akim Demaille <akim@epita.fr>
17627
17628 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17629 the result instead of using...
17630 (src_total, rrc_total, src_count, rrc_count): Remove.
17631 (any_conflicts): Remove.
17632 (print_conflicts): Split into...
17633 (conflicts_print, conflicts_output): New.
17634 * src/conflicts.h: Adjust.
17635 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
17636 * src/print.c (print_grammar): Issue `\n' between two rules.
17637 * tests/regression.at (Conflicts): New.
17638 Reported by Tom Lane.
17639
176402001-11-12 Akim Demaille <akim@epita.fr>
17641
17642 * tests/regression.at (Invalid input): Remove, duplicate with
17643 ``Invalid input: 1''.
17644
176452001-11-12 Akim Demaille <akim@epita.fr>
17646
17647 * tests/torture.at (AT_DATA_STACK_TORTURE)
17648 (Exploding the Stack Size with Alloca)
17649 (Exploding the Stack Size with Malloc): New.
17650
176512001-11-12 Akim Demaille <akim@epita.fr>
17652
17653 * src/bison.simple (YYSTACK_REALLOC): New.
17654 (yyparse) [!yyoverflow]: Use it and free the old stack.
17655 Reported by Per Allansson.
17656
176572001-11-12 Pascal Bart <pascal.bart@epita.fr>
17658
17659 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17660 define CPP macro, which substitute YYSTYPE by yystype.
17661 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17662 with yyltype/YYLTYPE. This allows inclusion of the generated
17663 header within the parser if the compiler, such as GGC, accepts
17664 multiple equivalent #defines.
17665 From Akim.
17666
176672001-11-05 Akim Demaille <akim@epita.fr>
17668
17669 * src/reader.c (symbols_output): New, extracted from...
17670 (packsymbols): here.
17671 (reader): Adjust.
17672
176732001-11-05 Akim Demaille <akim@epita.fr>
17674
17675 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17676
176772001-11-05 Akim Demaille <akim@epita.fr>
17678
17679 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17680 pattern.
17681
176822001-11-05 Akim Demaille <akim@epita.fr>
17683
17684 * src/options.h (struct option_table_struct): set_flags is void*.
17685 * src/options.c (longopts): Support `--output' and `%output'.
17686 (usage): Adjust.
17687 * src/lex.h (tok_setopt): Remove, replaced with...
17688 (tok_intopt, tok_stropt): these new guys.
17689 * src/lex.c (getopt.h): Not needed.
17690 (token_buffer, unlexed_token_buffer): Not const.
17691 (percent_table): Promote `-' over `_' in directive names.
17692 Active `%name-prefix', `file-prefix', and `output'.
17693 (parse_percent_token): Accept possible arguments to directives.
17694 Promote `-' over `_' in directive names.
17695
176962001-11-04 Akim Demaille <akim@epita.fr>
17697
17698 * doc/bison.texinfo (Decl Summary): Split the list into
17699 `directives for grammars' and `directives for bison'.
17700 Sort'em.
17701 Add description of `%name-prefix', `file-prefix', and `output'.
17702 Promote `-' over `_' in directive names.
17703 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17704 Simplify the description of `--name-prefix'.
17705 Promote `-' over `_' in directive names.
17706 Promote `--output' over `--output-file'.
17707 Fix the description of `--defines'.
17708 * tests/output.at: Exercise %file-prefix and %output.
17709
177102001-11-02 Akim Demaille <akim@epita.fr>
17711
17712 * doc/refcard.tex: Update.
17713
177142001-11-02 Akim Demaille <akim@epita.fr>
17715
17716 * src/symtab.h (SUNDEF): New.
17717 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17718 stand for `uninitialized', instead of 0.
17719 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17720 * src/lex.c (lex): Adjust.
17721
17722 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17723 Number it 0.
17724 Let yylex return it instead of a plain 0.
17725 Reported by Dick Streefland.
17726
177272001-11-02 Akim Demaille <akim@epita.fr>
17728
17729 * tests/regression.at (Mixing %token styles): New test.
17730
177312001-11-02 Akim Demaille <akim@epita.fr>
17732
17733 * src/reader.c (parse_thong_decl): Formatting changes.
17734 (token_translations_init): New, extracted from...
17735 (packsymbols): Here.
17736 Adjust.
17737
177382001-11-01 Akim Demaille <akim@epita.fr>
17739
17740 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17741 Check that `9foo.y' produces correct cpp guards.
17742 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17743 guards.
17744 Reported by Wwp.
17745
177462001-11-01 Akim Demaille <akim@epita.fr>
17747
17748 * tests/regression.at (Invalid input: 2): New.
17749 * src/lex.c (unlexed_token_buffer): New.
17750 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17751 too.
17752 Reported by Wwp.
17753
177542001-11-01 Akim Demaille <akim@epita.fr>
17755
17756 * tests/calc.at: Catch up with 1.30.
17757 * configure.in: Bump to 1.49a.
17758 Adjust to newer Autotest.
17759
177602001-10-19 Pascal Bart <pascal.bart@epita.fr>
17761
17762 * src/conflicts.c: Move global variables rrc_total and src_total ...
17763 (print_conflicts): here.
17764 * src/output.c (output): Free global variable user_toknums.
17765 * src/lex.c (token_obstack): Become static.
17766
177672001-10-18 Akim Demaille <akim@epita.fr>
17768
17769 * tests/atlocal.in (GCC): Add.
17770 * tests/calc.at: s/m4_match/m4_bmatch/.
17771 s/m4_patsubst/m4_bpatsubst/.
17772 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17773 * configure.in: AC_SUBST(GCC).
17774
177752001-10-14 Marc Autret <autret_m@epita.fr>
17776
17777 * src/options.c (create_long_option_table): Fix.
17778
177792001-10-10 Akim Demaille <akim@epita.fr>
17780
17781 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17782
177832001-10-04 Akim Demaille <akim@epita.fr>
17784
17785 * src/reader.c (parse_union_decl): Push the caracters in
17786 union_obstack, not attrs_obstack.
17787
177882001-10-04 Akim Demaille <akim@epita.fr>
17789
17790 Merge in the branch 1.29.
17791
17792 * src/reader.c (packsymbols): Use a temporary obstack for
17793 `%%tokendef', since output_stack is already used elsewhere.
17794
17795 2001-10-02 Akim Demaille <akim@epita.fr>
17796
17797 Bump 1.29d.
17798
17799 2001-10-02 Akim Demaille <akim@epita.fr>
17800
17801 Version 1.29c.
17802
17803 2001-10-02 Akim Demaille <akim@epita.fr>
17804
17805 * tests/regression.at (Invalid CPP headers): New.
17806 From Alexander Belopolsky.
17807 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17808
17809 2001-10-02 Akim Demaille <akim@epita.fr>
17810
17811 * tests/regression.at (Invalid input): New.
17812 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17813 Reported by Shura.
17814
17815 2001-10-02 Akim Demaille <akim@epita.fr>
17816
17817 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17818
17819 2001-10-02 Akim Demaille <akim@epita.fr>
17820
17821 * src/output.c (output_parser): Assert `skeleton'.
17822 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17823 systems.
17824 From Shura.
17825
17826 2001-10-01 Marc Autret <autret_m@epita.fr>
17827
17828 * src/lex.h: Echo modifications.
17829 * src/lex.c (unlex): Parameter is now token_t.
17830 From Hans Aberg.
17831
17832 2001-10-01 Marc Autret <autret_m@epita.fr>
17833
17834 * src/main.c: Include lex.h.
17835 From Hans Aberg.
17836
17837 2001-09-29 Akim Demaille <akim@epita.fr>
17838
17839 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17840
17841 2001-09-28 Akim Demaille <akim@epita.fr>
17842
17843 * tests/testsuite.at: Update to newer Autotest.
17844 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17845
17846 2001-09-27 Akim Demaille <akim@epita.fr>
17847
17848 Position independent wrapper.
17849
17850 * tests/bison: Remove.
17851 * tests/bison.in: New.
17852 * configure.in: Adjust.
17853
17854 2001-09-27 Paul Eggert <eggert@twinsun.com>
17855
17856 Port quotearg fixes from tar 1.13.24.
17857
17858 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17859 tm to be declared.
17860 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17861 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17862
17863 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17864 * m4/mbrtowc.m4: New file.
17865 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17866 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17867
17868 2001-09-27 Akim Demaille <akim@epita.fr>
17869
17870 Bump to 1.29c.
17871
17872 2001-09-27 Akim Demaille <akim@epita.fr>
17873
17874 Version 1.29b.
17875
17876 2001-09-25 Akim Demaille <akim@epita.fr>
17877
17878 * src/system.h: Include `xalloc.h'.
17879 Remove it from the C files.
17880 * src/files.c (output_files): Free the obstacks.
17881 * src/lex.c (init_lex): Rename as...
17882 (lex_init): this.
17883 (lex_free): New.
17884 * src/main.c (main): Use it.
17885
17886 2001-09-24 Marc Autret <autret_m@epita.fr>
17887
17888 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17889 to output informations in fout (FILE*).
17890 (open_graph, close_graph): Likewise.
17891 (output_graph, output_edge, output_node): Likewise.
17892 * src/vcg.h: Update function prototypes.
17893 * src/print_graph.c (print_graph): Open output graph file.
17894 (print_actions): Adjust.
17895 * src/files.h: Remove extern declaration.
17896 * src/files.c: Remove graph_obstack declaration.
17897 (open_files): Remove graph_obstack initialization.
17898 (output_files): Remove graph_obstack saving.
17899
17900 2001-09-24 Marc Autret <autret_m@epita.fr>
17901
17902 * src/files.c (compute_output_file_names): Fix.
17903
17904 2001-09-24 Marc Autret <autret_m@epita.fr>,
17905 Akim Demaille <akim@epita.fr>
17906
17907 * src/reader.c (reader): Remove call to free_symtab ().
17908 * src/main.c (main): Call it here.
17909 Include symtab.h.
17910 * src/conflicts.c (initialize_conflicts): Rename as...
17911 (solve_conflicts): this.
17912 * src/print.c (print_core, print_actions, print_state)
17913 (print_grammar): Dump to a file instead a `output_obstack'.
17914 (print_results): Dump `output_obstack', and then proceed with the
17915 FILE *.
17916 * src/files.c (compute_output_file_names, close_files): New.
17917 (output_files): Adjust.
17918 * src/main.c (main): Adjust.
17919
17920 2001-09-23 Marc Autret <autret_m@epita.fr>
17921
17922 * src/files.c (compute_header_macro): Computes header macro name
17923 from spec_defines_file when given.
17924
17925 2001-09-23 Marc Autret <autret_m@epita.fr>
17926
17927 * src/files.c (output_files): Add default extensions.
17928
17929 2001-09-22 Akim Demaille <akim@epita.fr>
17930
17931 * src/conflicts.c (finalize_conflicts): Rename as...
17932 (free_conflicts): this.
17933
17934 2001-09-22 Akim Demaille <akim@epita.fr>
17935
17936 * src/gram.c (gram_free): Rename back as...
17937 (dummy): this.
17938 (output_token_translations): Free `token_translations'.
17939 * src/symtab.c (free_symtab): Free the tag field.
17940
17941 2001-09-22 Akim Demaille <akim@epita.fr>
17942
17943 Remove `translations' as it is always set to true.
17944
17945 * src/gram.h: Adjust.
17946 * src/reader.c (packsymbols, parse_token_decl): Adjust
17947 * src/print.c (print_grammar): Adjust.
17948 * src/output.c (output_token_translations): Adjust.
17949 * src/lex.c (lex): Adjust.
17950 * src/gram.c: Be sure the set pointers to NULL.
17951 (dummy): Rename as...
17952 (gram_free): this.
17953
17954 2001-09-22 Akim Demaille <akim@epita.fr>
17955
17956 * configure.in: Invoke AM_LIB_DMALLOC.
17957 * src/system.h: Use dmalloc.
17958 * src/LR0.c: Be sure to have pointers initialized to NULL.
17959 (allocate_itemsets): Allocate kernel_items only if needed.
17960
17961 2001-09-22 Akim Demaille <akim@epita.fr>
17962
17963 * configure.in: Bump to 1.29b.
17964 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17965 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17966 need xmalloc.c in calc.y.
17967 From Pascal Bart.
17968
17969 2001-09-21 Akim Demaille <akim@epita.fr>
17970
17971 Version 1.29a.
17972 * Makefile.maint, config/config.guess, config/config.sub,
17973 * config/missing: Update from masters.
17974 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17975 upon package.m4.
17976 * configure.in (ALL_LINGUAS): Add `tr'.
17977
17978 2001-09-21 Akim Demaille <akim@epita.fr>
17979
17980 * tests/Makefile.am (package.m4): Move to...
17981 ($(srcdir)/$(TESTSUITE)): here.
17982
17983 2001-09-20 Akim Demaille <akim@epita.fr>
17984
17985 * src/complain.c: No longer try to be standalone: use system.h.
17986 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17987 * src/complain.h: Likewise.
17988 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17989 Remove the unused variable `n'.
17990 From Albert Chin-A-Young.
17991
17992 2001-09-18 Marc Autret <autret_m@epita.fr>
17993
17994 * doc/bison.1: Update.
17995 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17996 descriptions.
17997 (Option Cross Key): Update.
17998 Add --graph.
17999
18000 2001-09-18 Marc Autret <autret_m@epita.fr>
18001
18002 * tests/regression.at: New test (comment in %union).
18003
18004 2001-09-18 Marc Autret <autret_m@epita.fr>
18005
18006 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
18007 do that.
18008 Reported by Keith Browne.
18009
18010 2001-09-18 Marc Autret <autret_m@epita.fr>
18011
18012 * tests/output.at: Add tests for --defines and --graph.
18013
18014 2001-09-18 Marc Autret <autret_m@epita.fr>
18015
18016 * tests/output.at: Removes tests of %{header,src}_extension features.
18017
18018 2001-09-18 Akim Demaille <akim@epita.fr>
18019
18020 * tests/Makefile.am (package.m4): New.
18021 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
18022 (_AT_CHECK_CALC_ERROR): Likewise.
18023 Factor the `, ' part of verbose error messages.
18024
18025 2001-09-18 Marc Autret <autret_m@epita.fr>
18026
18027 * src/getargs.c (longopts): Declare --defines and --graph as options
18028 with optional arguments.
18029 * src/files.h: Add extern declarations.
18030 * src/files.c (spec_graph_file, spec_defines_file): New.
18031 (output_files): Update.
18032 Remove CPP-outed code.
18033
18034 2001-09-18 Marc Autret <autret_m@epita.fr>
18035
18036 Turn off %{source,header}_extension feature.
18037
18038 * src/files.c (compute_exts_from_gf): Update.
18039 (compute_exts_from_src): Update.
18040 (output_files): CPP-out useless code.
18041 * src/files.h: Remove {header,source}_extension extern declarations.
18042 * src/reader.c (parse_dquoted_param): CPP-out.
18043 (parse_header_extension_decl): Remove.
18044 (parse_source_extension_decl): Remove.
18045 (read_declarations): Remove cases tok_{hdrext,srcext}.
18046 * src/lex.c (percent_table): Remove {header,source}_extension entries.
18047 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
18048
18049 2001-09-10 Akim Demaille <akim@epita.fr>
18050
18051 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
18052 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
18053 (AT_CHECK_OUTPUT): this.
18054 Merely check ls' exit status, its output is useless.
18055
18056 2001-09-10 Akim Demaille <akim@epita.fr>
18057
18058 * tests/calc.at: Use m4_match.
18059 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
18060
18061 2001-09-10 Marc Autret <autret_m@epita.fr>,
18062 Akim Demaille <akim@epita.fr>
18063
18064 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
18065 enum color_e.
18066 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
18067 to `normal'.
18068 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
18069 * src/lex.h: Adjust prototype.
18070 (token_t): Add `tok_undef'.
18071 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
18072 (parse_percent_token): Now returns token_t.
18073 Add default statement in switch.
18074 (lex): Separate `c' as an input variable, from the token_t result
18075 part.
18076 (unlexed): Is a token_t.
18077
18078 2001-09-10 Akim Demaille <akim@epita.fr>
18079
18080 * configure.in: Bump to 1.29a.
18081
18082 2001-09-07 Akim Demaille <akim@epita.fr>
18083
18084 Version 1.29.
18085
18086 2001-08-30 Akim Demaille <akim@epita.fr>
18087
18088 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
18089 * m4/atconfig.m4: Remove.
18090 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
18091 * tests/bison: New.
18092 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
18093 m4_if, m4_patsubst, and m4_regexp.
18094 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
18095 `input' file instead of echo.
18096
18097 2001-08-29 Akim Demaille <akim@epita.fr>
18098
18099 Bump to 1.28e.
18100
18101 2001-08-29 Akim Demaille <akim@epita.fr>
18102
18103 Version 1.28d.
18104
18105 2001-08-29 Paul Eggert <eggert@twinsun.com>
18106
18107 * src/bison.simple (yyparse): Don't take the address of an
18108 item before the start of an array, as that doesn't conform to
18109 the C Standard.
18110
18111 2001-08-29 Robert Anisko <anisko_r@epita.fr>
18112
18113 * doc/bison.texinfo (Location Tracking Calc): New node.
18114
18115 2001-08-29 Paul Eggert <eggert@twinsun.com>
18116
18117 * src/output.c (output): Do not define const, as this now
18118 causes more problems than it cures.
18119
18120 2001-08-29 Akim Demaille <akim@epita.fr>
18121
18122 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
18123 the nodes.
18124 Be sure to tag the `detailmenu'.
18125
18126 2001-08-29 Akim Demaille <akim@epita.fr>
18127
18128 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
18129 download in a tmp dir.
18130
18131 2001-08-28 Marc Autret <autret_m@epita.fr>
18132
18133 * config/depcomp: New file.
18134
18135 2001-08-28 Marc Autret <autret_m@epita.fr>
18136
18137 * doc/bison.1 (mandoc): Adjust.
18138 From Juan Manuel Guerrero.
18139
18140 2001-08-28 Marc Autret <autret_m@epita.fr>
18141
18142 * src/print_graph.c (print_state): Fix.
18143
18144 2001-08-27 Marc Autret <autret_m@epita.fr>
18145
18146 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
18147 char * members.
18148 Echo modifications to the functions prototypes.
18149 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
18150
18151 2001-08-27 Marc Autret <autret_m@epita.fr>
18152
18153 * src/vcg.c: Include `xalloc.h'.
18154 (add_colorentry): New.
18155 (add_classname): New.
18156 (add_infoname): New.
18157 * src/vcg.h: Add new prototypes.
18158
18159 2001-08-27 Akim Demaille <akim@epita.fr>
18160
18161 * Makefile.maint: Sync. again with CVS Autoconf.
18162
18163 2001-08-27 Akim Demaille <akim@epita.fr>
18164
18165 * Makefile.maint: Formatting changes.
18166 (po-update, cvs-update, update): New targets.
18167 (AMTAR): Remove.
18168
18169 2001-08-27 Akim Demaille <akim@epita.fr>
18170
18171 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18172 * Makefile.maint: Sync. with CVS Autoconf.
18173
18174 2001-08-27 Marc Autret <autret_m@epita.fr>
18175
18176 * src/vcg.h (struct infoname_s): New.
18177 (struct colorentry_s): New.
18178 (graph_s): New fields {vertical,horizontal}_order in structure.
18179 Add `infoname' field.
18180 Add `colorentry' field;
18181 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
18182 (G_HORIZONTAL_ORDER): New.
18183 (G_INFONAME): New.
18184 (G_COLORENTRY): New.
18185 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
18186 Add output of `infoname'.
18187 Add output of `colorentry'.
18188
18189 2001-08-27 Marc Autret <autret_m@epita.fr>
18190
18191 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
18192 This one shadowed a global parameter.
18193
18194 2001-08-24 Marc Autret <autret_m@epita.fr>
18195
18196 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
18197 instead of `unsigned'.
18198 (print_state): Do not call obstack_object_size () in obstack_grow ()
18199 to avoid macro variables shadowing.
18200
18201 2001-08-23 Marc Autret <autret_m@epita.fr>
18202
18203 * src/lex.c (percent_table): Typo: s/naem/name/.
18204 Add graph option.
18205 Normalize new options declarations.
18206
18207 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
18208
18209 * tests/suite.at: Exercise %header_extension and %source_extension.
18210
18211 2001-08-16 Marc Autret <autret_m@epita.fr>
18212
18213 * src/reader.c (parse_dquoted_param): New.
18214 (parse_header_extension_decl): Use it.
18215 (parse_source_extension_decl): Likewise.
18216
18217 2001-08-16 Marc Autret <autret_m@epita.fr>
18218
18219 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
18220 (get_xxxx_str): Use assert () instead of complain ().
18221 Remove return invokations in default cases.
18222 (get_decision_str): Modify default behaviour. Remove second argument.
18223 Echo modifications on calls.
18224 (output_graph): Fix.
18225
18226 2001-08-16 Marc Autret <autret_m@epita.fr>
18227
18228 * src/getargs.c (usage): Update with ``-g, --graph''.
18229
18230 2001-08-16 Marc Autret <autret_m@epita.fr>
18231
18232 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
18233 (Option Cross Key): Likewise.
18234 * doc/bison.1: Update.
18235
182362001-09-25 Pascal Bart <pascal.bart@epita.fr>
18237
18238 * src/output.c (output_master_parser): Don't finish action_obstack.
18239 (output_parser): Don't care about the muscle action, here.
18240 (prepare): Copy the action_obstack in the action muscle.
18241 (output): Free action_obstack.
18242
182432001-09-23 Pascal Bart <pascal.bart@epita.fr>
18244
18245 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
18246 will contain `%union' declaration.
18247 (parse_union_decl): Delete #line directive output.
18248 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
18249 informations about %union.
18250 (parse_union_decl): Copy the union_obstack in the muscle stype.
18251 * src/bison.simple: Add new #line directive.
18252 Add typdef %%stype YYSTYPE.
18253
182542001-09-23 Pascal Bart <pascal.bart@epita.fr>
18255
18256 * src/bison.simple: Add new `#line' directive.
18257
182582001-09-22 Pascal Bart <pascal.bart@epita.fr>
18259
18260 * src/bison.simple: New `#line' directive.
18261 * src/output.c (output_parser): Support new dynamic muscle input_line.
18262
182632001-09-22 Marc Autret <autret_m@epita.fr>
18264
18265 * src/output.c (output_master_parser): New.
18266 (output_parser): Be more re-entrant.
18267
182682001-09-21 Marc Autret <autret_m@epita.fr>
18269
18270 * src/reader.c (copy_definition, parse_union_decl): Update and use
18271 `linef' muscle.
18272 (copy_action): Likewise.
18273 Use obstack_1grow ().
18274 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
18275
182762001-09-21 Marc Autret <autret_m@epita.fr>
18277
18278 * src/options.c (option_table): Adjust.
18279 * src/lex.c (parse_percent_token): Fix.
18280
182812001-09-20 Pascal Bart <pascal.bart@epita.fr>
18282
18283 * src/options.c (symtab.h): Include it, need by lex.h.
18284
182852001-09-20 Pascal Bart <pascal.bart@epita.fr>
18286
18287 * src/lex.c (parse_percent_token): Change type of variable `tx', which
18288 is now an option_table_struct*.
18289 (option_strcmp): New function option_strcmp.
18290 (parse_percent_token): Call option_strcmp.
18291 * src/getargs.c (xalloc.h, options.h): Include it.
18292 (getargs): Call create_long_option_table.
18293 (getargs): Free longopts at the end of the function.
18294 (shortopts): Move in options.c.
18295 * src/options.c (create_long_option_table): New function. Convert
18296 information from option_table to option structure.
18297 * src/reader.c (options.h): Include it.
18298
18299 * src/Makefile.am: Adjust.
18300 * src/options.c (option_table): Create from longopts and percent_table.
18301 * src/getargs.c (longopts): Delete.
18302 * src/lex.c (struct percent_table_struct): Delete.
18303 (percent_table): Delete.
18304 (options.h): Include it.
18305 * src/options.c: Create.
18306 * src/options.h: Create.
18307 Declare enum opt_access_e.
18308 Define struct option_table_struct.
18309
183102001-09-20 Marc Autret <autret_m@epita.fr>
18311
18312 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
18313 sections of Bison.
18314
183152001-09-19 Pascal Bart <pascal.bart@epita.fr>
18316
18317 * src/bison.simple: s/%%filename/%%skeleton.
18318 * src/muscle_tab.c (getargs.h): Include it.
18319 (muscle_init): Insert new muscle skeleton.
18320
183212001-09-18 Pascal Bart <pascal.bart@epita.fr>
18322
18323 * src/output.c (output_parser): Delete unused variable actions_dumped.
18324
183252001-09-07 Pascal Bart <pascal.bart@epita.fr>
18326
18327 * src/output.c (output): Delete call to reader_output_yylsp.
18328 * src/reader.c (reader): Likewise.
18329 * src/reader.h: Delete declaration of reader_output_yylsp.
18330
183312001-09-02 Marc Autret <autret_m@epita.fr>
18332
18333 * src/reader.c: Include muscle_tab.h.
18334 (parse_union_decl): Update.
18335 (parse_macro_decl): Rename parse_muscle_decl.
18336 Update to use renamed functions and variable.
18337 (read_declarations, copy_action, read_additionnal_code, : Updated
18338 with correct variables and functions names.
18339 (packsymbols, reader): Likewise.
18340
18341 * src/reader.h (muscle_obstack): Extern declaration update.
18342
18343 * src/output.c: Include muscle_tab.h
18344 In all functions using macro_insert, change by using muscle_insert ().
18345 (macro_obstack): Rename muscle_obstack.
18346 Echo modifications in the whole file.
18347 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
18348 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
18349 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
18350
18351 * src/muscle_tab.h: Update double inclusion macros.
18352 (macro_entry_s): Rename muscle_entry_s.
18353 Update prototypes.
18354
18355 * src/muscle_tab.c: Include muscle_tab.h.
18356 Rename macro_tabble to muscle_table.
18357 (mhash1, mhash2, mcmp): Use muscle_entry.
18358 (macro_init): Rename muscle_init. Update.
18359 (macro_insert): Rename muscle_insert. Update.
18360 (macro_find): Rename muscle_find. Update.
18361
18362 * src/main.c: Include muscle_tab.h.
18363 (main): Call muscle_init ().
18364 * src/Makefile.am (bison_SOURCES): Echo modifications.
18365
183662001-09-02 Marc Autret <autret_m@epita.fr>
18367
18368 Now the files macro_tab.[ch] are named muscle_tab.[ch].
18369
18370 * src/muscle_tab.c, src/muscle_tab.h: Add files.
18371
183722001-09-02 Marc Autret <autret_m@epita.fr>
18373
18374 * src/macrotab.c, src/macrotab.h: Remove.
18375
183762001-09-01 Pascal Bart <pascal.bart@epita.fr>
18377
18378 * src/reader.c (copy_guard): Use muscle to specify the `#line'
18379 filename.
18380
183812001-09-01 Marc Autret <autret_m@epita.fr>
18382
18383 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
18384 to an explicit value to activate the feature. We do it here.
18385
183862001-08-31 Pascal Bart <pascal.bart@epita.fr>
18387
18388 * src/output.c (prepare): Delete the `filename' muscule insertion.
18389 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
18390 (parse_union_decl): Likewise.
18391 * src/macrotab.c (macro_init): Initialize filename by infile.
18392
183932001-08-31 Marc Autret <autret_m@epita.fr>
18394
18395 * src/bison.simple (YYLSP_NEEDED): New definition.
18396 * src/output.c (prepare): Add macro insertion of `locations_flag'
18397
183982001-08-31 Pascal Bart <pascal.bart@epita.fr>
18399
18400 * src/output.c (prepare): Delete insertion of previous muscles,
18401 and insert the `prefix' muscles.
18402 * src/macrotab.c (macro_init): Likewise.
18403 (macro_init): Initialization prefix directive by `yy'.
18404 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
18405 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18406 yylval, yydebug, yyerror, yynerrs and yyparse.
18407 New directive `#define' to substitute yydebug, ... with option
18408 name_prefix.
18409
184102001-08-31 Pascal Bart <pascal.bart@epita.fr>
18411
18412 * src/main.c (main): Standardize.
18413 * src/output.c (output_table_data, output_parser): Likewise.
18414 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18415
184162001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18417
18418 * src/reader.c (read_additionnal_code): Rename %%user_code to
18419 %%epilogue.
18420 * src/output.c (output): Rename %%declarations to %%prologue.
18421 * src/bison.simple: Echo modifications.
18422
184232001-08-31 Marc Autret <autret_m@epita.fr>
18424
18425 * src/reader.c (readgram): CleanUp.
18426 (output_token_defines): Likewise.
18427 (packsymbols): Likewise.
18428 (reader): Likewise.
18429 * src/output.c (output): CPP-out useless code.
18430
184312001-08-31 Pascal Bart <pascal.bart@epita.fr>
18432
18433 * src/reader.c (reader): Delete obsolete call to function
18434 output_trailers and output_headers.
18435 * src/output.h: Remove obsolete functions prototypes of output_headers
18436 and output_trailers.
18437
184382001-08-30 Pascal Bart <pascal.bart@epita.fr>
18439
18440 * src/main.c: Include macrotab.h.
18441 * src/macrotab.h (macro_entry_s): Constify fields.
18442 Adjust functions prototypes.
18443 * src/macrotab.c (macro_insert): Constify key and value.
18444 (macro_find): Constify key.
18445 (macro_insert): Include 'xalloc.h'
18446 (macro_insert): Use XMALLOC.
18447 (macro_find): Constify return value.
18448 * src/output.c (output_table_data): Rename table to table_data.
18449 (output_parser): Constify macro_key, macro_value.
18450
184512001-08-30 Marc Autret <autret_m@epita.fr>
18452
18453 * src/reader.c (parse_skel_decl): New.
18454 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
18455 * src/lex.h (token_t): New token `tok_skel'.
18456 * src/lex.c (percent_table): Add skeleton option entry.
18457 Standardize.
18458
184592001-08-29 Marc Autret <autret_m@epita.fr>
18460
18461 * src/bison.simple: Add %%user_code directive at the end.
18462 * src/reader.c (read_additionnal_code): New.
18463 (reader): Use it.
18464 * src/output.c (output_program): Remove.
18465 (output): Update.
18466
184672001-08-28 Marc Autret <autret_m@epita.fr>
18468
18469 * src/output.c (output_actions): Clean up.
18470 (output_gram): CPP-out useless code.
18471 * src/reader.c (reader): Clean up, CPP-out useless code.
18472
184732001-08-28 Pascal Bart <pascal.bart@epita.fr>
18474
18475 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
18476 directive.
18477 * src/bison.simple: Add `%%definitions'.
18478
184792001-08-28 Marc Autret <autret_m@epita.fr>
18480
18481 * config/depcomp: New file.
18482
184832001-08-27 Paul Eggert <eggert@twinsun.com>
18484
18485 * src/bison.simple (yyparse): Don't take the address of an
18486 item before the start of an array, as that doesn't conform to
18487 the C Standard.
18488
184892001-08-27 Robert Anisko <robert.anisko@epita.fr>
18490
18491 * src/output.c (output): Remove the initialization of the macro
18492 obstack. It was done too late here.
18493
18494 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18495 completely wrong.
18496 (reader): Initialize the macro obstack here, since we need it to grow
18497 '%define' directives.
18498
18499 * src/reader.h: Declare the macro obstack as extern.
18500
185012001-08-27 Robert Anisko <robert.anisko@epita.fr>
18502
18503 * src/output.c (output_parser): Fix. Store single '%' characters in
18504 the output obstack instead of throwing them away.
18505
185062001-08-27 Akim Demaille <akim@epita.fr>
18507
18508 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18509
185102001-08-25 Robert Anisko <robert.anisko@epita.fr>
18511
18512 * lib/Makefile.am: Adjust.
18513
185142001-08-25 Robert Anisko <robert.anisko@epita.fr>
18515
18516 * src/bison.simple: Update and add '%%' directives.
18517
185182001-08-25 Robert Anisko <robert.anisko@epita.fr>
18519
18520 * src/reader.c (reader): Remove calls to 'output_headers' and
18521 'output_trailers'. Remove some C output.
18522 (readgram): Disable a piece of code that was writing a default
18523 definition for 'YYSTYPE'.
18524 (reader_output_yylsp): Remove.
18525 (packsymbols): Output token defintions to a macro.
18526 (copy_definition): Disable C output.
18527
18528 * src/reader.c (parse_macro_decl): New function used to parse macro
18529 declarations.
18530 (copy_string2): Put the body of copy_string into this new function.
18531 Add a parameter to let the caller choose whether he wants to copy the
18532 string delimiters or not.
18533 (copy_string): Be a simple call to copy_string2 with the last argument
18534 bound to true.
18535 (read_declarations): Add case for macro definition.
18536 (copy_identifier): New.
18537 (parse_macro_decl): Read macro identifiers using copy_identifier
18538 rather than lex.
18539
185402001-08-25 Robert Anisko <robert.anisko@epita.fr>
18541
18542 * src/output.c (prepare): Add prefixed names.
18543 (output_parser): Output semantic actions.
18544 (output_parser): Fix bug on '%%line' directives.
18545
18546 * src/output.c (output_headers): Remove. The C code printed by this
18547 function should now be in the skeletons.
18548 (output_trailers): Remove.
18549 (output): Disable call to 'reader_output_yylsp'.
18550 (output_rule_data): Do not output tables to the table obstack.
18551
18552 * src/output.c: Remove some C dedicated output.
18553 Improve the use of macro and output obstacks.
18554 (output_defines): Remove.
18555
18556 * src/output.c (output_token_translations): Associate 'translate'
18557 table with a macro. No output to the table obstack.
18558 (output_gram): Same for 'rhs' and 'prhs'.
18559 (output_stos): Same for 'stos'.
18560 (output_rule_data): Same for 'r1' and 'r2'.
18561 (token_actions): Same for 'defact'.
18562 (goto_actions): Same for 'defgoto'.
18563 (output_base): Same for 'pact' and 'pgoto'.
18564 (output_table): Same for 'table'.
18565 (output_check): Same for 'check'.
18566
18567 * src/output.c (output_table_data): New function.
18568 (output_short_table): Remove.
18569 (output_short_or_char_table): Remove.
18570
18571 * src/output.c (output_parser): Replace most of the skeleton copy code
18572 with something new. Skeletons are now processed character by character
18573 rather than line by line, and Bison looks for '%%' macros. This is the
18574 first step in making Bison's output process (a lot) more flexible.
18575 (output_parser): Use the macro table.
18576
185772001-08-25 Robert Anisko <robert.anisko@epita.fr>
18578
18579 * src/main.c (main): Initialize the macro table.
18580
185812001-08-25 Robert Anisko <robert.anisko@epita.fr>
18582
18583 * src/lex.c (percent_table): Add tok_define.
18584 * src/lex.h: Add tok_define.
18585
185862001-08-25 Robert Anisko <robert.anisko@epita.fr>
18587
18588 * src/macrotab.c: New file.
18589 * src/macrotab.h: New file.
18590 * src/Makefile.am: Update.
18591
185922001-08-25 Robert Anisko <robert.anisko@epita.fr>
18593
18594 * lib/hash.c: New file.
18595 * lib/hash.h: New file.
18596 * lib/Makefile.am: Update.
18597
185982001-08-15 Akim Demaille <akim@epita.fr>
18599
18600 Version 1.28c.
18601
186022001-08-15 Marc Autret <autret_m@epita.fr>
18603
18604 * src/reader.c (readgram): Indent output macro YYSTYPE.
18605 (packsymbols): Likewise.
18606 (output_token_defines): Likewise.
18607 * src/files.c: Standardize.
18608 (compute_header_macro): New.
18609 (defines_obstack_save): New. Use compute_header_macro.
18610 (output_files): Update. Use defines_obstack_save.
18611
186122001-08-15 Akim Demaille <akim@epita.fr>
18613
18614 * doc/bison.texinfo (Table of Symbols): Document
18615 YYSTACK_USE_ALLOCA.
18616
186172001-08-15 Akim Demaille <akim@epita.fr>
18618
18619 * missing: Update from CVS Automake.
18620 * config/config.guess, config/config.sub, config/texinfo.tex:
18621 Update from gnu.org.
18622
186232001-08-15 Akim Demaille <akim@epita.fr>
18624
18625 * Makefile.maint: Sync with CVS Autoconf.
18626
186272001-08-14 Pascal Bart <pascal.bart@epita.fr>
18628
18629 * doc/bison.texinfo: Include GNU Free Documentation License from
18630 `fdl.texi'.
18631 * doc/fdl.texi: Add to package.
18632
186332001-08-14 Marc Autret <autret_m@epita.fr>
18634
18635 Turn on %{source,header}_extension features.
18636
18637 * src/lex.c (percent_table): Un-CPP out header_extension and
18638 source_extension.
18639 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
18640 (compute_exts_from_src): Remove conditions. It restores priorities
18641 between options.
18642
186432001-08-14 Marc Autret <autret_m@epita.fr>
18644
18645 * src/files.c (compute_base_names): Add extensions computing when
18646 `--file-prefix' used.
18647 Standardize function calls.
18648
186492001-08-13 Marc Autret <autret_m@epita.fr>
18650
18651 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
18652 defining it (defined but null disables alloca).
18653
186542001-08-13 Marc Autret <autret_m@epita.fr>
18655
18656 * src/bison.simple (_yy_memcpy): CPP reformat.
18657
186582001-08-13 Pascal Bart <pascal.bart@epita.fr>
18659
18660 * tests/atconfig.in (CPPFLAGS): Fix.
18661
186622001-08-10 Pascal Bart <pascal.bart@epita.fr>
18663
18664 * doc/bison.texinfo: Include GNU General Public License from
18665 `gpl.texi'.
18666 * doc/gpl.texi: Add to package.
18667
186682001-08-10 Marc Autret <autret_m@epita.fr>
18669
18670 * src/print_graph.h: Fix.
18671 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18672
186732001-08-10 Akim Demaille <akim@epita.fr>
18674
18675 * src/system.h: Provide default declarations for stpcpy, strndup,
18676 and strnlen.
18677
186782001-08-10 Robert Anisko <anisko_r@epita.fr>
18679
18680 * doc/bison.texinfo (Locations): Update @$ stuff.
18681
186822001-08-09 Robert Anisko <anisko_r@epita.fr>
18683
18684 * src/bison.simple (YYLLOC_DEFAULT): Update.
18685 (yyparse): Adjust.
18686
186872001-08-08 Marc Autret <autret_m@epita.fr>
18688
18689 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
18690 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18691 Reported by Fabrice Bauzac.
18692
186932001-08-08 Marc Autret <autret_m@epita.fr>
18694
18695 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18696 * src/vcg.c (output_node): Fix.
18697 * src/vcg.h: Cleanup.
18698 * src/print_graph.c: Add comments.
18699 (node_output_size): New global variable. Simplify the formatting of
18700 the VCG graph output.
18701 (print_actions): Unused code is now used. It notifies the final state
18702 and no action states in the VCG graph. It also give the reduce actions.
18703 The `shift and goto' edges are red and the `go to state' edges are
18704 blue.
18705 Get the current node name and node_obstack by argument.
18706 (node_obstack): New variable.
18707 (print_state): Manage node_obstack.
18708 (print_core): Use node_obstack given by argument.
18709 A node is not only computed here but in print_actions also.
18710 (print_graph): CPP out useless code instead of commenting it.
18711
187122001-08-07 Pascal Bart <pascal.bart@epita.fr>
18713
18714 * tests/atconfig.in (CPPFLAGS): Fix.
18715
187162001-08-07 Akim Demaille <akim@epita.fr>
18717
18718 * src/print_graph.c (quote): New.
18719 (print_core): Use it.
18720
187212001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
18722
18723 * src/vcg.c (complain.h): Include it.
18724 Unepitaize `return' invocations.
18725 [NDEBUG] (main): Remove.
18726 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
18727 * src/files.c (open_files): Initialize graph_obstack.
18728 * src/print_graph.c (print_actions): CPP out useless code.
18729 (print_core): Don't output the last `\n' in labels.
18730 Use `quote'.
18731 * src/files.c (output_files): Output the VCG file.
18732 * src/main.c (main): Invoke print_graph ();
18733
187342001-08-06 Marc Autret <autret_m@epita.fr>
18735
18736 Automaton VCG graph output.
18737 Using option ``-g'' or long option ``--graph'', you can generate
18738 a gram_filename.vcg file containing a VCG description of the LALR (1)
18739 automaton of your grammar.
18740
18741 * src/main.c: Call to print_graph() function.
18742 * src/getargs.h: Update.
18743 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18744 (graph_flag): New flag.
18745 (longopts): Update.
18746 (getargs): Add case `g'.
18747 * src/files.c (graph_obstack): New obstack struct.
18748 (open_files): Initialize new obstack.
18749 (output_files): Saves graph_obstack if required.
18750 * src/files.h (graph_obstack): New extern declaration.
18751 * src/Makefile.am: Add new source files.
18752
187532001-08-06 Marc Autret <autret_m@epita.fr>
18754
18755 * src/print_graph.c, src/print_graph.h (graph): New.
18756 * src/vcg.h: New file.
18757 * src/vcg.c: New file, VCG graph handling.
18758
187592001-08-06 Marc Autret <autret_m@epita.fr>
18760
18761 Add of %source_extension and %header_extension which specify
18762 the source or/and the header output file extension.
18763
18764 * src/files.c (compute_base_names): Remove initialisation of
18765 src_extension and header_extension.
18766 (compute_exts_from_gf): Update.
18767 (compute_exts_from_src): Update.
18768 (output_files): Update.
18769 * src/reader.c (parse_header_extension_decl): New.
18770 (parse_source_extension_decl): New.
18771 (read_declarations): New case statements for the new tokens.
18772 * src/lex.c (percent_table): Add entries for %source_extension
18773 and %header_extension.
18774 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18775
187762001-08-06 Marc Autret <autret_m@epita.fr>
18777
18778 * configure.in: Bump to 1.28c.
18779 * doc/bison.texinfo: Texinfo thingies.
18780
187812001-08-04 Pascal Bart <pascal.bart@epita.fr>
18782
18783 * tests/atconfig.in (CPPFLAGS): Add.
18784 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18785
187862001-08-03 Akim Demaille <akim@epita.fr>
18787
18788 Version 1.28b.
18789
187902001-08-03 Akim Demaille <akim@epita.fr>
18791
18792 * tests/Makefile.am (check-local): Ship testsuite.
18793 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18794 Include `string.h'.
18795
187962001-08-03 Akim Demaille <akim@epita.fr>
18797
18798 * configure.in: Try using -Wformat when compiling.
18799
188002001-08-03 Akim Demaille <akim@epita.fr>
18801
18802 * configure.in: Bump to 1.28b.
18803
188042001-08-03 Akim Demaille <akim@epita.fr>
18805
18806 * src/complain.c: Adjust strerror_r portability issues.
18807
188082001-08-03 Akim Demaille <akim@epita.fr>
18809
18810 Version 1.28a.
18811
188122001-08-03 Akim Demaille <akim@epita.fr>
18813
18814 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18815 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18816 * src/getargs.c: Include complain.h.
18817 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18818 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18819
188202001-08-03 Akim Demaille <akim@epita.fr>
18821
18822 * src/reader.c (readgram): Display hidden chars in error messages.
18823
188242001-08-03 Akim Demaille <akim@epita.fr>
18825
18826 Update to gettext 0.10.39.
18827
188282001-08-03 Akim Demaille <akim@epita.fr>
18829
18830 * lib/strspn.c: New.
18831
188322001-08-01 Marc Autret <autret_m@epita.fr>
18833
18834 * doc/bison.texinfo: Update.
18835 * doc/bison.1 (mandoc): Update.
18836 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18837 * src/files.c: Support output files extensions computing.
18838 (src_extension): New static variable.
18839 (header_extension): New static variable.
18840 (tr): New function.
18841 (get_extension_index): New function, gets the index of an extension
18842 filename in a string.
18843 (compute_exts_from_gf): New function, computes extensions from the
18844 grammar file extension.
18845 (compute_exts_from_src): New functions, computes extensions from the
18846 C source file extension, file given by ``-o'' option.
18847 (compute_base_names): Update.
18848 (output_files): Update.
18849
188502001-08-01 Robert Anisko <anisko_r@epita.fr>
18851
18852 * doc/bison.texi: Document @$.
18853 (Locations): New section.
18854
188552001-07-18 Akim Demaille <akim@epita.fr>
18856
18857 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18858 * config/prev-version.txt, config/move-if-change: New.
18859 * Makefile.am: Adjust.
18860
188612001-07-08 Pascal Bart <pascal.bart@epita.fr>
18862
18863 * src/bison.simple (yyparse): Suppress warning `comparaison
18864 between signed and unsigned'.
18865
188662001-07-05 Pascal Bart <pascal.bart@epita.fr>
18867
18868 * src/getargs.h (raw_flag): Remove.
18869 * src/getargs.c: Die on `-r'/`--raw'.
18870 * src/lex.c (parse_percent_token): Die on `%raw'.
18871 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18872 * tests/calc.at: Suppress test with option `--raw'.
18873
188742001-07-14 Akim Demaille <akim@epita.fr>
18875
18876 * config/: New.
18877 * configure.in: Require Autoconf 2.50.
18878 Update to gettext 0.10.38.
18879
188802001-03-16 Akim Demaille <akim@epita.fr>
18881
18882 * doc/bison.texinfo: ANSIfy the examples.
18883
188842001-03-16 Akim Demaille <akim@epita.fr>
18885
18886 * getargs.c (skeleton): New variable.
18887 (longopts): --skeleton is a new option.
18888 (shortopts, getargs): -S is a new option.
18889 * getargs.h: Declare skeleton.
18890 * output.c (output_parser): Use it.
18891
188922001-03-16 Akim Demaille <akim@epita.fr>
18893
18894 * m4/strerror_r.m4: New.
18895 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18896 * lib/error.h, lib/error.c: Update.
18897
188982001-03-16 Akim Demaille <akim@epita.fr>
18899
18900 * src/getargs.c (longopts): Clean up.
18901
189022001-02-21 Akim Demaille <akim@epita.fr>
18903
18904 * src/reader.c (gensym): `gensym_count' is your own.
18905 Use a static buf to create the symbol name, as token_buffer is no
18906 longer a buffer.
18907
189082001-02-08 Akim Demaille <akim@epita.fr>
18909
18910 * src/conflicts.c (conflict_report): Be sure not to append to res
18911 between two calls, which could happen if both first sprintf were
18912 skipped, but not the first cp += strlen.
18913
189142001-02-08 Akim Demaille <akim@epita.fr>
18915
18916 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18917 New, from fileutils 4.0.37.
18918 * configure.in: Require Autoconf 2.49c. I took some time before
18919 making this decision. This is the only way out for portability
18920 issues in Bison, it would mean way too much duplicate effort to
18921 import in Bison features implemented in 2.49c since 2.13.
18922 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18923
189242001-02-02 Akim Demaille <akim@epita.fr>
18925
18926 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18927 * lib/xalloc.h, lib/xmalloc.c: Update.
18928
189292001-01-19 Akim Demaille <akim@epita.fr>
18930
18931 Get rid of the ad hoc handling of token_buffer in the scanner: use
18932 the obstacks.
18933
18934 * src/lex.c (token_obstack): New.
18935 (init_lex): Initialize it. No longer call...
18936 (grow_token_buffer): this. Remove it.
18937 Adjust all the places which used it to use the obstack.
18938
189392001-01-19 Akim Demaille <akim@epita.fr>
18940
18941 * src/lex.h: Rename all the tokens:
18942 s/\bENDFILE\b/tok_eof/g;
18943 s/\bIDENTIFIER\b/tok_identifier/g;
18944 etc.
18945 Let them be enums, not #define, to ease debugging.
18946 Adjust all the code.
18947
189482001-01-18 Akim Demaille <akim@epita.fr>
18949
18950 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18951 * src/lex.c (maxtoken, grow_token_buffer): Static.
18952
189532001-01-18 Akim Demaille <akim@epita.fr>
18954
18955 Since we now use obstacks, more % directives can be enabled.
18956
18957 * src/lex.c (percent_table): Also accept `%yacc',
18958 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18959 `%debug'.
18960 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18961 instead of returning a token.
18962 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18963 * src/reader.c (read_declarations): Adjust.
18964 * src/files.c (open_files): Don't call `compute_base_names', don't
18965 compute `attrsfile' since they depend upon data which might be
18966 *in* the input file now.
18967 (output_files): Do it here.
18968 * src/output.c (output_headers): Document the fact that this patch
18969 introduces a guaranteed SEGV for semantic parsers.
18970 * doc/bison.texinfo: Document them.
18971 * tests/suite.at: Exercise these %options.
18972
189732000-12-20 Akim Demaille <akim@epita.fr>
18974
18975 Also handle the output file (--verbose) with obstacks.
18976
18977 * files.c (foutput): Remove.
18978 (output_obstack): New.
18979 Adjust all dependencies.
18980 * src/conflicts.c: Return a string.
18981 * src/system.h (obstack_grow_string): Rename as...
18982 (obstack_sgrow): this. Be ready to work with non literals.
18983 (obstack_fgrow4): New.
18984
189852000-12-20 Akim Demaille <akim@epita.fr>
18986
18987 * src/files.c (open_files): Fix the computation of short_base_name
18988 in the case of `-o foo.tab.c'.
18989
189902000-12-20 Akim Demaille <akim@epita.fr>
18991
18992 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18993 (copy_dollar): Now that everything uses obstacks, get rid of the
18994 FILE * parameters.
18995
189962000-12-20 Akim Demaille <akim@epita.fr>
18997
18998 * src/files.c (open_files): Actually the `.output' file is based
18999 on the short_base_name, not base_name.
19000 * tests/suite.at (Checking output file names): Adjust.
19001
190022000-12-20 Akim Demaille <akim@epita.fr>
19003
19004 * src/bison.s1: Remove, we now use directly...
19005 * src/bison.simple: this.
19006 * src/Makefile.am: Use pkgdata instead of data.
19007
190082000-12-20 Akim Demaille <akim@epita.fr>
19009
19010 * src/files.c (guard_obstack): New.
19011 (open_files): Initialize it.
19012 (output_files): Dump it...
19013 * src/files.h: Export it.
19014 * src/reader.c (copy_guard): Use it.
19015
190162000-12-19 Akim Demaille <akim@epita.fr>
19017
19018 * src/files.c (outfile, defsfile, actfile): Removed as global
19019 vars.
19020 (open_files): Don't compute them.
19021 (output_files): Adjust.
19022 (base_name, short_base_name): Be global.
19023 Adjust dependencies.
19024
190252000-12-19 Akim Demaille <akim@epita.fr>
19026
19027 * src/files.c (strsuffix): New.
19028 (stringappend): Be just like strcat but allocate.
19029 (base_names): Eve out from open_files.
19030 Try to simplify the rather hairy computation of base_name and
19031 short_base_name.
19032 (open_files): Use it.
19033 * tests/suite.at (Checking output file names): New test.
19034
190352000-12-19 Akim Demaille <akim@epita.fr>
19036
19037 * src/system.h (obstack_grow_literal_string): Rename as...
19038 (obstack_grow_string): this.
19039 * src/output.c (output_parser): Recognize `%% actions' instead of
19040 `$'.
19041 * src/bison.s1: s/$/%% actions/.
19042 * src/bison.hairy: Likewise.
19043
190442000-12-19 Akim Demaille <akim@epita.fr>
19045
19046 * src/output.c (output_parser): Compute the `#line' lines when
19047 there are.
19048 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
19049 Suggested by Hans Aberg.
19050
190512000-12-19 Akim Demaille <akim@epita.fr>
19052
19053 Let the handling of the skeleton files be local to the procedures
19054 that use it.
19055
19056 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
19057 longer static.
19058 (fparser, open_extra_files): Remove.
19059 (open_files, output_files): Don't take care of fparser.
19060 * src/files.h: Adjust.
19061 * src/output.c (output_parser): Open and close the file to the
19062 skeleton.
19063 * src/reader.c (read_declarations): When %semantic_parser, open
19064 fguard.
19065
190662000-12-19 Akim Demaille <akim@epita.fr>
19067
19068 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
19069 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
19070
190712000-12-19 Akim Demaille <akim@epita.fr>
19072
19073 * src/files.c (open_files): Yipee! We no longer need all the code
19074 looking for `/tmp' since we have no tmp file.
19075
190762000-12-19 Akim Demaille <akim@epita.fr>
19077
19078 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
19079 New macros.
19080 * src/files.c (open_files): Less dependency on MSDOS etc.
19081
190822000-12-14 Akim Demaille <akim@epita.fr>
19083
19084 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
19085 Provide a default definition.
19086 Use it when executing the default @ action.
19087 * src/reader.c (reader_output_yylsp): No longer include
19088 `timestamp' and `text' in the default YYLTYPE.
19089
190902000-12-12 Akim Demaille <akim@epita.fr>
19091
19092 * src/reader.c (copy_definition, parse_union_decl, copy_action)
19093 (copy_guard): Quote the file names.
19094 Reported by Laurent Mascherpa.
19095
190962000-12-12 Akim Demaille <akim@epita.fr>
19097
19098 * src/output.c (output_headers, output_program, output): Be sure
19099 to escape special characters when outputting filenames.
19100 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
19101 (output_headers): Don't depend on them, Use ACTSTR.
19102
191032000-11-17 Akim Demaille <akim@epita.fr>
19104
19105 * lib/obstack.h: Formatting changes.
19106 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
19107 prevents type checking.
19108 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
19109 cast the value to (void *): assigning a `foo *' to a `void *'
19110 variable is valid.
19111 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
19112 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
19113 append characters.
19114
191152000-11-17 Akim Demaille <akim@epita.fr>
19116
19117 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
19118 as...
19119 (suite.m4, regression.m4, calc.m4): these.
19120 * tests/atgeneral.m4: Update from CVS Autoconf.
19121
191222000-11-17 Akim Demaille <akim@epita.fr>
19123
19124 * tests/regression.m4 (%union and --defines): New test,
19125 demonstrating a current bug in the obstack implementation.
19126
191272000-11-17 Akim Demaille <akim@epita.fr>
19128
19129 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
19130 macros.
19131 Use them to declare the variables which are global or local to
19132 `yyparse'.
19133
191342000-11-17 Akim Demaille <akim@epita.fr>
19135
19136 * acconfig.h: Remove, no longer used.
19137
191382000-11-07 Akim Demaille <akim@epita.fr>
19139
19140 * src: s/Copyright (C)/Copyright/g.
19141
191422000-11-07 Akim Demaille <akim@epita.fr>
19143
19144 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
19145 defining.
19146 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
19147
191482000-11-07 Akim Demaille <akim@epita.fr>
19149
19150 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
19151 Merge in a single CPP if/else.
19152
191532000-11-07 Akim Demaille <akim@epita.fr>
19154
19155 * src/output.c (output): Remove useless variables.
19156 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
19157 argument `data' for consistency with the prototypes.
19158 Qualify it `const'.
19159 (obstack_copy, obstack_copy0): Rename the second argument as
19160 `address' for consistency. Qualify it `const'.
19161 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
19162 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
19163 `const' their input argument (`data' or `address').
19164 Adjust the corresponding macros to include `const' in casts.
19165
191662000-11-03 Akim Demaille <akim@epita.fr>
19167
19168 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
19169 s/PFILE1/BISON_HAIRY/.
19170 Adjust dependencies.
19171
191722000-11-03 Akim Demaille <akim@epita.fr>
19173
19174 For some reason, this was not applied.
19175
19176 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19177 `unlink': it's no longer used.
19178
191792000-11-03 Akim Demaille <akim@epita.fr>
19180
19181 * src/files.c (skeleton_find): New function, eved out of...
19182 (open_files, open_extra_files): here.
19183
191842000-11-03 Akim Demaille <akim@epita.fr>
19185
19186 Don't use `atexit'.
19187
19188 * src/files.c (obstack_save): New function.
19189 (done): Rename as...
19190 (output_files): this.
19191 Use `obstack_save'.
19192 * src/main.c (main): Don't use `atexit' to register `done', since
19193 it no longer has to remove tmp files, just call `output_files'
19194 when there are no errors.
19195
191962000-11-02 Akim Demaille <akim@epita.fr>
19197
19198 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19199 `unlink': it's no longer used.
19200 * src/files.h: Formatting changes.
19201
192022000-11-02 Akim Demaille <akim@epita.fr>
19203
19204 Remove the last uses of mktemp and unlink/delete.
19205
19206 * src/files.c (fdefines, ftable): Removed.
19207 (defines_ostack, table_obstack): New.
19208 Adjust dependencies of the former into uses of the latter.
19209 * src/output.c (output_short_or_char_table, output_short_table):
19210 Convert to using obstacks.
19211 * src/reader.c (copy_comment2): Accept one FILE * and two
19212 obstacks.
19213 (output_token_defines, reader_output_yylsp): Use obstacks.
19214 * src/system.h (obstack_fgrow3): New.
19215 * po/POTFILES.in: Adjust.
19216
192172000-11-01 Akim Demaille <akim@epita.fr>
19218
19219 Change each use of `fattrs' into a use of `attrs_obstack'.
19220
19221 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
19222 * src/files.c (fattrs): Remove.
19223 (attrs_obstack): New.
19224 Adjust all dependencies.
19225 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
19226
192272000-11-01 Akim Demaille <akim@epita.fr>
19228
19229 Introduce obstacks.
19230 Change each use of `faction' into a use of `action_obstack'.
19231
19232 * lib/obstack.h, lib/obstack.c: New files.
19233 * src/files.c (faction): Remove.
19234 (action_obstack): New.
19235 Adjust all dependencies.
19236
192372000-10-20 Akim Demaille <akim@epita.fr>
19238
19239 * lib/quote.h (PARAMS): New macro. Use it.
19240
192412000-10-16 Akim Demaille <akim@epita.fr>
19242
19243 * src/output.c (output_short_or_char_table): New function.
19244 (output_short_table, output_token_translations): Use it.
19245 (goto_actions): Use output_short_table.
19246
192472000-10-16 Akim Demaille <akim@epita.fr>
19248
19249 * src/symtab.c (bucket_new): New function.
19250 (getsym): Use it.
19251
19252 * src/output.c (output_short_table): New argument to display the
19253 comment associated with the table.
19254 Adjust dependencies.
19255 (output_gram): Use it.
19256 (output_rule_data): Nicer output layout for YYTNAME.
19257
192582000-10-16 Akim Demaille <akim@epita.fr>
19259
19260 * src/lex.c (read_typename): New function.
19261 (lex): Use it.
19262 * src/reader.c (copy_dollar): Likewise.
19263
192642000-10-16 Akim Demaille <akim@epita.fr>
19265
19266 * src/reader.c (copy_comment2): Expect the input stream to be on
19267 the `/' which is suspected to open a comment, instead of being
19268 called after `//' or `/*' was read.
19269 (copy_comment, copy_definition, parse_union_decl, copy_action)
19270 (copy_guard): Adjust.
19271
192722000-10-16 Akim Demaille <akim@epita.fr>
19273
19274 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
19275 `read_signed_integer'.
19276
192772000-10-16 Akim Demaille <akim@epita.fr>
19278
19279 * src/reader.c (copy_dollar): New function.
19280 (copy_guard, copy_action): Use it.
19281
192822000-10-16 Akim Demaille <akim@epita.fr>
19283
19284 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
19285 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
19286 New files, from Fileutils 4.0.27.
19287 * src/main.c (printable_version): Remove.
19288 * src/lex.c, src/reader.c: Use `quote'.
19289
192902000-10-04 Akim Demaille <akim@epita.fr>
19291
19292 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
19293
192942000-10-04 Akim Demaille <akim@epita.fr>
19295
19296 * doc/bison.texinfo: Various typos spotted by Neil Booth.
19297
192982000-10-04 Akim Demaille <akim@epita.fr>
19299
19300 When a literal string is used to define two different tokens,
19301 `bison -v' segfaults.
19302 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
19303
19304 * tests/regression.m4: New file.
19305 Include the core of the sample provided by Piotr Gackiewicz.
19306 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
19307 properly.
19308
193092000-10-04 Akim Demaille <akim@epita.fr>
19310
19311 * src/reader.c (parse_expect_decl): Keep `count' within the size
19312 of `buffer'.
19313 From Neil Booth.
19314
193152000-10-02 Paul Eggert <eggert@twinsun.com>
19316
19317 * bison.s1 (yyparse): Assign the default value
19318 unconditionally, to avoid a GCC warning and make the parser a
19319 tad smaller.
19320
193212000-10-02 Akim Demaille <akim@epita.fr>
19322
19323 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
19324 options.
19325
193262000-10-02 Akim Demaille <akim@epita.fr>
19327
19328 * src/derives.c, src/print.c, src/reduce.c: To ease the
19329 translation, move some `\n' out of the translated strings.
19330
193312000-10-02 Akim Demaille <akim@epita.fr>
19332
19333 The location tracking mechanism is precious for parse error
19334 messages. Nevertheless, it is enabled only when `@n' is used in
19335 the grammar, which is a different issue (you can use it in error
19336 message, but not in the grammar per se). Therefore, there should
19337 be another means to enable it.
19338
19339 * src/getargs.c (getargs): Support `--locations'.
19340 (usage): Report it.
19341 * src/getargs.h (locationsflag): Export it.
19342 * src/lex.c (percent_table): Support `%locations'.
19343 * src/reader.c (yylsp_needed): Remove this variable, now replaced
19344 with `locationsflag'.
19345 * doc/bison.texinfo: Document `--locations' and `%locations'.
19346 Sort the options.
19347 * tests/calc.m4: Test it.
19348
19349 For regularity of the names, replace each
19350 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
19351 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
19352 In addition replace each `flag' with `_flag'.
19353
193542000-10-02 Akim Demaille <akim@epita.fr>
19355
19356 Also test parse error messages, including with YYERROR_VERBOSE.
19357
19358 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
19359 associative).
19360 Use it to check the computations.
19361 Use it to check `nonassoc' is honored.
19362 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
19363 `--yyerror-verbose'.
19364 (_AT_CHECK_CALC): Adjust to this option.
19365 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
19366
193672000-10-02 Akim Demaille <akim@epita.fr>
19368
19369 Test also `--verbose', `--defines' and `--name-prefix'. Testing
19370 the latter demonstrates a flaw in the handling of non debugging
19371 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
19372 was used in order to simplify:
19373
19374 #if YYDEBUG
19375 if (yydebug)
19376 {
19377 ...
19378 }
19379 #endif
19380
19381 into
19382
19383 if (yydebug)
19384 {
19385 ...
19386 }
19387
19388 unfortunately this leads to a CPP conflict when
19389 `--name-prefix=foo' is used since it produces `#define yydebug
19390 foodebug'.
19391
19392 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
19393 (YYDPRINTF): New macro.
19394 Spread its use.
19395 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
19396 the bison options.
19397 Also test `--verbose', `--defines' and `--name-prefix'.
19398
193992000-10-02 Akim Demaille <akim@epita.fr>
19400
19401 Improve the readability of the produced parsers.
19402
19403 * src/bison.s1: Formatting changes.
19404 Improve the comment related to the `$' mark.
19405 (yydefault): Don't fall through to `yyresume': `goto' there.
19406 * src/output.c (output_parser): When the `$' is met, skip the end
19407 of its line.
19408 New variable, `number_of_dollar_signs', to check there's exactly
19409 one `$' in the parser skeleton.
19410
194112000-10-02 Akim Demaille <akim@epita.fr>
19412
19413 * lib/xstrdup.c: New file, from the fileutils.
19414 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19415 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19416 instead of strlen + xmalloc + strcpy.
19417 * src/symtab.c (copys): Remove, use xstrdup instead.
19418
194192000-10-02 Akim Demaille <akim@epita.fr>
19420
19421 * src/gram.h (associativity): New enum type which replaces the
19422 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19423 `right_assoc', `left_assoc' and `non_assoc'.
19424 Adjust all dependencies.
19425 * src/reader.c: Formatting changes.
19426 (LTYPESTR): Don't define it, use it as a literal in
19427 `reader_output_yylsp'.
19428 * src/symtab.h (symbol_class): New enum type which replaces the
19429 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19430 `sunknown', `stoken and `snterm'.
19431
194322000-10-02 Akim Demaille <akim@epita.fr>
19433
19434 * src/getargs.c (fixed_outfiles): Rename as...
19435 (yaccflag): for consistency and accuracy.
19436 Adjust dependencies.
19437
194382000-10-02 Akim Demaille <akim@epita.fr>
19439
19440 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19441 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19442 difficult and introduced a lot of core dump. It turns out that
19443 Bison used an implementation of `xmalloc' based on `calloc', and
19444 at various places it does depend upon the initialization to 0. I
19445 have not tried to isolate the pertinent places, and all the former
19446 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19447 someone should address this issue.
19448
19449 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19450 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19451 files.
19452 Adjust dependencies.
19453 * src/warshall.h: New file.
19454 Propagate.
19455
194562000-10-02 Akim Demaille <akim@epita.fr>
19457
19458 Various anti-`extern in *.c' changes.
19459
19460 * src/system.h: Include `assert.h'.
19461
194622000-10-02 Akim Demaille <akim@epita.fr>
19463
19464 * src/state.h (nstates, final_state, first_state, first_shift)
19465 (first_reduction): Move their exportation from here...
19466 * src/LR0.h: to here.
19467 Adjust dependencies.
19468 * src/getargs.c (statisticsflag): New variable.
19469 Add support for `--statistics'.
19470 Adjust dependencies.
19471
19472 Remove a lot of now useless `extern' statements in most files.
19473
194742000-10-02 Akim Demaille <akim@epita.fr>
19475
19476 * src/LR0.h: New file.
19477 Propagate its use.
19478
194792000-10-02 Akim Demaille <akim@epita.fr>
19480
19481 * src/print.h: New file.
19482 Propagate its use.
19483 * src/print.c: Formatting and ordering changes.
19484 (verbose, terse): Replace with...
19485 (print_results): this new function.
19486 Adjust dependencies.
19487
194882000-10-02 Akim Demaille <akim@epita.fr>
19489
19490 * src/conflicts.c (conflict_report): New function.
19491 (conflict_log, verbose_conflict_log): Replace with...
19492 (print_conflicts): this function.
19493 Adjust dependencies.
19494 * src/conflicts.h: New file.
19495 Propagate its inclusion.
19496
194972000-10-02 Akim Demaille <akim@epita.fr>
19498
19499 * src/nullable.h: New file.
19500 Propagate its inclusion.
19501 * src/nullable.c: Formatting changes.
19502
195032000-10-02 Akim Demaille <akim@epita.fr>
19504
19505 * src/reduce.h: New file.
19506 Propagate its inclusion.
19507 * src/reduce.c: Topological sort and other formatting changes.
19508 (bool, TRUE, FALSE): Move their definition to...
19509 * src/system.h: here.
19510
195112000-10-02 Akim Demaille <akim@epita.fr>
19512
19513 * src/files.c: Formatting changes.
19514 (tryopen, tryclose, openfiles): Rename as...
19515 (xfopen, xfclose, open_files): this.
19516 (stringappend): static.
19517 * src/files.h: Complete the list of exported symbols.
19518 Propagate its use.
19519
195202000-10-02 Akim Demaille <akim@epita.fr>
19521
19522 * src/reader.h: New file.
19523 Propagate its use instead of tedious list of `extern' and
19524 prototypes.
19525 * src/reader.c: Formatting changes, topological sort,
19526 s/register//.
19527
195282000-10-02 Akim Demaille <akim@epita.fr>
19529
19530 * src/lex.h: Prototype `lex.c' exported functions.
19531 * src/reader.c: Adjust.
19532 * src/lex.c: Formatting changes.
19533 (safegetc): Rename as...
19534 (xgetc): this.
19535
195362000-10-02 Akim Demaille <akim@epita.fr>
19537
19538 * src/lalr.h: New file.
19539 Propagate its inclusion instead of prototypes and `extern'.
19540 * src/lalr.c: Formatting changes, topological sorting etc.
19541
195422000-10-02 Akim Demaille <akim@epita.fr>
19543
19544 * src/output.c (token_actions): Introduce a temporary array,
19545 YYDEFACT, that makes it possible for this function to use
19546 output_short_table.
19547
195482000-10-02 Akim Demaille <akim@epita.fr>
19549
19550 `user_toknums' is output as a `short[]' in `output.c', while it is
19551 defined as a `int[]' in `reader.c'. For consistency with the
19552 other output tables, `user_toknums' is now defined as a table of
19553 shorts.
19554
19555 * src/reader.c (user_toknums): Be a short table instead of an int
19556 table.
19557 Adjust dependencies.
19558
19559 Factor the short table outputs.
19560
19561 * src/output.c (output_short_table): New function.
19562 * src/output.c (output_gram, output_stos, output_rule_data)
19563 (output_base, output_table, output_check): Use it.
19564
195652000-10-02 Akim Demaille <akim@epita.fr>
19566
19567 * src/output.c (output): Topological sort of the functions, in
19568 order to get rid of the `static' prototypes.
19569 No longer use `register'.
19570 * src/output.h: New file.
19571 Propagate its inclusion in files explicitly prototyping functions
19572 from output.c.
19573
195742000-09-21 Akim Demaille <akim@epita.fr>
19575
19576 * src/atgeneral.m4: Update from Autoconf.
19577
195782000-09-21 Akim Demaille <akim@epita.fr>
19579
19580 * src/closure.h: New file.
19581 * src/closure.c: Formatting changes, topological sort over the
19582 functions, use of closure.h.
19583 (initialize_closure, finalize_closure): Rename as...
19584 (new_closure, free_closure): these. Adjust dependencies.
19585 * src/LR0.c: Formatting changes, topological sort, use of
19586 cloture.h.
19587 (initialize_states): Rename as...
19588 (new_states): this.
19589 * src/Makefile.am (noinst_HEADERS): Adjust.
19590
195912000-09-20 Akim Demaille <akim@epita.fr>
19592
19593 * src/acconfig.h: Don't protect config.h against multiple
19594 inclusion.
19595 Don't define PARAMS.
19596 * src/system.h: Define PARAMS.
19597 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19598 purpose of config.h. system.h must not try to fix wrong
19599 definitions in config.h.
19600
196012000-09-20 Akim Demaille <akim@epita.fr>
19602
19603 * src/derives.h: New file.
19604 * src/main.c, src/derives.h: Use it.
19605 Formatting changes.
19606 * src/Makefile.am (noinst_HEADERS): Adjust.
19607
196082000-09-20 Akim Demaille <akim@epita.fr>
19609
19610 * tests/atgeneral.m4: Update from Autoconf.
19611 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19612 (AT_CHECK_CALC): New macros.
19613 Use these macros to test bison with options `', `--raw',
19614 `--debug', `--yacc', `--yacc --debug'.
19615
196162000-09-19 Akim Demaille <akim@epita.fr>
19617
19618 * src/output.c: Formatting changes.
19619 * src/machine.h: Remove, leaving its contents in...
19620 * src/system.h: here.
19621 Include stdio.h.
19622 Adjust all dependencies on stdio.h and machine.h.
19623 * src/getargs.h: New file.
19624 Let all `extern' declarations about getargs.c be replaced with
19625 inclusion of `getargs.h'.
19626 * src/Makefile.am (noinst_HEADERS): Adjust.
19627
19628 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19629 scope.
19630 (yyerror): Returns void, not int.
19631 * doc/bison.texinfo: Formatting changes.
19632
196332000-09-19 Akim Demaille <akim@epita.fr>
19634
19635 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19636 portable.
19637
196382000-09-18 Akim Demaille <akim@epita.fr>
19639
19640 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19641 * src/Makefile.am (INCLUDES): Don't.
19642 Be ready to fetch headers in lib/.
19643
196442000-09-18 Akim Demaille <akim@epita.fr>
19645
19646 * doc/bison.texinfo: Update the copyright.
19647 ANSIfy and GNUify the examples.
19648 Remove the old menu.
19649
196502000-09-18 Akim Demaille <akim@epita.fr>
19651
19652 First set of tests: use the `calc' example from the documentation.
19653
19654 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19655 is defined only when YYDEBUG is.
19656 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19657 * src/files.c (tryopen, tryclose): Formatting changes.
19658 Move to the top and be static.
19659 * src/reader.c (read_signed_integer): Likewise.
19660 * tests/calc.m4: New file.
19661 * Makefile.am, suite.m4: Adjust.
19662 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19663
196642000-09-18 Akim Demaille <akim@epita.fr>
19665
19666 Add support for an Autotest test suite for Bison.
19667
19668 * m4/m4.m4, m4/atconfig.m4: New files.
19669 * m4/Makefile.am (EXTRA_DIST): Adjust.
19670 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19671 files.
19672 * src/getargs.c: Display a more standard --version message.
19673 * src/reader.c (reader): Formatting changes.
19674 No longer depend upon VERSION_STRING.
19675 * configure.in: No longer use `dnl'.
19676 Set up the test suite and the new directory `tests/.
19677 (VERSION_STRING): Remove.
19678
196792000-04-14 Akim Demaille <akim@epita.fr>
19680
19681 * src/reader.c (copy_comment2): New function, same as former
19682 `copy_comment', but outputs into two FILE *.
19683 (copy_comment): Use it.
19684 (parse_union_decl): Use it.
19685 (get_type, parse_start_decl): Use the same `invalid' message.
19686 (parse_start_decl, parse_union_decl): Use the same `multiple'
19687 message.
19688 (parse_union_decl, copy_guard, copy_action): Use the same
19689 `unmatched' message.
19690 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19691
196922000-03-31 Akim Demaille <akim@epita.fr>
19693
19694 * src/files.c (tryopen, tryclose): Move to the top.
19695 Be static.
19696
196972000-03-31 Akim Demaille <akim@epita.fr>
19698
19699 * src/main.c (main): Don't call `done', exit does it.
19700
197012000-03-31 Akim Demaille <akim@epita.fr>
19702
19703 * allocate.c: s/return (foo)/return foo/.
19704 * lalr.c: Likewise.
19705 * LR0.c: Likewise.
19706 * output.c: Likewise.
19707 * reader.c: Likewise.
19708 * symtab.c: Likewise.
19709 * vmsgetargs.c: Likewise.
19710
197112000-03-31 Akim Demaille <akim@epita.fr>
19712
19713 Clean up the error reporting functions.
19714
19715 * src/report.c: New file.
19716 * src/report.h: Likewise.
19717 * src/Makefile.am: Adjust.
19718 * m4/error.m4: New file.
19719 * m4/Makefile.am: Adjust.
19720 * configure.in (jm_PREREQ_ERROR): Call it.
19721 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19722 Remove.
19723 (fatal, fatals): Remove. All callers use complain.c::fatal.
19724 (warn, warni, warns, warnss, warnss): Remove. All callers use
19725 complain.c::complain.
19726 (toomany): Remove, use fatal instead.
19727 * src/files.c (done): No argument, use complain_message_count.
19728 * src/main.c (main): Register `done' to `atexit'.
19729
19730 * src/getargs.c (usage): More `fputs', less `fprintf'.
19731
197322000-03-28 Akim Demaille <akim@epita.fr>
19733
19734 * lib/: New directory.
19735 * Makefile.am (SUBDIRS): Adjust.
19736 * configure.in: Adjust.
19737 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19738 useless.
19739 * src/alloca.c: Moved to lib/.
19740 * src/getopt.c: Likewise.
19741 * src/getopt1.c: Likewise.
19742 * src/getopt.h: Likewise.
19743 * src/ansi2knr.c: Likewise.
19744 * src/ansi2knr.1: Likewise.
19745 * src/Makefile.am: Adjust.
19746 * lib/Makefile.am: New file.
19747
197482000-03-28 Akim Demaille <akim@epita.fr>
19749
19750 * src/getargs.c (usage): Refresh the help message.
19751
197522000-03-17 Akim Demaille <akim@epita.fr>
19753
19754 * src/getopt1.c: Updated from textutils 2.0e
19755 * src/getopt.c: Likewise.
19756 * src/getopt.h: Likewise.
19757
197582000-03-17 Akim Demaille <akim@epita.fr>
19759
19760 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19761 the file name, not the whole `#line LINE FILE'.
19762
197632000-03-17 Akim Demaille <akim@epita.fr>
19764
19765 On syntax errors, report the token on which we choked.
19766
19767 * src/bison.s1 (yyparse): In the label yyerrlab, when
19768 YYERROR_VERBOSE, add yychar in msg.
19769
197702000-03-17 Akim Demaille <akim@epita.fr>
19771
19772 * src/reader.c (copy_at): New function.
19773 (copy_guard): Use it.
19774 (copy_action): Use it.
19775
197762000-03-17 Akim Demaille <akim@epita.fr>
19777
19778 Be kind to translators, save some useless translations.
19779
19780 * src/main.c (banner): New function.
19781 (fatal_banner): Use it.
19782 (warn_banner): Use it.
19783
197842000-03-17 Akim Demaille <akim@epita.fr>
19785
19786 * src/reader.c (copy_definition): Use copy_string and
19787 copy_comment. Removed now unused `match', `ended',
19788 `cplus_comment'.
19789 (copy_comment, copy_string): Moved, to be visible from
19790 copy_definition.
19791
197922000-03-17 Akim Demaille <akim@epita.fr>
19793
19794 * src/reader.c (copy_string): Declare `static inline'. No
19795 problems with inline, since it is checked by configure.
19796 (copy_comment): Likewise.
19797
197982000-03-17 Akim Demaille <akim@epita.fr>
19799
19800 * src/reader.c (packsymbols): Formatting changes.
19801
198022000-03-17 Akim Demaille <akim@epita.fr>
19803
19804 * src/reader.c (copy_comment): New function, factored out from:
19805 (copy_action): Use it. Removed now unused `match', `ended',
19806 `cplus_comment'.
19807 (copy_guard): Likewise.
19808
198092000-03-17 Akim Demaille <akim@epita.fr>
19810
19811 * src/reader.c (copy_string): New function, factored out from:
19812 (copy_action): Use it.
19813 (copy_guard): Likewise.
19814
198152000-03-17 Akim Demaille <akim@epita.fr>
19816
19817 Change the handling of @s so that they behave exactly like $s.
19818 There is now a pseudo variable @$ (readble and writable), location
19819 of the lhs of the rule (by default ranging from the location of
19820 the first symbol of the rhs, to the location of the last symbol,
19821 or, if the rhs is empty, YYLLOC).
19822
19823 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19824 yyval.
19825 (yyparse): When providing a default semantic action, provide a
19826 default location action.
19827 (after the $): No longer change `*YYLSP', just stack YYLOC the
19828 same way you stack YYVAL.
19829 * src/reader.c (read_declarations): Use warns.
19830 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19831 (copy_action, case '@'): Likewise.
19832 Use a standard error message, to save useless work from
19833 translators.
19834
198352000-03-17 Akim Demaille <akim@epita.fr>
19836
19837 * src/bison.s1: Formatting and cosmetics changes.
19838 * src/reader.c: Likewise.
19839 Update the Copyright notice.
19840
198412000-03-17 Akim Demaille <akim@epita.fr>
19842
19843 * src/bison.s1 (#line): All set to `#line' only, since the
19844 Makefile now handles them.
19845
198462000-03-16 Akim Demaille <akim@epita.fr>
19847
19848 * src/output.c (output_rule_data): Output the documentation of
19849 some of the tables.
19850 (Copyright notice): Update.
19851 Formatting changes.
19852
198532000-03-16 Akim Demaille <akim@epita.fr>
19854
19855 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19856 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19857 One `#if YYDEBUG' remains, since it uses variables which are
19858 defined only if `YYDEBUG != 0'.
19859
198602000-03-16 Akim Demaille <akim@epita.fr>
19861
19862 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19863 and related variables so that the similarities are highlighted.
19864
198652000-03-16 Akim Demaille <akim@epita.fr>
19866
19867 * src/bison.s1: Properly indent CPP directives.
19868
198692000-03-16 Akim Demaille <akim@epita.fr>
19870
19871 * src/bison.s1: Properly indent the `alloca' CPP section.
19872
198732000-03-16 Akim Demaille <akim@epita.fr>
19874
19875 Do not hard code values of directories in `configure.in'.
19876 Update the `configure' tool chain.
19877
19878 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19879 src/makefile.am.
19880 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19881 (AC_OUTPUT): Add m4/Makefile.
19882 Bump to bison 1.28a, 1.29 has never been released.
19883 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19884 handled via src/Makefile.am.
19885 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19886 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19887 autoheader.
19888 * Makefile.am (SUBDIRS): Add m4.
19889 (ACLOCAL_AM_FLAGS): New variable.
19890 (AUTOMAKE_OPTIONS): Add check-news.
19891 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19892 the proper line number and file name.
19893 (DEFS): Propagate the location of bison library files and of the
19894 locale files.
19895 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19896 builddir.
19897 * acinclude.m4: Remove, replaced by the directory m4.
19898 * m4/Makefile.am (EXTRA_DIST): New variable.
19899 * m4/gettext.m4: New file, from the fileutils.
19900 * m4/lcmessage.m4: Likewise
19901 * m4/progtest.m4: Likewise.
19902 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19903
199042000-03-10 Akim Demaille <akim@epita.fr>
19905
19906 * src/closure.c:
19907 Formatting changes of various comments.
19908 Respect the GNU coding standards at various places.
19909 Don't use `_()' when no translation is needed.
19910
199111999-12-13 Jesse Thilo <jthilo@gnu.org>
19912
19913 * src/files.c:
19914 OS/2 honors TMPDIR environment variable.
19915
199161999-12-13 Jesse Thilo <jthilo@gnu.org>
19917
19918 * doc/bison.texinfo: Tweaked spelling and grammar.
19919 Updated ISBN.
19920 Removed reference to price of printed copy.
19921 Mention BISON_SIMPLE and BISON_HAIRY.
19922
199231999-12-13 Jesse Thilo <jthilo@gnu.org>
19924
19925 * configure.in, NEWS:
19926 Bison 1.29 released.
19927
199281999-10-27 Jesse Thilo <jthilo@gnu.org>
19929
19930 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19931 Added reference card.
19932
199331999-07-26 Jesse Thilo <jthilo@gnu.org>
19934
19935 * po/ru.po: Added Russian translation.
19936
199371999-07-26 Jesse Thilo <jthilo@gnu.org>
19938
19939 * configure.in: Added Russian translation.
19940
199411999-07-06 Jesse Thilo <jthilo@gnu.org>
19942
19943 * configure.in, NEWS, README:
19944 Released version 1.28.
19945
199461999-06-14 Jesse Thilo <jthilo@gnu.org>
19947
19948 * src/system.h:
19949 Squashed redefinition warning on some systems.
19950
19951 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19952 Have configure build version string instead of relying on ANSI string
19953 concatentation.
19954
199551999-06-14 Jesse Thilo <jthilo@gnu.org>
19956
19957 * po/POTFILES.in: Got rid of version.c.
19958
199591999-06-14 Jesse Thilo <jthilo@gnu.org>
19960
19961 * acconfig.h, configure.in:
19962 Have configure build version string instead of relying on ANSI string
19963 concatentation.
19964
199651999-06-08 Jesse Thilo <jthilo@gnu.org>
19966
19967 * doc/bison.1:
19968 Dropped mention of `+' for long-named options.
19969
199701999-05-30 Jesse Thilo <jthilo@gnu.org>
19971
19972 * src/files.c: Added <unistd.h> for unlink().
19973
19974 * src/Makefile.am, src/system.h:
19975 I18n fixes.
19976
199771999-05-30 Jesse Thilo <jthilo@gnu.org>
19978
19979 * README: Added a FAQ list.
19980
19981 * configure.in, acconfig.h:
19982 I18n fixes.
19983
199841999-05-30 Jesse Thilo <jthilo@gnu.org>
19985
19986 * doc/FAQ, doc/Makefile.am:
19987 Added a FAQ list.
19988
199891999-05-19 Jesse Thilo <jthilo@gnu.org>
19990
19991 * src/alloc.h, src/symtab.h, src/version.c:
19992 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19993
199941999-04-18 Jesse Thilo <jthilo@gnu.org>
19995
19996 * src/.cvsignore, src/Makefile.am:
19997 Reorganized: sources in `src', documentation in `doc'.
19998
19999 * src/lex.c (literalchar):
20000 fixed the code for escaping double quotes (thanks
20001 Jonathan Czisny.)
20002
200031999-04-18 Jesse Thilo <jthilo@gnu.org>
20004
20005 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
20006 Adjusted paths to reflect directory reorganization.
20007
200081999-04-18 Jesse Thilo <jthilo@gnu.org>
20009
20010 * doc/.cvsignore, doc/Makefile.am:
20011 Reorganized: sources in `src', documentation in `doc'.
20012
200131999-04-18 Jesse Thilo <jthilo@gnu.org>
20014
20015 * configure.in:
20016 Updated AC_INIT file to reflect directory reorganization.
20017
20018 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
20019 Reorganized: sources in `src', documentation in `doc'.
20020
200211999-04-13 Jesse Thilo <jthilo@gnu.org>
20022
20023 * src/allocate.c:
20024 Don't declare calloc() and realloc() if not necessary.
20025
200261999-04-13 Jesse Thilo <jthilo@gnu.org>
20027
20028 * configure.in, acconfig.h, acinclude.m4:
20029 Don't declare calloc() and realloc() if not necessary.
20030
200311999-03-23 Jesse Thilo <jthilo@gnu.org>
20032
20033 * po/.cvsignore: Added i18n support.
20034
200351999-03-23 Jesse Thilo <jthilo@gnu.org>
20036
20037 * acconfig.h, configure.in, Makefile.am:
20038 Added i18n support.
20039
200401999-03-22 Jesse Thilo <jthilo@gnu.org>
20041
20042 * src/bison.s1: Fixed #line numbers.
20043
200441999-03-15 Jesse Thilo <jthilo@gnu.org>
20045
20046 * po/es.po, po/fr.po, po/nl.po, po/de.po:
20047 Added PO files from Translation Project.
20048
200491999-03-03 Jesse Thilo <jthilo@gnu.org>
20050
20051 * Makefile.am:
20052 Added support for non-ANSI compilers (ansi2knr).
20053
200541999-02-16 Jesse Thilo <jthilo@gnu.org>
20055
20056 * configure.in: Bumped version number to 1.27.
20057
20058 * Makefile.am:
20059 Added `bison.simple' to list of files removed by `make distclean'.
20060
200611999-02-12 Jesse Thilo <jthilo@gnu.org>
20062
20063 * src/files.c, src/files.h:
20064 Defined locations of parser files in config.h instead of Makefile.
20065
200661999-02-12 Jesse Thilo <jthilo@gnu.org>
20067
20068 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
20069 Defined locations of parser files in config.h instead of Makefile.
20070
200711999-02-09 Jesse Thilo <jthilo@gnu.org>
20072
20073 * Makefile.am:
20074 Removed inappropriate use of $< macro.
20075
200761999-02-05 Jesse Thilo <jthilo@gnu.org>
20077
20078 * po/Makefile.in.in, po/POTFILES.in:
20079 Add `po' directory skeleton.
20080
200811999-01-27 Jesse Thilo <jthilo@gnu.org>
20082
20083 * README: Document help-bison list.
20084
20085 * configure.in: Add check for mkstemp().
20086
200871999-01-20 Jesse Thilo <jthilo@gnu.org>
20088
20089 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
20090 Hush a few compiler warnings.
20091
20092 * src/files.c:
20093 Add tryclose(), which verifies that fclose was successful.
20094 Hush a couple of compiler warnings.
20095
200961999-01-20 Jesse Thilo <jthilo@gnu.org>
20097
20098 * Makefile.am, OChangeLog:
20099 ChangeLog is now automatically generated. Include the old version as
20100 OChangeLog.
20101
201021999-01-14 Jesse Thilo <jthilo@gnu.org>
20103
20104 * 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:
20105 Update FSF address.
20106
201071999-01-14 Jesse Thilo <jthilo@gnu.org>
20108
20109 * doc/bison.texinfo: Fix formatting glitch.
20110
20111 * doc/bison.texinfo: Update FSF address.
20112
201131999-01-14 Jesse Thilo <jthilo@gnu.org>
20114
20115 * acconfig.h: Update FSF address.
20116
201171999-01-08 Jesse Thilo <jthilo@gnu.org>
20118
20119 * src/system.h:
20120 Don't define PACKAGE here, since config.h defines it.
20121
201221998-12-30 Jesse Thilo <jthilo@gnu.org>
20123
20124 * src/reader.c: Update copyright date.
20125
20126 * src/main.c:
20127 Ditch sprintf to statically-sized buffers in fatal/warn functions in
20128 favor of output directly to stderr (avoids buffer overruns).
20129
20130 * src/reader.c: Some checks for premature EOF.
20131
20132 * 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:
20133 Use prototypes if the compiler understands them.
20134
20135 * src/files.c: Honor TMPDIR on Unix hosts.
20136 Use prototypes if the compiler understands them.
20137
20138 * src/reader.c:
20139 Fix a couple of buffer overrun bugs.
20140 Use prototypes if the compiler understands them.
20141
20142 * src/system.h: Include unistd.h and ctype.h.
20143 Use #ifdef instead of #if for NLS symbols.
20144
201451998-12-30 Jesse Thilo <jthilo@gnu.org>
20146
20147 * doc/bison.texinfo:
20148 Delete comment "consider using @set for edition number, etc..." since
20149 we now are doing so.
20150
201511998-12-30 Jesse Thilo <jthilo@gnu.org>
20152
20153 * configure.in:
20154 Use prototypes if the compiler understands them.
20155
20156 * NEWS: Document 1.26 highlights.
20157
20158 * Makefile.am: Require Automake 1.3 or later.
20159
20160 * acconfig.h:
20161 Use prototypes if the compiler understands them.
20162
201631998-12-29 Jesse Thilo <jthilo@gnu.org>
20164
20165 * src/version.c:
20166 Use VERSION symbol from automake for version number.
20167
201681998-12-29 Jesse Thilo <jthilo@gnu.org>
20169
20170 * acconfig.h, configure.in, version.cin:
20171 Use VERSION symbol from automake for version number.
20172
201731998-11-28 Jesse Thilo <jthilo@gnu.org>
20174
20175 * Makefile.am:
20176 Distribute original version of simple parser (bison.s1), not built
20177 version (bison.simple).
20178
201791998-11-28 Jesse Thilo <jthilo@gnu.org>
20180
20181 * doc/bison.texinfo: Add info dir entry.
20182
20183 * doc/bison.texinfo:
20184 Let automake put version number into documentation.
20185
201861998-11-26 Jesse Thilo <jthilo@gnu.org>
20187
20188 * src/bison.cld, src/build.com, src/vmshlp.mar:
20189 Add non-RCS files from /gd/gnu/bison.
20190
201911998-11-26 Jesse Thilo <jthilo@gnu.org>
20192
20193 * doc/bison.1:
20194 Document the BISON_HAIRY and BISON_SIMPLE variables.
20195
201961998-11-25 Jesse Thilo <jthilo@gnu.org>
20197
20198 * src/version.c: Build version.c automatically.
20199
20200 * src/reader.c:
20201 Fix token numbering (used to start at 258, not 257).
20202
20203 * src/system.h: Include config.h.
20204
20205 * src/getargs.c: Update bug report address.
20206
20207 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
20208 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
20209
202101998-11-25 Jesse Thilo <jthilo@gnu.org>
20211
20212 * Makefile.am:
20213 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20214
20215 * configure.in, version.cin:
20216 Build version.c automatically.
20217
20218 * AUTHORS: Add AUTHORS file.
20219
20220 * README: Update bug report address.
20221
20222 * bison.simple:
20223 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20224
20225 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
20226 Add automake stuff.
20227
202281998-11-25 Jesse Thilo <jthilo@gnu.org>
20229
20230 * doc/bison.texinfo: Clean up some formatting.
20231
202321998-05-05 Richard Stallman <rms@gnu.org>
20233
20234 * doc/bison.texinfo:
20235 Explain better why to make a pure parser.
20236
202371998-01-05 Richard Stallman <rms@gnu.org>
20238
20239 * src/files.c (openfiles):
20240 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
20241 find a temporary directory, if possible. Do not unlink files while
20242 they are open.
20243
202441997-08-25 Richard Stallman <rms@gnu.org>
20245
20246 * src/reader.c (stack_offset;):
20247 Change some warni to warns.
20248
20249 * src/lex.c (literalchar): Use warns, not warni.
20250
202511997-06-28 Richard Stallman <rms@gnu.org>
20252
20253 * src/bison.s1: Add a Bison version comment.
20254
20255 * src/main.c (fatal, warn, berror):
20256 Use program_name.
20257
202581997-06-28 Richard Stallman <rms@gnu.org>
20259
20260 * Makefile.in (bison_version): New variable.
20261 (dist): Use that variable.
20262 (bison.s1): Substitute the Bison version into bison.simple.
20263
20264 * bison.simple: Add a Bison version comment.
20265
202661997-06-18 Richard Stallman <rms@gnu.org>
20267
20268 * src/main.c (fatal, warn, berror):
20269 Make error messages standard.
20270 (toomany): Improve error message text.
20271
20272 * 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:
20273 new.h renamed to alloc.h.
20274
202751997-06-18 Richard Stallman <rms@gnu.org>
20276
20277 * Makefile.in: new.h renamed to alloc.h.
20278
202791997-05-24 Richard Stallman <rms@gnu.org>
20280
20281 * src/lex.c (literalchar):
20282 Fix the code for escaping \, " and '.
20283
20284 (lex): Avoid trouble when there are many chars
20285 to discard in a char literal with just several chars in it.
20286
202871997-05-17 Richard Stallman <rms@gnu.org>
20288
20289 * src/bison.s1:
20290 Use malloc, if using alloca is troublesome.
20291 (YYSTACK_USE_ALLOCA): New flag macro.
20292 Define it for some systems and compilers.
20293 (YYSTACK_ALLOC): New macro.
20294 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20295 If it was malloc'd, free it.
20296
202971997-05-17 Richard Stallman <rms@gnu.org>
20298
20299 * bison.simple:
20300 Use malloc, if using alloca is troublesome.
20301 (YYSTACK_USE_ALLOCA): New flag macro.
20302 Define it for some systems and compilers.
20303 (YYSTACK_ALLOC): New macro.
20304 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20305 If it was malloc'd, free it.
20306
203071997-04-23 Richard Stallman <rms@gnu.org>
20308
20309 * src/bison.s1:
20310 (alloca) [__hpux]: Always define as __builtin_alloca.
20311
203121997-04-23 Richard Stallman <rms@gnu.org>
20313
20314 * bison.simple:
20315 (alloca) [__hpux]: Always define as __builtin_alloca.
20316
203171997-04-22 Richard Stallman <rms@gnu.org>
20318
20319 * src/bison.s1:
20320 [__hpux]: Include alloca.h (right for HPUX 10)
20321 instead of declaring alloca (right for HPUX 9).
20322
20323 * src/bison.s1 (__yy_memcpy):
20324 Declare arg `count' as unsigned int.
20325 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20326
203271997-04-22 Richard Stallman <rms@gnu.org>
20328
20329 * bison.simple:
20330 [__hpux]: Include alloca.h (right for HPUX 10)
20331 instead of declaring alloca (right for HPUX 9).
20332
20333 * bison.simple (__yy_memcpy):
20334 Declare arg `count' as unsigned int.
20335 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20336
203371997-01-03 Richard Stallman <rms@gnu.org>
20338
20339 * src/allocate.c: [__STDC__ or _MSC_VER]:
20340 Declare calloc and realloc to return void *.
20341
203421997-01-02 Richard Stallman <rms@gnu.org>
20343
20344 * src/system.h:
20345 [_MSC_VER]: Include stdlib.h and process.h.
20346 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
20347
20348 * src/main.c (main): Return FAILURE as a value.
20349 (printable_version): Declare arg as int, not char.
20350
203511997-01-02 Richard Stallman <rms@gnu.org>
20352
20353 * Makefile.in (dist):
20354 Explicitly check for symlinks, and copy them.
20355
203561996-12-19 Richard Stallman <rms@gnu.org>
20357
20358 * src/files.c:
20359 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
20360
203611996-12-18 Paul Eggert <eggert@gnu.org>
20362
20363 * src/bison.s1 (yyparse):
20364 If __GNUC__ and YYPARSE_PARAM are both defined,
20365 declare yyparse to have a void * argument.
20366
203671996-12-18 Paul Eggert <eggert@gnu.org>
20368
20369 * bison.simple (yyparse):
20370 If __GNUC__ and YYPARSE_PARAM are both defined,
20371 declare yyparse to have a void * argument.
20372
203731996-12-17 Richard Stallman <rms@gnu.org>
20374
20375 * src/reduce.c (nbits): Add some casts.
20376
203771996-08-12 Richard Stallman <rms@gnu.org>
20378
20379 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
20380
203811996-08-12 Richard Stallman <rms@gnu.org>
20382
20383 * bison.simple: Test _MSDOS as well as _MSDOS_.
20384
203851996-07-31 Richard Stallman <rms@gnu.org>
20386
20387 * src/bison.s1:
20388 [__sun && __i386]: Include alloca.h.
20389
203901996-07-31 Richard Stallman <rms@gnu.org>
20391
20392 * bison.simple:
20393 [__sun && __i386]: Include alloca.h.
20394
203951996-07-30 Richard Stallman <rms@gnu.org>
20396
20397 * src/bison.s1: Comment change.
20398
20399 * src/bison.s1: Test _MSDOS_, not MSDOS.
20400
204011996-07-30 Richard Stallman <rms@gnu.org>
20402
20403 * bison.simple: Comment change.
20404
20405 * bison.simple: Test _MSDOS_, not MSDOS.
20406
204071996-06-01 Richard Stallman <rms@gnu.org>
20408
20409 * 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:
20410 Insert `_' macro around many string constants.
20411
20412 * src/main.c:
20413 Insert `_' macro around many string constants.
20414
20415 (main): Call setlocale, bindtextdomain and textdomain.
20416
20417 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20418 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20419 [ENABLE_NLS]: Include libintl.h.
20420 [ENABLE_NLS] (gettext): Define.
20421 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20422 (N_, PACKAGE, LOCALEDIR): New macros.
20423
204241996-06-01 Richard Stallman <rms@gnu.org>
20425
20426 * POTFILES.in: New file.
20427
20428 * Makefile.in (allocate.o):
20429 Define target explicitly.
20430
20431 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20432 (LDFLAGS): Set to @LDFLAGS@.
20433 (configure): Run autoconf only if preceding `cd' succeeds.
20434 (bison.s1): Redirect output to temporary file then move the
20435 temporary to the target, rather than redirecting directly to bison.s1.
20436 (clean): Remove config.status and config.log.
20437 (distclean): Don't remove config.status here.
20438
204391996-05-12 Richard Stallman <rms@gnu.org>
20440
20441 * src/bison.s1:
20442 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20443
204441996-05-12 Richard Stallman <rms@gnu.org>
20445
20446 * bison.simple:
20447 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20448
204491996-05-11 Richard Stallman <rms@gnu.org>
20450
20451 * src/bison.s1 (__yy_memcpy):
20452 Really reorder the args, as was supposedly done on Feb 14 1995.
20453 (yyparse): Calls changed accordingly.
20454
204551996-05-11 Richard Stallman <rms@gnu.org>
20456
20457 * Makefile.in (dist): Don't use $(srcdir).
20458
20459 * bison.simple (__yy_memcpy):
20460 Really reorder the args, as was supposedly done on Feb 14 1995.
20461 (yyparse): Calls changed accordingly.
20462
204631996-01-27 Richard Stallman <rms@gnu.org>
20464
20465 * src/output.c (output_rule_data):
20466 Test YYERROR_VERBOSE in the conditional
20467 around the definition of ttyname.
20468
204691995-12-29 Richard Stallman <rms@gnu.org>
20470
20471 * src/bison.s1:
20472 Fix line numbers in #line commands.
20473
204741995-12-29 Richard Stallman <rms@gnu.org>
20475
20476 * bison.simple:
20477 Fix line numbers in #line commands.
20478
204791995-12-27 Richard Stallman <rms@gnu.org>
20480
20481 * src/bison.s1 (YYPARSE_PARAM_DECL):
20482 In C++, make it always null.
20483 (YYPARSE_PARAM_ARG): New macro.
20484 (yyparse): Use YYPARSE_PARAM_ARG.
20485
204861995-12-27 Richard Stallman <rms@gnu.org>
20487
20488 * bison.simple (YYPARSE_PARAM_DECL):
20489 In C++, make it always null.
20490 (YYPARSE_PARAM_ARG): New macro.
20491 (yyparse): Use YYPARSE_PARAM_ARG.
20492
204931995-11-29 Richard Stallman <rms@gnu.org>
20494
20495 * doc/bison.texinfo:
20496 Describe literal string tokens, %raw, %no_lines, %token_table.
20497
204981995-11-29 Daniel Hagerty <hag@gnu.org>
20499
20500 * doc/bison.texinfo: Fixed update date
20501
205021995-10-16 Richard Stallman <rms@gnu.org>
20503
20504 * src/version.c: Version 1.25.
20505
205061995-10-16 Richard Stallman <rms@gnu.org>
20507
20508 * NEWS: *** empty log message ***
20509
205101995-10-16 Richard Stallman <rms@gnu.org>
20511
20512 * doc/bison.1, doc/bison.rnh:
20513 Add new options.
20514
205151995-10-15 Richard Stallman <rms@gnu.org>
20516
20517 * src/vmsgetargs.c, src/getargs.c:
20518 Added -n, -k, and -raw switches.
20519 (noparserflag, toknumflag, rawtoknumflag): New variables.
20520
20521 * src/symtab.h (SALIAS):
20522 New #define for adding aliases to %token.
20523 (struct bucket): Added `alias' field.
20524
20525 * src/reduce.c (reduce_grammar):
20526 Revise error message.
20527 (print_notices): Remove final `.' from error message.
20528
20529 * src/reader.c (reader_output_yylsp):
20530 New function.
20531 (readgram): Use `#if 0' around code that accepted %command
20532 inside grammar rules: The documentation doesn't allow it,
20533 and it will fail since the %command processors scan for the next %.
20534 (parse_token_decl): Extended the %token
20535 declaration to allow a multi-character symbol as an alias.
20536 (parse_thong_decl): New function.
20537 (read_declarations): Added %thong declarations.
20538 (read_declarations): Handle NOOP to deal with allowing
20539 % declarations as another means to specify the flags.
20540 (readgram): Allow %prec prior to semantics embedded in a rule.
20541 (skip_to_char, read_declarations, copy_definition)
20542 (parse_token_decl, parse_start_decl, parse_type_decl)
20543 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20544 (get_type_name, copy_guard, copy_action, readgram)
20545 (get_type, packsymbols): Revised most error messages.
20546 Changed `fatal' to `warnxxx' to avoid aborting for error.
20547 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20548 (read_declarations): Improve the error message for
20549 an invalid character. Do not abort.
20550 (read_declarations, copy_guard, copy_action): Use
20551 printable_version to avoid unprintable characters in printed output.
20552 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20553 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20554 Allow the type of a non-terminal can be given
20555 more than once, as long as all specifications give the same type.
20556
20557 * src/output.c:
20558 (output_headers, output_trailers, output, output_gram)
20559 (output_rule_data): Implement noparserflag variable.
20560 Implement toknumflag variable.
20561 (output): Call reader_output_yylsp to output LTYPESTR.
20562
20563 * src/main.c (main):
20564 If reader sees an error, don't process the grammar.
20565 (fatals): Updated to not use VARARGS1.
20566 (printable_version, int_to_string, warn, warni, warns, warnss)
20567 (warnsss): New error reporting functions. Avoid abort for error.
20568
20569 * src/lex.h:
20570 Added THONG and NOOP for alias processing.
20571 Added SETOPT for the new code that allows setting options with %flags.
20572
20573 * src/lex.c:
20574 Include getopt.h. Add some extern decls.
20575 (safegetc): New function to deal with EOF gracefully.
20576 (literalchar); new function to deal with reading \ escapes.
20577 (lex): Use literalchar.
20578 (lex): Implemented "..." tokens.
20579 (literalchar, lex, parse_percent_token): Made tokenbuffer
20580 always contain the token. This includes growing the token
20581 buffer while reading an integer.
20582 (parse_percent_token): Replaced if-else statement with percent_table.
20583 (parse_percent_token): Added % declarations as another
20584 way to specify the flags -n, -l, and -r. Also added hooks for
20585 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20586 major changes to files.c.
20587 (lex) Retain in the incoming stream a character following
20588 an incorrect '/'.
20589 (skip_white_space, lex): Revised most error messages
20590 and changed fatal to warn to avoid aborting.
20591 (percent_table): Added %thong declarations.
20592
20593 * src/gram.h: Comment changes.
20594
20595 * src/files.c (openfiles, open_extra_files, done):
20596 Add faction flag
20597 and actfile file. Handle noparserflag. Both for -n switch.
20598
20599 * src/conflicts.c (resolve_sr_conflict):
20600 Remove use of alloca.
20601
206021995-06-01 Jim Meyering <meyering@gnu.org>
20603
20604 * doc/bison.texinfo: *** empty log message ***
20605
206061995-05-06 Richard Stallman <rms@gnu.org>
20607
20608 * src/bison.s1: Comment change.
20609
206101995-05-06 Richard Stallman <rms@gnu.org>
20611
20612 * bison.simple: Comment change.
20613
206141995-05-03 Richard Stallman <rms@gnu.org>
20615
20616 * src/version.c: Version now 1.24.
20617
20618 * src/bison.s1: Change distribution terms.
20619
20620 * src/version.c: Version now 1.23.
20621
206221995-05-03 Richard Stallman <rms@gnu.org>
20623
20624 * doc/bison.texinfo:
20625 Rewrite "Conditions for Using Bison".
20626 Update version to 1.24.
20627
206281995-05-03 Richard Stallman <rms@gnu.org>
20629
20630 * bison.simple: Change distribution terms.
20631
206321995-02-23 Richard Stallman <rms@gnu.org>
20633
20634 * src/files.c: Test __VMS_POSIX as well as VMS.
20635
206361995-02-14 Jim Meyering <meyering@gnu.org>
20637
20638 * src/bison.s1 (__yy_memcpy):
20639 Renamed from __yy_bcopy to avoid
20640 confusion. Reverse FROM and TO arguments to be consistent with
20641 those of memcpy.
20642
206431995-02-14 Jim Meyering <meyering@gnu.org>
20644
20645 * bison.simple (__yy_memcpy):
20646 Renamed from __yy_bcopy to avoid
20647 confusion. Reverse FROM and TO arguments to be consistent with
20648 those of memcpy.
20649
206501994-11-10 David J. MacKenzie <djm@gnu.org>
20651
20652 * NEWS: reformat
20653
20654 * NEWS: New file.
20655
20656 * Makefile.in (DISTFILES): Include NEWS.
20657
20658 * Makefile.in (DISTFILES):
20659 Include install-sh, not install.sh.
20660
20661 * configure.in: Update to Autoconf v2 macro names.
20662
206631994-10-05 David J. MacKenzie <djm@gnu.org>
20664
20665 * Makefile.in: fix typo
20666
20667 * Makefile.in (prefix, exec_prefix):
20668 Let configure set them.
20669
206701994-09-28 David J. MacKenzie <djm@gnu.org>
20671
20672 * Makefile.in: Set datadir to $(prefix)/share.
20673
206741994-09-15 Richard Stallman <rms@gnu.org>
20675
20676 * src/bison.s1:
20677 Update copyright notice and GPL version.
20678
206791994-09-15 Richard Stallman <rms@gnu.org>
20680
20681 * bison.simple:
20682 Update copyright notice and GPL version.
20683
206841994-07-12 Richard Stallman <rms@gnu.org>
20685
20686 * src/reduce.c, src/reader.c:
20687 entered into RCS
20688
206891994-05-05 David J. MacKenzie <djm@gnu.org>
20690
20691 * Makefile.in: entered into RCS
20692
206931994-03-26 Richard Stallman <rms@gnu.org>
20694
20695 * src/bison.s1: entered into RCS
20696
206971994-03-26 Richard Stallman <rms@gnu.org>
20698
20699 * bison.simple: entered into RCS
20700
207011994-03-25 Richard Stallman <rms@gnu.org>
20702
20703 * src/main.c: entered into RCS
20704
207051994-03-24 Richard Stallman <rms@gnu.org>
20706
20707 * src/conflicts.c: entered into RCS
20708
207091994-01-02 Richard Stallman <rms@gnu.org>
20710
20711 * Makefile.in: *** empty log message ***
20712
207131993-11-21 Richard Stallman <rms@gnu.org>
20714
20715 * src/bison.s1: *** empty log message ***
20716
207171993-11-21 Richard Stallman <rms@gnu.org>
20718
20719 * doc/bison.texinfo: entered into RCS
20720
20721 * doc/bison.texinfo: *** empty log message ***
20722
207231993-11-21 Richard Stallman <rms@gnu.org>
20724
20725 * bison.simple: *** empty log message ***
20726
207271993-10-25 David J. MacKenzie <djm@gnu.org>
20728
20729 * doc/bison.texinfo: *** empty log message ***
20730
207311993-10-19 Richard Stallman <rms@gnu.org>
20732
20733 * src/bison.s1: *** empty log message ***
20734
207351993-10-19 Richard Stallman <rms@gnu.org>
20736
20737 * bison.simple: *** empty log message ***
20738
207391993-10-14 Richard Stallman <rms@gnu.org>
20740
20741 * src/bison.s1: *** empty log message ***
20742
207431993-10-14 Richard Stallman <rms@gnu.org>
20744
20745 * bison.simple: *** empty log message ***
20746
207471993-09-14 David J. MacKenzie <djm@gnu.org>
20748
20749 * doc/bison.texinfo: *** empty log message ***
20750
207511993-09-13 Noah Friedman <friedman@gnu.org>
20752
20753 * Makefile.in: *** empty log message ***
20754
207551993-09-10 Richard Stallman <rms@gnu.org>
20756
20757 * src/conflicts.c: *** empty log message ***
20758
20759 * src/system.h: entered into RCS
20760
207611993-09-10 Richard Stallman <rms@gnu.org>
20762
20763 * doc/bison.1: entered into RCS
20764
207651993-09-06 Noah Friedman <friedman@gnu.org>
20766
20767 * src/version.c: entered into RCS
20768
207691993-09-06 Noah Friedman <friedman@gnu.org>
20770
20771 * Makefile.in: *** empty log message ***
20772
207731993-07-30 David J. MacKenzie <djm@gnu.org>
20774
20775 * Makefile.in: *** empty log message ***
20776
207771993-07-24 Richard Stallman <rms@gnu.org>
20778
20779 * src/bison.s1: *** empty log message ***
20780
207811993-07-24 Richard Stallman <rms@gnu.org>
20782
20783 * bison.simple: *** empty log message ***
20784
207851993-07-08 David J. MacKenzie <djm@gnu.org>
20786
20787 * Makefile.in: *** empty log message ***
20788
207891993-07-04 Richard Stallman <rms@gnu.org>
20790
20791 * src/bison.s1: *** empty log message ***
20792
207931993-07-04 Richard Stallman <rms@gnu.org>
20794
20795 * bison.simple: *** empty log message ***
20796
207971993-06-26 David J. MacKenzie <djm@gnu.org>
20798
20799 * src/getargs.c: entered into RCS
20800
208011993-06-26 David J. MacKenzie <djm@gnu.org>
20802
20803 * doc/bison.texinfo: *** empty log message ***
20804
20805 * doc/bison.1: New file.
20806
208071993-06-25 Richard Stallman <rms@gnu.org>
20808
20809 * src/getargs.c: New file.
20810
208111993-06-16 Richard Stallman <rms@gnu.org>
20812
20813 * src/bison.s1: *** empty log message ***
20814
208151993-06-16 Richard Stallman <rms@gnu.org>
20816
20817 * bison.simple: *** empty log message ***
20818
208191993-06-03 Richard Stallman <rms@gnu.org>
20820
20821 * src/bison.s1: New file.
20822
208231993-06-03 Richard Stallman <rms@gnu.org>
20824
20825 * doc/bison.texinfo: *** empty log message ***
20826
208271993-06-03 Richard Stallman <rms@gnu.org>
20828
20829 * bison.simple: New file.
20830
208311993-05-19 Richard Stallman <rms@gnu.org>
20832
20833 * doc/bison.texinfo: New file.
20834
208351993-05-07 Noah Friedman <friedman@gnu.org>
20836
20837 * Makefile.in: *** empty log message ***
20838
208391993-04-28 Noah Friedman <friedman@gnu.org>
20840
20841 * src/reader.c: *** empty log message ***
20842
208431993-04-23 Noah Friedman <friedman@gnu.org>
20844
20845 * src/alloc.h: entered into RCS
20846
208471993-04-20 David J. MacKenzie <djm@gnu.org>
20848
20849 * src/version.c: *** empty log message ***
20850
20851 * src/files.c, src/allocate.c:
20852 entered into RCS
20853
20854 * src/reader.c: *** empty log message ***
20855
20856 * src/lex.c: entered into RCS
20857
20858 * src/conflicts.c: New file.
20859
20860 * src/symtab.c: entered into RCS
20861
20862 * src/alloc.h: New file.
20863
20864 * src/LR0.c: entered into RCS
20865
208661993-04-18 Noah Friedman <friedman@gnu.org>
20867
20868 * src/reader.c: New file.
20869
20870 * src/version.c: *** empty log message ***
20871
208721993-04-18 Noah Friedman <friedman@gnu.org>
20873
20874 * Makefile.in: *** empty log message ***
20875
208761993-04-17 Noah Friedman <friedman@gnu.org>
20877
20878 * Makefile.in: *** empty log message ***
20879
208801993-04-15 Richard Stallman <rms@gnu.org>
20881
20882 * src/main.c, src/files.c:
20883 New file.
20884
208851993-04-15 Noah Friedman <friedman@gnu.org>
20886
20887 * configure.in: entered into RCS
20888
20889 * configure.in: *** empty log message ***
20890
20891 * configure.in: New file.
20892
208931993-04-14 Richard Stallman <rms@gnu.org>
20894
20895 * Makefile.in: New file.
20896
208971993-04-13 Richard Stallman <rms@gnu.org>
20898
20899 * src/version.c: New file.
20900
209011993-03-25 Richard Stallman <rms@gnu.org>
20902
20903 * src/output.c: entered into RCS
20904
209051992-09-25 Richard Stallman <rms@gnu.org>
20906
20907 * configure.bat: entered into RCS
20908
209091992-06-22 Richard Stallman <rms@gnu.org>
20910
20911 * src/vmsgetargs.c: entered into RCS
20912
209131992-06-22 Richard Stallman <rms@gnu.org>
20914
20915 * doc/bison.rnh: entered into RCS
20916
209171992-04-20 David J. MacKenzie <djm@gnu.org>
20918
20919 * README: entered into RCS
20920
209211992-01-22 Richard Stallman <rms@gnu.org>
20922
20923 * src/machine.h: entered into RCS
20924
209251991-12-21 Richard Stallman <rms@gnu.org>
20926
20927 * src/lalr.c, src/closure.c:
20928 entered into RCS
20929
209301991-12-20 Richard Stallman <rms@gnu.org>
20931
20932 * src/state.h: entered into RCS
20933
209341991-12-18 Richard Stallman <rms@gnu.org>
20935
20936 * src/print.c, src/nullable.c, src/derives.c:
20937 entered into RCS
20938
209391991-11-03 David J. MacKenzie <djm@gnu.org>
20940
20941 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20942 entered into RCS
20943
209441988-09-09 Richard Stallman <rms@gnu.org>
20945
20946 * src/bison.hairy: entered into RCS
20947
209481987-12-16 Richard Stallman <rms@gnu.org>
20949
20950 * REFERENCES: entered into RCS
20951
20952
20953 -----
20954
20955 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20956 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
20957 Free Software Foundation, Inc.
20958
20959 Copying and distribution of this file, with or without
20960 modification, are permitted provided the copyright notice and this
20961 notice are preserved.