]> git.saurik.com Git - bison.git/blob - ChangeLog
* src/getargs.c (flags_argmatch): Don't cause segmentation fault for
[bison.git] / ChangeLog
1 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
4 empty subargument list. For example: `bison --warnings= parser.y'.
5
6 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7
8 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
9 the parser header file so that gcc doesn't warn.
10
11 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
12
13 Split the default %destructor/%printer into two kinds: <*> and <!>.
14 Discussed starting at
15 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
16 * NEWS (2.3a+): Mention.
17 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
18 previous change today related to mid-rules.
19 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
20 * src/parser-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
21 (TYPE_TAG_ANY): Add as <*>.
22 (TYPE_TAG_NONE): Add as <!>.
23 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
24 for <*> and <!>.
25 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
26 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
27 * src/symlist.c (symbol_list_default_new): Split into tagged and
28 tagless versions.
29 (symbol_list_destructor_set, symbol_list_printer_set): Split
30 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
31 SYMLIST_DEFAULT_TAGLESS.
32 * src/symlist.h: Update symbol_list_default*_new prototypes.
33 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
34 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
35 * src/symtab.c (default_destructor, default_destructor_location,
36 default_printer, default_printer_location): Split each into tagged and
37 tagless versions.
38 (symbol_destructor_get, symbol_destructor_location_get,
39 symbol_printer_get, symbol_printer_location_get): Implement tagged
40 default and tagless default cases.
41 (default_destructor_set, default_printer_set): Split each into tagged
42 and tagless versions.
43 * src/symtab.h: Update prototypes.
44 * tests/actions.at (Default %printer and %destructor): Rename to...
45 (Default tagless %printer and %destructor): ... this, and extend.
46 (Per-type %printer and %destructor): Rename to...
47 (Default tagged and per-type %printer and %destructor): ... this, and
48 extend.
49 (Default %printer and %destructor for user-defined end token): Extend.
50 (Default %printer and %destructor are not for error or $undefined):
51 Update.
52 (Default %printer and %destructor are not for $accept): Update.
53 (Default %printer and %destructor for mid-rule values): Extend.
54 * tests/input.at (Default %printer and %destructor redeclared): Extend.
55 (Unused values with default %destructor): Extend.
56
57 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
58
59 Don't apply the default %destructor/%printer to an unreferenced midrule
60 value. Mentioned at
61 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
62 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
63 like $@n instead of just @n so that the default %destructor/%printer
64 logic doesn't see them as user-defined symbols.
65 (symbol_is_dummy): Check for both forms of the name.
66 * src/reader.c (packgram): Remove the `$' from each midrule symbol
67 name for which the midrule value is referenced in any action.
68 * tests/actions.at (Default %printer and %destructor for mid-rule
69 values): New test.
70 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
71 for change to dummy symbol names.
72
73 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
74
75 Warn about unset midrule $$ if the corresponding $n is used.
76 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
77 $n usage.
78 (packgram): Before invoking grammar_rule_check on any rule, make sure
79 all actions have already been scanned in order to set `used' flags.
80 Otherwise, checking that a midrule's $$ is set will not always work
81 properly because the midrule check must forward-reference the midrule's
82 parent rule.
83 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
84 warning.
85
86 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
87
88 More improvements to the documentation of the prologue alternatives:
89 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
90 Bison manual.
91 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
92 some text to clarify the relative importance of the new directives and
93 to show how these directives may be viewed as code labels.
94
95 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
96
97 Similar to the recently removed %before-header, add %code-top as the
98 alternative to the pre-prologue. Mentioned at
99 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
100 Also, let the prologue alternatives appear in the grammar section.
101 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
102 (prologue_declaration): Move the existing prologue alternatives to...
103 (grammar_declaration): ... here and add %code-top.
104 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
105
106 Clean up and extend documentation for the prologue alternatives.
107 * NEWS (2.3a+): Describe prologue alternatives.
108 * doc/bison.texinfo (Prologue): Move discussion of prologue
109 alternatives to...
110 (Prologue Alternatives): ... this new section, and extend it to discuss
111 all 4 directives in detail.
112 (Bison Symbols): Clean up discussion of prologue alternatives and add
113 %code-top.
114
115 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
116
117 DJGPP specific issues.
118
119 * djgpp/config.bat: config.hin has been moved to lib. Adjust
120 config.bat accordingly.
121 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
122 * djgpp/config.site: Likewise.
123
124 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
125
126 Replace %*-header with %provides, %requires, %code. See discussion at
127 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
128
129 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
130 (b4_user_start_header): Remove.
131 * data/glr.c: Use new macros instead of b4_*start_header
132 and b4_*end_header.
133 * data/glr.cc: Likewise.
134 * data/lalr1.cc: Likewise.
135 * data/push.c: Likewise.
136 * data/yacc.c: Likewise.
137
138 * doc/bison.texinfo: Remove %before-header, rename
139 %{start,end,after}-header to %requires, %provides, %code.
140
141 * src/parse-gram.y: Likewise (also rename token names accordingly).
142 * src/scan-gram.l: Likewise.
143 * tests/actions.at: Likewise.
144
145 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
146
147 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
148 Problem reported by Joel E. Denny.
149
150 2006-10-14 Jim Meyering <jim@meyering.net>
151
152 (Sync from coreutils.)
153 Work also when the working directory (with e.g. coreutils sources)
154 is version controlled with git, rather than CVS.
155 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
156 rather than CVS.
157 In messages and comments, say e.g., "checked-out sources",
158 rather than "CVS sources".
159 (version_controlled_file): New function. Work for git as well as
160 for CVS. Don't use grep's -q option.
161 (slurp): Call it here, in place of CVS-specific code.
162
163 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
164
165 Fix testsuite for ./configure --enable-gcc-warnings:
166 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
167 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
168 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
169 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
170 * test/regression.at (Diagnostic that expects two alternatives):
171 Likewise.
172
173 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
174
175 * bootstrap.conf (gnulib_modules): Add config-h.
176 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
177 worry about HAVE_CONFIG_H.
178 * lib/abitset.c: Likewise.
179 * lib/bitset.c: Likewise.
180 * lib/bitset_stats.c: Likewise.
181 * lib/bitsetv-print.c: Likewise.
182 * lib/bitsetv.c: Likewise.
183 * lib/ebitset.c: Likewise.
184 * lib/get-errno.c: Likewise.
185 * lib/lbitset.c: Likewise.
186 * lib/subpipe.c: Likewise.
187 * lib/timevar.c: Likewise.
188 * lib/vbitset.c: Likewise.
189 * lib/bitset.c: Include "bitset.h" first, to test interface.
190 * lib/bitset_stats.c: Include "bitset_stats.h" first.
191 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
192 * lib/bitsetv.c: Include "bitsetv.h" first.
193 * lib/get-errno.c: Include "get-errno.h" first.
194 * m4/.cvsignore: Add config-h.m4.
195 * tests/actions.at (Default %printer and %destructor for ...):
196 Adjust expected line numbers in output to reflect removal of #if
197 HAVE_CONFIG_H lines.
198 * tests/glr-regression.at (Missed %merge type warnings when ...):
199 Likewise.
200 * tests/regression.at (Braced code in declaration in rules section):
201 Likewise.
202 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
203 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
204 Include <config.h> unconditionally.
205
206 * bootstrap: Sync from coreutils, as follows:
207
208 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
209
210 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
211 variable was sometimes used without being initialized. This
212 messed up the installation of the INSTALL file in some cases.
213
214 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
215
216 * bootstrap (usage, main program, symlink_to_gnulib): Add option
217 --copy. Inspired by a suggestion from Bruno Haible.
218
219 2006-10-03 Jim Meyering <jim@meyering.net>
220
221 * bootstrap: Undo last change to this file, since now gnulib-tool
222 sticks with the automake default in generating dependencies.
223
224 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
225
226 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
227 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
228
229 * doc/bison.1: Add copyright notice.
230
231 * data/glr.c: Don't include <stdarg.h>; not used.
232
233 * NEWS: The -g and --graph options now output graphs in Graphviz
234 DOT format, not VCG format.
235 * doc/bison.1: Likewise.
236 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
237 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
238 of this change in
239 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
240 * TODO: Remove Graphviz entry.
241 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
242 remove vcg.c, vcg.h, vcg_defaults.h.
243 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
244 * src/graphviz.c, src/graphviz.h: New files.
245 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
246 * src/files.h: Make comment more generic.
247 * src/main.c (main): Likewise.
248 * src/print_graph.h: Likewise.
249 * src/getargs.c (usage): Make usage description more generic.
250 * src/print_graph.c: Include graphviz.h rather than vcg.h.
251 (static_graph, fgraph): Remove. All uses changed to pass
252 arguments instead of sharing a static var.
253 (print_core, print_actions, print_state, print_graph):
254 Output graphviz format rather than VCG format.
255 * tests/.cvsignore: Remove *.vcg; add *.dot.
256 * tests/output.at: Expect *.dot files, not *.vcg files.
257
258 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
259 accommodates the 2006-10-08 change.
260
261 2006-10-11 Bob Rossi <bob@brasko.net>
262
263 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
264 (b4_yyssa, b4_yyerror_range): New macros.
265 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
266 (yypvarsinit): Remove init of removed fields.
267 (yypushparse): Remove use of removed fields; use new macros instead.
268
269 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
270
271 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
272 in a push parser. Reindent slightly to match yacc.c better.
273
274 2006-10-11 Bob Rossi <bob@brasko.net>
275
276 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
277 yymsg_alloc fields.
278 (yypvarsinit, yypushparse): Remove init of removed fields.
279 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
280
281 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
282
283 * THANKS: Add Paolo Bonzini and Bob Rossi.
284
285 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
286
287 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
288 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
289 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
290 b4_define_user_cde and uses): Remove.
291 (b4_comment, b4_prefix, b4_sync_start): New.
292 * data/bison.m4: New file, with most of the content removed from c.m4.
293 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
294 * src/output.c (output_skeleton): Pass bison.m4.
295 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
296 only if specified.
297
298 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
299
300 Fix test failure reported by Tom Lane in
301 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
302 and try to make such failures easier to catch in the future.
303 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
304 that's now the caller's responsibility.
305 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
306 Set yychar = YYEOF if it's negative.
307 * tests/actions.at (yylex): Abort if asked to read past EOF.
308 * tests/conflicts.at (yylex): Likewise.
309 * tests/cxx-type.at (yylex): Likewise.
310 * tests/glr-regression.at (yylex): Likewise.
311 * tests/input.at (yylex): Likewise.
312 * tests/regression.at (yylex): Likewise.
313 * tests/torture.at (yylex): Likewise.
314
315 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
316
317 Fix problems with translating English-language diagnostics.
318 * bootstrap: Fix bug introduced in recent bootstrap changes, with
319 respect to bison-runtime pot generation. The YY_ stuff
320 wasn't being captured.
321 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
322 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
323 * runtime-po/POTFILES.in: Add data/push.c.
324
325 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
326
327 Merge bootstrap changes from coreutils.
328
329 2006-09-28 Jim Meyering <jim@meyering.net>
330
331 Automatically generated dependencies are important even
332 when all of the sources in a directory come from gnulib.
333 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
334 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
335
336 2006-09-23 Jim Meyering <jim@meyering.net>
337
338 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
339
340 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
341
342 * bootstrap: Add support for --force.
343 (usage): New function. Describe usage less tersely.
344 (CVS_only_file): New var.
345
346 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
347
348 * data/push.c (YYPUSH_MORE): Make it an enum instead.
349 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
350 Adjust white space and comments to match GNU style better.
351
352 2006-09-20 Bob Rossi <bob@brasko.net>
353
354 * data/push.c (yyresult_get): Remove function.
355 (YYPUSH_MORE): Add #define.
356 (yypushparse): Modify return value.
357
358 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
359
360 * stamp-h.in: Remove; no longer needed.
361 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
362 Remove config.h, config.hin, intl (no longer created).
363 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
364 stamp-h1.
365
366 Sync bootstrap from coreutils, as follows:
367
368 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
369
370 * bootstrap (symlink_to_gnulib): New function.
371 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
372 to copies-of-gnulib.
373 (cp_mark_as_generated, slurp, gnulib_files):
374 Avoid making a copy if it's the same as the old version.
375 (gnulib_files): Add support for this variable (used by Bison).
376
377 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
378
379 * src/getargs.c (usage): Rework to use conventions similar to
380 coreutils, to make translation a bit easier and the code a bit
381 smaller. Problem reported by Tim Van Holder.
382
383 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
384
385 Use some of gnulib's new modules, taken from coreutils.
386
387 * bootstrap: Sync from coreutils, except add support for gnulib_files.
388 * bootstrap.conf: New file.
389 (gnulib_modules): Add configmake, inttypes, unistd.
390 (XGETTEXT_OPTIONS): Add complain, complain_at,
391 fatal, fatal_at, warn, warn_at, unexpected_end.
392 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
393 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
394 (gl_EARLY): Add.
395 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
396 (gl_INIT): Add
397 (GNULIB_AUTOCONF_SNIPPET): Remove.
398 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
399 the pickiest.
400 * lib/.cvsignore: Add inttypes_.h.
401 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
402 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
403 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
404 no-longer-necessary initializations.
405 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
406 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
407 use the unistd module.
408 * src/system.h: Likewise.
409 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
410 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
411 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
412 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
413 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
414 * src/system.h: Include inttypes.h unconditionally, now that we
415 use the inttypes module. Don't bother to include stdint.h, since
416 inttypes.h now does that for us.
417 (LOCALEDIR): Remove, now that we use the configmake module.
418 * src/getargs.c: Include configmake.h.
419 * src/main.c: Likewise.
420 * src/output.c: Likewise.
421 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
422 not from $abs_top_builddir, since config.h moved.
423
424
425 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
426 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
427
428 * src/parse-gram.y (symbol_declaration): Don't put statements
429 before declarations; it's not portable to C89.
430 * src/scan-code.l (handle_action_at): Likewise.
431
432 * src/scan-code.l: Always initialize braces_level; the old code
433 left it uninitialized and therefore had undefined behavior.
434
435 Don't attempt to redefine 'assert', since it runs afoul of
436 systems where standard headers (mistakenly) include <assert.h>.
437 Instead, define and use our own alternative, called 'aver'.
438 * src/reader.c: Don't include assert.h, since we no longer
439 use assert.
440 * src/scan-code.l: Likewise.
441 * src/system.h (assert): Remove, replacing with....
442 (aver): New function, taking a bool arg. All uses changed.
443 * src/tables.c (pack_vector): Ensure that aver arg is bool,
444 not merely an integer.
445
446 2006-09-15 Bob Rossi <bob@brasko.net>
447
448 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
449 * data/c.m4 (YYPUSH): New.
450 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
451 * src/getargs.c (push_parser): New var.
452 * src/getargs.h (push_parser): New declaration.
453 * src/output.c (prepare): Add macro insertion of `push_flag'.
454 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
455 (prologue_declaration): Parse %push-parser.
456 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
457 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
458 list of removed lines from the traces observed.
459 (AT_CHECK_CALC_LALR): Added push parser tests.
460
461 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
462
463 * NEWS: Version 2.3a.
464 * configure.ac (AC_INIT): Likewise.
465
466 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
467 "#define YYSTYPE int" that caused "make maintainer-check" to fail
468 due to header ordering dependencies. I don't know why the #define
469 was there.
470
471 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
472 runtime cost when YYDEBUG is not defined, and so that some tests
473 that used to fail now work. Problem and initial suggestion by
474 Paolo Bonzini.
475 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
476 * data/glr.cc (b4_parser_class_name):
477 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
478 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
479 (yydebug_) [YYDEBUG]: New member.
480 (yycdebug_): Now defined only if YYDEBUG.
481 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
482 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
483 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
484 if YYYDEBUG.
485 (debug_stream, set_debug_stream, debug_level, set_debug_level):
486 Define only if YYDEBUG.
487 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
488 set_debug_level.
489 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
490 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
491 AT_CHECK_CALC_GLR_CC that are working now.
492
493 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
494
495 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
496 We don't need them in glr.cc, and glr.c defines them.
497 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
498 assumes that defining it to anything is the same as defining
499 it to 1. Problem reported by Paolo Bonzini.
500
501 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
502
503 * data/c.m4 (b4_null, b4_case): Define.
504 * src/output.c (prepare_symbols): Use b4_null.
505 (user_actions_output): Use b4_case.
506
507 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
508
509 * data/glr.c (b4_shared_declarations): Put start-header first,
510 before any #includes that we generate, so that feature-test
511 macros work. Problem reported by Michael Deutschmann in
512 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
513 * data/lalr1.cc: Likewise.
514 * doc/bison.texinfo (Prologue): Document that feature-test macros
515 should be defined before any Bison declarations.
516 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
517 that depend on location.hh after, not before, Bison decls, since
518 we now include location.hh after the first user prologue.
519
520 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
521 Sander Brandenburg in
522 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
523 Also, fix minor white space and comment issues.
524 (Prologue): Mention that it's better to define feature-test macros
525 before Bison declarations. Problem reported by Michael Deutschmann.
526
527 * README-cvs: Fix typo: "&" should be "&&". Problem reported
528 by Jim Meyering.
529 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
530 This adjusts to recent gnulib changes.
531
532 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
533
534 Finish implementation of per-type %destructor/%printer. Discussed
535 starting at
536 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
537 and
538 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
539 * NEWS (2.3+): Add a description of this feature to the default
540 %destructor/%printer description.
541 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
542 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
543 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
544 list node contains a semantic type.
545 * src/symtab.c, src/symtab.h: Extend with a table that associates
546 semantic types with their %destructor's and %printer's.
547 (semantic_type_from_uniqstr, semantic_type_get,
548 semantic_type_destructor_set, semantic_type_printer_set): New functions
549 composing the public interface of that table.
550 (symbol_destructor_get, symbol_destructor_location_get,
551 symbol_printer_get, symbol_printer_location_get): If there's no
552 per-symbol %destructor/%printer, look up the per-type before trying
553 the default.
554 * tests/actions.at (Per-type %printer and %destructor): New test case.
555 * tests/input.at (Default %printer and %destructor redeclared):
556 Extend to check that multiple occurrences of %symbol-default in a
557 single %destructor/%printer declaration is an error.
558 (Per-type %printer and %destructor redeclared, Unused values with
559 per-type %destructor): New test cases.
560
561 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
562
563 Require default %destructor/%printer to be declared using
564 %symbol-default instead of an empty symbol list, and start working on
565 new per-type %destructor/%printer. Discussed at
566 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
567 * NEWS (2.3+): Add %symbol-default to example.
568 * bison.texinfo (Freeing Discarded Symbols): Likewise.
569 (Bison Symbols): Add entry for %symbol-default.
570 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
571 (generic_symlist, generic_symlist_item): New nonterminals for creating
572 a list in which each item is a symbol, semantic type, or
573 %symbol-default.
574 (grammar_declaration): Use generic_symlist in %destructor and %printer
575 declarations instead of symbols.1 or an empty list.
576 (symbol_declaration, precedence_declaration, symbols.1): Update actions
577 for changes to symbol_list.
578 * src/reader.c: Update for changes to symbol_list.
579 * src/scan-code.l: Likewise.
580 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
581 * src/symlist.c, src/symlist.h: Extend such that a list node may
582 represent a semantic type or a %symbol-default in addition to just an
583 ordinary symbol. Add switched functions for setting %destructor's and
584 %printer's.
585 * tests/actions.at, tests/input.at: Add %symbol-default to all default
586 %destructor/%printer declarations.
587
588 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
589
590 Whether the default %destructor/%printer applies to a particular symbol
591 isn't a question of whether the user *declares* that symbol (in %token,
592 for example). It's a question of whether the user by any means
593 *defines* the symbol at all (by simply using a char token, for
594 example). $end is defined by Bison whereas any other token with token
595 number 0 is defined by the user. The error token is always defined by
596 Bison regardless of whether the user declares it with %token, but we
597 may one day let the user define error as a nonterminal instead.
598 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
599 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
600 the meaning of "user-defined".
601 * tests/actions.at (Default %printer and %destructor for user-declared
602 end token): Rename to...
603 (Default %printer and %destructor for user-defined end token): ...
604 this.
605
606 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
607 computation of whether to apply the default, don't maintain a list of
608 every Bison-defined symbol. Instead, just check for a first character
609 of '$', which a user symbol cannot have, and check for the error token.
610
611 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
612
613 Don't apply the default %destructor or %printer to the error token,
614 $undefined, or $accept. This change fits the general rule that the
615 default %destructor and %printer are only for user-declared symbols,
616 and it solves several difficulties that are described in the new test
617 cases listed below.
618 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
619 * tests/actions.at (Default %printer and %destructor are not for error
620 or $undefined, Default %printer and %destructor are not for $accept):
621 New test cases.
622
623 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
624
625 Allow %start after the first rule.
626 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
627 when parsing the first rule.
628 (check_and_convert_grammar): Search for it here after all grammar
629 declarations have been parsed. Skip midrules, which have dummy LHS
630 nonterminals.
631 * src/symtab.c (symbol_is_dummy): New function.
632 * src/symtab.h (symbol_is_dummy): Declare it.
633 * tests/input.at (%start after first rule): New test.
634
635 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
636
637 Redo some of the previous commit: add back the ability to use
638 non-aliased/undeclared string literals since it might be useful to
639 those declaring %token-table.
640 * src/reader.c (check_and_convert_grammar): Undo changes in previous
641 commit: don't worry about complaints from symbols_pack.
642 * src/symtab.c (symbol_new, symbol_class_set,
643 symbol_check_alias_consistency): Undo changes in previous commit: count
644 each string literal as a new symbol and token, assign it a symbol
645 number, and don't complain about non-aliased string literals.
646 (symbols_pack): Since symbol_make_alias still does not decrement symbol
647 and token counts but does still set aliased tokens to the same number,
648 symbol_pack_processor now leaves empty slots in the symbols array.
649 Remove those slots.
650 * tests/regression.at (Undeclared string literal): Remove test case
651 added in previous commit since non-aliased string literals are allowed
652 again.
653 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
654 remove unnecessary string literal declarations.
655 * tests/sets.at (Firsts): Likewise.
656
657 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
658
659 Don't allow an undeclared string literal, but allow a string literal to
660 be used before its declaration.
661 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
662 symbols_pack complained.
663 * src/symtab.c (symbol_new): Don't count a string literal as a new
664 symbol.
665 (symbol_class_set): Don't count a string literal as a new token, and
666 don't assign it a symbol number since symbol_make_alias does that.
667 (symbol_make_alias): It's not necessary to decrement the symbol and
668 token counts anymore. Don't assume that an alias declaration occurs
669 before any uses of the identifier or string, and thus don't assert that
670 one of them has the highest symbol number so far.
671 (symbol_check_alias_consistency): Complain if there's a string literal
672 that wasn't declared as an alias.
673 (symbols_pack): Bail if symbol_check_alias_consistency failed since
674 symbol_pack asserts that every token has been assigned a symbol number
675 although undeclared string literals have not.
676 * tests/regression.at (String alias declared after use, Undeclared
677 string literal): New test cases.
678 (Characters Escapes, Web2c Actions): Declare string literals as
679 aliases.
680 * tests/sets.at (Firsts): Likewise.
681
682 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
683
684 In the grammar scanner, STRING_FINISH unclosed constructs and return
685 them to the parser in order to improve error messages.
686 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
687 SC_BRACED_CODE, SC_PROLOGUE): Implement.
688 * tests/input.at (Unclosed constructs): New test case.
689 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
690 seen.
691
692 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
693 unused global.
694
695 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
696
697 Handle string aliases for character tokens correctly.
698 * src/symtab.c (symbol_user_token_number_set): If the token has an
699 alias, check and set its alias's user token number instead of its own,
700 which is set to indicate the alias. Previously, every occurrence of
701 the character token in the grammar overwrote that alias indicator with
702 the character code.
703 * tests/input.at (String aliases for character tokens): New test.
704
705 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
706
707 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
708
709 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
710
711 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
712 to prevent failures when building on older platforms.
713 Check for autopoint failure.
714 Set XGETTEXT_OPTIONS to values that check for C format strings,
715 so that translators are warned about them (this also helps
716 prevent core dumps).
717
718 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
719 function, since it simplifies our code a bit.
720
721 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
722 rather than -W, so we don't get bogus warnings about sign comparisons.
723 Add -Wpointer-arith, since that warning is useful (it reports code
724 that does not conform to C89 and that some compilers reject).
725 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
726 since it's no longer needed.
727
728 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
729
730 Clean up scanners a bit.
731 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
732 definitions so gcc won't warn when obstack_for_string is unused.
733 * src/scan-code.l: config.h and system.h are already #include'd by
734 scan-code-c.c, so get rid of them here.
735 * src/scan-gram.l: Likewise.
736 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
737 definitions rather than duplicating the rest of it.
738 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
739
740 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
741
742 Suppress signed/unsigned comparison warnings for yycheck.
743 * data/c.m4 (b4_safest_int_type): New macro.
744 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
745 a signed int type, cast it to b4_safest_int_type first.
746 * data/yacc.c: Likewise.
747 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
748 also overwritten.
749
750 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
751
752 * doc/bison.texinfo: Fix some typos.
753
754 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
755
756 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
757 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
758
759 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
760 the latest gnulib does this a different way.
761 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
762 translation was patched, so stop omitting it.
763
764 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
765
766 Enable declaration of default %printer/%destructor. Make the parser
767 use these for all user-declared grammar symbols for which the user does
768 not declare a specific %printer/%destructor. Thus, the parser uses it
769 for token 0 if the user declares it but not if Bison generates it as
770 $end. Discussed starting at
771 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
772 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
773 and
774 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
775 * NEWS (2.3+): Mention.
776 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
777 declare a %destructor for a mid-rule's semantic value. It's just
778 impossible to declare one specific to it.
779 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
780 code. Describe default %destructor form.
781 * src/parse-gram.y (grammar_declaration): Parse default
782 %printer/%destructor declarations.
783 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
784 and symbol_destructor_location_get rather than accessing the destructor
785 and destructor_location members of struct symbol.
786 (symbol_printers_output): Likewise but for %printer's.
787 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
788 again.
789 * src/symtab.c (default_destructor, default_destructor_location,
790 default_printer, default_printer_location): New static global
791 variables to record the default %destructor and %printer.
792 (symbol_destructor_get, symbol_destructor_location_get,
793 symbol_printer_get, symbol_printer_location_get): New functions to
794 compute the appropriate %destructor and %printer for a symbol.
795 (default_destructor_set, default_printer_set): New functions to set the
796 default %destructor and %printer.
797 * src/symtab.h: Prototype all those new functions.
798 * tests/actions.at (Default %printer and %destructor): New test to
799 check that the right %printer and %destructor are called, that they're
800 not called for $end, and that $$ and @$ work correctly.
801 (Default %printer and %destructor for user-declared end token): New
802 test to check that the default %printer and %destructor are called for
803 a user-declared end token.
804 * tests/input.at (Default %printer and %destructor redeclared, Unused
805 values with default %destructor): New tests to check related grammar
806 warnings and errors.
807
808 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
809
810 Clean up handling of %destructor for the end token (token 0).
811 Discussed starting at
812 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
813 and
814 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
815
816 Make the skeletons consistent in how they pop the end token and invoke
817 its %destructor.
818 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
819 state, which has token number 0, since this would invoke the
820 %destructor for the end token.
821 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
822 until after shifting the end token, or else it won't be popped.
823 * data/yacc.c (yyparse): Likewise.
824
825 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
826 it's the end token. Upon termination, destroy an unshifted lookahead
827 even when it's the end token.
828 * data/lalr1.cc (yy::parser::parse): Likewise.
829 * data/yacc.c (yyparse): Likewise.
830
831 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
832 value warnings for the end token when the user gives the end token a
833 %destructor.
834
835 * tests/actions.at (Printers and Destructors): Test all the above.
836
837 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
838
839 Update to latest gnulib and gettext versions.
840 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
841 Add fopen-safer.
842 (gnulib_files): Add m4/warning.m4. Don't worry about files
843 overwritten by autopoint.
844 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
845 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
846 rejects them.
847 Don't use autoreconf; instead, invoke autopoint etc. by hand,
848 so that we can remove the intl files at a better time.
849 (intl_files_to_remove): Remove aclocal.m4, since it gets
850 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
851 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
852 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
853 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
854 Remove datarootdir hack; no longer needed.
855 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
856 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
857 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
858 strdup.h.
859 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
860 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
861
862 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
863
864 * bootstrap: Adjust to today's change to gnulib-tool by invoking
865 it with --assume-autoconf='latest-stable'.
866
867 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
868
869 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
870 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
871 YYSTYPE' and `{'.
872 * src/muscle_tab.h (muscle_grow): Replace the header comments with
873 those from muscle_tab.c since the old ones are misleading.
874
875 2006-07-13 Akim Demaille <akim@epita.fr>
876
877 Support %define "KEY" {VALUE}.
878 * src/scan-code.h, src/scan-code.l (translate_action)
879 (translate_rule_action, translate_symbol_action, translate_code):
880 Return char *, not const char *.
881 * src/parse-gram.y (declaration): Rename as...
882 (prologue_declaration): this.
883 (string_content): Remove this nonterminal, use STRING.
884 (braceless, content, content.opt): New nonterminal.
885 Use them.
886 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
887 as value.
888 * src/scan-gram.l (getargs.h): Don't include it.
889
890 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
891
892 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
893 rather than a for-loop that declares a local bool variable. This
894 should work around a compatibility problem with a Cray x1e C++
895 compiler reported by Hung Nguyen in
896 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
897 The for-loop was introduced in the 2004-11-17 change but I don't
898 know why it was needed.
899
900 2006-07-12 Akim Demaille <akim@epita.fr>
901
902 * data/c.m4: Comment changes.
903
904 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
905
906 * src/complain.c (error_message, ERROR_MESSAGE): New.
907 To factor...
908 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
909 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
910
911 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
912
913 * NEWS: Instead of %union, you can define and use your own union type
914 YYSTYPE if your grammar contains at least one <type> tag.
915 Your YYSTYPE need not be a macro; it can be a typedef.
916 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
917 (Union Decl, Decl Summary): Document this.
918 * data/glr.c (YYSTYPE): Implement this.
919 * data/glr.cc (YYSTYPE): Likewise.
920 * data/lalr1.cc (YYSTYPE): Likewise.
921 * data/yacc.c (YYSTYPE): Likewise.
922 * src/output.c (prepare): Output tag_seen_flag.
923 * src/parse-gram.y (declaration, grammar_declaration):
924 Use 'union_seen' rather than 'typed' to determine whether
925 %union has been seen, since grammars can now be typed without
926 %union.
927 (symbol_declaration, type.opt, symbol_def):
928 Keep track of whether a tag has been seen.
929 * src/reader.c (union_seen, tag_seen): New vars.
930 (typed): remove.
931 * src/reader.h (union_seen, tag_seen, typed): Likewise.
932 * src/scan-code.l (untyped_var_seen): New variable.
933 (handle_action_dollar): Adjust to above changes.
934 (handle_action_dollar, handle_action_at):
935 Improve overflow checking for outlandish numbers.
936 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
937 avoid new diagnostics generated by above changes.
938 * tests/regression.at (YYSTYPE typedef): Add test to check
939 for type tags without %union.
940
941 * src/symlist.c (symbol_list_length): Return int, not unsigned
942 int, since callers expect int. This may need to get revisited
943 once we have proper integer overflow checking.
944
945 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
946 object is now static.
947
948 * src/getargs.c (flags_argmatch): Return void, not int,
949 to pacify ./configure --enable-gcc-warnings.
950
951 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
952 since last_string is already defined to FLEX_PREFIX (last_string).
953
954 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
955
956 Implement --warnings/-W.
957 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
958 replaced by...
959 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
960 Adjust callers.
961 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
962 (warnings_args, warnings_types): New.
963 (getargs, short_options, long_options): Accept -W/--warnings.
964 Sort the options by alphabetical order, upper case letter right
965 before its lower case.
966
967 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
968
969 Change %merge result type clash warnings to errors. Discussed at
970 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
971 * src/reader.c (record_merge_function_type): Use complain_at.
972 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
973 declared later): Update test case results.
974
975 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
976
977 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
978 to be in alphabetical order.
979 (trace_args): Spelling fixes.
980
981 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
982
983 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
984 so they don't collide with user-defined macros.
985 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
986 this was never guaranteed, and now that we're using gnulib stdint,
987 which defines int_fast16_t to long int, the problem is exposed.
988
989 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
990
991 * data/c.m4 (b4_basename): Simplify a bit, since we don't
992 need the full POSIX semantics (and weren't implementing them
993 anyway).
994
995 Adjust to Autoconf 2.60 and today's gnulib.
996 * bootstrap (gnulib_modules): Add stdint.
997 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
998 no longer copies it.
999 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1000 since stdint needs the former and wcwidth (which is now required
1001 by mbswidth) needs the latter.
1002 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1003 work around a compatibility glitch between gettext 0.14.6 and
1004 Autoconf 2.60.
1005 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1006 Do not check for uintptr_t, since new stdint module does the right
1007 thing.
1008 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1009 Add stdint.h, stdint_.h, wcwidth.h.
1010 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1011 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1012 stdint.m4, wchar_t.m4, wcwidth.m4.
1013 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1014 usual order for ../lib/*.h files.
1015 (file_name_split): Use last_component, not base_name, to adjust
1016 to gnulib changes.
1017 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1018 for ../lib/*.h files.
1019 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1020 Define unconditionally, since we now assume the stdint module.
1021 * src/scan-skel.l: Include <dirname.h>.
1022 (BASE_QPUTS): Use last_component, not base_name.
1023 * src/system.h: Include <unlocked-io.h> in the usual order
1024 for ../lib/*.h files. Include <stdint.h> unconditionally,
1025 since we now use the stdint module.
1026 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1027 HAVE_UINTPTR_T, since we now use the stdint module.
1028 (base_name): Remove decl, since files now include <dirname.h>
1029 to get the decl.
1030
1031 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1032
1033 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1034 New, default to 1.
1035 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1036 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1037 default.
1038 * tests/calc.at: Adjust.
1039
1040 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1041
1042 * data/c.m4 (b4_basename): New.
1043 (b4_syncline): Also output the location of its invocation (from
1044 the skeleton).
1045 (b4_user_action, b4_define_user_action, b4_user_actions)
1046 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1047 (b4_user_stype): New.
1048 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1049
1050 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1051
1052 In the grammar file, the first column is 1 not 0 on the first line as
1053 on every other line.
1054 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1055 * tests/input.at (Torturing the Scanner): Update output.
1056
1057 * src/scan-gram.l (scanner_cursor): Declare it static.
1058
1059 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1060
1061 In warnings, say "previous declaration" rather than "first
1062 declaration".
1063 * src/symtab.c (redeclaration): Do that here.
1064 * src/reader.c (record_merge_function_type): In the case of a result
1065 type clash, report the previous declaration rather than the very first
1066 one in the grammar file.
1067 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1068 declared later): Add a third declaration to check this behavior.
1069 * tests/input.at (Incompatible Aliases): Update output.
1070
1071 2006-06-27 Akim Demaille <akim@epita.fr>
1072
1073 * doc/Doxyfile.in: New.
1074 * doc/Makefile.am: Use it.
1075 * src/lalr.h, src/symtab.h: Initial doxygenation.
1076
1077 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1078
1079 Don't miss %merge result type warnings just because the LHS types are
1080 declared after the %merge. This continues the effort of the previous
1081 patch.
1082 * src/reader.c (get_merge_function): Don't set the merger type yet.
1083 (record_merge_function_type): New function for setting the merger type
1084 and checking for clashes.
1085 (grammar_current_rule_merge_set): Set the location of the %merge for
1086 the current rule.
1087 (packgram): Invoke record_merge_function_type for each rule now that
1088 all symbol type declarations have been parsed.
1089 * src/reader.h (merger_list.type_declaration_location): New member
1090 storing the location of the first %merge from which the type for this
1091 merging function was derived.
1092 * src/symlist.h (symbol_list.merger_declaration_location): New member
1093 storing the location of a rule's %merge, if any.
1094 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1095 declared later): New test to catch the error fixed by the above patch.
1096
1097 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1098
1099 Get action warnings (grammar_rule_check) right even when symbol
1100 declarations appear after the rules. Discussed at
1101 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1102 and
1103 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1104 Don't mistake the type of $$ in a midrule to be that of its parent
1105 rule's $$.
1106 * src/reader.c (grammar_current_rule_end): Don't invoke
1107 grammar_rule_check yet since not all symbol declarations may have been
1108 parsed yet.
1109 (grammar_midrule_action): Likewise.
1110 Don't record whether the midrule's $$ has been used yet since actions
1111 haven't been translated yet.
1112 Record the midrule's parent rule and its RHS index within the parent
1113 rule.
1114 (grammar_current_rule_action_append): Don't translate the action yet
1115 since not all symbol declarations may have been parsed yet and, thus,
1116 warnings about types for $$, $n, @$, and @n can't be reported yet.
1117 (packgram): Translate the action and invoke grammar_rule_check now that
1118 all symbol declarations have been parsed.
1119 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1120 after parsing the entire grammar file, the symbol list here in the case
1121 of a midrule is actually the midrule's empty RHS, so reference its
1122 parent rule's RHS where necessary.
1123 On the other hand, now that you can already know it's a midrule, you
1124 aren't forced to think $$ has the same type as its parent rule's $$.
1125 (handle_action_at): In the case of a midrule, reference the parent rule
1126 where necessary.
1127 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1128 members.
1129 (symbol_list_length): Now that this is invoked after all rules have
1130 been parsed, a NULL symbol (rather than a NULL symbol list node)
1131 terminates a rule. symbol_list_print already does this correctly.
1132 * src/symlist.h (symbol_list.midrule_parent_rule,
1133 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1134 remember their relationships with their parents.
1135 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1136 fixed by the above patch.
1137 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1138 implementing...
1139 (Unused values): ... this old test case and...
1140 (Unused values before symbol declarations): ... this new test case.
1141 This one is the same as `Unused values' except that all symbol
1142 declarations appear after the rules in order to catch the rest of the
1143 errors fixed by the above patch.
1144
1145 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1146
1147 More cleanup.
1148 * src/reader.c (current_rule): Declare it static since it's no longer
1149 used outside this file.
1150 (grammar_current_rule_action_append): Remove redundant arguments from
1151 translate_rule_action invocation.
1152 * src/reader.h (current_rule): Remove this unused extern.
1153 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1154 * src/scan-code.l (translate_rule_action): Likewise.
1155
1156 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1157
1158 Clean up yesterday's patch.
1159 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1160 to...
1161 * src/reader.c (grammar_current_rule_action_append): ... here for
1162 consistency with grammar_current_rule_symbol_append.
1163 * tests/regression.at (Braced code in declaration in rules section):
1164 Make yyerror and yylex static as usual.
1165
1166 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1167
1168 Fix bug that mistakes braced code in a declaration in the rules section
1169 to be a rule action. Mentioned at
1170 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1171 * src/scan-gram.l: Move midrule action detection from the start of the
1172 scanning of any braced code to...
1173 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1174 action. For readability, use $2 and @2 rather than the equivalent
1175 global variables.
1176 * tests/regression.at (Braced code in declaration in rules section):
1177 New test to catch the error fixed by the above patch.
1178
1179 Work on code readability some.
1180 * src/scan-code.l (current_rule): Get rid of this misleading and
1181 redundant declaration: it's actually extern'ed in reader.h.
1182 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1183 translate_action): Add a rule argument and use it instead of the global
1184 current_rule.
1185 (translate_rule_action): This already receives current_rule through an
1186 argument, so pass it on to translate_action instead of assigning
1187 current_rule to current_rule.
1188 (translate_symbol_action, translate_code): Pass rule = NULL to
1189 translate_action.
1190
1191 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1192
1193 Rename %before-definitions to %start-header and %after-definitions to
1194 %end-header. Don't use these declarations to separate pre-prologue
1195 blocks from post-prologue blocks. Add new order-independent
1196 declarations %before-header and %after-header as alternatives to the
1197 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1198 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1199 * NEWS (2.3+): Update for these changes.
1200 * data/glr.c (b4_before_definitions): Update to...
1201 (b4_start_header): ... this.
1202 (b4_after_definitions): Update to...
1203 (b4_end_header): ... this.
1204 * data/glr.cc: Likewise.
1205 * data/lalr1.cc: Likewise.
1206 * data/yacc.c: Likewise.
1207 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1208 prologue blocks with %*-header declarations.
1209 (Calc++ Parser): Likewise.
1210 (Bison Declaration Summary): Update names.
1211 (Bison Symbols): Update description.
1212 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1213 (PERCENT_END_HEADER): ... this.
1214 (PERCENT_BEFORE_DEFINITIONS): Update to...
1215 (PERCENT_START_HEADER): ... this.
1216 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1217 (declaration): Update token names and m4 macro names.
1218 When parsing %end-header and %start-header, invoke translate_code
1219 before muscle_code_grow, and no longer set global booleans to remember
1220 whether these declarations have been seen.
1221 Parse new %after-header and %before-header.
1222 * src/reader.c (before_definitions, after_definitions): Remove.
1223 (prologue_augment): Accept a new bool argument to specify whether to
1224 augment the pre-prologue or post-prologue.
1225 * src/reader.h (before_definitions, after_definitions): Remove these
1226 extern's.
1227 (prologue_augment): Add new bool argument.
1228 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1229 (PERCENT_END_HEADER): ... this.
1230 (PERCENT_BEFORE_DEFINITIONS): Update to...
1231 (PERCENT_START_HEADER): ... this.
1232 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1233 * tests/actions.at (Printers and Destructors): Update names.
1234
1235 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1236
1237 Add comparison operators for C++ location classes. Discussed at
1238 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1239 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1240 declaration indicating whether filename_type has an operator==. If
1241 filename_type is `std::string', it defaults to `1', `0' otherwise.
1242 * data/location.cc: Iff b4_define_location_comparison is `1', add
1243 operator== and operator!= for class position and for class location.
1244
1245 Some minor fixes.
1246 * src/scan-action.l: Remove unused file.
1247 * src/symtab.c (symbol_printer_set): Use printer_location not
1248 destructor_location.
1249 * src/symtab.h (struct symbol): Replace incorrect source comment for
1250 printer members.
1251 * tests/input.at (Incompatible Aliases): Update output with correct
1252 printer location.
1253
1254 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1255
1256 Don't put the pre-prologue in the header file. For the yacc.c code
1257 file and the glr.c header and code files, move the pre-prologue before
1258 the token definitions. Add new %before-definitions and
1259 %after-definitions to declare code that will go in both the header file
1260 and code file. Discussed at
1261 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1262 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1263 and
1264 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1265 * NEWS (2.3+): Describe these changes.
1266 * data/glr.c (b4_pre_prologue): Move from within to before...
1267 (b4_shared_declarations): ... this.
1268 Add new b4_before_definitions before b4_token_enums.
1269 Add new b4_after_definitions at the end.
1270 * data/glr.cc (b4_pre_prologue): Replace with...
1271 (b4_before_definitions): ... this in the header file.
1272 (b4_after_definitions): New near the end of the header file.
1273 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1274 code file right before including the header file.
1275 (b4_before_definitions): New in the previous position of
1276 b4_pre_prologue in the header file.
1277 (b4_after_definitions): New near the end of the header file.
1278 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1279 (b4_token_enums_defines): In the code file, move to right before
1280 YYSTYPE for consistency with the header file.
1281 (b4_before_definitions): New right before b4_token_enums_defines in
1282 both the header and code file.
1283 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1284 header and code file.
1285 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1286 of prologues for %union dependencies.
1287 (Bison Declaration Summary): In %defines description, mention the
1288 effect of %before-definitions and %after-definitions on the header
1289 file.
1290 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1291 than in the pre-prologue so that make check succeeds.
1292 (Bison Symbols): Add entries for %before-definitions and
1293 %after-definitions.
1294 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1295 %before-definitions.
1296 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1297 (declaration): Parse those declarations and append to
1298 b4_before_definitions and b4_after_definitions, respectively.
1299 * src/reader.c (before_definitions, after_definitions): New bools to
1300 track whether those declarations have been seen.
1301 (prologue_augment): Add to the post-prologue if %union,
1302 %before-definitions, or %after-definitions has been seen.
1303 * src/reader.h (before_definitions, after_definitions): New extern's.
1304 * src/scan-gram.l: Scan the new declarations.
1305 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1306 prologue block in a %before-definitions or a %after-definitions based
1307 on whether the %union is declared.
1308 * tests/regression.at (Early token definitions with --yacc, Early token
1309 definitions without --yacc): Move tests for token definitions into the
1310 post-prologue since token names are no longer defined in the
1311 pre-prologue.
1312
1313 2006-06-20 Akim Demaille <akim@epita.fr>
1314
1315 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1316 (symbol_get): Use it.
1317 * src/parse-gram.y: Use it.
1318
1319 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1320
1321 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1322 build succeeds when configured with --enable-gcc-warnings.
1323
1324 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1325
1326 * src/parse-gram.y (char_name): New function.
1327 (CHAR, STRING, string_content): For %printer, properly escape.
1328 (ID): Prefer fputs to fprintf.
1329 (id): Reindent to be consistent with other rules.
1330 Properly quote char.
1331
1332 The Translation Project changed its way of publishing translations
1333 to maintainers. I haven't received any responses to my request
1334 for supporting the old way, or for documenting the new way. I
1335 have modified 'bootstrap' to use screen scraping
1336 (in this case, HTML scraping). This is unreliable and inelegant,
1337 but I don't see any better way. Yuck.
1338 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1339 (get_translations): New function, which uses HTML scraping to
1340 deduce locations of latest translations.
1341 Use this function to grab both bison and bison-runtime .po files.
1342 Don't bother priming the pump for the runtime-po domain any more,
1343 as it's now translated better than bison is.
1344
1345 2006-06-19 Akim Demaille <akim@epita.fr>
1346
1347 * src/scan-gram.l: No longer "parse" things after `%union' until
1348 `{'. Rather, return a single "%union" token.
1349 No longer make symbols: return strings, and leave the conversion
1350 to symbols to the parser.
1351 (SC_PRE_CODE, token_type): Remove.
1352 * src/parse-gram.y (%union): New field `character'.
1353 Sort tokens.
1354 (CHAR): New token.
1355 (ID, ID_COLON): Now that the scanner no longer makes them
1356 identifiers, adjust all uses to invoke symbol_get.
1357 (id_colon): New, wraps the conversion from string to symbol.
1358 (%union): Accept a possible union_name.
1359 (symbol): Now can be a char.
1360 * data/c.m4 (b4_union_name): Leave a default value.
1361 * data/glr.c, data/yacc.c: Use it.
1362
1363 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1364
1365 For associating token numbers with token names for "yacc.c", don't use
1366 #define statements unless `--yacc' is specified; always use enum
1367 yytokentype. Most important discussions start at:
1368 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1369 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1370 and
1371 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1372 * NEWS (2.3+): Mention.
1373 * data/c.m4 (b4_yacc_if): New.
1374 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1375 token #define's.
1376 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1377 on token name definitions.
1378 * src/getargs.c (usage): Capitalize `Yacc' in English.
1379 * src/output.c (prepare): Define b4_yacc_flag.
1380 * tests/regression.at (Early token definitions): Test that tokens names
1381 are defined before the pre-prologue not just before the post-prologue.
1382 Remove this test case and copy to...
1383 (Early token definitions with --yacc): ... this to test #define's.
1384 (Early token definitions without --yacc): ... and this to test enums.
1385
1386 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1387
1388 * NEWS: Reword the post-2.3 change to not be so optimistic about
1389 removing the old "look-ahead" spelling.
1390 Update previous look-ahead/lookahead change reports.
1391 * REFERENCES: look-ahead -> lookahead (since that's
1392 what he actually wrote).
1393 * doc/refcard.tex: look ahead -> lookahead,
1394 look-ahead -> lookahead
1395
1396 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1397
1398 For consistency, use `lookahead' instead of `look-ahead' or
1399 `look_ahead'. Discussed starting at
1400 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1401 and then at
1402 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1403 * NEWS: For the next release, note the change to `--report'.
1404 * TODO, doc/bison.1: Update English.
1405 * doc/bison.texinfo: Update English.
1406 (Understanding Your Parser, Bison Options): Document as
1407 `--report=lookahead' rather than `--report=look-ahead'.
1408 * src/conflicts.c: Update English in comments.
1409 (lookahead_set): Rename from look_ahead_set.
1410 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1411 (resolve_sr_conflict): Rename local look_ahead_tokens to
1412 lookahead_tokens, and update other uses.
1413 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1414 count_rr_conflicts, conflicts_free): Update uses.
1415 * src/getargs.c (report_args): Move "lookahead" before alternate
1416 spellings.
1417 (report_types): Update uses.
1418 (usage): For `--report' usage description, state `lookahead' spelling
1419 rather than `look-ahead'.
1420 * src/getargs.h (report.report_lookahead_tokens): Rename from
1421 report_look_ahead_tokens.
1422 * src/lalr.c: Update English in comments.
1423 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1424 (state_lookahead_tokens_count): Rename from
1425 state_look_ahead_tokens_count.
1426 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1427 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1428 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1429 Update other uses.
1430 Update English in output.
1431 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1432 * src/print.c: Update English in comments.
1433 (lookahead_set): Rename from look_ahead_set.
1434 (print_reduction): Rename argument lookahead_token from
1435 look_ahead_token.
1436 (print_core, state_default_rule, print_reductions, print_results):
1437 Update uses.
1438 * src/print_graph.c: Update English in comments.
1439 (print_core): Update uses.
1440 * src/state.c: Update English in comments.
1441 (reductions_new): Update uses.
1442 (state_rule_lookahead_tokens_print): Rename from
1443 state_rule_look_ahead_tokens_print, and update other uses.
1444 * src/state.h: Update English in comments.
1445 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1446 (state_rule_lookahead_tokens_print): Rename from
1447 state_rule_look_ahead_tokens_print.
1448 * src/tables.c: Update English in comments.
1449 (conflict_row, action_row): Update uses.
1450 * tests/glr-regression.at
1451 (Incorrect lookahead during deterministic GLR,
1452 Incorrect lookahead during nondeterministic GLR): Rename
1453 print_look_ahead to print_lookahead.
1454 * tests/torture.at: Update English in comments.
1455 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1456 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1457 (Many lookahead tokens): Update uses.
1458 * data/glr.c: Update English in comments.
1459 * lalr1.cc: Likewise.
1460 * yacc.c: Likewise.
1461 * src/conflicts.h: Likewise.
1462 * src/lalr.h: Likewise.
1463 * src/main.c: Likewise.
1464 * src/output.c: Likewise.
1465 * src/parse-gram.c: Likewise.
1466 * src/tables.h: Likewise.
1467 * tests/calc.at: Likewise.
1468
1469 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1470
1471 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1472
1473 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1474
1475 * TODO: Add request from Nelson H. F. Beebe to be able to install
1476 Bison without installing the yacc script.
1477
1478 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1479
1480 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1481 and yytext if they're already #define'd.
1482 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1483 * src/scan-code-c.c: ... here.
1484 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1485 <config.h>.
1486
1487 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1488
1489 Get Bison to build again when configured with --enable-gcc-warnings.
1490 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1491 missing #include's.
1492 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1493 loc argument as it shadows a global.
1494 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1495 invocation.
1496
1497 * src/.cvsignore: Add scan-code.c.
1498
1499 2006-06-07 Akim Demaille <akim@epita.fr>
1500
1501 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1502 to...
1503 * src/scan-code.l: here.
1504 * tests/input.at (Torturing the Scanner): Fix another location
1505 error.
1506
1507 2006-06-07 Akim Demaille <akim@epita.fr>
1508
1509 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1510
1511 2006-06-06 Akim Demaille <akim@epita.fr>
1512
1513 Extract the parsing of user actions from the grammar scanner.
1514 As a consequence, the relation between the grammar scanner and
1515 parser is much simpler. We can also split "composite tokens" back
1516 into simple tokens.
1517 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1518 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1519 rename as...
1520 * src/location.h, src/location.c (add_column_width)
1521 (location_compute): these.
1522 Fix the column count: the initial column is 0.
1523 (location_print): Be robust to ending column being 0.
1524 * src/location.h (boundary_set): New.
1525 * src/main.c: Adjust to scanner_free being renamed as
1526 gram_scanner_free.
1527 * src/output.c: Include scan-code.h.
1528 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1529 Use boundary_set.
1530 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1531 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1532 which is now, again, a separate token.
1533 Adjust all dependencies.
1534 Whereever actions with $ and @ are used, use translate_code.
1535 (action): Remove this nonterminal which is now useless.
1536 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1537 (grammar_current_rule_action_append): Use translate_code.
1538 (packgram): Bound check ruleno, itemno, and rule_length.
1539 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1540 (last_string, last_braced_code_loc, max_left_semantic_context)
1541 (scanner_initialize, scanner_free, scanner_last_string_free)
1542 (gram_out, gram_lineno, YY_DECL_): Move to...
1543 * src/scan-gram.h: this new file.
1544 (YY_DECL): Rename as...
1545 (GRAM_DECL): this.
1546 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1547 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1548 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1549 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1550 Move these declarations, and...
1551 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1552 these to...
1553 * src/flex-scanner.h: this new file.
1554 * src/scan-gram.l (rule_length, rule_length_overflow)
1555 (increment_rule_length): Remove.
1556 (last_braced_code_loc): Rename as...
1557 (gram_last_braced_code_loc): this.
1558 Adjust to the changes of the parser.
1559 Move all the handling of $ and @ into...
1560 * src/scan-code.l: here.
1561 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1562 (handle_action_dollar, handle_action_at): Move to...
1563 * src/scan-code.l: here.
1564 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1565 scan-code.h, scan-code-c.c, scan-gram.h.
1566 (EXTRA_bison_SOURCES): Add scan-code.l.
1567 (BUILT_SOURCES): Add scan-code.c.
1568 (yacc): Be robust to white spaces.
1569
1570 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1571 * tests/regression.at: Adjust the column numbers.
1572 * tests/regression.at: Adjust the error message.
1573
1574 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1575
1576 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1577 Use Akim's wording from
1578 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1579
1580 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1581
1582 Between Bison releases, manually append `+' to the previous Bison
1583 release number, and use that as a signal to automatically print the
1584 ChangeLog's CVS Id keyword from --version. Discussed starting at
1585 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1586 * ChangeLog: Add Id header.
1587 * configure.ac (AC_INIT): Append `+' to `2.3'.
1588 * src/.cvsignore: Add revision.c.
1589 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1590 (BUILT_SOURCES): Add revision.c.
1591 (revision.c): New target rule. This file defines a new global variable
1592 named revision. It initializes it with either the Id from ChangeLog
1593 or, if VERSION doesn't contain `+', with the empty string.
1594 * src/getargs.c (version): Print the value of revision.
1595 * src/revision.h: Extern revision.
1596
1597 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1598
1599 * NEWS: Version 2.3.
1600 * configure.ac (AC_INIT): Likewise.
1601
1602 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1603
1604 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1605 with no arguments, not as an object-like macro. This is for
1606 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1607 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1608 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1609 Document this.
1610
1611 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1612
1613 * src/getargs.c (usage): Back out yesterday's modification of the
1614 --help output so that we don't have to wait for translation before
1615 releasing 2.3.
1616
1617 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1618
1619 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1620 Problem reported by Akim Demaille.
1621
1622 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1623
1624 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1625
1626 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1627
1628 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1629 generated source code. Problem reported by Frans Englich in
1630 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1631
1632 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1633
1634 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1635 shell, not within 'make', so that 'make' by an ordinary builder
1636 (using GNU make) does not worry about configuring gzip. This also
1637 works around a bug reported independently by Keith Thompson and by
1638 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1639 stderr rather than stdout, messing up the build logs.
1640
1641 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1642
1643 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1644 to make sure that YYID will never be unused. This fixes a 'make
1645 maintainer-check' failure caused by the recent changes to the 'Trivial
1646 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1647 not used.
1648 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1649
1650 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1651
1652 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1653 state before an empty RHS is always resolved here. Only the location
1654 of that state is guaranteed to be resolved, and that's enough. This
1655 fixes the remaining bug reported by Derek M. Jones in
1656 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1657 * tests/glr-regression.at (Uninitialized location when reporting
1658 ambiguity): Test the above case.
1659 Also, the embedded comments in this test case claim it checks the case
1660 of an empty RHS that has inherited the initial location. However, the
1661 corresponding LHS was already resolved, so yyresolveLocations didn't
1662 actually have reason to modify it. Fix this by forcing
1663 nondeterministic operation at the beginning of the parse.
1664
1665 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1666
1667 * data/c.m4 (b4_yy_symbol_print_generate):
1668 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1669 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1670 of the bugs reported today by Derek M Jones in
1671 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1672 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1673 defined to be a type name without parens or brackets.
1674 (Location Type): Similarly for YYLTYPE.
1675 * tests/regression.at (Trivial grammars): Put in a test for this
1676 bug that will be caught by 'make maintainer-check' (though not,
1677 alas, by 'make check' unless your compiler is picky).
1678
1679 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1680
1681 * NEWS: Version 2.2.
1682 * configure.ac (AC_INIT): Likewise.
1683
1684 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1685
1686 * data/glr.c (yyreportTree): Make room in yystates for the state
1687 preceding the RHS. This fixes the segmentation fault reported by Derek
1688 M. Jones in
1689 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1690 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1691 to the user. Reported for yyreportTree by Derek M. Jones later in the
1692 same thread.
1693 * THANKS: Add Derek M. Jones.
1694 Update my email address.
1695 Fix typo in Steve Murphy's name.
1696
1697 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1698
1699 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1700 checking against YYLAST that caused the parser to miss a potential
1701 alternative in its diagnostic.
1702 Problem reported by Maria Jose Moron Fernandez in
1703 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1704 * data/lalr1.cc (yysyntax_error_): Likewise.
1705 * data/yacc.c (yysyntax_error): Likewise.
1706 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1707 tokens, in case we run into an older C compiler.
1708 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1709 Use them to check for the off-by-one error fixed above.
1710
1711 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1712 YYSIZE_T, not size_t.
1713 * tests/regression.at (Trivial grammars): New test, to catch
1714 the error fixed by the above patch.
1715
1716 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1717
1718 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1719 scheme.
1720 Reported by Steve Murphy.
1721
1722 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1723
1724 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1725 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1726
1727 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1728
1729 Implement --trace=m4.
1730 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1731 * src/output.c (output_skeleton): When set, pass -dV to m4.
1732
1733 Factor the handling of flags in m4.
1734 * src/output.c (prepare): Rename the muscle names debug, defines,
1735 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1736 * data/c.m4: Adjust.
1737 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1738 Use b4_define_flag_if to define other b4_FLAG_if macros.
1739 (b4_location_if): As a consequence, rename as...
1740 (b4_locations_if): this, for consistency.
1741 Adjust all the skeletons.
1742
1743 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1744
1745 * etc/bench.pm: Shorten bench names.
1746
1747 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1748
1749 * src/output.h, src/output.c (error_verbose): Move to...
1750 * src/getargs.h, src/getargs.c: here.
1751 Sort the flags.
1752 Adjust dependencies.
1753
1754 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1755
1756 * data/c.m4 (b4_copyright): Put the special exception for Bison
1757 skeletons here, so we don't have to put it in each skeleton. All
1758 uses changed. Suggested by Akim Demaille. Also, wrap the
1759 copyright notice, in case it is longer than 80 columns. Replace
1760 comma by newline after title.
1761
1762 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1763
1764 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1765 incompatibility, not a bug. Mention that it wasn't fixed as of
1766 flex 2.5.33.
1767
1768 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1769
1770 * examples/extexi: Enforce the precedence of concatenation over
1771 >>.
1772 Reported by Tommy Nordgren.
1773
1774 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1775
1776 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1777 with the member "token".
1778 Reported by Martin Nylin.
1779
1780 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1781
1782 * data/glr.c: Switch to Bison 2.2 special-exception language in
1783 the copyright notice. Use more-regular format for titles and
1784 copyright notices.
1785 * data/glr.cc: Likewise.
1786 * data/location.cc: Likewise.
1787 * data/yacc.cc: Likewise.
1788 * doc/bison.texinfo (Conditions): Document this.
1789 * NEWS: likewise. Upgrade version to 2.2.
1790
1791 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
1792
1793 * data/glr.cc: Remove dead code.
1794
1795 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1796
1797 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1798 that variable and the line breaks the bootstrap. Problem reported
1799 by Juan M. Guerrero.
1800
1801 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1802
1803 * doc/bison.texinfo (Multiple start-symbols): New.
1804
1805 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1806
1807 * etc/README, etc/bench.pl: New.
1808
1809 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
1810
1811 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1812 rule.
1813 Reported by Mickael Labau.
1814 * tests/input.at (Torturing the Scanner): Test it.
1815
1816 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1817
1818 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1819 Problem reported by Bob Rossi.
1820
1821 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1822
1823 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1824 and didn't really work.
1825 For the index, use @ifnotinfo, not @iftex.
1826 Minor cleanups of spacing and terminology.
1827
1828 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1829
1830 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1831 of AT_NAME_PREFIX when %name-prefix is not used.
1832
1833 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1834
1835 Apply --prefix to C++ skeletons too: they change the namespace.
1836 The test suite already exercize these cases.
1837 * data/c++.m4 (b4_namespace): New.
1838 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1839 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1840 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1841 * doc/bison.texinfo: Document it.
1842 (Option Cross Key): Use @multitable in all formats. It looks
1843 nicer, even in TeX outputs.
1844 (Rules): Use the same code whatever the output type is.
1845 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1846 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1847 * tests/calc.at: Use it, instead of hard coding `yy'.
1848
1849 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1850
1851 * TODO: Remove dead items.
1852
1853 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1854
1855 * doc/FAQ: Remove, merged into...
1856 * doc/bison.texinfo (FAQ): this.
1857 * doc/Makefile.am (EXTRA_DIST): Adjust.
1858
1859 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1860
1861 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1862 even if empty.
1863 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1864 * doc/bison.texinfo (Calc++ Scanner): Use it.
1865
1866 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1867
1868 Fix two nits reported by twlevo, plus one more that I discovered.
1869
1870 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1871 this is the usual Bison style.
1872 * src/location.h (location_print): Likewise.
1873
1874 * src/reader.h (token_name): Likewise.
1875
1876 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1877
1878 Fix some nits reported by twlevo.
1879 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1880 and "POSIX". Use more-modern syntax for URLs. Mention C++
1881 and ask for Java. Don't hardwire OS version numbers. Add
1882 copyright notice.
1883 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1884 * src/conflicts.c (solved_conflicts_obstack): Now static.
1885
1886 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1887
1888 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1889 page. Say "you can use it" not "you may use it" as on the web page;
1890 we're describing capabilities not granting permission.
1891
1892 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1893
1894 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1895 shadowing warnings. Use usual patter for iterating through RHS.
1896 * tests/glr-regression.at
1897 (Uninitialized location when reporting ambiguity):
1898 Modify yylex so that it uses its argument, rather than trying
1899 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1900 const char -> char const.
1901
1902 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1903 Don't use tabs inside commands; it messes up 'ps'.
1904 Problem reported by twlevo.
1905
1906 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1907
1908 * tests/glr-regression.at (Uninitialized location when reporting
1909 ambiguity): New test case.
1910 * data/glr.c (yyresolveLocations): New function, which uses
1911 YYLLOC_DEFAULT.
1912 (yyresolveValue): Invoke yyresolveLocations before reporting an
1913 ambiguity.
1914 * doc/bison.texinfo (Default Action for Locations): Note
1915 YYLLOC_DEFAULT's usage for ambiguity locations.
1916 (GLR Semantic Actions): Cross-reference those notes.
1917
1918 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1919
1920 * tests/glr-regression.at (Leaked semantic values when reporting
1921 ambiguity): Remove unnecessary union and type declarations.
1922 (Leaked lookahead after nondeterministic parse syntax error): New test
1923 case.
1924 * data/glr.c (yyparse): Check for zero stacks remaining before
1925 attempting to shift the lookahead so that you don't lose it.
1926
1927 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1928
1929 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1930 * tests/glr-regression.at (Leaked semantic values when reporting
1931 ambiguity): New test case.
1932 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1933 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1934 now unnecessary yystackp parameter.
1935 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1936 destructors can be called.
1937
1938 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1939 in existing testcases.
1940
1941 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1942
1943 Don't leak semantic values for parent RHS when a user action cuts the
1944 parser, and clean up related code a bit.
1945 * tests/glr-regression.at (Leaked merged semantic value if user action
1946 cuts parse): Rename to...
1947 (Leaked semantic values if user action cuts parse): ... this. Add check
1948 for leaked parent RHS values.
1949 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1950 between an unresolved state (non-empty chain of semantic options) and
1951 an incomplete one (signaled by an empty chain).
1952 (yyresolveStates): Document the interface. Move all manipulation of a
1953 successfully or unsuccessfully resolved yyGLRState to...
1954 (yyresolveValue): ... here so that yyresolveValue always leaves a
1955 yyGLRState with consistent data and thus is easier to understand.
1956 Remove the yyvalp and yylocp parameters since they are always just
1957 taken from the yys parameter. When reporting a discarded merged value
1958 in debugging output, note that it is incompletely merged. Document the
1959 interface.
1960 (yyresolveAction): If resolving any of the RHS states fails, destroy
1961 them all rather than leaking them. Thus, as long as user actions are
1962 written to clean up the RHS correctly, yyresolveAction always cleans up
1963 the RHS of a semantic option. Document the interface.
1964
1965 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1966
1967 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1968 led to a segmentation fault in GNU Pascal. Problem reported
1969 by Waldek Hebisch.
1970
1971 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1972
1973 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1974 mid-rule action inside a nonterminal symbol in order to declare a
1975 destructor for its semantic value.
1976
1977 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1978
1979 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1980 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1981 __cplusplus && ! defined _STDLIB_H && !
1982 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1983 defined free))]: Include <stdlib.h> rather than rolling our own
1984 declarations of malloc and free, to avoid problems with
1985 incompatible declarations (using 'throw') C++'s stdlib.h. This
1986 should fix Debian bug 340012
1987 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1988 reported by Guillaume Melquiond.
1989
1990 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1991
1992 * NEWS: Clarify symbols versus types in unused-value warnings.
1993
1994 * configure.ac (AC_INIT): Bump version number.
1995
1996 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1997
1998 * NEWS: Version 2.1a.
1999 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2000 since C99 requires this.
2001
2002 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2003
2004 * m4/c-working.m4: New file.
2005 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2006
2007 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2008
2009 * Makefile.maint: Merge from coreutils.
2010
2011 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2012
2013 More portability fixes for problems summarized by Nelson H. F. Beebe.
2014
2015 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2016 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2017 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2018 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2019 messes up because C++ code is compiled in 32-bit mode but linked
2020 in 64-bit mode.
2021
2022 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2023
2024 More portability fixes for problems summarized by Nelson H. F. Beebe.
2025
2026 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2027 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2028
2029 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2030 nodist_PROGRAMS, since we don't need to actually compile the
2031 example if we're just doing a plain 'make'. This avoids bothering
2032 the installer unnecessarily about problems due to weird C++
2033 compilers.
2034
2035 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2036
2037 More portability fixes for problems summarized by Nelson H. F. Beebe.
2038
2039 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2040 than #include "...", and compile with -I'.'. The old method was
2041 not portable, according to Posix and the C standard, and it does
2042 not work with Sun C 5.7, where previous #line directives affect
2043 the working directory used in later #include "..." directives.
2044
2045 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2046
2047 Various DJGGP specific issues in /djgpp
2048
2049 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2050
2051 More portability fixes for problems summarized by Nelson H. F. Beebe.
2052
2053 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2054 '#include <map>' works and that you can apply ++ to iterators.
2055
2056 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2057
2058 Work around portability problems summarized by Nelson H. F. Beebe in
2059 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2060
2061 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2062 that '#include <string>' works.
2063
2064 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2065 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2066 "warning: sorry: semantics of inline function static data `const
2067 unsigned char translate_table[262]' are wrong (you'll wind up with
2068 multiple copies)".
2069
2070 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2071 or, xor to not_, and_, or_, and xor_, respectively. This works
2072 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2073 random system header somewhere that includes the equivalent of
2074 <iso646.h>.
2075
2076 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2077 -E" works; it apparently doesn't work with PathScale EKO Compiler
2078 Suite Version 2.0.
2079
2080 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2081
2082 During deterministic GLR operation, user actions should be able to
2083 influence the parse by changing yychar. To make this easier to fix and
2084 to make glr.c easier to evolve in general, don't maintain yytoken in
2085 parallel with yychar; just compute yytoken when needed.
2086 * tests/glr-regression.at (Incorrect lookahead during deterministic
2087 GLR): Check that setting yychar in a user action has the intended
2088 effect.
2089 * data/glr.c (yyGLRStack): Remove yytokenp member.
2090 (yyclearin): Don't set *yytokenp.
2091 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2092 yychar rather than *yytokenp to determine the current lookahead.
2093 Compute yytoken locally when needed.
2094 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2095 point to.
2096
2097 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2098 after `--report' documentation.
2099
2100 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2101
2102 * src/parse-gram.y (grammar_declaration): Location of printer
2103 symbol is @1, not list->location. Bug reported by twlevo.
2104 * tests/input.at (Incompatible Aliases): Adjust to above change.
2105
2106 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2107
2108 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2109 all the test at once. This makes the output easier to read in the
2110 normal case.
2111
2112 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2113 got from <http://bro-ids.org/download.html>. The bug is that
2114 when two actions appeared in succession, the second one was
2115 scanned before the first one was added to the grammar rule
2116 as a midrule action. Bison then output the incorrect warning
2117 "parse.y:905.17-906.36: warning: unused value: $3".
2118 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2119 associated with a value.
2120 (rhs): Don't invoke grammar_current_rule_action_append.
2121 (action): Invoke it here instead.
2122 * src/reader.c (grammar_midrule_action): Now extern.
2123 (grammar_current_rule_action_append): Don't invoke
2124 grammar_midrule_action; that is now the scanner's job.
2125 * src/reader.h (last_string, last_braced_code_loc):
2126 (grammar_midrule_action): New decls.
2127 * src/scan-gram.l (last_string): Now extern, sigh.
2128 (last_braced_code_loc): New extern variable.
2129 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2130 rule already has an action.
2131 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2132 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2133 Add some tests to check that the above changes fixed the bug.
2134
2135 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2136
2137 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2138 All used changed. Check whether the symbol has a destructor,
2139 not whether it is typed.
2140 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2141 that the values are still reported as unused. All line numbers
2142 adjusted.
2143
2144 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2145
2146 Work around a bug in bro 0.8, which underparenthesizes its
2147 definition of YYLLOC_DEFAULT.
2148 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2149 their arguments.
2150 * data/lalr1.cc: Likewise.
2151 * data/yacc.cc: Likewise.
2152
2153 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2154
2155 Work around a bug in Pike 7.0, and give the Pike folks a
2156 better way to override the usual int widths.
2157 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2158 user can override the types.
2159 (short): #undef, to work around a bug in Pike 7.0.
2160 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2161 (union yyalloc.yyss): Use yytype_int16 rather than short.
2162 All uses changed.
2163 (yysigned_char): Remove.
2164 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2165 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2166 * tests/regression.at (Web2c Actions): Adjust to above changes.
2167
2168 * src/reader.c (check_and_convert_grammar): New function.
2169 (reader): Close the input file even if something went wrong during
2170 parsing. Minor file descriptor leak reported by twlevo.
2171
2172 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2173 to pacify gcc -Wswitch-default.
2174 * src/scan-gram.l (adjust_location): Use a default: break; case
2175 to pacify gcc -Wswitch-default.
2176 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2177 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2178 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2179 Move these decls to scan-skel.l, since they don't need to be
2180 visible elsewhere.
2181 * src/scan-skel.l: Accept the above decls.
2182 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2183 is used.
2184
2185 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2186
2187 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2188 since we don't want to insist on a version number at the start
2189 of the changelog every time.
2190 * Makefile.maint: Sync from coreutils a bit better.
2191 (sc_trailing_blank): Renamed from sc_trailing_space.
2192 All uses changed.
2193 (sc_no_if_have_config_h, sc_require_config_h):
2194 (sc_prohibit_assert_without_use): New rules.
2195 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2196 (sc_dd_max_sym_length): Fix leading spaces in rule.
2197 (sc_system_h_headers): Prefix with @.
2198 (sc_useless_cpp_parens, m4-check): Output line numbers.
2199 (changelog-check): Allow version only in head.
2200 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2201 satisfy new Makefile.maint rule.
2202 * data/glr.c: Likewise.
2203 * data/glr.cc: Likewise.
2204 * data/lalr1.cc: Likewise.
2205 * data/yacc.c: Likewise.
2206 * lib/ebitsetv.c: Likewise.
2207 * lib/lbitset.c: Likewise.
2208 * lib/subpipe.c: Likewise.
2209 * lib/timevar.c: Likewise.
2210 * src/system.h: Likewise.
2211 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2212 * djgpp/Makefile.maint: Add copyright notice.
2213 * djgpp/README.in: Likewise.
2214 * djgpp/config.bat: Likewise.
2215 * djgpp/config.site: Likewise.
2216 * djgpp/config_h.sed: Likewise.
2217 * djgpp/djunpack.bat: Likewise.
2218 * djgpp/config.sed: Fix copyright notice to match standard format.
2219 * djgpp/subpipe.h: Likewise.
2220 * lib/bitsetv-print.c: Likewise.
2221 * lib/bitsetv.c: Likewise.
2222 * lib/subpipe.h: Likewise.
2223 * lib/timevar.c: Likewise.
2224 * lib/timevar.h: Likewise.
2225 * djgpp/subpipe.c: Use standard recipe for config.h.
2226 * lib/abitset.c: Likewise.
2227 * lib/bitset.c: Likewise.
2228 * lib/bitset_stats.c: Likewise.
2229 * lib/bitsetv-print.c: Likewise.
2230 * lib/bitsetv.c: Likewise.
2231 * lib/ebitsetv.c: Likewise.
2232 * lib/get-errno.c: Likewise.
2233 * lib/lbitset.c: Likewise.
2234 * lib/subpipe.c: Likewise.
2235 * lib/timevar.c: Likewise.
2236 * lib/vbitset.c: Likewise.
2237 * tests/local.at: Likewise.
2238 * src/scan-gram.l: Don't include verify.h, since system.h does
2239 that for us.
2240 * .x-sc_require_config_h: New file.
2241 * .x-sc_unmarked_diagnostics: New file.
2242
2243 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2244
2245 Be a bit more systematic about using 'abort'.
2246 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2247 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2248 Put 'default: abort ();' before some other case, to satisfy older
2249 pedantic compilers.
2250 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2251 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2252 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2253 * src/conflicts.c (resolve_sr_conflict): Likewise.
2254 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2255 (get_decision_str, get_orientation_str, get_node_alignment_str):
2256 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2257 (get_linestyle_str, get_arrowstyle_str): Likewise.
2258 * src/conflicts.c (resolve_sr_conflict):
2259 Use a default case rather than one for the one remaining enum
2260 value, to catch invalid enum values as well.
2261 * src/lalr.c (set_goto_map, map_goto):
2262 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2263 * src/nullable.c (nullable_compute, token_definitions_output):
2264 Likewise.
2265 * src/reader.c (packgram, reader): Likewise.
2266 * src/state.c (transitions_to, state_new, state_reduction_find):
2267 Likewise.
2268 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2269 (symbol_pack): Likewise.
2270 * src/tables.c (conflict_row, pack_vector): Likewise.
2271 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2272 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
2273 * src/system.h: Don't include <assert.h>.
2274 (assert): New macro.
2275
2276 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2277 (Destructor Decl, Parser Function, Pure Calling):
2278 Describe rules for braces inside C code more carefully.
2279
2280 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2281
2282 Fix some porting glitches found by Nelson H. F. Beebe.
2283 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2284 compilers that don't understand that abort () does not return.
2285 * src/state.c (transitions_to): Likewise.
2286 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2287 that '#include <cstdlib>' works.
2288 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2289 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2290 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2291 for the benefit of some pre-C99 compilers.
2292
2293 * bootstrap: Undo changes to gnulib files that autoreconf made.
2294
2295 Minor fixups to get 'make maintainer-check' to work.
2296 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2297 with the new verify.h implementation.
2298 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2299 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2300 * data/yacc.c (YYUSE): Likewise.
2301 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2302 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2303 * src/parse-gram.y (declaration): Don't pass a string constant
2304 to a function that expects char *, since GCC might complain
2305 about the constant value.
2306 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2307 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2308 before #defining them.
2309 * tests/glr-regression.at
2310 (Incorrectly initialized location for empty right-hand side in GLR):
2311 In yyerror, use the msg arg.
2312 (Corrupted semantic options if user action cuts parse):
2313 (Incorrect lookahead during deterministic GLR):
2314 (Incorrect lookahead during nondeterministic GLR):
2315 Don't name a local var 'index'; it shadows string.h's 'index'.
2316
2317 2006-01-19 Akim Demaille <akim@epita.fr>
2318
2319 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2320 location, not just parts of it.
2321
2322 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2323
2324 * NEWS: Document the fact that multiple %unions are now allowed.
2325 * doc/bison.texinfo (Union Decl): Likewise.
2326 * TODO: This feature is now implemented, so remove it from
2327 the wishlist.
2328
2329 * Makefile.maint: Merge with coreutils Makefile.maint.
2330 (CVS_LIST): Use build-aux version if available.
2331 (VERSION_REGEXP): New macro.
2332 (syntax-check-rules): Add sc_no_if_have_config_h,
2333 sc_prohibit_assert_without_use, sc_require_config_h,
2334 sc_useless_cpp_parens.
2335 (sc_obsolete_symbols): Check for O_NDELAY.
2336 (sc_dd_max_sym_length): Track coreutils.
2337 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2338 (sc_useless_cpp_parens): New rule.
2339 (news-date-check): Look for version or today's date.
2340 (changelog-check): Don't require version number near head.
2341 (copyright-check): Use current year instead of hardwiring 2005.
2342 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2343 (announcement): Add --gpg-key-ID.
2344
2345 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2346 with "file system".
2347
2348 Avoid undefined behavior that addressed just before the start of an
2349 array. Problem reported by twlevo.
2350 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2351 * src/lalr.c (build_relations): Rely on new sentinel.
2352 * src/gram.c (gram_free): Adjust to new sentinel.
2353
2354 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2355
2356 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2357 yylookaheadNeeds. All uses updated.
2358 (yysplitStack): Rename local yynewLookaheadStatuses to
2359 yynewLookaheadNeeds.
2360 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2361 GLR): In comments, change `lookahead status' to `lookahead need'.
2362
2363 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2364
2365 * data/glr.c (yysplitStack): A little stylistic rewrite.
2366
2367 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2368
2369 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2370
2371 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2372
2373 * doc/bison.texinfo: Fix some typos.
2374 (GLR Semantic Actions): New subsection discussing special
2375 considerations because GLR semantic actions might be deferred.
2376 (Actions): Mention look-ahead usage of yylval.
2377 (Actions and Locations): Mention look-ahead usage of yylloc.
2378 (Special Features for Use in Actions): Add YYEOF entry and mention it
2379 in the yychar entry.
2380 In the yychar entry, remove mention of the local yychar case (pure
2381 parser) since this is irrelevant information when writing semantic
2382 actions and since it's already discussed in `Bison Symbols' where
2383 yychar is otherwise described as an external variable.
2384 In the yychar entry, don't call it the `current' look-ahead since it
2385 isn't when semantic actions are deferred.
2386 In the yychar and yyclearin entries, add note about deferred semantic
2387 actions.
2388 Add yylloc and yylval entries discussing look-ahead usage.
2389 (Look-Ahead Tokens): When discussing yychar, don't call it the
2390 `current' look-ahead, and do mention yylval and yylloc.
2391 (Error Recovery): Cross-reference `Action Features' when mentioning
2392 yyclearin.
2393 (Bison Symbols): In the yychar entry, don't call it the `current'
2394 look-ahead.
2395 In the yylloc and yylval entries, mention look-ahead usage.
2396
2397 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2398
2399 * tests/glr-regression.at: Update copyright year to 2006.
2400
2401 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2402
2403 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2404 use during nondeterministic operation to track which stacks have
2405 actually needed the current lookahead.
2406 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2407 Allocate, deallocate, resize, and otherwise shuffle space for
2408 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2409 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2410 appropriately during nondeterministic operation.
2411 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2412 members to store the current lookahead to be used by the deferred
2413 user action.
2414 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2415 from which the RHS is taken. Set the lookahead members of the new
2416 yySemanticOption according to the lookahead status for stack yyk.
2417 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2418 yyaddDeferredAction.
2419 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2420 members of yySemanticOption before invoking yyuserAction, and then set
2421 them back to their current values afterward.
2422 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2423 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2424 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2425 titles for consistency.
2426 (Leaked merged semantic value if user action cuts parse): In order to
2427 suppress lint warnings, use arguments in merge function, and assign
2428 char value < 128 in main.
2429 (Incorrect lookahead during deterministic GLR): New test case.
2430 (Incorrect lookahead during nondeterministic GLR): New test case.
2431
2432 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2433
2434 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
2435 !yyvaluep as signal that no semantic value is available to print.
2436 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2437 to print a semantic value.
2438
2439 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2440
2441 * tests/glr-regression.at: For consistency with my newer test cases,
2442 don't thank myself.
2443
2444 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2445
2446 * data/glr.c (yyresolveValue): When merging semantic options, if at
2447 least one user action succeeds but a later one cuts the parse, then
2448 destroy the semantic value before returning rather than leaking it.
2449 (yyresolveStates): If a user action cuts the parse and thus
2450 yyresolveValue fails, ignore the (unset) semantic value rather than
2451 corrupting the yyGLRState, and empty the semantic options list since
2452 the user actions should have called all necessary destructors.
2453 Simplify code with YYCHK.
2454 * tests/glr-regression.at (Corrupted semantic options if user action
2455 cuts parse): New test case.
2456 (Undesirable destructors if user action cuts parse): New test case.
2457 Before applying any of this patch, this test case never actually failed
2458 for me... but only because the corrupted semantic options usually
2459 masked this bug.
2460 (Leaked merged semantic value if user action cuts parse): New test
2461 case.
2462
2463 2006-01-05 Akim Demaille <akim@epita.fr>
2464
2465 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2466
2467 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2468
2469 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2470 _MSC_VER. Problem reported by Cenzato Marco.
2471 (b4_c_function_def): Use it.
2472 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2473 b4_c_modern.
2474 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2475 than rolling our own.
2476
2477 2006-01-04 Akim Demaille <akim@epita.fr>
2478
2479 Also warn about non-used mid-rule values.
2480 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2481 member.
2482 (symbol_list_new): Adjust.
2483 * src/reader.c (symbol_typed_p): New.
2484 (grammar_rule_check): Use it.
2485 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2486 Check its rule.
2487 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2488 Use it.
2489 * tests/actions.at (Exotic Dollars): Adjust.
2490
2491 2006-01-04 Akim Demaille <akim@epita.fr>
2492
2493 * src/reader.c (grammar_midrule_action): If $$ is set in a
2494 mid-rule, move the `used' bit to its lhs.
2495 * tests/input.at (Unused values): New.
2496 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2497
2498 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2499
2500 * doc/bison.texinfo (Bison Options): Say more accurately what
2501 --yacc does.
2502 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2503 about declarations in the grammar when in Yacc mode, as POSIX does
2504 not require a diagnostic when the grammar uses extensions.
2505
2506 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2507
2508 Warn about dubious constructions like "%token T T".
2509 Reported by twlevo.
2510 * src/symtab.h (struct symbol.declared): New member.
2511 * src/symtab.c (symbol_new): Initialize it to false.
2512 (symbol_class_set): New arg DECLARING, specifying whether
2513 this is a declaration that we want to warn about, if there
2514 is more than one of them. All uses changed.
2515
2516 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2517 Allow multiple %union directives, whose contents concatenate.
2518 * src/parse-gram.y (grammar_declaration): Likewise.
2519 Use muscle_code_grow, so that we don't need stype_line any more.
2520 All uses changed.
2521
2522 * src/muscle_tab.c (muscle_grow): Fix comment.
2523
2524 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2525 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2526 Update copyright year to 2006.
2527
2528 2006-01-03 Akim Demaille <akim@epita.fr>
2529
2530 Have glr.cc pass (some of) the calc.at tests.
2531 * data/glr.cc (b4_parse_param_orig): New.
2532 (b4_parse_param): Improve its definition, and bound it more
2533 clearly in the skeleton.
2534 (b4_epilogue): Append, instead of prepending, in order to keep
2535 #line consistency.
2536 Simplify the generation of auxiliary functions: locations and
2537 purity are mandated.
2538 (b4_global_tokens_and_yystype): Honor it.
2539 * data/location.cc (c++.m4): Don't include it.
2540 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2541 and AT_SKEL_CC_IF.
2542 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2543 AT_LALR1_CC_IF.
2544 Be sure to initialize the first position's filename.
2545 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2546 mandated anyway.
2547 (AT_CHECK_CALC_GLR_CC): New.
2548 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2549
2550 2006-01-02 Akim Demaille <akim@epita.fr>
2551
2552 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2553 c.m4.
2554 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2555 * data/glr.cc: Do not include stack.hh.
2556
2557 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2558
2559 * data/glr.c: Reformat whitespace with tabs.
2560 (b4_lpure_formals): Remove this unused m4 macro.
2561 * tests/cxx-type.at: Reformat whitespace with tabs.
2562 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2563 since it's a member. Rename type to isNterm for clarity.
2564
2565 2005-12-29 Akim <akim@sulaco.local>
2566
2567 Let glr.cc catch up with symbol_value_print.
2568 * data/glr.cc (b4_yysymprint_generate): Replace by...
2569 (b4_yy_symbol_print_generate): this.
2570 (yy_symbol_print, yy_symbol_value_print): Declare them.
2571
2572 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2573
2574 * src/location.h (boundary): Note that a line or column equal
2575 to INT_MAX indicates an overflow.
2576 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2577 (rule_length_overflow, increment_rule_length, add_column_width):
2578 New functions.
2579 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2580 (<SC_BRACED_CODE>"}"):
2581 Use increment_rule_length rather than incrementing it by hand.
2582 (adjust_location, handle_syncline): Diagnose overflow.
2583 (handle_action_dollar, handle_action_at):
2584 Fix bug with monstrosities like $-2147483648.
2585 Remove now-unnecessary checks.
2586 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2587 (convert_ucn_to_byte): Verify assumptions.
2588 (handle_syncline): New arg LOC. All callers changed.
2589 Don't store through a value derived from char const * pointer.
2590
2591 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2592 GCC warnings.
2593
2594 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2595
2596 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2597 Remove unnecessary forward static decls.
2598
2599 2005-12-27 Akim Demaille <akim@epita.fr>
2600
2601 * src/reader.c (grammar_current_rule_check): Also check that $$
2602 is used.
2603 Take the rule to check as argument, hence rename as...
2604 (grammar_rule_check): this.
2605 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2606 Rename as...
2607 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2608 (grammar_midrule_action, grammar_symbol_append): Now static.
2609 * tests/torture.at (input): Don't rely on the default action
2610 being always performed.
2611 * tests/calc.at: "Set" $$ even when the action is "cut" with
2612 YYERROR or other.
2613 * tests/actions.at (Exotic Dollars): Instead of using unused
2614 values, check that the warning is issued.
2615
2616 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2617
2618 * NEWS: Improve wording for unused-value warnings.
2619
2620 2005-12-22 Akim Demaille <akim@epita.fr>
2621
2622 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2623 (b4_yysymprint_generate): Rename as...
2624 (b4_yy_symbol_print_generate): this.
2625 Generate yy_symbol_print instead of yysymprint.
2626 Generate also yy_symbol_value_print, and use it.
2627
2628 2005-12-22 Akim Demaille <akim@epita.fr>
2629
2630 * NEWS: Warn about unused values.
2631 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2632 a `used' member.
2633 (symbol_list_n_get, symbol_list_n_used_set): New.
2634 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2635 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2636 * src/reader.c (grammar_current_rule_check): Check that values are
2637 used.
2638 * src/symtab.c (symbol_print): Accept 0.
2639 * tests/existing.at: Remove the type information.
2640 Empty the actions.
2641 Remove useless actions (beware of mid-rule actions: perl -000
2642 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2643 * tests/actions.at (Exotic Dollars): Use unused values.
2644 * tests/calc.at: Likewise.
2645 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2646 Likewise.
2647
2648 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2649 rule_useful_p.
2650
2651 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2652
2653 Undo 2005-12-01 tentative license wording change. The wording is
2654 still being reviewed by the lawyers, and we don't want to wait for
2655 them before publishing a test release. For now, revert to the
2656 previous wording.
2657 * NEWS: Undo 2005-12-01 change.
2658 * data/glr.c: Revert to previous license wording.
2659 * data/glr.cc: Likewise.
2660 * data/lalr1.cc: Likewise.
2661 * data/location.cc: Likewise.
2662 * data/yacc.c: Likewise.
2663
2664 * NEWS: Reword %destructor vs YYABORT etc.
2665 * data/glr.c: Use American spacing, for consistency.
2666 * data/glr.cc: Likewise.
2667 * data/lalr1.cc: Likewise.
2668 * data/yacc.c: Likewise.
2669 * data/yacc.c: Reformat comments slightly.
2670 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2671 for consistency. Fix some spelling errors and reword recently-included
2672 text slightly.
2673 * tests/cxx-type.at: Cast results of malloc, for C++.
2674
2675 2005-12-21 Joel E. Denny <address@hidden>
2676
2677 * tests/cxx-type.at: Construct a tree, count the parents of shared
2678 nodes, and free each node once and only once. Previously, the memory
2679 for semantic values was leaked instead.
2680
2681 2005-12-21 Joel E. Denny <address@hidden>
2682
2683 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2684 (yylval, yylloc): If pure, #define to yystackp->yyval and
2685 yystackp->yyloc similar to yychar and yynerrs.
2686 (yyparse): If pure, remove local yylval and yylloc. Add local
2687 yystackp to accommodate pure definitions of yylval and yylloc.
2688 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2689 yylvalp and yyllocp to &yylval and &yylloc.
2690 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2691 namespace. Previously, nerrs and char were missing, but lval and lloc
2692 weren't necessary.
2693 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2694 yylvalp and yyllocp parameters since, if pure, these are now always
2695 accessible through yystackp. If not pure, they are still accessible
2696 globally.
2697 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2698 `if (YYID (N))' to pacify lint.
2699
2700 2005-12-21 Akim Demaille <akim@epita.fr>
2701
2702 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2703 destroy the RHS symbols of a rule.
2704 * data/yacc.c (yylen): Initialize to 0.
2705 Keep its value to the number of items to possibly shift.
2706 In particular, a regular successful parse that ends on YYFINAL by
2707 a (internal) YYACCEPT must not have yylen != 0.
2708 (yyerrorlab, yyreturn): Pop the RHS.
2709 Reorder a bit to emphasize the `shifting' bits of code.
2710 (YYPOPSTACK): Now accept a number of items to pop.
2711 * data/lalr1.cc: Likewise.
2712 * data/glr.c: Formatting changes.
2713 Use goto instead of fall through.
2714 * doc/bison.texinfo (Destructor Decl): Complete.
2715
2716 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2717
2718 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2719 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2720 * djgpp/config.bat: Replace every occurence of the file name
2721 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2722 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2723 * djgpp/config.sed: Replace every occurence of the file name
2724 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2725 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2726 * djgpp/djunpack.bat: DJGPP specific file.
2727 * djgpp/fnchange.lst: DJGPP specific file.
2728 * djgpp/README.in: Add new information about how to unpack the bison
2729 source on MSDOS and other systems which have 8.3 file name restrictions
2730 using djunpack.bat and fnchange.lst.
2731
2732 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2733
2734 * bootstrap (build_cvs_prefix): Remove; unused.
2735 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2736 when getting gnulib.
2737
2738 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2739
2740 * data/glr.c: Reorder typedef declarations for structs to match order
2741 of struct declarations.
2742 Rename yystack everywhere to yystackp except in yyparse where it's not
2743 a pointer.
2744 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2745 consistency.
2746 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2747 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2748 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2749 lint.
2750
2751 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2752
2753 * tests/sets.at (Accept): Fix typos in regular expression used to
2754 sed out the final state number.
2755
2756 Work around portability problem on Solaris 10: flex-generated
2757 files include <stdio.h> before <config.h>, which messes up
2758 because the latter defines __EXTENSIONS__. Address the problem
2759 by creating two new little files that include <config.h> first,
2760 then include the flex-generated files. Rewrite everyone else
2761 to include <config.h> first, as well.
2762 * lib/timevar.c: Always include "config.h".
2763 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2764 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2765 (EXTRA_bison_SOURCES): New macro.
2766 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2767 * src/system.h: Don't include config.h.
2768 * src/LR0.c: Include <config.h> first.
2769 * src/assoc.c: Likewise.
2770 * src/closure.c: Likewise.
2771 * src/complain.c: Likewise.
2772 * src/conflicts.c: Likewise.
2773 * src/derives.c: Likewise.
2774 * src/files.c: Likewise.
2775 * src/getargs.c: Likewise.
2776 * src/gram.c: Likewise.
2777 * src/lalr.c: Likewise.
2778 * src/location.c: Likewise.
2779 * src/main.c: Likewise.
2780 * src/muscle_tab.c: Likewise.
2781 * src/nullable.c: Likewise.
2782 * src/output.c: Likewise.
2783 * src/parse-gram.y: Likewise.
2784 * src/print.c: Likewise.
2785 * src/print_graph.c: Likewise.
2786 * src/reader.c: Likewise.
2787 * src/reduce.c: Likewise.
2788 * src/relation.c: Likewise.
2789 * src/state.c: Likewise.
2790 * src/symlist.c: Likewise.
2791 * src/symtab.c: Likewise.
2792 * src/tables.c: Likewise.
2793 * src/uniqstr.c: Likewise.
2794 * src/vcg.c: Likewise.
2795
2796 * src/parse-gram.y: Fix minor problems uncovered by lint.
2797 (current_lhs, current_lhs_location): Now static.
2798 (current_assoc): Remove unused variable.
2799
2800 Cleanups so that Bison-generated parsers have less lint.
2801 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2802 Prepend /*ARGSUSED*/, for lint's sake.
2803 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2804 definition if 'lint' is defined.
2805 (YYID): New macro (or function, if lint).
2806 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2807 * data/yacc.c: Likewise.
2808 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2809 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2810 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2811 is C++ only.
2812 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2813 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2814 Use YYID(0) rather than 0, for lint.
2815 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2816 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2817
2818 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2819
2820 * tests/glr-regression.at
2821 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2822 Close memory leak reported by twlevo.
2823
2824 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2825
2826 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2827 all stacks.
2828 (yyparse): Iterate another stack in order to call user destructors.
2829 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2830 New test case.
2831 (Duplicated user destructor for lookahead): This test now is expected
2832 to succeed.
2833
2834 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2835
2836 * NEWS: Document the following change.
2837 * data/yacc.c: Say "parser skeleton" rather than "file", since
2838 it's no longer just a file.
2839 * data/glr.c: Grant a special exception for C GLR parsers, that
2840 reads like the already-existing exception for C LALR(1) parsers.
2841 * data/glr.cc: Likewise.
2842 * data/lalr1.cc: Likewise.
2843 * data/location.cc: Likewise.
2844 * data/yacc.c: Reword the "written by" statement to clarify that
2845 it was the parser skeleton, not the entire output file.
2846 * data/glr.c: Written by Paul Hilfinger.
2847 * data/glr.cc: Written by Akim Demaille.
2848 * data/lalr1.cc: Likewise.
2849
2850 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2851
2852 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2853 Fix typos in previous change that broke 'make check'.
2854 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2855 supported in C.
2856 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2857 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2858 We can revert this once things settle down.
2859
2860 * src/conflicts.c (conflicts_print): Don't print file name twice
2861 when %expect fails because there were no conflicts.
2862 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2863 change.
2864 * tests/conflicts.at (%expect not enough, %expect too much):
2865 (%expect with reduce conflicts): Adjust to new behavior.
2866
2867 2005-11-18 Akim Demaille <akim@epita.fr>
2868
2869 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2870 errors.
2871 * NEWS: Document this.
2872 * doc/bison.texinfo (Expect Decl): Likewise.
2873
2874 2005-11-16 Akim Demaille <akim@epita.fr>
2875
2876 Generalize the display of semantic values and locations in traces.
2877 * data/glr.c (yy_reduce_print): Fix indices (again).
2878 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2879 literal integers.
2880 * data/lalr1.cc (yyreduce_print): Rename as...
2881 (yy_reduce_print): this.
2882 Display values and locations.
2883 * data/yacc.c (yy_reduce_print): Likewise.
2884 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2885 (yysymprint): Move higher to be visible from yy_reduce_print).
2886 (yyparse): Adjust.
2887 * tests/calc.at: Adjust the expected length of the traces.
2888
2889 2005-11-14 Akim Demaille <akim@epita.fr>
2890
2891 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2892 from 1 to N, while values and location start at 0.
2893 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2894
2895 2005-11-14 Akim Demaille <akim@epita.fr>
2896
2897 * data/glr.c (yy_reduce_print): Fix the $ number.
2898
2899 2005-11-14 Akim Demaille <akim@epita.fr>
2900
2901 "Use" parse parameters.
2902 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2903 * data/glr.c, data/glr.cc: Use them.
2904 * data/glr.c (YYUSE): Have a C++ definition that supports
2905 non-pointer types.
2906
2907 2005-11-14 Akim Demaille <akim@epita.fr>
2908
2909 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2910
2911 2005-11-14 Akim Demaille <akim@epita.fr>
2912
2913 * data/glr.cc: New.
2914 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
2915
2916 2005-11-12 Akim Demaille <akim@epita.fr>
2917
2918 Let position and location be PODs.
2919 * data/location.cc (position::initialize, location::initialize): New.
2920 (position::position, location::location): Define only if
2921 b4_location_constructors is defined.
2922 * data/lalr1.cc (b4_location_constructors): Define it for backward
2923 compatibility.
2924 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2925
2926 2005-11-12 Akim Demaille <akim@epita.fr>
2927
2928 * data/lalr1.cc: Move the body of the ctor and dtor into the
2929 parser file (instead of the header).
2930 Wrap the implementations in a "namespace yy".
2931
2932 2005-11-12 Akim Demaille <akim@epita.fr>
2933
2934 Have glr.c include its header file when created.
2935 * data/glr.c (b4_shared_declarations): New.
2936 Output them verbatim in the parser if !%defines, otherwise
2937 output then in the header file, and include it instead.
2938
2939 2005-11-11 Akim Demaille <akim@epita.fr>
2940
2941 * data/glr.c: Comment changes.
2942
2943 2005-11-11 Akim Demaille <akim@epita.fr>
2944
2945 When yydebug, report semantic and location values for reductions.
2946 * data/glr.c (yy_reduce_print): Report the semantic values and the
2947 locations.
2948 (YY_REDUCE_PRINT): Adjust.
2949 (yyglrReduce): Use them.
2950 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2951 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2952 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2953 traces.
2954
2955 2005-11-10 Akim Demaille <akim@epita.fr>
2956
2957 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2958 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2959 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2960
2961 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2962
2963 * m4/cxx.m4, examples/Makefile.am: Don't build
2964 examples/calc++ if no C++ compiler is available. (trivial change)
2965
2966 2005-11-09 Akim Demaille <akim@epita.fr>
2967
2968 * src/scan-skel.l: Use a couple of asserts.
2969
2970 2005-11-03 Akim Demaille <akim@epita.fr>
2971
2972 In some (weird) cases, the final state number is incorrect.
2973 Reported by Alexandre Duret-Lutz.
2974 * src/LR0.c (state_list_append): Remove the computation of
2975 final_state.
2976 (save_reductions): Do it here.
2977 (get_state): Alpha conversion.
2978 (generate_states): Use a for loop.
2979 * src/gram.h (item_number_is_rule_number)
2980 (item_number_is_symbol_number): New.
2981 * src/state.c: Use assert.
2982 * src/system.h: Include assert.h.
2983 * tests/sets.at (Accept): New.
2984
2985 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2986
2987 * data/glr.c (yyfill): Adjust comment.
2988 (yyresolveAction): Initialize default location properly
2989 for empty right-hand sides.
2990 (yydoAction): Ditto.
2991 Add comment explaining apparently dead code.
2992 * tests/glr-regression.at
2993 (Incorrectly initialized location for empty right-hand side in GLR):
2994 New test.
2995
2996 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2997
2998 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2999 gnulib when interrupted. This fixes some race conditions and
3000 works around some portability problems (one noted by Paul
3001 Hilfinger).
3002
3003 2005-10-22 Akim <akim@epita.fr>
3004
3005 * Makefile.cfg: Adjust to config -> build-aux.
3006 Reported by twledo.
3007
3008 2005-10-21 Akim Demaille <akim@epita.fr>
3009
3010 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3011 the %parse-params.
3012 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3013 * data/yacc.c (b4_Pure_if): Rename as...
3014 (b4_yacc_pure_if): this.
3015 (YY_SYMBOL_PRINT, yyparse): Adjust.
3016 * doc/bison.texinfo: Formatting changes.
3017
3018 2005-10-21 Akim Demaille <akim@epita.fr>
3019
3020 Finish the transition config -> build-aux.
3021 * configure.ac, Makefile.am: Use build-aux.
3022 * config/prev-version, config/announce-gen, config/Makefile.am:
3023 Move to...
3024 * build-aux/prev-version, build-aux/announce-gen,
3025 * build-aux/Makefile.am: here.
3026
3027 2005-10-14 Akim Demaille <akim@epita.fr>
3028
3029 * examples/calc++/test: Use set -x only when VERBOSE.
3030
3031 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3032
3033 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3034 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3035
3036 2005-10-13 Akim Demaille <akim@epita.fr>
3037
3038 * src/scan-skel.l: Output the base name parts of the parser and
3039 header file names.
3040 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
3041 additional checks.
3042 Use this to exercise C++ outputs in subdirs.
3043 Reported by Oleg Smolsky.
3044
3045 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3046
3047 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3048 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3049 Problem reported by John P. Hartmann.
3050 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3051 already defined it.
3052
3053 2005-10-12 Akim Demaille <akim@epita.fr>
3054
3055 * src/parse-gram.y (version_check): Exit 63 to please missing
3056 (stands for "version mismatch).
3057 * tests/input.at, doc/bison.texinfo: Adjust.
3058
3059 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3060
3061 Work around portability problems with Visual Age C compiler
3062 (xlc and xlC_r) reported by John P. Hartmann.
3063 * data/location.cc (initial_column, initial_line): Remove.
3064 All uses replaced by 0 and 1.
3065 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3066 that xlc complains about.
3067 * src/scan-skel.l (skel_wrap): Likewise.
3068 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
3069 as __STDC__.
3070 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3071 __STDC_VERSION__. Use it everywhere instead of looking at
3072 __STDC__ and __cplusplus.
3073
3074 2005-10-10 Akim Demaille <akim@epita.fr>
3075
3076 * examples/calc++/test: Be quiet unless VERBOSE.
3077
3078 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3079
3080 * data/c.m4 (yydestruct, yysymprint):
3081 Use YYUSE instead of casting to void.
3082 * data/glr.c (YYUSE): New macro.
3083 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3084 Use it instead of rolling our own.
3085 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3086 (YYCHK1):
3087 Use /*CONSTCOND*/ to suppress lint warnings.
3088 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3089 (YY_STACK_PRINT): Use 'false' not '0'.
3090 (YYUSE): New macro.
3091 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3092 * data/yacc.c (YYUSE): New macro.
3093 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3094 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3095 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3096
3097
3098 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3099 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3100
3101 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3102
3103 Undo the parts of the unlocked-I/O change that substituted
3104 putc or puts for printf. This might hurt performance a bit,
3105 but some people prefer the printf style.
3106 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3107 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3108 All uses replaced by YYFPRINTF and YYDPRINTF.
3109 * data/yacc.c: Likewise.
3110 * lib/bitset.c (bitset_print): Likewise.
3111 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3112 putc and puts.
3113 * lib/lbitset.c (debug_lbitset): Likewise.
3114 * src/closure.c (print_firsts, print_fderives): Likewise.
3115 * src/gram.c (grammar_dump): Likewise.
3116 * src/lalr.c (look_ahead_tokens_print): Likewise.
3117 * src/output.c (escaped_output): Likewise.
3118 (user_actions_output): Break apart two printfs.
3119 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3120 * src/reduce.c (reduce_print): Likewise.
3121 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3122 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3123
3124 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3125 Use assignments rather than casts-to-void to suppress
3126 unused-variable warnings. This pacifies 'lint'.
3127 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3128 unused-variable warnings.
3129
3130 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3131
3132 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3133
3134 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3135
3136 Use unlocked I/O for a minor performance improvement on hosts like
3137 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3138 is to use the gnlib unlocked-io module, and to prefer putc and
3139 puts to printf when either will work (since the latter doesn't
3140 come in an unlocked flavor).
3141 * bootstrap (gnulib_modules): Add unlocked-io.
3142 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3143 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3144 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3145 and similarly for puts and putc and printf.
3146 * data/yacc.c: Likewise.
3147 * lib/bitset.c (bitset_print): Likewise.
3148 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3149 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3150 to printf.
3151 * lib/lbitset.c (debug_lbitset): Likewise.
3152 * src/closure.c (print_firsts, print_fderives): Likewise.
3153 * src/gram.c (grammar_dump): Likewise.
3154 * src/lalr.c (look_ahead_tokens_print): Likewise.
3155 * src/output.c (escaped_output): Likewise.
3156 (user_actions_output): Coalesce two printfs.
3157 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
3158 * src/reduce.c (reduce_print): Likewise.
3159 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3160 * src/system.h: Include unlocked-io.h rather than stdio.h.
3161
3162 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3163 this confuses xgettext.
3164
3165 2005-10-02 Akim Demaille <akim@epita.fr>
3166
3167 * bootstrap (gnulib_modules): Add strverscmp.
3168 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3169 * m4/.cvsignore: Add strverscmp.m4.
3170 * src/parse-gram.y (%require): New token, new rule.
3171 (version_check): New.
3172 * src/scan-gram.l (%require): Adjust.
3173 * tests/input.at (AT_REQUIRE): New.
3174 Use it.
3175 * doc/bison.texinfo (Require Decl): New.
3176 (Calc++ Parser): Use %require.
3177
3178 2005-10-02 Akim Demaille <akim@epita.fr>
3179
3180 * data/location.cc: New.
3181
3182 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3183 Akim Demaille <akim@epita.fr>
3184
3185 Make sure -odir/foo.cc creates dir/location.hh etc.
3186 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3187 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3188 (spec_defines_file): Now const.
3189 (dir_prefix): New.
3190 (short_base_name): Remove.
3191 * src/files.c: Adjust.
3192 (dirname.h): Include.
3193 (base_name): Don't prototype it.
3194 (finput): Remove, duplicates gram_in.
3195 (full_base_name, short_base_name): Replace by...
3196 (all_but_ext, all_but_tab_ext): these.
3197 (compute_base_names): Rename as...
3198 (compute_file_name_parts): this.
3199 Update to compute the new variables, including dir_prefix.
3200 Adjust dependencies.
3201 * src/output.c (prepare): Output them.
3202 * src/reader.c: Adjust to use gram_in, not finput.
3203 * src/scan-skel.l (@dir_prefix@): New.
3204
3205 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3206
3207 * lib/subpipe.c: New function end_of_output_subpipe() added
3208 to allow support for non-posix systems. This is a no-op function
3209 for posix systems.
3210
3211 * lib/subpipe.h: New function end_of_output_subpipe() added
3212 to allow support for non-posix systems. This is a no-op function
3213 for posix systems.
3214
3215 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3216 handle the lack of pipe/fork functionality on non-posix systems.
3217
3218 * djgpp/Makefile.maint: DJGPP specific file.
3219
3220 * djgpp/README.in: DJGPP specific file.
3221
3222 * djgpp/config.bat: DJGPP specific configuration file.
3223
3224 * djgpp/config.sed: DJGPP specific configuration file.
3225
3226 * djgpp/config.site: DJGPP specific configuration file.
3227
3228 * djgpp/config_h.sed: DJGPP specific configuration file.
3229
3230 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3231
3232 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3233
3234 2005-10-02 Akim Demaille <akim@epita.fr>
3235
3236 * data/location.cc: New, extract from...
3237 * data/lalr1.cc: here.
3238 (location.hh): Include it after the user prologue, in case the
3239 filename type is defined by the user.
3240 Forward declation location and position before the pre-prologue.
3241 (yyresult_): Rename as...
3242 (yyresult): this, it's a local variable, not an attribute.
3243 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3244
3245 2005-10-01 Akim Demaille <akim@epita.fr>
3246
3247 * examples/extexi: Restore the #line generation.
3248
3249 2005-09-30 Akim Demaille <akim@epita.fr>,
3250 Alexandre Duret-Lutz <adl@gnu.org>
3251
3252 Move the token type and YYSTYPE in the parser class.
3253 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3254 (parser::token): New, from the moved free definition of tokens.
3255 (parser::semantic_value): Now a full definition instead of an
3256 indirection to YYSTYPE.
3257 (b4_post_prologue): No longer included in the header file, but
3258 in the implementation file.
3259 * doc/bison.texi (C+ Language Interface): Update.
3260 * src/parse-gram.y: Support unary %define.
3261 * tests/actions.at: Define global_tokens_and_yystype for backward
3262 compatibility until we update the tests.
3263 * tests/calc.at: Idem.
3264 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3265 to simplify the code.
3266
3267 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3268
3269 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3270 Ah, the good old days! Problem reported by Peter Klein.
3271 * bootstrap (gnulib_modules): Add strerror, strtoul.
3272 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3273 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3274
3275 2005-09-29 Akim Demaille <akim@epita.fr>
3276
3277 * data/c.m4 (b4_error_verbose_if): New.
3278 * data/lalr1.cc: Use it.
3279 (YYERROR_VERBOSE_IF): Remove.
3280 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3281 parser members, replaced by...
3282 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3283 local variables.
3284 (yysyntax_error_): Takes the state number as argument.
3285 (yyreduce_print_): Use the argument yyrule, not the former
3286 attribute yyn_.
3287
3288 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3289
3290 * bootstrap (gnulib_modules): Add verify.
3291 * lib/.cvsignore: Add verify.h.
3292 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3293 * src/system.h (verify): Remove.
3294 Include verify.h instead.
3295 * src/tables.c (tables_generate): Use new API for 'verify'.
3296
3297 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3298
3299 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3300 local variables whose names begin with 'yy'.
3301 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3302 Trivial changes from Joel E. Denny.
3303
3304 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3305 it itself.
3306 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3307 don't use alloca any more.
3308
3309 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3310 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
3311 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
3312 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3313 to match yacc.c, to test more hosts.
3314
3315 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3316
3317 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3318 doesn't affect behavior.
3319 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3320 Solaris, AIX, MSC.
3321 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3322 This works a bit better with glibc, if user code has already included
3323 stdlib.h.
3324 * doc/bison.texinfo (Bison Parser): Document that users can't
3325 arbitrarily use malloc and free for other purposes. Document
3326 that <alloca.h> and <malloc.h> might be included.
3327 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3328 user must declare alloca.
3329
3330 * HACKING (release): Forwarn the Translation Project about
3331 stable releses.
3332
3333 2005-09-20 Akim Demaille <akim@epita.fr>
3334
3335 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3336
3337 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3338
3339 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3340 (YYSTACK_ALLOC_MAXIMUM): Use it.
3341 (yysyntax_error): New function.
3342 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3343 multiple syntax errors are reported, and alloca is being used.
3344 Instead, reallocate buffers twice as big each time, so that
3345 we waste at most half the allocated memory. Start with a small
3346 (128-byte) buffer that will suffice in most cases anyway.
3347 Use yysyntax_error to do most of the work.
3348
3349 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3350 yynerrs is the number of errors reported, not the number of
3351 errors encountered.
3352
3353 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3354 Mark it as expected to fail.
3355 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3356 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3357 Don't start user-code symbols with "yy", to avoid name space problems.
3358
3359 2005-09-19 Akim Demaille <akim@epita.fr>
3360
3361 Remove the traits, failed experiment.
3362 It never proved useful, and anyway because of the current
3363 definition, it was not possible to have several specialization of
3364 this traits, making it useless.
3365 * data/lalr1.cc (yy:traits): Remove.
3366 Inline its definitions in the parser class.
3367
3368 2005-09-19 Akim Demaille <akim@epita.fr>
3369
3370 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3371 least Mac OSX with a /usr/local install of gettext.
3372
3373 2005-09-19 Akim Demaille <akim@epita.fr>
3374
3375 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3376 and yytoken for similarity with the other skeletons.
3377
3378 2005-09-19 Akim Demaille <akim@epita.fr>
3379
3380 * NEWS, configure.ac: update version number to 2.1a.
3381
3382 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3383
3384 * NEWS: Version 2.1.
3385
3386 * NEWS: Remove notice of yytname change, since it was never in an
3387 official release.
3388 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3389 diagnostic.
3390 * src/output.c (prepare): Likewise.
3391 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3392 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3393 is not defined. This is an awful hack, but it's enough for now.
3394 All callers changed.
3395 * tests/glr-regression-at (make_value): Args are const pointers now,
3396 to avoid GCC warning.
3397 (Duplicated user destructor for lookahead): New test. Currently
3398 skipped. It fails on my host but I'm not sure it'll always fail.
3399
3400 2005-09-16 Akim Demaille <akim@epita.fr>
3401
3402 * src/symtab.h (struct symbol): Declare the printer and destructor
3403 as const, to avoid accidental calls to free.
3404 (symbol_destructor_set, symbol_printer_set): Adjust.
3405 * src/symtab.c: Adjust.
3406
3407 2005-09-16 Akim Demaille <akim@epita.fr>
3408
3409 * data/c.m4 (b4_token_enums): New.
3410 (b4_token_defines): Rename as...
3411 (b4_token_enums_defines): this.
3412 (b4_token_defines): New, output only the #defines.
3413 * data/yacc.c, data/glr.c: Adjust.
3414 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3415 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3416 as default values.
3417
3418 2005-09-16 Akim Demaille <akim@epita.fr>
3419
3420 * data/lalr1.cc (yylex_): Remove, inline its code.
3421 (yyreport_syntax_error_): Remove, replaced by...
3422 (yysyntax_error_): this which returns a string and leaves to the
3423 caller the call to the users' error function.
3424 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3425 Move from members of the parser object...
3426 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3427 to local variables of the parse function.
3428
3429 2005-09-16 Akim Demaille <akim@epita.fr>
3430
3431 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3432 since it's in Bison's name space.
3433
3434 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3435
3436 * data/glr.c (yyresolveValue): Add default case to pacify
3437 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3438
3439 * NEWS: Document when yyparse started to return 2.
3440 * doc/bison.texinfo (Parser Function): Document when yyparse
3441 returns 2.
3442
3443 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3444 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3445 changed.
3446 (class position): file_name -> filename (reverting). All uses changed.
3447
3448 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3449
3450 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3451 do anything if $@ exists. This reverts part of the 2005-07-07
3452 patch.
3453
3454 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3455
3456 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3457 contains obsolete information and isn't worth distributing as a
3458 separate file anyway.
3459 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3460 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3461 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3462 (yyparse): Abort if user code uses longjmp to throw an unexpected
3463 value.
3464
3465 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3466
3467 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3468 Suggested by twlevo@xs4all.nl.
3469
3470 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3471 This avoids a diagnostic from gcc -Wswitch-enum.
3472 Problem reported by twlevo@xs4all.nl.
3473
3474 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3475 standards. Use "file name" or "file" or "name", depending on
3476 the context.
3477 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3478 not to hack/foo.tab.c.
3479 (Calc++ Top Level): 2nd arg of main is not const.
3480 * data/glr.c: b4_filename -> b4_file_name.
3481 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3482 All uses changed.
3483 (class position): filename -> file_name. All uses changed.
3484 * data/yacc.c: b4_filename -> b4_file_name.
3485 * lib/bitset.h: filename -> file_name in local vars.
3486 * lib/bitset_stats.c: Likewise.
3487 * src/files.c: Likewise.
3488 * src/scan-skel.l ("@output ".*\n): Likewise.
3489 * src/files.c (file_name_split): Renamed from filename_split.
3490 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3491
3492 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3493
3494 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3495 to accommodate latest gnulib.
3496
3497 * tests/glr-regression.at (Duplicate representation of merged trees):
3498 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3499
3500 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3501 needed.
3502
3503 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3504
3505 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3506 All uses changed. Invoke user destructor after an error during a
3507 split parse (trivial change from Joel E. Denny).
3508
3509 * tests/glr-regression.at
3510 (User destructor after an error during a split parse): New test case.
3511 Problem reported by Joel E. Denny in:
3512 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3513
3514 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3515
3516 * README-cvs: Give URLs for recommended tools.
3517 Mention Gzip version problem, and bootstrapping issues.
3518 Remove troubleshooting section, as it's somewhat obsolete.
3519
3520 * bootstrap (no_cache): New var, to accommodate different wget
3521 variants. Use it instead of '-C off'. Problem reported by
3522 twlevo@xs4all.nl.
3523
3524 * data/glr.c (yydestroyStackItem): New function.
3525 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3526 debugging information. Problem reported by Joel E. Denny.
3527
3528 2005-08-25 Akim Demaille <akim@epita.fr>
3529
3530 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3531
3532 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3533
3534 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3535 Don't invoke destructor on unresolved entries.
3536 * tests/glr-regression.at
3537 (User destructor for unresolved GLR semantic value): New test case.
3538 Problem reported by Joel E. Denny in:
3539 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3540
3541 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3542
3543 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3544 Add strnlen.c.
3545 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3546 lib-prefix.m4, po.m4.
3547
3548 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3549 in yydestruct diagnostic, since it might not be an error.
3550 Problem reported by Joel Denny near end of
3551 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3552 * data/lalr1.cc (yyerturn): Likewise.
3553 * data/yacc.c (yyreturn): Likewise.
3554 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3555
3556 * src/files.c: Remove obsolete FIXME comment.
3557
3558 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3559 with the other templates, and to fix bogus run-on messages such
3560 as the one reported at the end of
3561 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3562 All callers changed to avoid the newline.
3563 (yyprocessOneStack): Output two lines rather than one, to accommodate
3564 the above change. This changes the debug output format slightly.
3565
3566 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3567 reported by Joel E. Denny in
3568 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3569 (trivial change).
3570 * tests/glr-regression.at (Duplicate representation of merged trees):
3571 New test, from Joel E. Denny in:
3572 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3573 * THANKS: Add Joel E. Denny.
3574
3575 * configure.ac (AC_INIT): Bump to 2.0c.
3576
3577 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3578
3579 * NEWS: Version 2.0b.
3580
3581 * Makefile.am (SUBDIRS): Put examples before tests, so that
3582 "make check" doesn't finish with "All 1 tests passed".
3583
3584 * tests/regression.at (Token definitions): Don't rely on
3585 AT_PARSER_CHECK for data that contains backslashes. It currently
3586 uses 'echo', and 'echo' isn't portable if its argument contains
3587 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3588 that the byte '\0xff' is not printable in the C locale; it is,
3589 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3590 not printable, so use '\0x81' to test.
3591
3592 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3593 version of GCC, since the macro is used with non-GCC compilers.
3594
3595 Fix core dump reported by Pablo De Napoli in
3596 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3597 * tests/regression.at (Invalid inputs with {}): New test.
3598 * src/parse-gram.y (token_name): Translate type before using
3599 it as an index.
3600
3601 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3602 the user's name space. All uses changed to __attribute__
3603 ((__unused__)).
3604 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3605 Add __attribute__ ((__noreturn__)).
3606
3607 * etc/clcommit: Remove. We weren't using it, and it failed
3608 "make maintainer-distcheck".
3609 * Makefile.maint: Merge from coreutils.
3610 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3611 (syntax-check-rules): Change list of rules as described below.
3612 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3613 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3614 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3615 (sc_trailing_space): New rules.
3616 (sc_xalloc_h_in_src): Remove.
3617 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3618 (sc_space_tab, sc_error_exit_success, sc_changelog):
3619 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3620 (makefile-check, po-check, author_mark_check):
3621 (makefile_path_separator_check, copyright-check):
3622 Use grep -n, to make it easier to find violations.
3623 Use CVS_LIST and CVS_LIST_EXCEPT.
3624 (header_regexp, h_re): Remove.
3625 (dd_c): New macro.
3626 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3627 (my-distcheck): Use more-modern GCC flags.
3628 (signatures, %.asc): Remove.
3629 (rel-files, announcement): Remove signatures.
3630 Restore old updating code, even though we don't use it, so
3631 that we're the same as coreutils.
3632 (alpha, beta, major): Depend on news-date-check.
3633 Make the upload commands.
3634
3635 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3636 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3637 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3638 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3639 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3640 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3641 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3642 * tests/sets.at: Likewise.
3643
3644 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3645 we comment out the Autoconf version number.
3646 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3647 it's error-prone and "make maintainer-distcheck" rejects it.
3648
3649 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3650 Indent calls to "error" to pacify "make maintainer-distcheck",
3651 when the calls are not intended to be translated.
3652 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3653
3654 * src/Makefile.am (DEFS): Use +=, to pacify
3655 "make maintainer-distcheck".
3656 (bison_SOURCES): Add scan-skel.h.
3657 (sc_tight_scope): New rule, from coreutils.
3658
3659 * src/files.c (src_extension, header_extension):
3660 Now static, not extern.
3661 * src/getargs.c (short_options): Likewise.
3662 * src/muscle_tab.c (muscle_table): Likewise.
3663 * src/parse-gram.y (current_class, current_type, current_prec):
3664 Likewise.
3665 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3666 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3667 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3668 void, to avoid warning when NLS is disabled.
3669 * src/output.c: Include scan-skel.h.
3670 (scan_skel): Remove decl, since scan-skel.h does this.
3671 (output_skeleton):
3672 Indent calls to "error" to pacify "make maintainer-distcheck".
3673 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3674 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3675 "make maintainer-distcheck".
3676 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3677 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3678 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3679 (skel_lex_destroy, scan_skel): Move these decls to...
3680 * src/scan-skel.h: New file.
3681 * src/uniqstr.c (uniqstr_assert):
3682 Indent calls to "error" to pacify "make maintainer-distcheck".
3683
3684 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3685 not @VAR@.
3686
3687 * tests/torture.at: Revamp to avoid misuse of atoi that
3688 "make maintainer-distcheck" complained about.
3689
3690 * examples/extexi (message): Don't print a message more than once,
3691 and omit line-number decoration that makes Emacs compile think
3692 that informative messages are worth worrying about.
3693
3694 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3695
3696 * configure.ac: Update version number.
3697
3698 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3699 accidentally.
3700 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3701 autogenerated by the maintainer.
3702 * examples/calc++/.cvsignore: Add *.yy.
3703
3704 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3705 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3706 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3707
3708 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3709
3710 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3711 from maintainer-distcheck about casting the argument of 'free'.
3712
3713 * NEWS: Mention recent yytname changes.
3714 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3715
3716 * bootstrap: For translations that have not yet been upgraded to
3717 the new runtime-po domain, prime the pump by extracting the
3718 relevant strings from the obsolete translations. This code can be
3719 removed once the bison-runtime domain has been translated by each
3720 team.
3721
3722 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3723 now that token names are already quoted.
3724
3725 Fix problem reported by Anthony Heading.
3726 * data/glr.c (YYTOKEN_TABLE): New macro.
3727 (yytname): Define if YYTOKEN_TABLE.
3728 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3729 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3730 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3731 * src/output.c (prepare_symbols): Output token_table_flag.
3732
3733 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3734
3735 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3736 again if the first call fails.
3737
3738 * data/glr.c (yytnamerr): New function.
3739 (yyreportSyntaxError): Use it to dequote most string literals.
3740 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3741 with other skeletons. All uses changed.
3742 (yytnameerr_): New function.
3743 (yyreport_syntax_error): Use it to dequote most string literals.
3744 * data/yacc.c (yytnamerr): New function.
3745 (yyerrlab): Use it to decode most string literals.
3746 * doc/bison.texinfo (Decl Summary, Calling Convention):
3747 Clarify quoting convention of yytname.
3748 * src/output.c (prepare_symbols): Quote all names. This undoes
3749 the 2005-04-17 change, which is now accomplished (mostly) via
3750 changes in the parsers as described above.
3751 * tests/regression.at (Token definitions, Web2c Actions):
3752 Undo most 2005-04-17 change here, too.
3753
3754 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3755
3756 Fix more problems reported by twlevo@xs4all.nl.
3757 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3758 remove trailing spaces. This loses the exit status of ./types,
3759 and isn't needed since ./types shouldn't be emitting trailing
3760 spaces.
3761 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3762 as the stack isn't valid in that case.
3763
3764 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3765 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3766 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3767 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3768 is used.
3769 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3770 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3771 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3772 Likewise.
3773
3774 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3775 overly-picky compilers that reject 'char *foo = "bar";'.
3776
3777 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3778 to FILE * parameter, not to stderr. This fixes a typo introduced
3779 in the 2005-07-12 change.
3780
3781 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3782 warnings from GCC 4.
3783
3784 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3785 (yyglrShiftDefer, yysplitStack):
3786 Remove unused parameters b4_pure_formals. All uses changed.
3787 (yyglrShift): Remove unused parameters b4_user_formals.
3788 All uses changed.
3789 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3790
3791 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3792
3793 Destructor cleanups and regularization among the three skeletons.
3794 * NEWS: Document the behavior changes.
3795 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3796 stack before failing, as the cleanup code will do it for us now.
3797 * data/lalr1.cc (yyerrlab): Likewise.
3798 * data/glr.c (yyparse): Pop everything off the stack before
3799 freeing it, so that destructors get called properly.
3800 * data/lalr1.cc (yyreturn): Likewise.
3801 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3802 This is more consistent.
3803 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3804 why destructors might be called. 1.875 -> 2.1.
3805 (Destructor Decl, Decl Summary, Table of Symbols):
3806 Some English-language cleanups for %destructor.
3807 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3808 Add output line for destructor of start symbol.
3809 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3810 because of that same extra output line.
3811
3812 * NEWS: Document minor wording changes in diagnostics of
3813 Bison-generated parsers.
3814 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3815 Remove unused formals. All uses changed.
3816 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3817 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3818 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3819 Rename yyoverflowab to yyexhaustedlab.
3820 When memory exhaustion occurs during syntax-error reporting,
3821 report it separately rather than in a single diagnostic; this
3822 eases translation.
3823 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3824 (Memory Exhausted): Renamed from Parser Stack Overflow.
3825 Revamp wording slightly to prefer "memory exhaustion".
3826 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3827
3828 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3829
3830 Add i18n support to the GLR skeleton. Partially fix the C++
3831 skeleton; a C++ expert needs to finish this. Remove debugging
3832 msgids; there's little point to having them translated, since they
3833 can be understood only by someone who can read the
3834 (English-language) source code.
3835
3836 Generate runtime-po/bison-runtime.pot automatically, so that we
3837 don't have to worry about garbage getting in that file. We'll
3838 make sure after the next official release that old msgids don't
3839 get lost. See
3840 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3841
3842 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3843 Now auto-generated.
3844 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3845 Fix typos in explanations of the runtime file.
3846 * bootstrap: Change gettext keyword from YYI18N to YY_.
3847 Use standard Makefile.in.in in runtime-po, since we'll arrange
3848 for backward-compatible bison-runtime.po files in a different way.
3849 * data/glr.c (YY_): New macro, from yacc.c.
3850 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3851 Translate messages intended for users.
3852 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3853 the wording in the other skeletons. We don't know that the memory
3854 is virtual.
3855 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3856 Use same method that yacc.c uses.
3857 Don't translate debugging messages.
3858 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3859 it doesn't work (yet), and requires C++ expertise to fix.
3860 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3861 Move defn to a more logical place, to be consistent with other
3862 skeletons.
3863 Don't translate debugging messages.
3864 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3865 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3866 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3867 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3868
3869 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3870 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3871 void, not int.
3872 * tests/glr-regression.at (Badly Collapsed GLR States):
3873 Likewise.
3874 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3875 yylex should return 0 at EOF rather than aborting.
3876
3877 Improve tests for stack overflow in GLR parser.
3878 Problem reported by twlevo@xs4all.nl.
3879 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3880 All uses removed.
3881 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3882 can handle the problem.
3883 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3884 (yyparse): New local variable yyresult to record the result.
3885 Use result of setjmp to set it, rather than storing itinto
3886 struct.
3887 (yyDone): Remove label.
3888 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3889 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3890 if YYABORT is used).
3891 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3892 yyparse status; put status > 1 into diagnostic.
3893 Check that status==2 works.
3894 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3895 Use exit status 3 for failure to open (which shouldn't happen).
3896
3897 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3898
3899 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3900 1 on syntax error; just let yyparse do its thing.
3901 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3902 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3903 (Exploding the Stack Size with Alloca):
3904 (Exploding the Stack Size with Malloc):
3905 Expect exit status 2, not 1, since the parser is supposed to blow
3906 its stack. Problem reported by twlevo@xs4all.nl.
3907
3908 * data/glr.c (yyparse): Don't assume that the initial calls
3909 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3910 Print a stack-overflow message and fail instead.
3911 Initialize the line-number information before creating the stack,
3912 so that the stack-overflow message can report line zero safely.
3913
3914 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3915
3916 Fix problems reported by twlevo@xs4all.nl.
3917 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3918 (yyuserMerge): Provide a default case if b4_mergers is empty.
3919 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3920 * tests/glr-regression.at
3921 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3922 Add casts to pacify C++ compilers.
3923 * tests/glr-regression.at (Improper merging of GLR delayed action
3924 sets): Declare yylex before using it.
3925 * tests/Makefile.am (maintainer-check-g++): Fix a stray
3926 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3927 test for valgrind; valgrind is independent of g++.
3928 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3929 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3930 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3931 Use a destructor, so that we can expand the stack. Change
3932 YYSTYPE to char * so that we can free it. Cast result of malloc.
3933
3934 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3935
3936 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3937 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3938
3939 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3940
3941 * PACKAGING: New file, suggested by Bruno Haible and taken from
3942 similar wording in gettext's PACKAGING file.
3943 * NEWS: Mention PACKAGING.
3944 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3945
3946 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3947
3948 * NEWS: Document recent i18n improvements.
3949 * bootstrap: Get runtime translations into runtime-po.
3950 Create runtime-po files automatically, if possible.
3951 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3952 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3953 does not infringe on the user's name space.
3954 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3955 * doc/bison.texinfo (Internationalization): Revamp the English
3956 and Texinfo syntax a bit, to try to make it clearer.
3957 (Bison Options, Option Cross Key): Mention --print-localedir.
3958 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3959 YYENABLE_NLS. Quote a bit more.
3960 * runtime-po/.cvsignore: New file.
3961 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3962 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3963 * runtime-po/quot.sed: Likewise.
3964 * runtime-po/boldquot.sed: Likewise.
3965 * runtime-po/en@quot.header: Likewise.
3966 * runtime-po/en@boldquot.header: Likewise.
3967 * runtime-po/insert-header.sin: Likewise.
3968 * runtime-po/remove-potcdate.sin: Likewise.
3969 * runtime-po/Makevars: Likewise.
3970 * runtime-po/LINGUAS: Likewise.
3971 * runtime-po/de.po: Likewise; we will rely on the translation project
3972 to maintain this, so "bootstrap" should get it.
3973 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
3974 its value.
3975 * src/main.c (main): Bind the bison-runtime domain, too.
3976
3977 2005-07-12 Bruno Haible <bruno@clisp.org>
3978
3979 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3980 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3981 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3982 * runtime-po: New directory.
3983 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3984 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3985 * runtime-po/Rules-quot: New file, copied from po/.
3986 * runtime-po/quot.sed: Likewise.
3987 * runtime-po/boldquot.sed: Likewise.
3988 * runtime-po/en@quot.header: Likewise.
3989 * runtime-po/en@boldquot.header: Likewise.
3990 * runtime-po/insert-header.sin: Likewise.
3991 * runtime-po/remove-potcdate.sin: Likewise.
3992 * runtime-po/Makevars: New file.
3993 * runtime-po/POTFILES.in: New file.
3994 * runtime-po/LINGUAS: New file.
3995 * runtime-po/bison-runtime.pot: New file.
3996 * runtime-po/de.po: New file.
3997 * m4/bison.m4: New file.
3998 * Makefile.am (SUBDIRS): Add runtime-po.
3999 (aclocaldir, aclocal_DATA): New variables.
4000 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4001 Define aclocaldir.
4002 * src/getargs.c (usage): Document --print-localedir option.
4003 (PRINT_LOCALEDIR_OPTION): New enum item.
4004 (long_options): Add --print-localedir option.
4005 (getargs): Handle --print-localedir option.
4006 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4007 (Internationalization): New section.
4008
4009 2005-07-12 Akim Demaille <akim@epita.fr>
4010
4011 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4012 for consistency with the rest of the code.
4013 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4014 Add separators.
4015
4016 2005-07-12 Akim Demaille <akim@epita.fr>
4017
4018 * src/parse-gram.y: Use %printer instead of YYPRINT.
4019
4020 2005-07-12 Akim Demaille <akim@epita.fr>
4021
4022 * src/symtab.h, src/symtab.c (symbol_print): New.
4023 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4024 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4025
4026 2005-07-12 Akim Demaille <akim@epita.fr>
4027
4028 * data/glr.c (b4_syncline): Fix (swap) the definitions of
4029 b4_at_dollar and b4_dollar_dollar.
4030
4031 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4032
4033 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4034 and Pennello's paper.
4035
4036 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4037
4038 * data/yacc.c (yyparse): Undo previous patch. Instead,
4039 set yylsp[0] and yyvsp[0] only if the initial action
4040 sets yylloc and yylval, respectively.
4041
4042 * data/yacc.c (yyparse): In the initial action, set
4043 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4044 This avoids the use of undefined variables if the initial
4045 action does not set yylloc and/or yylval.
4046
4047 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4048
4049 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4050 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4051 Remove from CVS. These files are automatically generated.
4052 * examples/extexi: Clarify that this file is now part of Bison,
4053 not GNU M4, and that it works with any POSIX-compatible Awk.
4054 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4055 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4056 so that we also get calc++-parser.yy. Geneate it.
4057 Use $(AWK), not gawk, since any conforming Awk will do.
4058 Put comment before action, since older 'make' can't handle comment
4059 in action.
4060 $(BUILT_SOURCES): List all built sources, not just some of them.
4061 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4062 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4063 $($(calc_sources_generated)): Remove unnecessary test for existence
4064 of target. (This had a shell syntax error anyway; a stray "x".)
4065 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4066 calc++-parser.yy.
4067 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4068
4069 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4070 implied by the other modules.
4071
4072 2005-07-06 Akim Demaille <akim@epita.fr>
4073
4074 Bind examples/calc++ to the package.
4075 * examples/calc++/Makefile: Remove, replaced by...
4076 * examples/calc++/Makefile.am: ... this new file.
4077 * examples/calc++/test: Remove input.
4078 * examples/calc++/compile: Remove.
4079 * examples/Makefile.am: New.
4080 * configure.ac, Makefile.am: Adjust.
4081 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4082
4083 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4084
4085 * data/glr.c (yyFail): Drastically simplify; since the format argument
4086 never had any % directives, we can simply pass it to yyerror.
4087 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4088 be modified later, as that is the usual style in glr.c.
4089 Problems reported by Paul Hilfinger.
4090
4091 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4092 and size overflow errors.
4093 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4094 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4095 (YYSIZEMAX): New macro.
4096 (yystpcpy): New function, taken from yacc.c.
4097 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4098 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4099 so that we don't have to maintain their signatures.
4100 (yyFail): Check for buffer overflow, by using vsnprintf rather
4101 than vsprintf. Allocate a bigger buffer if possible.
4102 Report an error if buffer allocation fails.
4103 (yyStackOverflow): New function.
4104 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4105 the initialization was successful. It might fail if storage was
4106 exhausted.
4107 (yyexpandGLRStack): Add more checks for storage allocation failure.
4108 Use yyStackOverflow to report failures.
4109 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4110 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4111 Don't assume stack number fits in int.
4112 (yysplitStack): Check for storage allocation failure.
4113 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4114 can print diagnostics on storage allocation failure. All callers
4115 changed.
4116 (yyresolveValue): Use yybool for boolean.
4117 (yyreportSyntaxError): Check for size-calculation overflow.
4118 This code is taken from yacc.c.
4119 (yyparse): Check for storage allocation errors when allocating
4120 the initial stack.
4121
4122 2005-07-05 Akim Demaille <akim@epita.fr>
4123
4124 Extract calc++ from the documentation.
4125 * doc/bison.texinfo (Calc++): Add the extraction marks.
4126 * examples/extexi: New, from the aborted GNU Programming 2E.
4127 Separate the different paragraph of a file with empty lines.
4128 * examples/Makefile: Use it to extract the whole calc++ example.
4129
4130 2005-06-24 Akim Demaille <akim@epita.fr>
4131
4132 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4133 class typedefs.
4134
4135 2005-06-22 Akim Demaille <akim@epita.fr>
4136
4137 * doc/bison.texinfo (C++ Language Interface): First stab.
4138 (C++ Parsers): Remove.
4139
4140 2005-06-22 Akim Demaille <akim@epita.fr>
4141
4142 * data/lalr1.cc (yylex_): Honor %lex-param.
4143
4144 2005-06-22 Akim Demaille <akim@epita.fr>
4145
4146 Start a set of simple examples.
4147 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4148 * examples/calc++/calc++-driver.hh,
4149 * examples/calc++/calc++-parser.yy,
4150 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4151 * examples/calc++/compile, examples/calc++/test: New.
4152
4153 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4154
4155 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4156 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4157 which stems from the 2005-05-27 patch.
4158
4159 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4160
4161 * data/glr.c: Modify treatment of unused parameters to permit use
4162 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4163
4164 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4165
4166 Fix infringement on user name space reported by Janos Zoltan Szabo.
4167 * data/yacc.c (yyparse): strlen -> yystrlen.
4168
4169 2005-05-30 Akim Demaille <akim@epita.fr>
4170
4171 * data/lalr1.cc (_): New.
4172 Translate the various messages.
4173
4174 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4175
4176 Fix infringement on user name space reported by Bruno Haible.
4177 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4178 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4179 the user's name space.
4180 (alloca): Include <stdlib.h> to get it, if it's not built in.
4181 (YYMALLOC, YYFREE): Define only if needed.
4182 (malloc, free): Declare, but only if needed, as this infringes on
4183 the user name space.
4184
4185 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4186
4187 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4188 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4189 with %d format.
4190 * lib/ebitset.c (min, max): Undef before defining.
4191 * lib/vbitset.c (min, max): Likewise.
4192 * lib/subpipe.c (create_subpipe): Save local variables in case
4193 vfork clobbers them.
4194
4195 2005-05-24 Bruno Haible <bruno@clisp.org>
4196
4197 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4198 error message syntax used by gcc-4.0.
4199
4200 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4201
4202 * README: Mention m4 1.4.3. Remove obsolete advice about
4203 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4204
4205 * bootstrap: Remove workaround for problem I encountered with
4206 gettext 0.14.1; it seems to be fixed now.
4207
4208 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4209
4210 * NEWS: Version 2.0a.
4211
4212 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4213 the previous change.
4214
4215 Various maintainer cleanups.
4216 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4217 conftest*, for benefit of CVS commands run at the same time as
4218 "configure". Add build-aux, since "bootstrap" now creates it and
4219 its subfiles.
4220 * Makefile.cfg (move_if_change): Remove.
4221 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4222 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4223 (po_repo, do-po-update, po-update, wget_files, get-targets):
4224 (config.guess-url_prefix, config.sub-url_prefix):
4225 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4226 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4227 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4228 Remove.
4229 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4230 this is now the recommended name.
4231 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4232 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4233 ylwrap. These files now go into build-aux.
4234 * config/move-if-change: Remove.
4235 * config/prev-version.txt: Bump from 1.75 to 2.0.
4236
4237 * bootstrap: Add stdio-safer, unistd-safer modules.
4238 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4239 we don't need it).
4240 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4241 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4242 * lib/subpipe.c: Include "unistd-safer.h".
4243 (create_subpipe): Make sure all the newly-created
4244 file descriptors are > 2, so that diagnostics don't
4245 get sent down them (which might cause Bison to hang, in theory).
4246 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4247 * src/files.c (xfopen): Use fopen_safer, not fopen.
4248
4249 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4250 yesterday's yacc.c fix.
4251
4252 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4253
4254 * data/glr.c, data/lalr1.cc: Update copyright date.
4255
4256 Fix a destructor bug reported by Wolfgang Spraul in
4257 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4258 * data/yacc.c (yyabortlab): Don't call destructor, and
4259 don't set yychar to EMPTY.
4260 (yyoverflowlab): Don't call destructor.
4261 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4262 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4263 since we no longer output the message "discarding lookahead token
4264 end of input ()".
4265
4266 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4267
4268 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4269 fix a small glitch in debugging output.
4270 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4271 after YY_SYMBOL_PRINT where needed.
4272
4273 (struct yyGLRState): Add some comments.
4274 (struct yySemanticOption): Add some comments.
4275 (union yyGLRStackItem): Add comment.
4276
4277 (yymergeOptionSets): Correct this to properly perform the union,
4278 avoiding infinite reported by Michael Rosien.
4279 Update comment.
4280
4281 * tests/glr-regression.at: Add test for GLR merging error reported
4282 by M. Rosien.
4283
4284 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4285
4286 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4287 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4288 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4289 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4290 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4291 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4292 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4293 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4294 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4295 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4296 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4297 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4298 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4299 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4300 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4301 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4302 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4303 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4304 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4305 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4306 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4307 src/output.h, src/parse-gram.c, src/parse-gram.h,
4308 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4309 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4310 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4311 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4312 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4313 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4314 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4315 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4316 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4317 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4318 tests/reduce.at, tests/regression.at, tests/sets.at,
4319 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4320 Update FSF postal mail address.
4321
4322 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4323
4324 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4325 Problem reported by Ralf Menzel.
4326
4327 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4328
4329 * tests/actions.at: Test that stack overflow invokes destructors.
4330 From Marcus Holland-Moritz.
4331 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4332 from here....
4333 (yyreturn): to here. That way, destructors are called properly
4334 even if the stack overflows, or the user calls YYACCEPT or
4335 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4336 (yyoverflowlab): Destroy the lookahead.
4337
4338 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4339
4340 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4341
4342 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4343
4344 * NEWS: Bison-generated C parsers no longer quote literal strings
4345 associated with tokens.
4346 * src/output.c (prepare_symbols): Don't escape strings,
4347 since users don't want to see C escapes.
4348 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4349 in diagnostics.
4350 * tests/input.at (Torturing the Scanner): Likewise.
4351 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4352
4353 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4354
4355 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4356 the data size is known to be too small and we can't increase it.
4357 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4358
4359 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4360
4361 * src/parse-gram.y: Include quotearg.h.
4362 (string_as_id): Quote $1 before using it as a key, since the
4363 lexer no longer quotes it for us.
4364 (string_content): Don't strip quotes, since lexer no longer
4365 quotes it for us.
4366 * src/scan-gram.l: Include quotearg.h.
4367 ("\""): Omit quote.
4368 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4369 a key, since the rest of the lexer doesn't quote it.
4370 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4371 * tests/regression.at (Token definitions): Check for backslashes
4372 in token strings.
4373
4374 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4375 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4376 (yyparse): Revamp code to generate long syntax error message, to
4377 make it easier to translate, and to avoid problems with arithmetic
4378 overflow. Change "virtual memory" to "memory" in diagnostic, since
4379 we don't know whether the memory is virtual.
4380
4381 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4382
4383 * NEWS: Bison-generated C parsers now use the _ macro to
4384 translate strings.
4385 * data/yacc.c (_) [!defined _]: New macro.
4386 All English strings wrapped inside this macro.
4387 * doc/bison.texinfo (Bison Parser): Document _.
4388 * po/POTFILES.in: Include src/parse-gram.c, since it now
4389 includes translateable strings that parse-gram.y doesn't.
4390
4391 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4392
4393 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4394 reverting the 2004-10-11 change to this function.
4395 (symbol_check_alias_consistency): Don't call symbol_type_set
4396 if the type name is already correct.
4397 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4398
4399 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4400
4401 * tests/regression.at (Token definitions): Don't use a token named
4402 c, as that generates a "#define c ..." that runs afoul of buggy
4403 stdlib.h that uses the identifier c as a member of struct
4404 drand48_data. Problem reported by Horst Wente.
4405
4406 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4407
4408 * bootstrap: Change translation URL from
4409 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4410 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4411 redirection glitches. Problem reported by twlevo@xs4all.nl.
4412
4413 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4414
4415 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4416 after operands; POSIX says this isn't portable for the c99 command.
4417
4418 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4419
4420 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4421 immediately if a data overrun has occurred; this may help us track
4422 down what may be a spurious failure on MacOS.
4423
4424 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4425
4426 Respond to problems reported by twlevo@xs4all.nl.
4427
4428 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4429
4430 * src/vcg.h: Comment fix.
4431 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4432 (G_CMAX): Change to -1 instead of INT_MAX.
4433
4434 * data/yacc.c (yyparse): Omit spaces before #line.
4435
4436 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4437
4438 * src/tables.c (state_number_to_vector_number): Put it inside an
4439 "#if 0", since it's not currently used. Problem reported by
4440 Roland McGrath.
4441
4442 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4443
4444 * src/output.c (escaped_output): Renamed from
4445 escaped_file_name_output, since we now use it for symbol tags as
4446 well. All uses changed.
4447 (symbol_destructors_output, symbol_printers_output):
4448 Escape symbol tags too.
4449 Problem reported by Matyas Forstner in
4450 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4451
4452 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4453 not needed.
4454 * src/output.c (user_actions_output, token_definitions_output,
4455 symbol_destructors_output, symbol_printers_output): Likewise.
4456 * src/reader.c (prologue_augment): Likewise.
4457 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4458
4459 * src/vcg.c (output_edge): Don't quote linestyle arg.
4460 Problem reported by twlevo@xs4all.nl.
4461
4462 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4463
4464 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4465 example, reported by Derek M Jones. Also, make the example even
4466 more outrageous, to better illustrate how bad the problem is.
4467
4468 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4469
4470 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4471 putsym. Typo reported by Sebastian Piping.
4472
4473 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4474
4475 * doc/bison.texinfo (Language and Grammar): some -> same
4476 (Epilogue): int he -> in the
4477 Typos reported by Sebastian Piping via Justin Pence.
4478
4479 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4480
4481 * tests/glr-regression.at (Improper handling of embedded actions
4482 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4483 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4484 with dollar signs in test names.
4485 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4486 for a similar reason.
4487
4488 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4489
4490 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4491 wants to redefine G_VIEW.
4492
4493 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4494
4495 * src/vcg.c (get_view_str): Remove case for normal_view.
4496 Problem reported by twlevo@xs4all.nl.
4497
4498 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4499
4500 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4501 Problem reported by twlevo@xs4all.nl.
4502
4503 * doc/bison.texinfo: Change @dircategory from "GNU programming
4504 tools" to "Software development". Requested by Richard Stallman
4505 via Karl Berry.
4506
4507 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4508
4509 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4510 Problem reported by twlevo@xs4all.nl.
4511
4512 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4513
4514 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4515 keyword; it's not needed with modern compilers, and it doesn't
4516 affect correctness with older compilers. Suggested by
4517 twlevo@xs4all.nl.
4518
4519 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4520
4521 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4522 gcc -Wswitch-default.
4523 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4524 * data/yacc.c (yyparse): Likewise.
4525
4526 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4527
4528 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4529 already. Let config.h define any nonstandard values.
4530
4531 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4532
4533 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4534 for the benefit of slower hosts. Problem reported by
4535 Nelson H. F. Beebe.
4536
4537 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4538
4539 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4540 being defined and not used.
4541 * data/lalr1.cc (yyparse): Likewise.
4542 Use "if (false)" rather than "if (0)".
4543
4544 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4545
4546 * TODO: Mention that we should allow NUL bytes in tokens.
4547
4548 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4549
4550 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4551 Problem reported by Hans Aberg.
4552
4553 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4554
4555 * src/getargs.c (version): Happy new year; update overall
4556 program copyright date from 2004 to 2005.
4557
4558 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4559 Problem reported by Hans Aberg.
4560 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4561 (Output file names.): Add a test for the case when standard output
4562 is closed.
4563
4564 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4565
4566 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4567 to fix an oversight in the Bison 2.0 manual.
4568
4569 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4570
4571 * NEWS: Version 2.0. Reformat the existing news items since
4572 1.875, so that related items are grouped together.
4573 * configure.ac (AC_INIT): Bump version to 2.0.
4574 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4575
4576 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4577 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4578 otherwise, we're not testing alloca. Unfortunately there's no
4579 simple way to consult HAVE_ALLOCA here.
4580
4581 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4582 for yymsg, too.
4583
4584 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4585 hand. This avoids a warning about comparing int to size_t when
4586 GCC warnings are enabled.
4587
4588 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4589
4590 * NEWS: Bison-generated parsers no longer default to using the
4591 alloca function (when available) to extend the parser stack, due
4592 to widespread problems in unchecked stack-overflow detection.
4593 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4594 responsibility to set it to a positive value. This lets the user
4595 specify a value that is not a preprocessor constant.
4596 * data/yacc.c (YYMAXDEPTH): Likewise.
4597 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4598 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4599 to be a compile-time constant. However, explain the constraints on it.
4600 Also, explain the constraints on YYINITDEPTH.
4601 (Table of Symbols): Explain that alloca is no longer the default.
4602 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4603 to 1.
4604
4605 * doc/bison.texinfo (Location Default Action): Mention that n must
4606 be zero when k is zero. Suggested by Frank Heckenbach.
4607
4608 2004-12-22 Akim Demaille <akim@epita.fr>
4609
4610 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4611 (parser::state_type, parser::semantic_type, parser::location_type):
4612 Private, not public.
4613 (parser::parse): Return ints, not bool.
4614 Returning a bool introduces a problem: 0 corresponds to false, and
4615 it seems weird to return false on success. Returning true changes
4616 the conventions for yyparse.
4617 Alternatively we could return void and send an exception.
4618 There is no clear consensus (yet?).
4619 (state_stack, semantic_stack, location_stack): Rename as...
4620 (state_stack_type, semantic_stack_type, location_stack_type): these.
4621 Private, not public.
4622 * tests/c++.at: New.
4623 * tests/testsuite.at, tests/Makefile.am: Adjust.
4624
4625 2004-12-21 Akim Demaille <akim@epita.fr>
4626
4627 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4628
4629 2004-12-21 Akim Demaille <akim@epita.fr>
4630
4631 Don't impose std::string for filenames.
4632
4633 * data/lalr1.cc (b4_filename_type): New.
4634 (position::filename): Use it.
4635 (parser.hh): Move the inclusion of stack.hh and location.hh below
4636 the user code, so that needed headers for the filename type can be
4637 included first.
4638 Forward declare them before the user code.
4639 * tests/Makefile.am (check-local, installcheck-local): Pass
4640 TESTSUITEFLAGS to the TESTSUITE.
4641
4642 2004-12-20 Akim Demaille <akim@epita.fr>
4643
4644 Use more STL like names: my_class instead of MyClass.
4645
4646 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4647 (SemanticStack, SemanticType, StateStack, StateType)
4648 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4649 (Parser::value): Rename as...
4650 (location_stack, location_type, rhs_number_type, semantic_stack)
4651 (semantic_type, state_stack, state_type, token_number_type, stack)
4652 (slice, traits, parser::yylloc, parser::yylval): these.
4653
4654 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4655
4656 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4657
4658 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4659 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4660
4661 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4662
4663 Remove uses of 'short int' and 'unsigned short int'. This raises
4664 some arbitrary limits. It uses more memory but nowadays that's
4665 not much of an issue.
4666
4667 This change does not affect the generated parsers; that's a different
4668 task, as some users will want to conserve memory there.
4669
4670 Ideally we should use size_t to represent all object counts, and
4671 something like ptrdiff_t to represent signed differences of object
4672 counts; but that will require more code-cleanup than I have the
4673 time to do right now.
4674
4675 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4676 Use size_t, not int or short int, to count objects.
4677 * src/closure.c (nritemset, closure): Likewise.
4678 * src/closure.h (nritemset, closure): Likewise.
4679 * src/nullable.c (nullable_compute): Likewise.
4680 * src/print.c (print_core): Likewise.
4681 * src/print_graph.c (print_core): Likewise.
4682 * src/state.c (state_compare, state_hash): Likewise.
4683 * src/state.h (struct state): Likewise.
4684 * src/tables.c (default_goto, goto_actions): Likewise.
4685
4686 * src/gram.h (rule_number, rule): Use int, not short int.
4687 * src/output.c (prepare_rules): Likewise.
4688 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4689 errs, reductions): Likewise.
4690 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4691 Likewise.
4692 * src/tables.c (vector_number, tally, action_number,
4693 ACTION_NUMBER_MINIMUM): Likewise.
4694 * src/output.c (muscle_insert_short_int_table): Remove.
4695
4696 2004-12-17 Akim Demaille <akim@epita.fr>
4697
4698 * data/lalr1.cc: Extensive Doxygenation.
4699 (error_): Rename as...
4700 (error): this, since it is visible to the user.
4701 Adjust callers.
4702 (Parser::message): Now an automatic variable from...
4703 (Parser::yyreport_syntax_error_): here.
4704 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4705 Parser::error.
4706 * tests/input.at: Escape $.
4707
4708 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4709
4710 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4711 Parenthesize rhs to avoid obscure problems with mistakes like
4712 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4713 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4714 b4_rhs_location): Likewise.
4715 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4716 b4_rhs_location): Likewise.
4717
4718 2004-12-16 Akim Demaille <akim@epita.fr>
4719
4720 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4721 yacc.c: be sure to stay within yycheck_.
4722 * tests/actions.at: Re-enable C++ tests.
4723
4724 2004-12-16 Akim Demaille <akim@epita.fr>
4725
4726 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4727 real.
4728
4729 2004-12-16 Akim Demaille <akim@epita.fr>
4730
4731 Use #define to handle the %name-prefix.
4732
4733 * data/glr.c, data/yacc.c: Comment changes.
4734 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4735 so that one can refer to yylex in the parser file, and have it
4736 renamed, as is the case with other skeletons.
4737
4738 2004-12-16 Akim Demaille <akim@epita.fr>
4739
4740 Move lalr1.cc internals into yy*.
4741
4742 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4743 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4744 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4745 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4746 (empty_, final_, terror_, errcode_, ntokens_)
4747 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4748 (looka_, ilooka_, error_range_, nerrs_):
4749 Rename as...
4750 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4751 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4752 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4753 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4754 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4755 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4756 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4757 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4758 these.
4759
4760 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4761
4762 Fix some problems reported by twlevo at xs4all.
4763 * src/symtab.c (symbol_new): Report an error if the input grammar
4764 contains too many symbols. This is better than calling abort() later.
4765 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4766 (struct node, struct graph):
4767 Rename member expand to stretch. All uses changed.
4768 (struct graph): Remove member layoutalgorithm. All uses removed.
4769 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4770 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4771 All uses changed.
4772 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4773
4774 2004-12-15 Akim Demaille <akim@epita.fr>
4775
4776 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4777 Add more Doxygen comments.
4778 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4779 (report_syntax_error_, translate_): Rename as...
4780 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4781 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4782
4783 2004-12-15 Akim Demaille <akim@epita.fr>
4784
4785 * data/lalr1.cc (lex_): Rename as...
4786 (yylex_): this.
4787 Move the trace here.
4788 Take the %name-prefix into account.
4789 Reported by Alexandre Duret-Lutz.
4790
4791 2004-12-15 Akim Demaille <akim@epita.fr>
4792
4793 Simplify the C++ parser constructor.
4794
4795 * data/lalr1.cc (debug_): Rename as...
4796 (yydebug_): so that the parser's internals are always in the yy*
4797 pseudo namespace.
4798 Adjust uses.
4799 (b4_parse_param_decl): Remove the leading comma as it is now only
4800 called as unique argument list.
4801 (Parser::Parser): Remove the constructor accepting a location and
4802 an initial debugging level.
4803 Remove from the other ctor the argument for the debugging level.
4804 (debug_level_type, debug_level, set_debug_level): New.
4805
4806 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4807 constructor calls.
4808
4809 2004-12-15 Akim Demaille <akim@epita.fr>
4810
4811 Remove b4_root related material: failure experiment
4812 (which goal was to allow to derive from a class).
4813
4814 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4815 definitions and uses.
4816
4817 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4818
4819 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4820 not 2, since it's not portable to subtract 1 from the start of an
4821 array. The new item 0 is never set or used. All uses changed.
4822
4823 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4824 the default definition of YYLLOC_DEFAULT. Problem reported
4825 by Frank Heckenbach.
4826
4827 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4828
4829 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4830 the normal case and one for the error case. Just use the
4831 first one uniformly. Problem reported by Frank Heckenbach.
4832 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4833 use exactly the same macro in both places.
4834 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4835 so that the normal-case YYRHSLOC works for the error case too.
4836 All uses changed.
4837 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4838 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4839 * doc/bison.texinfo (Location Default Action): Don't claim that
4840 we have an array of locations. Use the same macro for both glr
4841 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4842 the index is 0.
4843
4844 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4845
4846 * HACKING: Update email addresses to send announcements to.
4847
4848 * configure.ac (AC_INIT): Bump version to 1.875f.
4849
4850 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4851
4852 * NEWS: Version 1.875e.
4853 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4854
4855 * src/scan-skel.l: Include "complain.h", for "fatal".
4856
4857 * src/relation.h (relation_print, relation_digraph):
4858 Relation sizes are of type relation_node, not size_t (this is
4859 merely a doc fix, since the two types are equivalent).
4860 (relation_transpose): Relation sizes are of type relation_node,
4861 not int.
4862 * src/relation.c: Likewise.
4863 (top, infinity): Now of type relation_node, not int.
4864 (traverse, relation_transpose): Use relation_node, not int.
4865
4866 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4867 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4868 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4869
4870 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
4871 specifying whether the test should be skipped. Use it tp
4872 specify that the [%defines %skeleton "lalr1.cc"] tests currently
4873 fail on some hosts, and should be skipped.
4874
4875 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4876
4877 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4878 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4879 unless otherwise specified below.
4880
4881 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4882 to allocate kernel_base, kernel_items, kernel_size, since
4883 they needn't be initialized to 0.
4884 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4885 * src/closure.c (new_closure): Likewise, for itemset.
4886 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4887 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4888 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4889 (build_relations): Likewise for edge, states1, includes.
4890 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4891 * src/reader.c (packgram): Likewise, for ritem, rules.
4892 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4893 * src/relation.c (relation_digraph): Likewise for VERTICES.
4894 (relation_transpose): Likewise for new_R, end_R.
4895 * src/symtab.c (symbols_token_translations_init): Likewise for
4896 token_translations.
4897 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4898 (token_actions): Likewise for yydefact, actrow, conflrow,
4899 conflict_list.
4900 (save_column): Likewise for froms[symno], tos[symno].
4901 (goto_actions): Likewise for state_count.
4902 (pack_table): Likewise for base, pos, check.
4903 (tables_generate): Likewise for width.
4904
4905 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4906 for initial core. Just have a separate core, so we needn't worry
4907 about whether kernel_size and kernel_base are initialized.
4908
4909 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4910 kernel_size, kernel_items): Remove unnecessary initialization.
4911 * src/conflicts.c (conflicts): Likewise.
4912 * src/derives.c (derives): Likewise.
4913 * src/muscle_tablc (muscle_insert): Likewise.
4914 * src/relation.c (relation_digraph): Likewise.
4915 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4916 conflrow, conflict_table, conflict_list, table, check):
4917 Likewise.
4918
4919 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4920 This is because all callers pass unsigned int.
4921 * src/closure.h (new_closure): Likewise.
4922
4923 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4924 (build_relations): Initialize includes[i] in all cases.
4925 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4926 and rules[ruleno].precsym. Initialize members in order.
4927 * src/relation.c (relation_transpose): Always initialize new_R[i]
4928 and end_R[i].
4929 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4930
4931 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4932 conflict_list[0] was always 0, but now it isn't initialized.
4933
4934 * src/table.c (table_grow): When conflict_table grew, the grown
4935 area wasn't cleared. Fix this.
4936
4937 * lib/.cvsignore: Add strdup.c, strdup.h.
4938 * m4/.cvsignore: Add strdup.m4.
4939
4940 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4941
4942 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4943 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4944 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4945 ngotos + 1 without checking for overflow.
4946 (build_relations): Use END_NODE, not -1, to denote end of edges.
4947 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4948 build_relations): Use goto_number, not int, for goto numbers.
4949 * src/tables.c (save_column, default_goto): Likewise.
4950
4951 2004-11-23 Akim Demaille <akim@epita.fr>
4952
4953 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4954 of #defining from yystype.
4955 Don't typedef yystype, C++ does not need it.
4956 This lets it possible to forward declare it as union.
4957
4958 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4959
4960 * bootstrap (gnulib_modules): Add extensions.
4961 Problem reported by Jim Meyering.
4962
4963 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4964
4965 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4966 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4967 src/system.h, src/tables.c: XFREE -> free, to accommodate
4968 recent change to gnulib xalloc.h.
4969 Problem reported by Jim Meyering.
4970
4971 2004-11-17 Akim Demaille <akim@epita.fr>
4972
4973 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4974
4975 2004-11-17 Akim Demaille <akim@epita.fr>,
4976 Alexandre Duret-Lutz <adl@gnu.org>
4977
4978 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4979 changes.
4980 (YYCDEBUG): Adjust.
4981 Use it instead of cdebug_.
4982 (Parser::debug_stream, Parser::set_debug_stream): New.
4983 (Parser::symprint_): Define cdebug_ for temporary backward
4984 compatibility.
4985 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4986 debug_stream ().
4987
4988 2004-11-17 Akim Demaille <akim@epita.fr>
4989
4990 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4991 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4992 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4993 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4994
4995 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4996
4997 * data/glr.c (yyloc_default): Remove; not used.
4998 Problem reported by Frank Heckenbach.
4999
5000 2004-10-25 Akim Demaille <akim@epita.fr>
5001
5002 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5003 Introduce another definition to address simple location arrays.
5004 (yyGLRStack): New member: yyerror_range.
5005 (yyrecoverSyntaxError, yyparse): Update it.
5006 (yyrecoverSyntaxError): Use it when shifting the error token to
5007 have an accurate range, equivalent to the one computed by both
5008 yacc.c and lalr1.cc.
5009 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5010 that column numbers start at column 0, as per GNU Coding
5011 Standards, the others tests, and the doc.
5012 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5013 Adjust to the above change (first column is 0).
5014 And adjust the location of the "<error>", now covering the whole
5015 line.
5016
5017 2004-10-22 Akim Demaille <akim@epita.fr>
5018 and Paul Eggert <eggert@cs.ucla.edu>
5019
5020 Remove some arbitrary limits on goto numbers and relations.
5021 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5022 initial values, since they're never used.
5023 (set_goto_map): ngotos is now unsigned, so test for overflow
5024 by seeing whether it wraps around to zero.
5025 * src/lalr.h (goto_number): Now size_t, not short int.
5026 (GOTO_NUMBER_MAXIMUM): Remove.
5027 * src/relation.c (relation_print, traverse, relation_transpose):
5028 Check for END_NODE rather than looking at sign.
5029 * src/relation.h (END_NODE): New macro.
5030 (relation_node): Now size_t, not short int.
5031
5032 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5033
5034 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5035 keyword, not an identifier. Problem reported by Baron Schwartz in
5036 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5037
5038 2004-10-11 Akim Demaille <akim@epita.fr>
5039
5040 * src/symtab.c (symbol_check_alias_consistency): Also check
5041 type names, destructors, and printers.
5042 Reported by Alexandre Duret-Lutz.
5043 Recode the handling of associativity and precedence in terms
5044 of symbol_precedence_set.
5045 Accept no redeclaration at all, not even equal to the previous
5046 value.
5047 (redeclaration): New.
5048 Use it to factor redeclaration complaints.
5049 (symbol_make_alias): Don't set the type of the alias, let
5050 symbol_check_alias_consistency do it as for other features.
5051 * src/symtab.h (symbol): Add new member prec_location, and
5052 type_location.
5053 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5054 * tests/input.at (Incompatible Aliases): New.
5055
5056 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5057
5058 .cvsignore fixes to accommodate gnulib changes,
5059 and the practice of naming build directories "_build".
5060 * .cvsignore: Add "_*". Sort.
5061 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5062 * m4/.cvsignore: Add "*_gl.m4".
5063
5064 2004-10-06 Akim Demaille <akim@epita.fr>
5065
5066 * src/parse-gram.y (add_param): Fix the truncation of trailing
5067 spaces.
5068
5069 2004-10-05 Akim Demaille <akim@epita.fr>
5070
5071 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5072 whether the reducion was empty or not. This leaves room to
5073 improve the use of YYLLOC_DEFAULT in such a case.
5074 lalr1.cc is still experimental, so changing this is acceptable.
5075 And finally, there are probably not many users who changed the
5076 handling of locations in GLR, so changing is admissible too.
5077
5078 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5079 empty reduction, set @$ to an empty location ending the previously
5080 stacked symbol.
5081 Adjust uses to make sure the code is triggered on empty
5082 reductions.
5083 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5084 expected output: empty reductions have empty locations.
5085
5086 2004-09-29 Akim Demaille <akim@epita.fr>
5087
5088 * data/lalr1.cc: Move towards a more standard C++ coding style
5089 for templates: Class < T > -> Class<T>.
5090
5091 2004-09-29 Akim Demaille <akim@epita.fr>
5092
5093 * data/lalr1.cc: Reinstall the former ctor, for sake of
5094 compatibility, but warn it will be removed.
5095 Move towards a more standard C++ coding style (i.e., type *var ->
5096 type* var).
5097
5098 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5099
5100 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5101 since it's less likely to work if NULs are involved in the future.
5102
5103 2004-09-27 Akim Demaille <akim@epita.fr>
5104
5105 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5106
5107 2004-09-27 Akim Demaille <akim@epita.fr>
5108
5109 * data/lalr1.cc (b4_parse_param_decl_1): New.
5110 (b4_parse_param_decl): Use it to have different names between attribute
5111 and argument names.
5112 (b4_cc_constructor_call): Likewise.
5113
5114 2004-09-24 Akim Demaille <akim@epita.fr>
5115
5116 * src/parse-gram.y (add_param): Strip the leading and trailing
5117 blanks from a formal argument declaration.
5118 (YY_LOCATION_PRINT): New.
5119
5120 2004-09-24 Akim Demaille <akim@epita.fr>
5121
5122 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5123 after the location.
5124
5125 2004-09-24 Akim Demaille <akim@epita.fr>
5126
5127 * doc/bison.texinfo (Table of Symbols): Sort.
5128
5129 2004-09-21 Akim Demaille <akim@epita.fr>
5130
5131 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5132 the useless parentheses.
5133 Suggested by Paul Eggert.
5134
5135 2004-09-20 Akim Demaille <akim@epita.fr>
5136
5137 Let the initial-action act on the look-ahead, and use it for the
5138 "initial push" (corresponding to an hypothetical beginning-of-file).
5139 And let lalr1.cc honor %initial-action.
5140
5141 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5142 example.
5143 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5144 (Parser::Parser): Remove the ctor that used to initialize it.
5145 (Parser::parse): Like in the other skeletons, issue the "starting
5146 parse" message before any action.
5147 Honor %initial-action.
5148 Initialize the stacks with the lookahead.
5149 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5150 look-ahead.
5151 Push them in the stacks.
5152 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5153
5154 2004-09-20 Akim Demaille <akim@epita.fr>
5155
5156 * doc/bison.texinfo (Initial Action Decl): New.
5157
5158 2004-09-20 Akim Demaille <akim@epita.fr>
5159
5160 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5161 clearer criterion to define it.
5162 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5163 When reducing on an empty RHS, use the latest stacked location as
5164 location.
5165 yylloc is not always available.
5166 * data/glr.c: Likewise.
5167 Also, honor initial-actions.
5168
5169 2004-09-20 Akim Demaille <akim@epita.fr>
5170
5171 * data/yacc.c (YY_LOCATION_PRINT): New.
5172 Define when we know YYLTYPE's structure, i.e., when the default
5173 YYLLOC_DEFAULT is used.
5174 * data/c.m4 (b4_yysymprint_generate): Use it.
5175 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5176 value of the result.
5177 (error_start_): Replace with...
5178 (error_range_): this location array.
5179 This allows to replace code relying on the implementation of
5180 locations by portable code.
5181 * data/yacc.c (yylerrsp): Replace with...
5182 (yyerror_range): this.
5183 Every time a token is popped, update yyerror_range[0], to have an
5184 accurate location for the error token.
5185 * data/glr.c (YY_LOCATION_PRINT): New.
5186 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5187 deference a pointer.
5188 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5189 report the location in %printers.
5190
5191 * src/scan-skel.l: Instead of abort, report error messages to ease
5192 understanding skeleton scanning failures.
5193
5194 2004-09-16 Akim Demaille <akim@epita.fr>
5195
5196 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5197 (iterator, const_iterator): these, to be more in the C++ spirit.
5198 Also, return reverse iterators so that when displaying the stack
5199 we display its bottom first.
5200 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5201 from yacc.c.
5202 We should probably use vector here though.
5203
5204 2004-09-16 Akim Demaille <akim@epita.fr>
5205
5206 Have more complete shift traces.
5207
5208 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5209 to report Shifts instead of ad hoc YYDPRINTF invocations,
5210 including for the error token.
5211 * data/lalr1.cc (symprint_): Output the location.
5212 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5213 output the location within the %printer.
5214 Activate GLR tests, at least to make sure they compile properly.
5215 They still don't pass though.
5216 * tests/calc.at: Adjust expect verbose output, since now "Entering
5217 state..." is on a different line than the "Shifting" message.
5218
5219 2004-09-08 Akim Demaille <akim@epita.fr>
5220
5221 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5222 Bison directive from the Bison file to the invocation of this
5223 macro, so that these directives are passed to
5224 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5225 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5226 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5227 the extra Bison directives instead of the whole series.
5228 Change the grammar so that there are recoverable errors, and
5229 unrecoverable errors. Now we can have the parser give up before
5230 consuming the whole input. As a result we now can observe that
5231 the lookahead is freed when needed.
5232 Change the parser source to parse argv[1] instead of a hard coded
5233 string.
5234 Simplify yylex, and give a value and location to EOF.
5235 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5236 passed directives already coded in the file.
5237 Add some tests to check the location of "error".
5238 For some tests, the C++ parser is correct, and not yacc.c.
5239 For other tests, they provide different, but unsatisfying, values,
5240 so keep the C++ value so that at least one parser is "correct"
5241 according to the test suite.
5242 (Actions after errors): Remove, this is subsumed by the
5243 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5244
5245 2004-09-06 Akim Demaille <akim@epita.fr>
5246
5247 * data/lalr1.cc: Adjust the indentation of the labels.
5248 (Parser::pop): New.
5249 Use it.
5250
5251 2004-09-06 Akim Demaille <akim@epita.fr>
5252
5253 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5254 argument, an informative message.
5255 Call YY_SYMBOL_PRINT.
5256 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5257 * data/lalr1.cc (destruct_): Likewise.
5258 In addition, no longer depend on b4_yysymprint_generate and
5259 b4_yydestruct_generate to generate these functions, do it "by
5260 hand".
5261
5262 2004-09-03 Akim Demaille <akim@epita.fr>
5263
5264 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5265 invoked, yydestruct the lookahead.
5266 * tests/calc.at (Calculator $1): Update the expected lengths of
5267 traces: there is an added line for the discarded lookahead.
5268 * doc/bison.texinfo (Destructor Decl): Some rewording.
5269 Define "discarded" symbols.
5270
5271 2004-09-02 Akim Demaille <akim@epita.fr>
5272
5273 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5274
5275 2004-09-02 Akim Demaille <akim@epita.fr>
5276
5277 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5278 (YYDSYMPRINTF): Rename as...
5279 (YY_SYMBOL_PRINT): this.
5280 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5281 two.
5282 Use it instead of direct symprint_ calls.
5283 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5284 one.
5285
5286 2004-09-02 Akim Demaille <akim@epita.fr>
5287
5288 * data/lalr1.cc (b4_yysymprint_generate): New.
5289 (symprint_): New member function, defined when YYDEBUG.
5290 Use it consistently instead of token/nterm debugging output by
5291 hand.
5292 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5293 %printer calls to use cdebug_ when using lalr1.cc.
5294
5295 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5296
5297 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5298 with #ifdef YYDEBUG.
5299
5300 2004-08-26 Akim Demaille <akim@epita.fr>
5301
5302 * doc/bison.texinfo (Implementing Loops): Rename as...
5303 (Implementing Gotos/Loops): this.
5304
5305 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5306
5307 Adjust to latest gnulib.
5308 * bootstrap (gnulib_modules): Add xalloc-die.
5309 Set LC_ALL=C so that file names sort consistently.
5310 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5311 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5312 uintmax_t.m4, ulonglong.m4.
5313 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5314 po.m4 since we are now using _gl.m4 instead.
5315
5316 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5317
5318 * src/scan-action.l: Remove. Scanning of semantic actions is
5319 handled in scan-gram.l.
5320
5321 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5322
5323 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5324
5325 * src/location.h (struct): The file member is a uniqstr.
5326 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5327
5328 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5329
5330 Fix bug with non-%union parsers that have printers or destructors,
5331 which led to a Bison core dump. Reported by Peter Fales in
5332 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
5333
5334 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5335 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5336 not to our own type.
5337 * src/output.c (symbol_destructors_output, symbol_printers_output):
5338 Don't assume %union.
5339 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5340 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5341 UNION-FLAG. All callers changed.
5342 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5343 Use type char, not unsigned int, when declaring an array of char;
5344 this lets us remove a cast.
5345 (Printers and Destructors): Add non-%union test cases.
5346
5347 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5348
5349 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5350 GLR writeups. E.g., avoid frenchspacing and the future tense,
5351 change "lookahead" to "look-ahead", and change "wrt" to "with
5352 respect to".
5353
5354 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5355
5356 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5357 New sections, split off from the GLR Parsers section. Put the new
5358 Simple GLR Parser near the start of the GLR section, for clarity.
5359 Rewrite connective text.
5360
5361 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
5362
5363 * doc/bison.texinfo (Simple GLR Parsers): New section.
5364
5365 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5366
5367 * NEWS, TODO, doc/bison.texinfo:
5368 Use "look-ahead" instead of "lookahead", to be consistent.
5369 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5370 while we're fixing "look-ahead".
5371 * src/conflicts.c (shift_set): Renamed from shiftset.
5372 (look_ahead_set): Renamed from lookaheadset.
5373 * src/print.c: Likewise.
5374 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5375 name for "lookahead".
5376 (report_types, usage): Likewise.
5377 * src/getargs.h (report_look_ahead_tokens): Renamed from
5378 report_lookaheads.
5379 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5380 compute_lookaheads.
5381 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5382 (look_ahead_tokens_print): Renamed from lookaheads_print.
5383 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5384 state_rule_lookaheads_print.
5385 * src/state.h: Likewise.
5386 (reductions.look_ahead_tokens): Renamed from lookaheads.
5387 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5388 AT_DATA_LOOKAHEADS_GRAMMAR.
5389
5390 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5391
5392 * README: Update location of patched M4 distribution.
5393
5394 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5395
5396 Don't assume the C++ compiler takes the same arguments as the C compiler
5397 (trivial change).
5398 * configure.ac (O0CXXFLAGS): New var.
5399 * tests/atlocal.in (CXXFLAGS): Use it.
5400
5401 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5402
5403 Fix some "make check" problems with C++ reported by
5404 Albert Chin-A-Young for Tru64 C++ in this thread:
5405 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5406
5407 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5408 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5409 Output to a .cc file for C++, not to a .c file.
5410 * tests/calc.at (AT_CHECK_CALC): Likewise.
5411 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5412 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5413
5414 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5415
5416 * tests/calc.at, tests/actions.at: Workaround for SGI
5417 C++ compiler. (trivial change)
5418
5419 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5420
5421 Spent a few hours checking out which prerequisite versions the
5422 current sources actually require. I went all the way back to
5423 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5424 a seemingly endless set of combinations of versions more recent
5425 than that. The bottom line is that the current sources require
5426 fairly recent versions of the build tools, and it'll be some work
5427 to change this.
5428 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5429 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5430 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5431 Add comments explaining why those particular versions are
5432 currently needed.
5433
5434 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5435 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
5436 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
5437
5438 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5439 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5440
5441 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5442
5443 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5444 0.11.5. Suggested by Bruno Haible.
5445 * bootstrap: Remove gettext version checking.
5446
5447 * doc/bison.texinfo (Decl Summary): Also mention that %union
5448 can depend on prerequisite types. Problem reported by Tim
5449 Van Holder.
5450
5451 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5452
5453 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5454 * README-alpha: Don't tell people not to package this.
5455
5456 * bootstrap: Don't assume $(...) works; use `...` instead.
5457 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5458 gettext better.
5459
5460 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5461 put into the -d output file, and mention what to do if YYSTYPE is
5462 defined as a macro.
5463
5464 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5465
5466 Undo change made earlier today: it caused autopoint to not bring
5467 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5468 autopoint's.
5469
5470 * bootstrap: Check that gettext version matches what's in
5471 configure.ac. Warn users to ignore robots.txt ERROR 404.
5472 * bootstrap: Undo today's earlier change (logged below).
5473 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5474
5475 The gettext version checking is causing more trouble than it's
5476 curing; remove it. Problem reported by Paul Hilfinger.
5477
5478 * bootstrap: Issue a warning that one can expect a message
5479 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5480 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5481
5482 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5483
5484 Ensure that the C++ compiler used for testing actually works on a
5485 simple test program; if not, skip the C++-related tests. Problem
5486 reported by Vin Shelton in:
5487 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5488
5489 * m4/cxx.m4: New file.
5490 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5491 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5492 * tests/local.at (AT_COMPILE_CXX): Use it.
5493
5494 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5495
5496 * data/glr.c (yylloc): Output this macro even if locations are not
5497 being generated, as the GLR parser needs it even in that case.
5498 Problem reported by Troy A. Johnson
5499 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5500
5501 * configure.ac (AC_INIT): Update to 1.875e.
5502
5503 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5504
5505 * NEWS: Version 1.875d.
5506 * configure.ac (AC_INIT): Likewise.
5507 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5508
5509 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5510 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5511 lalr1.cc runs afoul of the first, and the last two are no longer
5512 supported by GCC 3.4.0.
5513 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5514 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5515
5516 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5517
5518 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5519 unsigned int, for compatibility with latest gnulib hash module.
5520 * src/state.c (state_hash, state_hasher): Likewise.
5521 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5522 * src/uniqstr.c (hash_uniqstr): Likewise.
5523
5524 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5525
5526 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5527
5528 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5529 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5530 character and string literals.
5531 (unexpected_end): New function.
5532 (unexpected_eof): Use it.
5533 (unexpected_newline): New function.
5534 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5535 actions.
5536
5537 * NEWS: Document %expect-rr.
5538
5539 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5540 Fix typo by replacing $1 with $option.
5541 Remove more 'intl'-related files.
5542 Don't DEFUN AM_INTL_SUBDIR twice.
5543
5544 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5545 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5546 strtoul.c.
5547 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5548 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5549 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5550 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5551 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5552 * src/.cvsignore: Add *.output.
5553
5554 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5555 gets copied to the output file.
5556
5557 2004-04-28 Paul Eggert <eggert@twinsun.com>
5558
5559 Get files from the gnulib and po repositories, instead of relying
5560 on them being in our CVS. Upgrade to latest versions of gnulib
5561 and Automake.
5562
5563 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5564 * bootstrap: Bootstrap from gnulib and po repositories.
5565 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5566 * README-cvs: Document these changes. Remove version numbers from
5567 mentions of build tools, since they change so often. Mention Flex.
5568
5569 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5570 (gl_USE_SYSTEM_EXTENSIONS): Add.
5571 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5572 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5573 does this for us.
5574 (AC_ISC_POSIX): Remove; we no longer support this
5575 ancient OS, as it gets in the way of latest Autoconf & gnulib.
5576 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5577 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5578 Do not check for C89 headers, except for locale.h which is used
5579 by the Yacc library and must port to K&R hosts.
5580 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5581 Do not check for C89 functions, except for setlocale which is
5582 used by the Yacc library.
5583 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5584 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5585 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5586 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5587 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5588 AM_GNU_GETTEXT): Remove; now done by:
5589 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5590 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5591 for us.
5592
5593 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5594 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5595 Define to empty, as gnulib.mk will do the rest for us.
5596 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5597 for us.
5598 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5599 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5600
5601 * src/files.c: Include gnulib's xstrndup.h.
5602
5603 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5604 (REALLOC): Use xnrealloc, for likewise.
5605 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5606 (strnlen, memrchr): Remove decls; functions no longer used.
5607 Include <stpcpy.h>.
5608
5609 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5610 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5611 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5612 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5613 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5614 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5615 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5616 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5617 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5618 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5619 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5620 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5621 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5622 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5623 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5624 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5625 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5626 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5627 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5628 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5629 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5630 Remove, as these files are now generated automatically
5631 by bootstrap or automake.
5632
5633 * po/ChangeLog: Remove: all but one entry was a duplicate
5634 of this file, and I moved that 2000-11-02 entry here.
5635
5636 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5637 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5638 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5639 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5640 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5641 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5642 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5643 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5644 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5645 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5646 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5647 xstrndup.h.
5648 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5649 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5650 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5651 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5652 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5653 * src/.cvsignore: Remove *_.c.
5654
5655
5656 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5657 support it. (The latest stable gzip doesn't.)
5658
5659 2004-04-27 Paul Eggert <eggert@twinsun.com>
5660
5661 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5662 case, as stos_ is now used by destructors due to the 2004-02-09
5663 change.
5664
5665 Remove more K&R C support.
5666 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5667 * lib/subpipe.c (errno): Remove decl.
5668 Include <stdlib.h> unconditionally.
5669 (EXIT_FAILURE): Remove macro.
5670 * src/complain.c (vfprintf, strerror): Remove.
5671 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5672 unconditionally.
5673 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5674 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5675 (strchr, strspn, memchr): Remove decls.
5676 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5677 unconditionally. Do not declare perror.
5678 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5679 unconditionally.
5680
5681 * src/complain.c (_): Remove useless defn, as system.h defines this.
5682
5683 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5684 with latest obstack.h.
5685 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5686 to procedure types, as obstack.h now does that for us.
5687 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5688
5689 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5690 so that this include file can stand alone.
5691 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5692 does this now. Include subpipe.h first after config.h, to
5693 test whether it can stand alone.
5694
5695 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5696 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5697 unused declaration.
5698
5699 * tests/synclines.at (%union synch line): Put a dummy member in
5700 the union, because empty unions aren't allowed in C. Caught
5701 by GCC 3.4.0.
5702
5703 2004-04-13 Jim Meyering <jim@meyering.net>
5704
5705 * src/conflicts.c (conflicts_print): Correct format string typo:
5706 use `%%' to produce literal `%'. (trivial change)
5707
5708 2004-03-30 Paul Eggert <eggert@twinsun.com>
5709
5710 * src/getargs.c (version): Update copyright year to 2004.
5711
5712 * data/c.m4 (b4_int_type): Use 'short int' rather than
5713 'short', and similarly for 'long', 'unsigned', etc.
5714 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5715 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5716 yy_yypstack, yydumpstack): Likewise.
5717 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5718 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5719 Likewise.
5720 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5721 yy_stack_print, yyparse): Likewise.
5722 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5723 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5724 * lib/bitset.c (bitset_print): Likewise.
5725 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5726 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5727 * lib/bitsetv.c (bitsetv_dump): Likewise.
5728 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5729 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5730 Likewise.
5731 * src/LR0.c (allocate_itemsets): Likewise.
5732 * src/gram.h (rule_number, rule): Likewise.
5733 * src/lalr.h (goto_number): Likewise.
5734 * src/nullable.c (nullable_compute): Likewise.
5735 * src/output.c (prepare_rules): Likewise.
5736 * src/relation.c (relation_print, relation_digraph): Likewise.
5737 * src/relation.h (relation_node): Likewise.
5738 * src/state.h (state_number, transitions, errs, reductions,
5739 struct state): Likewise.
5740 * src/symtab.h (symbol_number, struct symbol): Likewise.
5741 * src/tables.c (vector_number, tally, action_number,
5742 default_goto, goto_actions): Likewise.
5743 * tests/existing.at (GNU Cim Grammar): Likewise.
5744 * tests/regression.at (Web2c Actions): Likewise.
5745
5746 * src/output.c (muscle_insert_short_int_table): Renamed from
5747 muscle_insert_short_table. All uses changed.
5748
5749 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5750
5751 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5752 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5753 Add %expect-rr rule.
5754
5755 * src/scan-gram.l: Recognize %expect-rr.
5756
5757 * src/conflicts.h (expected_sr_conflicts): Rename from
5758 expected_conflicts.
5759 (expected_rr_conflicts): Declare.
5760
5761 * src/conflicts.c (expected_sr_conflicts): Rename from
5762 expected_conflicts.
5763 (expected_rr_conflicts): Define.
5764 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5765 for GLR parsers.
5766 Use expected_sr_conflicts in place of expected_conflicts.
5767 Warn if expected_rr_conflicts used in non-GLR parser.
5768
5769 * doc/bison.texinfo: Add documentation for %expect-rr.
5770
5771 2004-03-08 Paul Eggert <eggert@gnu.org>
5772
5773 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5774 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5775
5776 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5777 in lalr1.cc.
5778 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5779 * src/scan-gram.l (scan_integer): New function.
5780 ({int}): Use it.
5781 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5782 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5783 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5784 Say "long int", not "long", for uniformity with GNU style.
5785
5786 2004-02-25 Paul Eggert <eggert@twinsun.com>
5787
5788 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5789 compilers. This fixes a problem with Intel's C++ compiler being
5790 chatty, reported by Guido Trentalancia in
5791 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5792
5793 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5794
5795 Support %destructor and merge error locations in lalr1.cc.
5796
5797 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5798 (Parser::stos_): Define unconditionally.
5799 (Parser::destruct_): New method. Generate its body with
5800 b4_yydestruct_generate.
5801 (Parser::error_start_): New attribute.
5802 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5803 token which are discarded.
5804 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5805 error_start_ when erroneous token are discarded.
5806 (Parser::parse) <yyerrlab1>: Compute the location of the error
5807 token so that it covers all the discarded tokens.
5808 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5809 it can be called with `%skeleton "lalr1.cc"', and do that.
5810
5811 2004-02-02 Paul Eggert <eggert@twinsun.com>
5812
5813 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5814 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5815 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5816 There's no need to mention top_builddir since Automake does that
5817 for us.
5818 (INCLUDES): Remove, as Automake says it's obsolescent.
5819 Contents migrated into AM_CPPFLAGS as described above.
5820 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5821
5822 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5823
5824 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5825 (yyreportSyntaxError): Handle case where lookahead token is
5826 YYEMPTY.
5827
5828 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5829
5830 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5831 resulting parsers are compilable with C++.
5832
5833 2003-12-23 Paul Eggert <eggert@twinsun.com>
5834
5835 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5836 * src/output.c (output_skeleton): Rename local var.
5837 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5838 Bison tokens, as this runs afoul of the 2003-10-07 change that
5839 disallowed NUL bytes in character constants or string literals.
5840
5841 * tests/local.at: Require Autoconf 2.59's Autotest.
5842 * tests/testsuite.at: Don't include local.at, since we now assume
5843 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5844 including it.
5845 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5846 multiple inclusion warnings.
5847
5848 2003-12-02 Akim Demaille <akim@epita.fr>
5849
5850 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5851 conditions.
5852 From Bruno Haible.
5853
5854 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5855
5856 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5857
5858 2003-10-07 Paul Eggert <eggert@twinsun.com>
5859
5860 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5861 if testsuite doesn't exist.
5862
5863 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5864 literals, unfortunately.
5865 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5866 Complain about NUL bytes in character constants or string literals.
5867
5868 2003-10-05 Paul Eggert <eggert@twinsun.com>
5869
5870 * NEWS: Don't document %no-default-prec, as it's still
5871 too experimental.
5872 * doc/bison.texinfo: Document %no-default-prec only if
5873 the defaultprec flag is set. Normally it's not.
5874
5875 2003-10-04 Paul Eggert <eggert@twinsun.com>
5876
5877 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5878 non-modifiable lvalue, instead of a modifiable one.
5879 * doc/bison.texinfo (Actions): Document that $$ can
5880 be assigned to. Do not claim that $$ and $N are
5881 array element references: user code should not rely on this.
5882
5883 2003-10-01 Paul Eggert <eggert@twinsun.com>
5884
5885 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5886 (grammar_declaration): Use it.
5887 * src/scan-gram.l: New token %no-default-prec.
5888 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5889 * NEWS, doc/bison.texinfo: Document the above.
5890
5891 2003-10-01 Akim Demaille <akim@epita.fr>
5892
5893 VCG no longer supports long_straight_phase.
5894
5895 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5896 * src/print_graph.c (print_graph): Adjust.
5897
5898 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
5899 and Paul Eggert <eggert@twinsun.com>
5900
5901 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5902 Table of Symbols): Document %default-prec.
5903 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5904 (grammar_declaration): Set default_prec on %default-prec.
5905 * src/scan-gram.l (%default-prec): New token.
5906 * src/reader.h (default_prec): New flag.
5907 * src/reader.c: Likewise.
5908 (packgram): Handle it.
5909 * tests/conflicts.at (%default-prec without %prec,
5910 %default-prec with %prec, %default-prec 1): New tests.
5911
5912 2003-09-30 Paul Eggert <eggert@twinsun.com>
5913
5914 * tests/testsuite.at: Include local.at, not input.at, fixing
5915 a typo in the 2003-08-25 patch.
5916
5917 2003-08-27 Akim Demaille <akim@epita.fr>
5918
5919 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5920 GCC warnings.
5921
5922 2003-08-26 Akim Demaille <akim@epita.fr>
5923
5924 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5925 "<\#" to avoid magic from Gnus when posting parts of this script.
5926
5927 2003-08-26 Akim Demaille <akim@epita.fr>
5928
5929 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5930 (Parser::parse): here.
5931 Adjust: nerrs and errstatus is now replaced by...
5932 (Parser::nerrs_, Parser::errstatus_): New.
5933
5934 2003-08-25 Akim Demaille <akim@epita.fr>
5935
5936 * config/announce-gen, Makefile.cfg: New.
5937 * Makefile.am: Adjust.
5938 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5939 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5940
5941 2003-08-25 Akim Demaille <akim@epita.fr>
5942
5943 When reducing initial empty rules, Bison parser read an initial
5944 location that is not defined. This results in garbage, and that
5945 affects Bison's own parser. Therefore we need (i) to extend Bison
5946 to support a means to initialize this location, and (ii) to use
5947 this CVS Bison to fix CVS Bison's parser.
5948
5949 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5950 with...
5951 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5952 * src/parse-gram.y: Adjust.
5953 (%initial-action): New.
5954 (%error-verbose): Since we require CVS Bison, there is no reason
5955 not to use it.
5956 * src/scan-gram.l: Adjust.
5957 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5958 * data/yacc.c (yyparse): Use b4_initial_action.
5959
5960 2003-08-25 Akim Demaille <akim@epita.fr>
5961
5962 * doc/bison.texinfo: Don't promote stdout for error messages.
5963
5964 2003-08-25 Akim Demaille <akim@epita.fr>
5965
5966 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5967 From Alexandre Duret-Lutz.
5968
5969 2003-08-25 Akim Demaille <akim@epita.fr>
5970
5971 Version 1.875c.
5972
5973 2003-08-25 Akim Demaille <akim@epita.fr>
5974
5975 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5976 Use them.
5977
5978 2003-08-25 Akim Demaille <akim@epita.fr>
5979
5980 * data/lalr1.cc (Parser::reduce_print_): New.
5981 Use it.
5982
5983 2003-08-25 Akim Demaille <akim@epita.fr>
5984
5985 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5986 error recovery loops. This patch is based on
5987 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
5988 Also, augment the similarity between lalr1.cc and yacc.c.
5989 Note: the locations of error recovery rules are not correct yet.
5990
5991 * data/lalr1.cc: Comment changes to augment the similarity between
5992 lalr1.cc and yacc.c.
5993 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5994 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5995 yyerrlab), when hitting EOF, pop the whole stack here instead of
5996 merely falling thru the default error handling mechanism.
5997 (yyerrorlab): New label, with the old contents of YYERROR,
5998 plus the following change: pop the stack of rhs corresponding
5999 to the production that invoked YYERROR. That is how Yacc
6000 behaves (required by POSIX).
6001 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6002 fail.
6003
6004 2003-08-25 Akim Demaille <akim@epita.fr>
6005
6006 Tune local.at so that people can "autom4te -l autotest calc.at -o
6007 calc" for instance, to extract a sub test suite.
6008
6009 * tests/testsuite.at: Move the initialization, Autotest version
6010 requirement, and AT_TESTED invocation into...
6011 * tests/local.at: here.
6012 * tests/testsuite.at: Include it for compatibility with Autoconf
6013 2.57.
6014 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6015 be ignore.
6016
6017 2003-08-04 Paul Eggert <eggert@twinsun.com>
6018
6019 Rework code slightly to avoid gcc -Wtraditional warnings.
6020 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6021 The returned value is now stored in *YY0. All callers changed.
6022 * src/output.c (merge_output): Adjust to the above change.
6023
6024 2003-07-26 Paul Eggert <eggert@twinsun.com>
6025
6026 * data/glr.c (YYASSERT): New macro.
6027 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6028 yyresolveStates, yyprocessOneStack):
6029 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6030 Derived from a suggestion by Frank Heckenbach.
6031
6032 2003-07-25 Paul Eggert <eggert@twinsun.com>
6033
6034 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6035 for portability to K&R C (after ansi2knr, presumably). See
6036 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
6037 by Frank Heckenbach, though I have omitted the structure-initialization
6038 part of his glr-knr.diff patch since I recall that the Portable
6039 C Compiler didn't require that change.
6040
6041 Let the user specify how to allocate and free memory.
6042 Derived from a suggestion by Frank Heckenbach in
6043 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
6044 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6045 All uses of free, malloc, realloc changed to use these macros,
6046 and unnecessary casts removed.
6047 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6048
6049 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6050
6051 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6052 use s.empty() rather than s == "" to test for empty string; see
6053 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6054 (trivial change)
6055
6056 2003-06-25 Akim Demaille <akim@epita.fr>
6057
6058 * config/depcomp, config/install-sh: Update from masters.
6059
6060 2003-06-20 Paul Eggert <eggert@twinsun.com>
6061
6062 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6063 and return properly parenthesized result.
6064 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6065 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6066 Remove unnecessary parentheses from uses.
6067 * doc/bison.texinfo (Location Default Action): Describe the
6068 conventions for parentheses.
6069
6070 2003-06-19 Paul Eggert <eggert@twinsun.com>
6071
6072 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6073 yyreportTree): Do not assume that size_t is the same width as int,
6074 when printing sizes. Print sizes using an unsigned format.
6075 Problem reported by Frank Heckenbach in
6076 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
6077
6078 Port to Forte Developer 7 C compiler.
6079 * data/glr.c (struct YYLTYPE): If locations are not being used,
6080 declare a single dummy member, as empty structs do not conform
6081 to the C standard.
6082 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6083 the Forte Developer 7 C compiler complains that end-of-loop
6084 code is not reached.
6085
6086 2003-06-17 Paul Eggert <eggert@twinsun.com>
6087
6088 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6089 avoid warnings from picky compilers about redefinition of PARAMS.
6090
6091 2003-06-17 Paul Eggert <eggert@twinsun.com>
6092
6093 Version 1.875b.
6094
6095 * NEWS: Document 1.875b.
6096
6097 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6098 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6099 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6100 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6101 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6102 per recent gettext manual's suggestion.
6103 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6104 Use prototypes, not old-style definitions.
6105 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6106 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6107 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6108 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6109 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6110 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6111 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6112 vbitset_or_and_cmp, vbitset_copy): Likewise.
6113
6114 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6115 Do not include <stdlib.h>.
6116 (PARAMS): Define unconditionally for C89.
6117 (ATTRIBUTE_NORETURN): Remove.
6118 (ATTRIBUTE_UNUSED): Define unconditionally.
6119
6120 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
6121 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
6122 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6123 * lib/vbitset.c, lib/vbitset.h: New files.
6124 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6125 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6126 from libbitset.
6127
6128 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6129 `How Can I Reset @code{yyparse}', since texinfo does not allow
6130 arbitrary @ in node names.
6131
6132 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6133 shouldn't be needed according to the gettext 0.12.1 documentation
6134 but which seem to be needed anyway: codeset.m4 glibc21.m4
6135 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
6136 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
6137 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
6138
6139 * lib/.cvsignore: Add stdbool.h.
6140 * m4/.cvsignore: Add nls.m4, po.m4.
6141
6142 Upgrade to CVS gnulib.
6143 * stdbool_.h: File renamed from stdbool.h.in.
6144 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6145 AC_HEADER_STDBOOL.
6146 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6147 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6148 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6149 (MOSTLYCLEANFILES): New var.
6150 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6151 (stdbool.h): New rule.
6152 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6153 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6154 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6155 m4/quote.m4: Upgrade to today's gnulib.
6156
6157 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6158 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6159 the tests right now.
6160 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6161 yyerror are declared before use; C99 requires this.
6162
6163 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6164
6165 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6166 first.
6167 (yyrecoverSyntaxError): Correct the logic for setting and testing
6168 yyerrState.
6169 Correct comment on handling EOF.
6170 Allow states with only a default reduction, rather than failing
6171 (I can't quite reconstruct why these were not allowed before).
6172
6173 Fixes to avoid problem that $-N rules in GLR parsers can cause
6174 buffer overruns, corrupting state.
6175
6176 * src/output.c (prepare_rules): Output max_left_semantic_context
6177 definition.
6178 * src/reader.h (max_left_semantic_context): New variable declaration.
6179 * src/scan-gram.l (max_left_semantic_context): Define.
6180 (handle_action_dollar): Update max_left_semantic_context.
6181 * data/glr.c (YYMAXLEFT): New definition.
6182 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6183 (yyresolveAction): Ditto.
6184
6185 Fixes to problems with location handling in GLR parsers reported by
6186 Frank Heckenbach (2003/06/05).
6187
6188 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6189 (YYRHSLOC): Add parentheses, and define only if locations used.
6190 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6191 locations not used.
6192 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6193 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
6194
6195 * tests/cxx-type.at: Exercise location information; update tests
6196 to differentiate output with and without locations.
6197 Remove forward declarations of yylex and yyerror---caused errors
6198 because default YYLTYPE not yet defined.
6199 Change semantic actions to compute strings, rather than printing
6200 them directly (to test proper passing of semantics values). Change
6201 output to prefix notation and update test data and expected results.
6202 (yylex): Track locations.
6203 (stmtMerge): Return value rather than printing, and include arguments
6204 in value.
6205
6206 2003-06-03 Paul Eggert <eggert@twinsun.com>
6207
6208 Avoid warnings generated by GCC 2.95.4 when Bison is
6209 configured with --enable-gcc-warnings.
6210 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6211 yy::]b4_parser_class_name[::translate_,
6212 yy::Stack::operator[] (unsigned),
6213 yy::Stack::operator[] (unsigned) const,
6214 yy::Slice::operator[] (unsigned),
6215 yy::Slice::operator[] (unsigned) const):
6216 Rename local vars to avoid warnings.
6217 * tests/glr-regression.at (Improper handling of embedded actions
6218 and $-N in GLR parsers): Remove unused local variable from yylex.
6219 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6220 (void) as arg when not pure, since we now assume C89 when building
6221 Bison. Pacify GCC by using parameter.
6222
6223 2003-06-02 Paul Eggert <eggert@twinsun.com>
6224
6225 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6226 yy::Location::lines, yy::Location::columns): Rename arguments
6227 to avoid shadowing; this removes a warning generated by GCC 3.3.
6228
6229 2003-06-01 Paul Eggert <eggert@twinsun.com>
6230
6231 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6232 to g++, as GCC 3.3 complains if you do it.
6233 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6234 everything that WARNING_CFLAGS has, except omit warnings
6235 not suitable for C++.
6236 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6237 * tests/atlocal.in (CXXFLAGS): New var.
6238 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6239
6240 Fix a GLR parser bug I reported in February; see
6241 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
6242 The problem was that GLR parsers did not conform to the C standard,
6243 because actions like { $1 = $2 + $3; } expanded to expressions
6244 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6245 to a local variable. The C standard says that expressions
6246 like (var = f ()) + (var = f ()) have undefined behavior.
6247 Another problem was that GCC sometimes issues warnings that
6248 yyfill and its parameters are unused.
6249
6250 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6251 as possibly unused.
6252 (yyfill): New function.
6253 (YYFILL): Use it.
6254 (yyuserAction): Change type of yynormal to bool, so that it matches
6255 the new yyfill signature. Mark it as possibly unused.
6256
6257
6258 Follow up on a bug I reported in February, where a Bison-generated
6259 parser can loop. Provide a test case and a fix for yacc.c. I
6260 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6261 The original bug report is in:
6262 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
6263
6264 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6265 macro's size was becoming unwieldy.
6266 (yyerrlab): Do not discard an empty lookahead symbol, as this
6267 might destroy garbage.
6268 (yyerrorlab): New label, with the old contents of YYERROR,
6269 plus the following change: pop the stack of rhs corresponding
6270 to the production that invoked YYERROR. That is how Yacc
6271 behaves, and POSIX requires this behavior.
6272 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6273 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6274 Define 'alarm' to do nothing if unistd.h is not available.
6275 Add a new rule "exp: '-' error;" to test the above change to
6276 data/yacc.c. Use 'alarm' to abort any test taking longer than
6277 10 seconds, as it's probably looping.
6278 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6279 Also, the new yacc.c generates two fewer diagnostics for an
6280 existing test.
6281
6282 2003-05-24 Paul Eggert <eggert@twinsun.com>
6283
6284 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6285 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6286 This fixes a problem reported by John Bowman when the Compaq/HP
6287 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6288 -ansi -Wall -gall).
6289 * data/yacc.c (union yyalloc): Likewise.
6290 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
6291
6292 Switch from 'int' to 'bool' where that makes sense.
6293
6294 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6295 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6296 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6297 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6298 Return or accept bool, not int. All callers changed.
6299 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6300 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6301 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6302 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6303 bitset_or_and_cmp_): Likewise.
6304 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6305 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6306 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6307 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6308 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6309 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6310 bitset_stats_or_and_cmp): Likewise.
6311 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6312 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6313 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6314 ebitset_xor_cmp): Likewise.
6315 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6316 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6317 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6318 lbitset_xor_cmp): Likewise.
6319 * lib/bbitset.h: Include <stdbool.h>.
6320 (struct bitset_vtable): The following members now return bool, not
6321 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6322 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6323 or_and_cmp).
6324 * src/conflicts.c (count_rr_conflicts): Likewise.
6325 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6326 All uses changed.
6327 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6328 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6329 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6330 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6331 graph_flag): Likewise.
6332 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6333 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6334 graph_flag): Likewise.
6335 * src/output.c (error_verbose): Likewise.
6336 * src/output.h (error_verbose): Likewise.
6337 * src/reader.c (start_flag, typed): Likewise.
6338 * src/reader.h (typed): Likewise.
6339 * src/getargs.c (LOCATIONS_OPTION): New constant.
6340 (long_options, getargs): Use it.
6341 * src/lalr.c (build_relations): Use bool, not int.
6342 * src/nullable.c (nullable_compute): Likewise.
6343 * src/print.c (print_reductions): Likewise.
6344 * src/tables.c (action_row, pack_vector): Likewise.
6345 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6346 * src/output.c (prepare): Use it.
6347 * src/output.c (token_definitions_output,
6348 symbol_destructors_output, symbol_destructors_output): Use string,
6349 not boolean integer, to keep track of whether to output separator.
6350 * src/print_graph.c (print_core): Likewise.
6351 * src/state.c (state_rule_lookaheads_print): Likewise.
6352
6353 * config/install-sh: Sync from automake 1.7.5.
6354
6355 2003-05-14 Paul Eggert <eggert@twinsun.com>
6356
6357 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6358 semicolon after a grammar declaration, in the interest of possible
6359 future changes to the Bison input language.
6360 Do not allow a stray semicolon at the start of the grammar.
6361 (rhses.1): Allow one or more semicolons after any rule, including
6362 just before "|" as required by POSIX.
6363 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6364 grammar.
6365
6366 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6367
6368 %parse-param support for lalr1.cc.
6369
6370 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6371 b4_cc_constructor_calls, b4_cc_constructor_call,
6372 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6373 definitions.
6374 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6375 parse-param arguments.
6376 (yy::b4_parser_class_name): Declare instance variables to
6377 hold parse-param arguments.
6378 * tests/calc.at: s/value/semantic_value/ because value clashes
6379 with a member of yy::b4_parser_class_name. Adjust C++ code
6380 to handle %parse-param. Enable %parse-param test in C++.
6381
6382 2003-05-12 Paul Eggert <eggert@twinsun.com>
6383
6384 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6385 English a bit. Fix fclose typo. Change "const char" to "char
6386 const", and use ANSI C rather than K&R for "main". Suggest
6387 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6388 and suggest yy_switch_to_buffer.
6389
6390 2003-05-05 Paul Eggert <eggert@twinsun.com>
6391
6392 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6393 C89. This avoids a diagnostic on compilers that define __STDC__
6394 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
6395 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6396
6397 2003-05-03 Paul Eggert <eggert@twinsun.com>
6398
6399 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6400 Do not overrun array bounds.
6401 This should fix a bug reported today by Olatunji Oluwabukunmi in
6402 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
6403
6404 2003-04-29 Akim Demaille <akim@epita.fr>
6405
6406 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6407 * src/getargs.c, src/getargs.h: here, as bool, not int.
6408 (nondeterministic_parser): New.
6409 * src/parse-gram.y, src/scan-gram.l: Support
6410 %nondeterministic-parser.
6411 * src/output.c (prepare): Use nondeterministic_parser instead
6412 of glr_parser where appropriate.
6413 * src/tables.c (conflict_row, action_row, save_row)
6414 (token_actions, token_actions, pack_vector): Ditto.
6415
6416 2003-04-29 Akim Demaille <akim@epita.fr>
6417
6418 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6419
6420 2003-04-29 Akim Demaille <akim@epita.fr>
6421
6422 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6423 with %pure-parser and %locations to exercise the patch from Yakov
6424 Markovitch below.
6425
6426 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6427
6428 * data/yacc.c: (b4_lex_param): Corrected for the case where
6429 %lex-param is provided and %pure-parser isn't.
6430
6431 2003-04-27 Paul Eggert <eggert@twinsun.com>
6432
6433 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
6434 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
6435 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6436 if it is not defined.
6437 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6438
6439 2003-04-26 Paul Eggert <eggert@twinsun.com>
6440
6441 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6442 Declare to be of type suitable for the ninf value itself, not of
6443 type suitable for the corresponding table, since the latter might
6444 be unsigned but the ninf value might be negative. This fixes a
6445 bug reported by Alexandre Duret-Lutz in
6446 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
6447
6448 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6449 invokes it. We shouldn't invoke it twice because it will attempt
6450 to put error.o in the archive twice. This fixes a glitch reported
6451 by Martin Mokrejs in
6452 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6453
6454 2003-04-21 Paul Eggert <eggert@twinsun.com>
6455
6456 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6457 to gnulib.
6458
6459 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6460
6461 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6462 Fix obvious typo that results in uncompilable GLR parsers
6463 when both %pure-parser and %locations are used. (trivial change)
6464
6465 2003-04-17 Paul Eggert <eggert@twinsun.com>
6466
6467 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6468 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6469 Do not insert the expected token via unput, as this runs afoul
6470 of a POSIX-compatibility bug in flex 2.5.31.
6471 All uses changed to BEGIN the parent state,
6472 since we no longer insert the expected token via unput.
6473 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6474 that is no longer emitted after the above change.
6475
6476 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6477 the first one. This change is from Paul Hilfinger, and it fixes
6478 regression reported by Werner Lemberg in
6479 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6480
6481 (resolve_sr_conflict): Don't invoke state_errs_set
6482 unless one or more tokens have been explicitly made errors.
6483 Otherwise, the above change causes Bison to abort.
6484
6485 * tests/existing.at (GNU pic Grammar): New test case, taken from
6486 Lemberg's email.
6487
6488 2003-03-31 Akim Demaille <akim@epita.fr>
6489
6490 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6491
6492 2003-03-31 Akim Demaille <akim@epita.fr>
6493
6494 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6495 output.
6496
6497 2003-03-31 Akim Demaille <akim@epita.fr>
6498
6499 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6500 From Paul Hilfinger.
6501
6502 2003-03-29 Akim Demaille <akim@epita.fr>
6503
6504 * m4/error.m4: Do not put under dynamic conditions some code which
6505 expansion is under static control.
6506
6507 2003-03-29 Akim Demaille <akim@epita.fr>
6508
6509 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6510
6511 2003-03-29 Akim Demaille <akim@epita.fr>
6512
6513 * doc/bison.texinfo (Strings are Destroyed): New.
6514
6515 2003-03-13 Paul Eggert <eggert@twinsun.com>
6516
6517 * .cvsignore: Add configure.lineno.
6518 * src/.cvsignore: Add yacc.
6519 * tests/.cvsignore: Add testsuite.log.
6520 * doc/fdl.texi: Sync with latest FSF version.
6521
6522 2003-03-12 Paul Eggert <eggert@twinsun.com>
6523
6524 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6525 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6526 cursor, instead of leaving it undefined. This fixes a bug
6527 reported by Tim Van Holder in
6528 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6529 * tests/input.at (Torturing the Scanner): Test the scanner on
6530 an empty input file, which was Tim Van Holder's test case.
6531
6532 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6533 <sys/resource.h> can be included, include sys/time.h and
6534 sys/times.h first, if available. This works around the SunOS
6535 4.1.4 porting bug reported by Bruce Becker in
6536 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6537
6538 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6539 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6540 AC_HEADER_SYS_WAIT.
6541
6542 Merge changes from gnulib. This was prompted because the CVS
6543 snapshot didn't build on Solaris 7 due to strnlen problems.
6544
6545 These changes need to be merged back into gnulib:
6546 * lib/hash.c: Include <stdbool.h> unconditionally.
6547 * m4/onceonly.m4 (m4_quote): New macro.
6548 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6549 Quote AC_FOREACH variable-expansions properly.
6550 The 2003-01-03 obstack.h change also needs merging.
6551 {end of changes requiring merging}
6552
6553 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6554 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6555 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6556 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6557 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6558 New files, imported from gnulib.
6559 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6560 above.
6561
6562 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6563 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6564 gnulib sources.
6565
6566 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6567 Add.
6568 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6569 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6570 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6571 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6572 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6573 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6574 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6575 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6576 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6577 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6578 (jm_PREREQ_ARGMATCH): Remove.
6579 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6580 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6581
6582 * src/system.h: Include <stdbool.h> unconditionally.
6583
6584 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6585 assuming at least C89 in the bitset code for some time now.
6586
6587 2003-03-03 Akim Demaille <akim@epita.fr>
6588
6589 * ro.po: New.
6590
6591 2003-03-02 Akim Demaille <akim@epita.fr>
6592
6593 * doc/bison.texinfo (Table of Symbols): Reactivate the
6594 documentation for %lex-param, and %parse-param.
6595
6596 2003-03-02 Akim Demaille <akim@epita.fr>
6597
6598 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6599 generate verbose error messages.
6600 Use the number of tokens as an upper bound in yytname, as it
6601 cannot be a non terminal.
6602
6603 2003-03-02 Akim Demaille <akim@epita.fr>
6604
6605 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6606 message.
6607
6608 2003-03-02 Akim Demaille <akim@epita.fr>
6609
6610 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6611 Use them to exercise yycheck overrun.
6612 Based on Andrew Suffield's grammar.
6613
6614 2003-03-02 Akim Demaille <akim@epita.fr>
6615
6616 Create tests/local.at for Bison generic testing macros.
6617
6618 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6619 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6620 This new file.
6621 * tests/calc.at (AT_CHECK_CALC): Adjust.
6622 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6623 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6624 * tests/local.at: here.
6625 (AT_COMPILE_CXX): Tags the tests using it as c++.
6626 Ignore the test if CXX is not functional.
6627
6628 2003-03-01 Paul Eggert <eggert@twinsun.com>
6629
6630 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6631 not loc->end, since loc->end might contain garbage and this leads
6632 to undefined behavior on some platforms.
6633 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6634 depend on *loc, so that the reader doesn't give the the false
6635 impression that *loc is initialized.
6636 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6637 does not survive the return.
6638
6639 2003-03-01 Akim Demaille <akim@epita.fr>
6640
6641 * src/scan-gram.l (code_start): Always initialize it when entering
6642 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6643 yylex invocation. An alternative would be making it static, but
6644 then it starts with the second %%'s beginning, instead of its end.
6645
6646 2003-02-28 Paul Eggert <eggert@twinsun.com>
6647
6648 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6649 around a UnixWare 7.1.1 porting bug reported by John Hughes in
6650 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
6651
6652 2003-02-26 Paul Eggert <eggert@twinsun.com>
6653
6654 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6655 Remove Sequent/Pyramid discussion (nobody uses them any more).
6656 Merge VMS and MS-DOS discussion; these ports may well be dead
6657 but let's keep mentioning them for now. Put <> around email
6658 addresses. Add copyright notice.
6659
6660 2003-02-24 Paul Eggert <eggert@twinsun.com>
6661
6662 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6663 to avoid collision with flex use of yylineno.
6664 Problem reported by Bruce Lilly in
6665 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
6666 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6667 * data/yacc.c (yy_reduce_print): Likewise.
6668
6669 * config/depcomp: Sync with Automake 1.7.3.
6670
6671 2003-02-21 Akim Demaille <akim@epita.fr>
6672
6673 * data/lalr1.cc: Use temporary variables instead of casts to
6674 change integer types.
6675 Suggested by Paul Eggert.
6676
6677 2003-02-21 Akim Demaille <akim@epita.fr>
6678
6679 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6680 to avoid confusions with lalr1.cc's notion of Position.
6681 Suggested by Paul Eggert.
6682
6683 2003-02-20 Akim Demaille <akim@epita.fr>
6684
6685 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6686 before initial_columns.
6687 (location.hh): Use consistent variable names when defining the
6688 operator<<.
6689 Use "last" so that we subtract from Positions, not from unsigned.
6690
6691 2003-02-20 Akim Demaille <akim@epita.fr>
6692
6693 * data/lalr1.cc (position.hh): New subfile, including the extended
6694 and Doxygen'ed documentation of class Position.
6695 (location.hh): Use it.
6696 Document a` la Doxygen.
6697 With the help of Benoit Perrot.
6698
6699 2003-02-20 Akim Demaille <akim@epita.fr>
6700
6701 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6702 AT_YACC_IF.
6703 Redefine AT_YYERROR_SEES_LOC_IF using it.
6704 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6705 not defined.
6706 Don't use the location in yy::Parser::error_ and
6707 yy::Parser::print_ when not %locations.
6708 Activate more lalr1.cc tests.
6709
6710 2003-02-19 Akim Demaille <akim@epita.fr>
6711
6712 * data/lalr1.cc: When displaying a line number, be sure to make it
6713 an int.
6714
6715 2003-02-19 Akim Demaille <akim@epita.fr>
6716
6717 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6718 Remove, useless.
6719 (YYABORT, YYACCEPT, YYERROR): New.
6720 * tests/calc.at: Renable the lalr1.cc test.
6721
6722 2003-02-19 Akim Demaille <akim@epita.fr>
6723
6724 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6725 error recovery, mixing with/without pops and discarding of the
6726 lookahead.
6727 Exercise YYERROR.
6728 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6729
6730 2003-02-17 Paul Eggert <eggert@twinsun.com>
6731
6732 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6733 * tests/testsuite.at (AT_COMPILE): Use them.
6734 This fixes the testsuite problem reported by Robert Lentz in
6735 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6736
6737 2003-02-12 Paul Eggert <eggert@twinsun.com>
6738
6739 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6740 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6741 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6742 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6743 Check for malloc failure, for consistency with yacc.c.
6744 (yytname_size): Remove, for consistency with yacc.c.
6745
6746 The bug still remains in data/lalr1.cc, as I didn't have time
6747 to fix it there.
6748
6749 2003-02-06 Akim Demaille <akim@epita.fr>
6750
6751 * configure.ac (GXX): Rename as...
6752 (CXX): this, to keep the original Autoconf semantics.
6753 Require 2.57.
6754 * data/lalr1.cc: Fix b4_copyright invocations.
6755 If YYDEBUG is not defined, don't depend upon name_ being defined.
6756 (location.hh): Include string and iostream.
6757 (Position::filename): New member.
6758 (Position::Position ()): New.
6759 (operator<< (Position)): New.
6760 (operator- (Position, int)): New.
6761 (Location::first, Location::last): Rename as...
6762 (Location::begin, Location::end): these, to mock the conventional
6763 iterator names.
6764 (operator<< (Location)): New.
6765 * tests/atlocal.in (CXX): New.
6766 * tests/testsuite.at (AT_COMPILE_CXX): New.
6767 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6768 locations in a more synthetic way.
6769 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6770 lalr1.cc is used.
6771 Adjust the C locations to match those from Emacs: first column is
6772 column 0.
6773 Change all the expected results.
6774 Conform to the GCS: simplify the locations when applicable.
6775 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6776 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6777 these CPP macros with the m4 macros new defined by...
6778 (AT_CHECK_PUSHDEFS): this, i.e.:
6779 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6780 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6781 New macros.
6782 (AT_CHECK_POPDEFS): Undefine them.
6783 (AT_CHECK_CALC_LALR1_CC): New.
6784 Use it for the first lalr1.cc test.
6785
6786 2003-02-04 Akim Demaille <akim@epita.fr>
6787
6788 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6789 Location as is defined.
6790
6791 2003-02-04 Akim Demaille <akim@epita.fr>
6792
6793 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6794 name_ being defined.
6795
6796 2003-02-03 Paul Eggert <eggert@twinsun.com>
6797
6798 * src/gram.h (start_symbol): Remove unused decl.
6799
6800 Use more-consistent naming conventions for local vars.
6801
6802 * src/derives.c (derives_compute): Change type of local var from
6803 int to rule_number.
6804 * src/gram.c (grammar_rules_partial_print): Likewise.
6805 * src/print.c (print_core): Likewise.
6806 * src/reduce.c (reduce_grammar_tables): Likewise.
6807
6808 * src/gram.c (grammar_dump): Change name of item_number *
6809 local var from r to rp.
6810 * src/nullable.c (nullable_compute): Likewise.
6811
6812 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6813
6814 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6815 for symbol or symbol_number var.
6816 * src/reader.c (grammar_start_symbol_set): Likewise.
6817 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6818 Likewise.
6819 * src/state.c (transitions_to): Likewise.
6820 * src/state.h: Likewise.
6821 * src/tables.c (symbol_number_to_vector_number): Likewise.
6822
6823 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6824 char * var.
6825
6826 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6827 var.
6828
6829 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6830 var.
6831
6832 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6833 Use str, not s, for char * var. Use ch, not c, for character var.
6834 Use size for size var.
6835
6836 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6837 char * var.
6838 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6839 uniqstr var.
6840 * src/uniqstr.h: Likewise.
6841
6842 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6843 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6844 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6845 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6846 param to have same name as that of enum, so that we don't use
6847 "s" to stand for a non-state.
6848
6849 2003-02-02 Akim Demaille <akim@epita.fr>
6850
6851 * src/scan-skel.l: Scan more than one inert character per yylex
6852 invocation.
6853
6854 2003-02-01 Paul Eggert <eggert@twinsun.com>
6855
6856 Version 1.875a.
6857
6858 * po/LINGUAS: Add ms.
6859
6860 2003-01-30 Akim Demaille <akim@epita.fr>
6861
6862 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6863
6864 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6865
6866 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6867 of $1.
6868
6869 Changes in response to error report by S. Eken: GLR mode does not
6870 handle negative $ indices or $ indices in embedded rules correctly.
6871 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
6872
6873 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6874 (b4_rhs_location): Ditto.
6875 (yyfill): New function to copy from stack tree into array
6876 incrementally.
6877 (yyuserAction): Modify to allow incremental move of semantic values
6878 to rhs array when in GLR mode.
6879 Define YYFILL to use in user-defined actions to fill semantic array
6880 as needed.
6881 Remove dummy use of yystack, as there is now a guaranteed use.
6882 (yydoAction): Modify to allow incremental move of semantic values
6883 to rhs array when in GLR mode.
6884 (yyresolveAction): Ditto.
6885 (yyglrShiftDefer): Update comment.
6886 (yyresolveStates): Use X == NULL for pointers, not !X.
6887 (yyglrReduce): Ditto.
6888 (yydoAction): Ditto
6889
6890 * tests/glr-regr1.at: Rename to ...
6891 * tests/glr-regression.at: Add new regression test for the problems
6892 described above (adapted from S. Eken).
6893 Update copyright notice.
6894 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6895 * tests/Makefile.am: Ditto.
6896
6897 2003-01-28 Paul Eggert <eggert@twinsun.com>
6898
6899 * data/lalr1.cc: Do not use @output_header_name@ unless
6900 b4_defines_flag is set. This fixes two bugs reported by
6901 Tim Van Holder in
6902 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6903 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6904
6905 2003-01-21 Paul Eggert <eggert@twinsun.com>
6906
6907 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6908 we don't need to worry about yyerrlab1 being reported as an
6909 "unused label" by non-GCC C compilers. The downside is that if
6910 locations are used then a couple of statements are duplicated each
6911 time YYERROR is invoked, but the upside is that the warnings
6912 should vanish.
6913 (yyerrlab1): Move code to YERROR.
6914 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6915 This reverts some of the 2002-12-27 change.
6916
6917 2003-01-17 Paul Eggert <eggert@twinsun.com>
6918
6919 * src/output.c (symbol_printers_output): Fix typo that led
6920 to core dump. Problem reported by Antonio Rus in
6921 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
6922
6923 2003-01-13 Akim Demaille <akim@epita.fr>,
6924 Quoc Peyrot <chojin@lrde.epita.fr>,
6925 Robert Anisko <anisko_r@lrde.epita.fr>
6926
6927 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6928 when the stacks contain one element, as the loop would otherwise
6929 free the last state, and then use the top state (the one we just
6930 popped). This means that the initial elements will not be freed
6931 explicitly, as is the case in yacc.c; it is not a problem, as
6932 these elements have fake values.
6933
6934 2003-01-11 Paul Eggert <eggert@twinsun.com>
6935
6936 * NEWS: %expect-violations are now just warnings, reverting
6937 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6938 bootstrapping problem reported by Matthias Klose; see
6939 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
6940 * src/conflicts.c (conflicts_print): Likewise.
6941 * tests/conflicts.at (%expect not enough, %expect too much,
6942 %expect with reduce conflicts): Likewise.
6943 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6944 that the warning is enabled if the number of conflicts changes
6945 (not necessarily increases).
6946
6947 * src/getargs.c (version): Update copyright year.
6948
6949 2003-01-09 Akim Demaille <akim@epita.fr>
6950
6951 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6952
6953 2003-01-08 Paul Eggert <eggert@twinsun.com>
6954
6955 * Makefile.maint (WGETFLAGS):
6956 New macro, containing "-C off" to disable proxy caches.
6957 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6958 (rel-check): Use $(WGET) instead of wget.
6959
6960 2003-01-06 Paul Eggert <eggert@twinsun.com>
6961
6962 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6963 the GLR paper of Scott, Johnstone and Hussain.
6964
6965 2003-01-04 Paul Eggert <eggert@twinsun.com>
6966
6967 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6968 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6969 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6970 (EXTRA_LIBRARIES): New var, for liby.a.
6971 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6972 (EXTRA_SCRIPTS): New var, for yacc.
6973
6974 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6975 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6976 Problem reported by Nelson H. F. Beebe.
6977
6978 2003-01-03 Paul Eggert <eggert@twinsun.com>
6979
6980 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6981 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6982 when compiling Bison 1.875's `bitset bset = obstack_alloc
6983 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6984
6985 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6986 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6987 grow to a huge size with typical invocation.
6988
6989 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6990 Use the pattern recommended by Autoconf 2.57, except also protect
6991 against double-definition.
6992 * src/system.h: Likewise.
6993 Portability issues reported by Nelson H. F. Beebe.
6994
6995 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6996 All uses changed. Provide a definition in both C and C++.
6997 (yytrue, yyfalse): Define even if defined (__cplusplus).
6998
6999 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7000 Reported by Nelson H. F. Beebe.
7001
7002 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7003
7004 2003-01-02 Paul Eggert <eggert@twinsun.com>
7005
7006 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7007 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7008 Bug reported by Nelson H. F. Beebe.
7009
7010 2003-01-01 Paul Eggert <eggert@twinsun.com>
7011
7012 * Version 1.875.
7013
7014 2002-12-30 Paul Eggert <eggert@twinsun.com>
7015
7016 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7017 Moved here from...
7018 (<INITIAL>","): Here. This causes stray "," to be treated
7019 more uniformly.
7020
7021 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
7022 last brace in braced code when not in Yacc mode, for compatibility
7023 with Bison 1.35. This resurrects the 2001-12-15 patch to
7024 src/reader.c.
7025
7026 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7027 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7028
7029 2002-12-28 Paul Eggert <eggert@twinsun.com>
7030
7031 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7032 that of SYM's type. This fixes Debian bug 168069, reported by
7033 Thomas Olsson.
7034
7035 2002-12-28 Paul Eggert <eggert@twinsun.com>
7036
7037 Version 1.75f.
7038
7039 Switch back to the Yacc style of conflict reports, undoing some
7040 of the 2002-07-30 change.
7041 * doc/bison.texinfo (Understanding): Use Yacc style for
7042 conflict reports. Also, use new way of locating rules.
7043 * src/conflicts.c (conflict_report):
7044 Renamed from conflict_report_yacc, removing the old
7045 'conflict_report'. Translate the entire conflict report at once,
7046 so that we don't assume that "," has the same interpretation in
7047 all languages.
7048 (conflicts_output): Use Yacc-style conflict report for each state,
7049 instead of our more-complicated style.
7050 (conflicts_print): Use Yacc-style conflict report, except print
7051 the input file name when not emulating Yacc.
7052 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7053 Conflicted Reduction, %expect not enough, %expect too much,
7054 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7055 * tests/existing.at (GNU Cim Grammar): Likewise.
7056 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7057
7058 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7059 fatal): Don't invoke fflush; it's not needed and it might even be
7060 harmful for stdout, as stdout might not be open.
7061 * src/reduce.c (reduce_print): Likewise.
7062
7063 2002-12-27 Paul Eggert <eggert@twinsun.com>
7064
7065 Fix a bug where error locations were not being recorded correctly.
7066 This problem was originally reported by Paul Hilfinger in
7067 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
7068
7069 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7070 top of the location stack's error locations.
7071 (yyerrlab): Set it. When discarding a token, push its location
7072 onto yylerrsp so that we don't lose track of the error's end.
7073 (yyerrlab1): Now is only the target of YYERROR, so that we can
7074 properly record the location of the action that failed. For GCC
7075 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7076 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7077 (yyerrlab2): New label, which yyerrlab now falls through to.
7078 Compute the error's location by applying YYLLOC_DEFAULT to
7079 the locations of all the symbols that went into the error.
7080 * doc/bison.texinfo (Location Default Action): Mention that
7081 YYLLOC_DEFAULT is also invoked for syntax errors.
7082 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7083 Error locations include the locations of all the tokens that were
7084 discarded, not just the last token.
7085
7086 2002-12-26 Paul Eggert <eggert@twinsun.com>
7087
7088 * src/files.c: Include quote.h.
7089 (compute_output_file_names): Warn if we detect conflicting
7090 outputs to the same file. This should catch the misunderstanding
7091 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7092
7093 * src/conflicts.c (conflicts_print): If the user specifies
7094 "%expect N", report an error if there are any reduce/reduce
7095 conflicts. This is what the manual says should happen.
7096 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7097 * tests/conflicts.at (%expect with reduce conflicts): New test.
7098
7099 Don't use m4_include on relative file names, as it doesn't work as
7100 desired if there happens to be a file with that name under ".".
7101
7102 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7103 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7104 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7105 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7106 * src/output.c (output_skeleton): Use full path names when
7107 specifying a file to include; don't rely on include path, as
7108 it's unreliable when the working file contains a file with
7109 that name.
7110
7111 2002-12-25 Paul Eggert <eggert@twinsun.com>
7112
7113 Remove obsolete references to bison.simple and bison.hairy.
7114 Problem mentioned by Aubin Mahe in
7115 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
7116 * data/glr.c: Comment fix.
7117 * doc/bison.1: Remove references. Also, mention "yacc".
7118
7119 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7120 with -g option.
7121
7122 * src/parse-gram.y (declaration): Use enum "report_states" rather
7123 than its numeric value 1.
7124
7125 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7126 opening a new one. This fixes Debian bug 165349, reported by
7127 Bruce Stephens.
7128
7129 2002-12-24 Paul Eggert <eggert@twinsun.com>
7130
7131 Version 1.75e.
7132
7133 * Makefile.maint (cvs-update): Don't assume that the shell
7134 supports $(...), as Solaris sh doesn't.
7135
7136 * src/parse-gram.y (lloc_default): Remove test for empty
7137 nonterminals at the end, since it didn't change the result.
7138
7139 2002-12-24 Paul Eggert <eggert@twinsun.com>
7140
7141 If the user does not define YYSTYPE as a macro, Bison now declares it
7142 using typedef instead of defining it as a macro. POSIX requires this.
7143 For consistency, YYLTYPE is also declared instead of defined.
7144
7145 %union directives can now have a tag before the `{', e.g., the
7146 directive `%union foo {...}' now generates the C code
7147 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7148 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7149 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7150 instead of `yyltype'.
7151
7152 `yystype' and `yyltype' are now obsolescent macros instead of being
7153 typedefs or tags; they are no longer documented and will be
7154 withdrawn in a future release.
7155
7156 * data/glr.c (b4_location_type): Remove.
7157 (YYSTYPE): Renamed from yystype.
7158 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7159 (struct YYLTYPE): Renamed from struct yyltype.
7160 (YYLTYPE): Renamed from yyltype.
7161 (yyltype, yystype): New (and obsolescent) macros,
7162 for backward compatibility.
7163 * data/yacc.c: Likewise.
7164
7165 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7166 does not specify a union tag. This is for compatibility with
7167 Solaris 9 yacc.
7168
7169 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7170 const *, since it is now modified by stripping surrounding { }.
7171 (current_braced_code): Remove.
7172 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7173 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7174 trailing " {...}". Now of type <chars>.
7175 (grammar_declaration): Adjust to bundled tokens.
7176 (code_content): Remove; stripping is now done by add_param.
7177 (print_token_value): Print contents of bundled tokens.
7178 (token_name): New function.
7179
7180 * src/reader.h (braced_code, current_braced_code): Remove.
7181 (token_name): New decl.
7182
7183 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7184 token_type, not braced_code code_kind. All uses changed.
7185 (SC_PRE_CODE): New state, for scanning after a keyword that
7186 has (or usually has) an immediately-following braced code.
7187 (token_type): New local var, to keep track of which token type
7188 to return when scanning braced code.
7189 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
7190 <INITIAL>"%parse-param", <INITIAL>"%printer",
7191 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7192 instead of returning a token type immediately.
7193 (<INITIAL>"{"): Set token type.
7194 (<SC_BRACED_CODE>"}"): Use it.
7195 (handle_action_dollar, handle_action_at): Now returns bool
7196 indicating success. Fail if ! current_rule; this prevents a core dump.
7197 (handle_symbol_code_dollar, handle_symbol_code_at):
7198 Remove; merge body into caller.
7199 (handle_dollar, handle_at): Complain in invalid contexts.
7200
7201 * NEWS, doc/bison.texinfo: Document the above.
7202 * NEWS: Fix years and program names in copyright notice.
7203
7204 2002-12-17 Paul Eggert <eggert@twinsun.com>
7205
7206 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7207 Reporting, Table of Symbols): Omit mentions of %lex-param and
7208 %parse-param from the documentation for now.
7209
7210 2002-12-15 Paul Eggert <eggert@twinsun.com>
7211
7212 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7213 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7214 lookahead symbol, and which sets yychar in parser actions) and it
7215 disagreed with the Bison documentation. Bug
7216 reported by Andrew Walrond.
7217
7218 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7219 as the caller now does that.
7220 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7221 (YYEMPTY): Parenthesize right hand side, since others use it.
7222 (yyparse): Don't assume that our generated code is the only code
7223 that sets yychar.
7224
7225 2002-12-13 Paul Eggert <eggert@twinsun.com>
7226
7227 Version 1.75d.
7228
7229 POSIX requires a "yacc" command.
7230 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7231 (MOSTLYCLEANFILES): Add yacc.
7232 (yacc): New rule.
7233 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
7234 as an alias for bison y.
7235
7236 * po/LINGUAS: Add da.
7237
7238 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7239 problem with latest <getopt.h>.
7240 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7241
7242 * doc/fdl.texi: Upgrade to 1.2.
7243 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7244 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7245 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7246 gnulib.
7247 * config/install-sh: Sync with autotools.
7248
7249 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
7250 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7251 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7252 locations are requested.
7253 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7254 locations are requested.
7255
7256 2002-12-12 Paul Eggert <eggert@twinsun.com>
7257
7258 Remove unportable casts and storage allocation tricks.
7259 While we're at it, remove almost all casts, since they
7260 usually aren't needed and are a sign of trouble.
7261
7262 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7263
7264 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7265 the pointer DSET returned by malloc; this isn't portable.
7266 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7267 Similarly for DERIVES.
7268 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7269 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7270 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7271
7272 * src/derives.c (derives_compute): Do not bother invoking
7273 int_of_rule_number, since rule numbers are integers.
7274
7275 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7276 rather than XMALLOC (char, N).
7277
7278 * src/files.c (filename_split): Rewrite to avoid cast.
7279
7280 * src/gram.h (symbol_number_as_item_number,
7281 item_number_as_symbol_number, rule_number_as_item_number,
7282 item_number_as_rule_number):
7283 Now inline functions rather than macros, to avoid casts.
7284 * src/state.h (state_number_as_int): Likewise.
7285 * src/tables.c (state_number_to_vector_number,
7286 symbol_number_to_vector_number): Likewise.
7287
7288 * src/gram.h (int_of_rule_number): Remove; no longer used.
7289
7290 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7291 since the resulting storage is always stored into.
7292
7293 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7294 where it's needed.
7295
7296 * src/muscle_tab.c (muscle_m4_output):
7297 Now inline. Return bool, not int.
7298 * src/state.c (state_compare): Likewise.
7299 * src/symtab.c (symbol_check_defined,
7300 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7301 hash_compare_symbol, hash_symbol):
7302 Likewise.
7303 * src/uniqstr.c (uniqstr_print): Likewise.
7304 * src/muscle_tab.c (muscle_m4_output_processor):
7305 New function, to avoid casts.
7306 * src/state.c (state_comparator, stage_hasher): Likewise.
7307 * src/symtab.c (symbol_check_defined_processor,
7308 symbol_check_alias_consistency_processor, symbol_pack_processor,
7309 symbol_translation_processor, hash_symbol_comparator,
7310 hash_symbol_hasher): Likewise.
7311 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7312 * src/muscle_tab.c (muscles_m4_output):
7313 Use new functions instead of casting old functions unportably.
7314 * src/state.c (state_hash_new): Likewise.
7315 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7316 symbols_token_translations_init):
7317 Likewise.
7318 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7319
7320 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7321 var instead of casting to long, to avoid casts.
7322 (prepare_states): Use MALLOC rather than alloca, so that we don't
7323 have to worry about alloca.
7324 * src/state.c (state_hash_lookup): Likewise.
7325
7326 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7327 local var instead of casting to unsigned char, to avoid casts.
7328
7329 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7330 STATE_ALLOC): Remove.
7331 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7332 rather than calloc, and use offsetof to avoid allocating slightly
7333 too much storage.
7334 (state_new): Initialize all members.
7335
7336 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7337
7338 * src/symtab.c (symbol_free): Remove; unused.
7339 (symbol_get): Remove cast in lhs of assignment.
7340 (symbols_do): Now static. Accept generic arguments, not
7341 hashing-related ones.
7342
7343 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7344 (symbol_processor): Remove.
7345 (symbols_do): Remove decl; now static.
7346
7347 * src/system.h (alloca): Remove; decl no longer needed.
7348 (<stddef.h>): Include, for offsetof.
7349 (<inttypes.>, <stdint.h>): Include if available.
7350 (uintptr_t): New type, if system lacks it.
7351 (CALLOC, MALLOC, REALLOC): New macros.
7352 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7353 new macros.
7354
7355 * src/tables.c (table_size): Now int, to pacify GCC.
7356 (table_grow, table_ninf_remap): Use signed table size.
7357 (save_row): Don't bother initializing locals when not needed.
7358 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7359 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7360
7361 * src/vcg.h: Correct misspellings.
7362
7363 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7364
7365
7366 * src/getargs.c (getargs): Don't assume EOF == -1.
7367
7368 2002-12-09 Paul Eggert <eggert@twinsun.com>
7369
7370 Change identifier spellings to avoid collisions with names
7371 that are reserved by POSIX.
7372
7373 Don't use names ending in _t, since POSIX reserves them.
7374 For consistency, remove _e and _s endings -- they're weren't
7375 needed to remove ambiguity. All uses changed.
7376 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7377 turn was just renamed from struniq_t.
7378 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7379 which in turn was just renamed from struniq_processor_t.
7380 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7381 in turn was renamed from hash_compare_struniq_t.
7382 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7383 (state_list): Renamed from state_list_t.
7384 * src/assoc.h (assoc): Renamed from assoc_t.
7385 * src/conflicts.c (enum conflict_resolution): Renamed from
7386 enum conflict_resolution_e.
7387 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7388 (rule_list): Renamed from rule_list_t.
7389 * src/getargs.h (enum trace): Renamed from enum trace_e.
7390 (enum report): Renamed from enum report_e.
7391 * src/gram.h (item_number): Renamed from item_number_t.
7392 (rule_number): Renamed from rule_number_t.
7393 (struct rule_s): Remove the "rule_s" part; not used.
7394 (rule): Renamed from rule_t.
7395 (rule_filter): Renamed from rule_filter_t.
7396 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7397 (goto_list): Renamed from goto_list_t.
7398 * src/lalr.h (goto_number): Renamed from goto_number_t.
7399 * src/location.h (location): Renamed from location_t.
7400 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7401 and moved here from:
7402 * src/muscle_tab.h (muscle_entry_t): here.
7403 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7404 (rule_list): Renamed from rule_list_t.
7405 * src/print_graph.c (static_graph): Renamed from graph.
7406 * src/reader.h (braced_code): Renamed from braced_code_t.
7407 Remove brace_code_e tag.
7408 * src/relation.h (relation_node): Renamed from relation_node_t.
7409 (relation_nodes): Renamed from relation_nodes_t.
7410 (relation): Renamed from relation_t.
7411 * src/state.h (state_number): Renamed from state_number_t.
7412 (struct state): Renamed from struct state_s.
7413 (state): Renamed from state_t.
7414 (transitions): Renamed from transitions_t. Unused (and
7415 misspelled) transtion_s tag removed.
7416 (errs): Renamed from errs_t. Unused errs_s tag removed.
7417 (reductions): Renamed from reductions_t. Unused tag
7418 reductions_s removed.
7419 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7420 (struct symbol_list): Renamed from struct symbol_list_s.
7421 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7422 (struct symbol): Renamed from struct symbol_s.
7423 (symbol): Renamed from symbol_t.
7424 * src/tables.c (vector_number): Renamed from vector_number_t.
7425 (action_number): Renamed from action_t.
7426 * src/tables.h (base_number): Renamed from base_t.
7427 * src/vcg.h (enum color): Renamed from enum color_e.
7428 (enum textmode): Renamed from enum textmode_e.
7429 (enum shape): Renamed from enum shape_e.
7430 (struct colorentry): Renamed from struct colorentry_s.
7431 (struct classname): Renamed from struct classname_s.
7432 (struct infoname): Renamed from struct infoname_s.
7433 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7434 (enum decision): Renamed from enum decision_e.
7435 (enum orientation): Renamed from enum orientation_e.
7436 (enum alignment): Renamed from enum alignment_e.
7437 (enum arrow_mode): Renamed from enum arrow_mode_e.
7438 (enum crossing_type): Renamed from enum crossing_type_e.
7439 (enum view): Renamed from enum view_e.
7440 (struct node): Renamed from struct node_s.
7441 (node): Renamed from node_t.
7442 (enum linestyle): Renamed from enum linestyle_e.
7443 (enum arrowstyle): Renamed from enum arrowstyle_e.
7444 (struct edge): Renamed from struct edge.
7445 (edge): Renamed from edge_t.
7446 (struct graph): Renamed from struct graph_s.
7447 (graph): Renamed from graph_t.
7448 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7449 Rename value_t -> value.
7450 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7451 value_t_as_yystype -> value_as_yystype.
7452
7453 Don't include <errno.h> in the mainstream code, since it
7454 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7455 * lib/get-errno.c, lib/get-errno.h: New files.
7456 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7457 get-errno.c.
7458 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7459 * src/output.c (output_skeleton): Likewise.
7460 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7461 instead of errno.
7462 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7463 Likewise.
7464 (handle_action_dollar, handle_action_at): Likewise.
7465 * src/system.h: Do not include <errno.h>.
7466 (TAB_EXT): Renamed from EXT_TAB.
7467 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7468
7469 Avoid str[a-z]*, since <string.h> reserves that name space.
7470 Change all instances of "struniq" in names to "uniqstr", and
7471 likewise for "STRUNIQ" and "UNIQSTR".
7472 * src/uniqstr.c: Renamed from src/struniq.c.
7473 * src/uniqstr.h: Renamed from src/struniq.h.
7474 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7475 * src/files.c (strsuffix): Remove; unused.
7476 (concat2): Renamed from stringappend. Now static.
7477 * src/files.h (strsuffix, stringappend): Remove; unused.
7478 * src/parse-gram.y (<chars>): Renamed from <string>.
7479 (<uniqstr>): Renamed from <struniq>.
7480 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7481 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7482 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7483 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7484 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7485 (N_EXPAND): Renamed from N_STRETCH.
7486
7487 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7488 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7489 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7490 Remove; unused.
7491 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7492 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7493 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7494 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7495 (BASE_MAXIMUM): Renamed from BASE_MAX.
7496 (BASE_MINIMUM): Renamed from BASE_MIN.
7497 (ACTION_MAX): Remove; unused.
7498 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7499 Unnecessary casts removed from above defines.
7500
7501
7502 Fix misspelling in names.
7503 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7504 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7505 G_NODE_ALIGNEMENT.
7506
7507
7508 * lib/timevar.c (timevar_report): Renamed from time_report,
7509 for consistency with other names.
7510 * lib/timevar.h (timevar_report): New decl.
7511 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7512
7513
7514 Sort include-file uses.
7515
7516 Reorder all include files under src to be in the order "system.h".
7517 then the ../lib include files in angle brackets (alphabetized),
7518 then the . include files in double-quotes (alphabetized). Fix
7519 dependency breakages encountered in this process, as follows:
7520 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7521 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7522 * src/state.h: Include "symtab.h".
7523
7524 2002-12-08 Paul Eggert <eggert@twinsun.com>
7525
7526 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7527 since this causes problems when __file__ contains character
7528 sequences like "@" that are treated specially by src/scan-skel.l.
7529 Instead, just use the file's basename. This fixes the bug
7530 reported by Martin Mokrejs in
7531 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7532
7533 2002-12-06 Paul Eggert <eggert@twinsun.com>
7534
7535 Add support for rules that do not have trailing semicolons, as
7536 POSIX requires. Improve the quality of locations in Bison
7537 diagnostics.
7538
7539 * src/location.c: Include <quotearg.h>.
7540 (empty_location): Now const.
7541 (location_print): New function. Follow the recommendation of the
7542 GNU Coding Standards for locations that span file boundaries.
7543 * src/location.h: Do not include <quotearg.h>; no longer needed.
7544 (boundary): New type.
7545 (location_t): Use it. This allows locations to span file boundaries.
7546 All member uses changed: file -> start.file or end.file (as needed),
7547 first_line -> start.line, first_column -> start.column,
7548 last_line -> end.line, last_column -> end.column.
7549 (equal_boundaries): New function.
7550 (LOCATION_RESET, LOCATION_STEP): Remove.
7551 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7552 (empty_location): Now const.
7553 (location_print): New decl.
7554 * src/parse-gram.y (lloc_default): New function, which handles
7555 empty locations more accurately.
7556 (YYLLOC_DEFAULT): Use it.
7557 (%token COLON): Remove.
7558 (%token ID_COLON): New token.
7559 (rules): Use it.
7560 (declarations, rules): Remove trailing semicolon.
7561 (declaration, rules_or_grammar_declaration):
7562 Allow empty (";") declaration.
7563 (symbol_def): Remove empty actions; no longer needed.
7564 (rules_or_grammar_declaration): Remove trailing semicolon.
7565 (semi_colon.opt): Remove.
7566 * src/reader.h: Include location.h.
7567 (scanner_cursor): New decl.
7568 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7569 rolling our own.
7570 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7571 of *loc.
7572 (STEP): Remove. No longer needed, now that adjust_location does
7573 the work. All uses removed.
7574 (scanner_cursor): New var.
7575 (adjust_location): Renamed from extend_location. It now sets
7576 *loc and adjusts the scanner cursor. All uses changed.
7577 Don't bother testing for CR.
7578 (handle_syncline): Remove location arg; now updates scanner cursor.
7579 All callers changed.
7580 (unexpected_end_of_file): Now accepts start boundary of token or
7581 comment, not location. All callers changed. Update scanner cursor,
7582 not the location.
7583 (SC_AFTER_IDENTIFIER): New state.
7584 (context_state): Renamed from c_context. All uses changed.
7585 (id_loc, code_start, token_start): New local vars.
7586 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7587 processing of Yacc white space and equivalents here.
7588 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7589 instead of returning ID immediately, since we need to search for
7590 a subsequent colon.
7591 (<INITIAL>"'", "\""): Save token_start.
7592 (<INITIAL>"%{", "{", "%%"): Save code_start.
7593 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7594 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7595 BEGIN context_state at end, not INITIAL.
7596 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7597 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7598 Return correct token start.
7599 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7600 the start of a character, string or multiline comment is found.
7601 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7602 Reduction): Adjust reported locations to match the more-precise
7603 results now expected.
7604 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7605 * tests/reduce.at (Useless Rules, Reduced Automaton,
7606 Underivable Rules): Likewise.
7607 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7608 or "|"' now that so many other tokens are allowed by the new grammar.
7609
7610 * src/complain.h (current_file): Remove duplicate decl;
7611 current_file is now owned by files.h.
7612 * src/complain.c, src/scan-gram.l: Include files.h.
7613
7614 2002-12-06 Paul Eggert <eggert@twinsun.com>
7615
7616 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7617 promotes to int; it might be unsigned int.
7618 * data/yacc.c (yy_reduce_print): Likewise.
7619
7620 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7621 be #defined in the prologue, not in the Bison declarations.
7622 This fixes Debian Bug 102878, reported by Shaul Karl.
7623
7624 2002-12-02 Paul Eggert <eggert@twinsun.com>
7625
7626 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7627 * lib/strtoul.c: New file, from gnulib.
7628 This fixes a porting bug reported by Peter Klein in
7629 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
7630
7631 2002-11-30 Paul Eggert <eggert@twinsun.com>
7632
7633 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7634 and put only a forward declaration in the prologue. This is for
7635 consistency with the other scanner helper functions.
7636
7637 Type clashes now generate warnings, not errors, since it
7638 appears that POSIX may allow some grammars with type clashes.
7639 * src/reader.c (grammar_current_rule_check): Warn about
7640 type clashes instead of complaining.
7641 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7642
7643 Add Yacc library, since POSIX requires it.
7644 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7645 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7646 * lib/main.c, lib/yyerror.c: New files.
7647
7648 gram_error can be static; it need not be extern.
7649 * src/reader.h (gram_error): Remove decl.
7650 * src/parse-gram.y (gram_error): Now static. Add static decl.
7651 (print_token_value): Omit parameter names from forward decl,
7652 for consistency.
7653
7654 2002-11-29 Paul Eggert <eggert@twinsun.com>
7655
7656 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7657 be declared before being used. E.g., one should typically
7658 declare them in the prologue. Use GNU coding style in examples.
7659 Put "const" consistently after the type it modifies. Mention
7660 that C99 supports "inline". Mention that yyerror traditionally
7661 returns "int".
7662
7663 %parse-param and %lex-param now take just one argument, the
7664 declaration; the argument name is deduced from the declaration.
7665
7666 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7667 Reporting, Table of Symbols): Document this.
7668 * src/parse-gram.y (add_param): New function.
7669 (COMMA): Remove.
7670 (declaration): Implement new rule for %parse-param and %lex-param.
7671 * src/scan-gram.l: "," now elicits a warning, rather than being
7672 a token; this is more compatible with byacc.
7673 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7674
7675 2002-11-27 Paul Eggert <eggert@twinsun.com>
7676
7677 Rename identifiers to avoid real and potential collisions.
7678
7679 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7680 to avoid collision with lex macro described by Bruce Lilly in
7681 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7682 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7683 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7684 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7685 All uses changed.
7686 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7687 The name "yycontrol" violates the name space rules, and this stuff
7688 wasn't being used anyway.
7689 (input): Remove action; this stuff wasn't being used.
7690 (gram_error): Rename local variable yylloc -> loc.
7691 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7692 (YY_DECL): Don't use "yy" at start of local variables.
7693 All uses changed, e.g., yylloc -> loc.
7694 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7695 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7696 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7697 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7698
7699 * src/parse-gram.y (gram_error): loc is now const *.
7700 * src/reader.h (gram_error): Likewise.
7701
7702 2002-11-24 Paul Eggert <eggert@twinsun.com>
7703
7704 Version 1.75c.
7705
7706 * tests/actions.at (Actions after errors): Use an output format
7707 more similar to that of the Printers and Destructors test.
7708 Test the position of the ';' token too.
7709 (Printers and Destructors): Likewise.
7710 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7711 unnecessarily alarming people when the test fails.
7712
7713 * data/yacc.c (yyerrlab1): Move this label down, so that the
7714 parser does not discard the lookahead token if the user code
7715 invokes YYERROR. This change is required for POSIX conformance.
7716
7717 * lib/error.c: Sync with gnulib.
7718
7719 2002-11-22 Paul Eggert <eggert@twinsun.com>
7720
7721 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7722 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7723 * lib/xmalloc.c: Likewise.
7724
7725 2002-11-20 Paul Eggert <eggert@twinsun.com>
7726
7727 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7728
7729 2002-11-20 Paul Eggert <eggert@twinsun.com>
7730
7731 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7732 should use `if (! x) abort ();' rather than `assert (x);', and
7733 anyway it's one less thing to worry about configuring.
7734
7735 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7736 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7737 and replace all instances of assert with abort.
7738 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7739 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7740
7741 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7742 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7743 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7744 hash_find_entry, hash_rehash, hash_insert): Likewise.
7745 * src/conflicts.c (resolve_sr_conflict): Likewise.
7746 * src/lalr.c (set_goto_map, map_goto): Likewise.
7747 * src/nullable.c (nullable_compute): Likewise.
7748 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7749 * src/reader.c (packgram, reader): Likewise.
7750 * src/state.c (state_new, state_free, state_transitions_set,
7751 state_reduction_find): Likewise.
7752 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7753 symbol_pack): Likewise.
7754 * src/tables.c (conflict_row, pack_vector): Likewise.
7755 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7756 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7757 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7758 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7759
7760 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7761 (ARGMATCH_CONSTRAINT): New macro.
7762 (ARGMATCH_ASSERT): Use it.
7763
7764 * src/system.h (verify): New macro.
7765 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7766 rather than assert.
7767 * src/tables.c (tables_generate): Likewise.
7768
7769 * src/struniq.c (struniq_assert): Now returns void, and aborts
7770 if the assertion is false.
7771 (struniq_assert_p): Remove.
7772 * src/struniq.h: Likewise.
7773
7774 2002-11-18 Paul Eggert <eggert@twinsun.com>
7775
7776 * data/glr.c (yygetLRActions): Replace `yyindex' with
7777 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7778 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7779 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7780
7781 2002-11-18 Akim Demaille <akim@epita.fr>
7782
7783 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7784 space.
7785 From Tim Van Holder.
7786
7787 2002-11-17 Paul Eggert <eggert@twinsun.com>
7788
7789 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7790 to "SyntaxError" for consistency with my 2002-11-15 change.
7791
7792 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7793 not define to {}, since this breaks the common use of `YYDPRINTF
7794 ((...));' if a single statement is desired (e.g. before `else').
7795 Work around GCC warnings by surrounding corresponding calls with
7796 {} if needed.
7797 (yyhasResolvedValue): Remove unused function.
7798 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7799 loop body.
7800 (yyreportSyntaxError): Renamed from yyreportParseError.
7801 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7802 All uses changed.
7803 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7804 extern when possible. Remove unused initializations.
7805
7806 2002-11-16 Akim Demaille <akim@epita.fr>
7807
7808 Augment the similarity between GLR and LALR traces.
7809
7810 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7811 (YY_REDUCE_PRINT): New.
7812 (yyparse): Use them.
7813 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7814 YYDPRINT here.
7815 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7816 state reached after the reduction/recovery, since...
7817 (yyparse, yyprocessOneStack): Report the state we are entering in.
7818
7819 2002-11-16 Akim Demaille <akim@epita.fr>
7820
7821 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7822 Add support for --trace=skeleton.
7823 * src/scan-skel.l: %option debug.
7824 Scan strings of non-@ or \n instead of character by character.
7825 (scan_skel): Handle trace_skeleton.
7826 (QPUTS): New.
7827 (@output_parser_name@, @output_header_name@): ``Restore'' their
7828 support (used to be M4 macros).
7829 * data/yacc.c: Quote larger chunks, a la glr.c.
7830 * data/lalr1.cc: Likewise.
7831 The header guards are no longer available, so use some other
7832 string than `YYLSP_NEEDED'.
7833
7834 2002-11-16 Akim Demaille <akim@epita.fr>
7835
7836 Make the ``Printers and Destructors'' test more verbose, taking
7837 `yacc.c''s behavior as (possibly wrong) reference.
7838
7839 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7840 instead of fprint on stdout.
7841 Set and report the last_line of the symbols.
7842 Consistently display values and locations.
7843
7844 2002-11-16 Paul Eggert <eggert@twinsun.com>
7845
7846 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7847
7848 2002-11-15 Paul Eggert <eggert@twinsun.com>
7849
7850 * tests/actions.at (Actions after errors): New test case.
7851
7852 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7853 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7854 tests/action.at, tests/calc.at, tests/conflicts.at,
7855 tests/cxx-type.at, tests/regression.at:
7856 "parse error" -> "syntax error" for POSIX compatibility.
7857 "parsing stack overflow..." -> "parser stack overflow" so
7858 that code matches Bison documentation.
7859
7860 2002-11-15 Akim Demaille <akim@epita.fr>
7861
7862 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7863 take two BRACED_CODE, not two string_content.
7864 Free the scanner's obstack when we are done.
7865 (code_content): New.
7866 * tests/calc.at: Adjust.
7867 * doc/bison.texinfo: Adjust.
7868 Also, make sure to include the `,' for these declarations.
7869
7870 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7871
7872 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7873 definition; avoids potential autoreconf problems.
7874
7875 2002-11-15 Akim Demaille <akim@epita.fr>
7876
7877 Always check the value returned by yyparse.
7878
7879 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7880 returned by yyparse.
7881 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7882 Adjust calls.
7883 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7884 returned by yyparse.
7885
7886 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7887
7888 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7889 on input.at test.
7890
7891 2002-11-14 Paul Eggert <eggert@twinsun.com>
7892
7893 * src/output.c (output_skeleton): Call xfopen instead of
7894 duplicating xfopen's body.
7895
7896 Fix bugs reported by Nelson H. F. Beebe in
7897 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
7898
7899 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7900 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7901 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7902 file twice in the grammar, as an extra check.
7903
7904 * tests/input.at (Torturing the Scanner): Surround the
7905 backslash-newline tests with "#if 0", to make it less likely that
7906 we'll run into compiler bugs. Bring back solitary \ inside
7907 comment, but add a closing comment to work around HP C bug. Don't
7908 test backslash-newline in C character constant.
7909
7910 2002-11-14 Akim Demaille <akim@epita.fr>
7911
7912 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7913 status of the compiler.
7914 Calling `exit 1' is no longer needed.
7915 Reported by Nelson H. F. Beebe.
7916
7917 2002-11-14 Akim Demaille <akim@epita.fr>
7918
7919 * tests/atlocal.in (CPPFLAGS): We have config.h.
7920 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7921 New.
7922 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7923 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7924 * tests/regression.at, tests/torture.at: Use them for all the
7925 grammars that are to be compiled.
7926 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7927 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7928 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7929
7930 2002-11-14 Akim Demaille <akim@epita.fr>
7931
7932 * doc/bison.texinfo: Various formatting changes (alignments in
7933 samples, additional @group/@end group, GCS in samples.
7934 Use @deffn instead of simple @table to define the directives,
7935 macros, variables etc.
7936
7937 2002-11-13 Paul Eggert <eggert@twinsun.com>
7938
7939 Fix some bugs reported by Albert Chin-A-Young in
7940 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
7941
7942 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
7943 -o c"; the HP C compiler chatters during compilation.
7944 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7945 * tests/headers.at (export YYLTYPE): Likewise.
7946
7947 * tests/input.at (Torturing the Scanner): Remove lines containing
7948 solitary backslashes, as they tickle a bug in the HP C compiler.
7949
7950 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7951 comments, since they're not portable. Use GNU coding style.
7952
7953 2002-11-13 Akim Demaille <akim@epita.fr>
7954
7955 * data/yacc.c: Leave bigger chunks of quoted text.
7956 (YYDSYMPRINTF): New.
7957 Use it to report symbol activities.
7958 * data/glr.c (YYDSYMPRINTF): New.
7959 Use it.
7960
7961 2002-11-12 Paul Eggert <eggert@twinsun.com>
7962
7963 Version 1.75b.
7964
7965 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7966 (yyglrReduce): Return yyok, not 0.
7967 This should avoid the enumerated-type warnings reported
7968 by Nelson H. F. Beebe in
7969 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
7970
7971 * lib/bbitset.h (BITSET_INLINE): Remove.
7972 * lib/bitset.h [! BITSET_INLINE]: Remove.
7973 (bitset_set, bitset_reset, bitset_test): Rename local vars
7974 to avoid shadowing warnings by GCC.
7975
7976 * data/glr.c (inline): Remove #define. It's the user's
7977 responsibility to #define it away, just like 'const'.
7978 This fixes one of the bugs reported by Nelson H. F. Beebe in
7979 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
7980
7981 * Makefile.maint (po-check): Scan .l and .y files instead of the
7982 .c and the .h files that they generate. This fixes the bug
7983 reported by Tim Van Holder in:
7984 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
7985 Look for N_ as well as for _. Try to avoid matching #define for
7986 N_ and _.
7987 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7988 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7989 * src/scan-gram.l: Revamp regular expressions so that " and '
7990 do not confuse xgettext.
7991
7992 * src/struniq.h (struniq_new): Do not declare the return type
7993 to be 'const'; this violates the C standard.
7994 * src/struniq.c (struniq_new): Likewise.
7995
7996 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7997
7998 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7999 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8000 linker.
8001
8002 2002-11-12 Akim Demaille <akim@epita.fr>
8003
8004 * Makefile.maint: Sync with Autoconf:
8005 (local_updates): New.
8006
8007 2002-11-12 Akim Demaille <akim@epita.fr>
8008
8009 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8010
8011 2002-11-12 Akim Demaille <akim@epita.fr>
8012
8013 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8014 locations.
8015
8016 2002-11-12 Akim Demaille <akim@epita.fr>
8017
8018 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8019 not yyvalue.
8020
8021 2002-11-12 Akim Demaille <akim@epita.fr>
8022
8023 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8024 Use it to test the GLR parser.
8025
8026 2002-11-12 Akim Demaille <akim@epita.fr>
8027
8028 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8029 defines it.
8030 * data/glr.c (yystos): New.
8031 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8032 (YYDSYMPRINT): New.
8033 (yyval): Don't define it, it is handled via M4.
8034 (yyrecoverParseError): Free verbosely the discarded symbols.
8035 * data/yacc.c (yysymprint): Remove, rather...
8036 (b4_yysymprint_generate): invoke.
8037 * data/c.m4 (b4_yysymprint_generate): New.
8038 Accept pointers as arguments, as opposed to the version from
8039 yacc.c.
8040 (b4_yydestruct_generate): Likewise.
8041 * tests/cations.at (Printers and Destructors): Use Bison directives
8042 instead of CPP macros.
8043 Don't rely on internal details.
8044
8045 2002-11-12 Akim Demaille <akim@epita.fr>
8046
8047 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8048 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8049 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8050 it against YYEMPTY and so forth), work on yytoken (i.e., set
8051 it to YYEMPTY etc.).
8052 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8053 (b4_symbol_actions): Remove.
8054 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8055 for 0, end-of-input.
8056
8057 2002-11-12 Akim Demaille <akim@epita.fr>
8058
8059 * doc/bison.texinfo (Destructor Decl): New.
8060
8061 2002-11-12 Akim Demaille <akim@epita.fr>
8062
8063 * src/tables.c (tables_generate): Use free for pointers that
8064 cannot be NULL, not XFREE.
8065 (pack_vector): Use assert, not fatal, for bound violations.
8066 * src/state.c (state_new): Likewise.
8067 * src/reader.c (reader): Likewise.
8068 * src/lalr.c (set_goto_map): Likewise.
8069 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
8070 the file name.
8071
8072 2002-11-12 Akim Demaille <akim@epita.fr>
8073
8074 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8075 Restore.
8076 * src/scan-gram.l (last_string): Is global to the file, not to
8077 yylex.
8078 * src/parse-gram.y (input): Don't append the epilogue here,
8079 (epilogue.opt): do it here, and free the scanner's obstack.
8080 * src/reader.c (epilogue_set): Rename as...
8081 (epilogue_augment): this.
8082 * data/c.m4 (b4_epilogue): Defaults to empty.
8083
8084 2002-11-12 Akim Demaille <akim@epita.fr>
8085
8086 * src/getargs.c (long_options): Remove duplicates.
8087 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8088 Remove.
8089 * doc/bison.rnh: Remove.
8090 * doc/bison.texinfo (VMS Invocation): Remove.
8091
8092 2002-11-12 Akim Demaille <akim@epita.fr>
8093
8094 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8095 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8096
8097 Use struniq for symbols.
8098
8099 * src/symtab.h (symbol_t): The tag member is a struniq.
8100 (symbol_type_set): Adjust.
8101 * src/symtab.c (symbol_new): Takes a struniq.
8102 (symbol_free): Don't free the tag member.
8103 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8104 (hash_compare_symbol, hash_symbol): these.
8105 Use the fact that tags as struniqs.
8106 (symbol_get): Use struniq_new.
8107 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8108 Returns a strniq.
8109 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8110 and type members are struniqs.
8111 * src/reader.c (get_merge_function)
8112 (grammar_current_rule_merge_set): Adjust.
8113 (TYPE, current_type): Are struniq.
8114
8115 Use struniq for file names.
8116
8117 * src/files.h, src/files.c (infile): Split into...
8118 (grammar_file, current_file): these.
8119 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8120 * src/reduce.c (reduce_print): Likewise.
8121 * src/getargs.c (getargs): Likewise.
8122 * src/complain.h, src/complain.c: Likewise.
8123 * src/main.c (main): Call struniqs_new early enough to use it for
8124 file names.
8125 Don't free the input file name.
8126
8127 2002-11-12 Akim Demaille <akim@epita.fr>
8128
8129 * src/symtab.c (symbol_free): Remove dead deactivated code:
8130 type_name are properly removed.
8131 Don't use XFREE to free items that cannot be NULL.
8132 * src/struniq.h, src/struniq.c: New.
8133 * src/main.c (main): Initialize/free struniqs.
8134 * src/parse-gram.y (%union): Add astruniq member.
8135 (yyprint): Adjust.
8136 * src/scan-gram.l (<{tag}>): Return a struniq.
8137 Free the obstack bit that used to store it.
8138 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8139
8140 2002-11-11 Paul Eggert <eggert@twinsun.com>
8141
8142 Revamp to fix many (but not all) of the C- and M4-related quoting
8143 problems. Among other things, this fixes the Bison bug reported
8144 by Jan Hubicka when processing the Bash grammar; see:
8145 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
8146
8147 Use new @ escapes consistently. Represent brackets with @{ and @}
8148 rather than @<:@ and @:>@, since this works a bit better with dumb
8149 editors like vi. Represent @ with @@, since @ is now consistently
8150 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8151 __ofile__, to avoid unexpected expansions. Similarly, use @output
8152 rather than #output.
8153
8154 * data/c.m4 (b4_copyright): Omit file name from comment, since
8155 the file name could contain "*/".
8156 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8157 be quoted. All uses changed.
8158
8159 * data/glr.c: Use new @ escapes consistently.
8160 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8161 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8162 Remove, since they couldn't handle arbitrary characters in file
8163 names.
8164 * data/lalr1.cc: Likewise.
8165 * data/yacc.c: Likewise.
8166
8167 * src/files.c (output_infix): Remove; all uses removed.
8168 * src/files.h: Likewise.
8169
8170 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8171 mishandled funny characters in file names, and anyway it isn't
8172 needed any more.
8173 * data/yacc.c: Likewise.
8174 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8175
8176 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8177 * data/yacc.c: Likewise.
8178
8179 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8180 strings now.
8181 (muscle_init): Quote filename as a C string.
8182 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8183 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8184 * src/output.c (escaped_file_name_output): New function.
8185 (prepare_symbols): Quote tokens for M4.
8186 (prepare): Don't insert output_infix, output_prefix,
8187 output_parser_name, output_header_name; this is now down by scan-skel.
8188 Insert skeleton as a C string.
8189
8190 * src/output.c (user_actions_output, symbol_destructors_output,
8191 symbol_printers_output): Quote filenames for C and M4.
8192 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8193
8194 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8195 escapes other than \\ and \'; this simplifies the code.
8196 (<SC_STRING>): Likewise, for \\ and \".
8197 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8198 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8199 Use new escapes @{ and @} for [ and ].
8200
8201 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8202 them with auto vars.
8203 Switch to new escape scheme, where @ is the escape character uniformly.
8204 Abort if a stray escape character is found. Avoid unbounded input
8205 buffer when parsing non-escaped text.
8206
8207 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8208 __oline__, #output, $@, and @{ do not have unintended meanings.
8209
8210 2002-11-09 Paul Eggert <eggert@twinsun.com>
8211
8212 Fix the test failure due to GCC warnings described in
8213 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
8214 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8215 evaluate to 0 if it's impossible for NINF to be in the respective
8216 table.
8217 (yygetLRActions, yyrecoverParseError): Use them.
8218
8219 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8220 counted in the token inserted at end of file. Now takes
8221 location_t *, not location_t, so that the location can be
8222 adjusted. All uses changed.
8223
8224 * tests/regression.at (Invalid inputs): Adjust wording in
8225 diagnostic to match the new behavior.
8226
8227 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8228 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8229 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8230 abort ();'. This reduces the runtime of the "Many lookaheads"
8231 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8232 GCC 3.2.
8233
8234 2002-11-07 Paul Eggert <eggert@twinsun.com>
8235
8236 * src/parse-gram.y (CHARACTER): Remove unused token.
8237 All uses removed.
8238
8239 * src/scan-gram.l: Remove stack option. We no longer use the
8240 stack, since the stack was never deeper than 1; instead, use the
8241 new auto var c_context to record the stacked value.
8242
8243 Remove nounput option. At an unexpected end of file, we now unput
8244 the minimal input necessary to end cleanly; this simplifies the
8245 code.
8246
8247 Avoid unbounded token sizes where this is easy.
8248
8249 (unexpected_end_of_file): New function.
8250 Use it to systematize the error message on unexpected EOF.
8251 (last-string): Now auto, not static.
8252 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8253 (scanner_last_string_free): Remove; not used.
8254 (percent_percent_count): Move decl to just before use.
8255 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8256 not the (never otherwised-used) CHARACTER.
8257
8258 2002-11-07 Akim Demaille <akim@epita.fr>
8259
8260 Let yyerror always receive the msg as last argument, so that
8261 yyerror can be variadic.
8262
8263 * data/yacc.c (b4_yyerror_args): New.
8264 Use it when calling yyerror.
8265 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8266 Use it when calling yyerror.
8267 * doc/bison.texinfo (Error Reporting): Adjust.
8268 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8269 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8270
8271 2002-11-06 Akim Demaille <akim@epita.fr>
8272
8273 #line should have quoted strings.
8274 Ideally, this should be done by m4_quotearg.
8275
8276 * src/scan-skel.l: Include quotearg.h.
8277 Quote __ofile__.
8278 * src/output.c (symbol_printers_output)
8279 (symbol_destructors_output): Quote the file name.
8280
8281 2002-11-06 Akim Demaille <akim@epita.fr>
8282
8283 * tests/regression.at (Invalid inputs): Adjust to the recent
8284 messages.
8285
8286 2002-11-06 Akim Demaille <akim@epita.fr>
8287
8288 Restore --no-lines.
8289 Reported by Jim Kent.
8290
8291 * data/c.m4 (b4_syncline): New.
8292 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8293 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8294 * src/output.c (user_actions_output): Likewise.
8295 (prepare): Define 'b4_synclines_flag'.
8296 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
8297
8298 2002-11-06 Akim Demaille <akim@epita.fr>
8299
8300 * src/main.c (main): Free `infile'.
8301 * src/scan-gram.l (handle_syncline): New.
8302 Recognize `#line'.
8303 * src/output.c (user_actions_output, symbol_destructors_output)
8304 (symbol_printers_output): Use the location's file name, not
8305 infile.
8306 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8307
8308 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8309
8310 * src/tables.c (matching_state): Don't allow states to match if
8311 either has GLR conflict entries.
8312
8313 2002-11-05 Paul Eggert <eggert@twinsun.com>
8314
8315 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8316 "integer out of range" rather than "invalid value".
8317 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8318 accordingly.
8319
8320 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8321 Also, remove one static variable in the scanner.
8322
8323 * src/scan-gram.l (braces_level): Now auto, not static.
8324 Initialize to zero if the compiler is being picky.
8325 (INITIAL): Clear braces_level instead of incrementing it.
8326 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8327 as POSIX 1003.1-2001 requires.
8328 * src/system.h (IF_LINT): New macro, taken from coreutils.
8329 * configure.ac: Define "lint" if --enable-gcc-warnings.
8330
8331 2002-11-05 Akim Demaille <akim@epita.fr>
8332
8333 * src/scan-gram.l: When it starts with `%', complain about the
8334 whole directive, not just that `invalid character: %'.
8335
8336 2002-11-04 Akim Demaille <akim@epita.fr>
8337
8338 * Makefile.maint: Update from Autoconf.
8339 (update, cvs-update, po-update, do-po-update): New.
8340
8341 2002-11-04 Akim Demaille <akim@epita.fr>
8342
8343 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8344 and yyerror.
8345 Have yyerror `use' its arguments.
8346 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8347 returns true when location & yacc & pure & parse-param.
8348 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8349
8350 2002-11-04 Akim Demaille <akim@epita.fr>
8351
8352 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8353 clashes.
8354 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8355 font-lock-mode.
8356 Use complain_at.
8357 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8358 slot 0.
8359
8360 2002-11-03 Paul Eggert <eggert@twinsun.com>
8361
8362 * src/reader.c (get_merge_function, grammar_current_rule_check):
8363 Use consistent diagnostics for reporting type name clashes.
8364 Quote the types with <>, for consistency with Yacc.
8365 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8366
8367 2002-11-03 Akim Demaille <akim@epita.fr>
8368
8369 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8370 New.
8371 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8372 (b4_parse_param): Remove.
8373 Use b4_identification.
8374 Propagate b4_pure_args where needed to pass them to yyerror.
8375 * data/glr.m4 (b4_parse_param): Remove.
8376 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8377 (b4_lpure_formals): New.
8378 Use b4_identification.
8379 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8380 b4_user_formals and b4_user_args.
8381 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8382 (yyreportAmbiguity): When using a pure parser, also need
8383 the location, and the parse-params.
8384 Adjust callers.
8385 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8386 When using a pure parser, also need the parse-params.
8387 Adjust callers.
8388 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8389 (%pure-parser + %parse-param) LALR and GLR parsers.
8390 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8391 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8392 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8393 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8394 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8395 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8396 * doc/bison.texinfo: Untabify the whole file.
8397 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8398 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8399 (Error Reporting): Adjust to these new directives.
8400 Document %error-verbose, deprecate YYERROR_VERBOSE.
8401
8402 2002-11-03 Akim Demaille <akim@epita.fr>
8403
8404 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8405 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8406 command line options.
8407 * tests/cxx-type.at: Formatting changes.
8408
8409 2002-11-03 Paul Eggert <eggert@twinsun.com>
8410
8411 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8412 to count columns correctly, and to check for invalid inputs.
8413
8414 Use mbsnwidth to count columns correctly. Account for tabs, too.
8415 Include mbswidth.h.
8416 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8417 (extend_location): New function.
8418 (YY_LINES): Remove.
8419
8420 Handle CRLF in C code rather than in Lex code.
8421 (YY_INPUT): New macro.
8422 (no_cr_read): New function.
8423
8424 Scan UCNs, even though we don't fully handle them yet.
8425 (convert_ucn_to_byte): New function.
8426
8427 Handle backslash-newline correctly in C code.
8428 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8429 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8430 all uses changed.
8431 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8432 Use {splice} wherever C allows backslash-newline.
8433 YY_STEP after space, newline, vertical-tab.
8434 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
8435
8436 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8437
8438 ({int}, handle_action_dollar, handle_action_at): Check for integer
8439 overflow.
8440
8441 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8442
8443 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8444 as well as \000. Check for UCHAR_MAX, not 255.
8445 Allow \x with an arbitrary positive number of digits, as in C.
8446 Check for overflow here.
8447 Allow \? and UCNs, for compatibility with C.
8448
8449 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8450 with quote slot used by complain_at.
8451
8452 * tests/input.at: Add tests for backslash-newline, m4 quotes
8453 in symbols, long literals, and funny escapes in strings.
8454
8455 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8456 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8457 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8458 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8459 * m4/mbswidth.m4: New file, from GNU coreutils.
8460
8461 * doc/bison.texinfo (Grammar Outline): Document // comments.
8462 (Symbols): Document that trigraphs have no special meaning in Bison,
8463 nor is backslash-newline allowed.
8464 (Actions): Document that trigraphs have no special meaning.
8465
8466 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8467 no longer used.
8468
8469 2002-11-02 Paul Eggert <eggert@twinsun.com>
8470
8471 * src/reader.c: Don't include quote.h; not needed.
8472 (get_merge_function): Reword warning to be consistent with
8473 type clash diagnostic in grammar_current_rule_check.
8474
8475 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8476 bug in trigraph handling.
8477
8478 * src/output.c (prepare_symbols): When printing token names,
8479 escape "[" as "@<:@" and likewise for "]".
8480
8481 * src/system.h (errno): Remove declaration, as we are now
8482 assuming C89 or better, and C89 guarantees errno.
8483
8484 2002-10-30 Paul Eggert <eggert@twinsun.com>
8485
8486 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8487 Check for close failures.
8488 * src/files.h (xfclose): Return void, not int, since it always
8489 returned zero.
8490 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8491 indicates one.
8492 * src/output.c (output_skeleton): Use xfclose rather than fclose
8493 and ferror. xfclose now checks ferror.
8494
8495 * data/glr.c (YYLEFTMOST_STATE): Remove.
8496 (yyreportTree): Use a stack-based leftmost state. This avoids
8497 our continuing battles with bogus warnings about initializers.
8498
8499 2002-10-30 Akim Demaille <akim@epita.fr>
8500
8501 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8502 #if.
8503
8504 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8505
8506 * tests/glr-regr1.at: New test for reported regressions.
8507 * tests/testsuite.at: Add glr-regr1.at test.
8508 * tests/Makefile.am: Add glr-regr1.at test.
8509
8510 2002-10-24 Paul Eggert <eggert@twinsun.com>
8511
8512 Version 1.75a.
8513
8514 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8515 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8516 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8517 Don't assume strdup exists; POSIX says its an XSI extension.
8518 Check for buffer overflow on input.
8519
8520 2002-10-24 Akim Demaille <akim@epita.fr>
8521
8522 * src/output.c (output_skeleton): Don't disable M4sugar comments
8523 too soon: it results in comments being expanded.
8524 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8525 first output.
8526
8527 2002-10-24 Akim Demaille <akim@epita.fr>
8528
8529 * data/yacc.c (m4_int_type): New.
8530 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8531 char' as only yacc.c wants K&R portability.
8532 * data/glr.c (yysigned_char): Remove.
8533 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8534 Reported by Quoc Peyrot.
8535
8536 2002-10-23 Paul Eggert <eggert@twinsun.com>
8537
8538 * src/main.c (main): With --trace=time, report times even if a
8539 non-fatal error occurs. Formerly, the times were reported in some
8540 such cases but not in others.
8541 * src/reader.c (reader): Just return if a complaint has been issued,
8542 instead of exiting, so that 'main' can report times.
8543
8544 2002-10-22 Akim Demaille <akim@epita.fr>
8545
8546 * src/system.h: Include sys/types.
8547 Reported by Bert Deknuydt.
8548
8549 2002-10-23 Paul Eggert <eggert@twinsun.com>
8550
8551 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8552 Suggested by Art Haas.
8553
8554 2002-10-22 Paul Eggert <eggert@twinsun.com>
8555
8556 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8557 decl; not needed any more.
8558 * src/main.c (main): Use return to exit, undoing yesterday's change.
8559 The last OS that we could find where this wouldn't work is
8560 SunOS 3.5, and that's too old to worry about now.
8561
8562 * data/glr.c (struct yyltype): Define members even when not
8563 doing locations. This is more consistent with yacc.c, and it
8564 works around the following bug reports:
8565 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8566 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8567
8568 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8569 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8570 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8571
8572 2002-10-22 Akim Demaille <akim@epita.fr>
8573
8574 * data/README: New.
8575
8576 2002-10-21 Paul Eggert <eggert@twinsun.com>
8577
8578 Be consistent about 'bool'; the old code used an enum in one
8579 module and an int in another, and this violates the C standard.
8580 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8581 * configure.ac (AC_HEADER_STDBOOL): Add.
8582 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8583 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8584 * src/symtab.c (hash_compare_symbol_t): Likewise.
8585 * src/system.h (bool, false, true): Use a definition consistent
8586 with ../lib/hash.c. All uses changed.
8587
8588 * src/complain.c (warning_issued): Renamed from warn_message_count,
8589 so that we needn't worry about integer overflow (!).
8590 Now of type bool. All uses changed.
8591 (complaint_issued): Renamed from complain_message_count; likewise.
8592
8593 * src/main.c (main): Use exit to exit with failure.
8594
8595 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8596 rather than 1 and 0.
8597 * src/main.c (main): Likewise.
8598 * src/getargs.c (getargs): Likewise.
8599 * src/reader.c (reader): Likewise.
8600
8601 * src/getarg.c (getargs): Remove duplicate code for
8602 "Try `bison --help'".
8603
8604 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8605 What was that "2" for?
8606
8607 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8608 * src/getargs.c (usage): Likewise.
8609
8610 * src/getargs.c (getargs): When there are too few operands, report
8611 the last one. When there are too many, report the first extra
8612 one. This is how diffutils does it.
8613
8614 2002-10-20 Paul Eggert <eggert@twinsun.com>
8615
8616 Remove K&R vestiges.
8617 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8618 * src/complain.c (VA_START): Remove. Assume prototypes.
8619 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8620 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8621 fatal): Assume prototypes.
8622 * src/complain.h: Assume prototypes.
8623 * src/system.h (PARAMS): Remove.
8624 Include <limits.h> unconditionally, since it's guaranteeed even
8625 for a freestanding C89 compiler.
8626 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8627 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8628
8629 2002-10-20 Akim Demaille <akim@epita.fr>
8630
8631 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8632 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8633 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8634 (yyresolveStates, yyresolveAction, yyresolveStack)
8635 (yyprocessOneStack): Use them.
8636 (yy_reduce_print): New.
8637 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8638
8639 2002-10-20 Akim Demaille <akim@epita.fr>
8640
8641 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8642 arguments and output `void'.
8643 (b4_c_function): Rename as...
8644 (b4_c_function_def): this.
8645 (b4_c_function_decl, b4_c_ansi_function_def)
8646 (b4_c_ansi_function_decl): New.
8647 Change the interpretation of the arguments: before `int, foo', now
8648 `int foo, foo'.
8649 * data/yacc.c (yyparse): Prototype and define thanks to these.
8650 Adjust b4_c_function_def uses.
8651 * data/glr.c (yyparse): Likewise, but ANSI only.
8652
8653 2002-10-20 Akim Demaille <akim@epita.fr>
8654
8655 * src/output.c (prepare): Move the definition of `tokens_number',
8656 `nterms_number', `undef_token_number', `user_token_number_max'
8657 to...
8658 (prepare_tokens): Here.
8659 (prepare_tokens): Rename as...
8660 (prepare_symbols): this.
8661 (prepare): Move the definition of `rules_number' to...
8662 (prepare_rules): here.
8663 (prepare): Move the definition of `last', `final_state_number',
8664 `states_number' to...
8665 (prepare_states): here.
8666 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8667
8668 2002-10-20 Akim Demaille <akim@epita.fr>
8669
8670 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8671
8672 2002-10-20 Akim Demaille <akim@epita.fr>
8673
8674 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8675 * data/c.m4: here.
8676
8677 2002-10-20 Akim Demaille <akim@epita.fr>
8678
8679 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8680 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8681 `pair'.
8682 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8683 `name' to...
8684 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8685 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8686 These.
8687
8688 2002-10-19 Paul Eggert <eggert@twinsun.com>
8689
8690 Do not create a temporary file, as that involves security and
8691 cleanup headaches. Instead, use a pair of pipes.
8692 Derived from a suggestion by Florian Krohm.
8693 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8694 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8695 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8696 (BISON_PREREQ_SUBPIPE): Add.
8697 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8698 Add subpipe.h, subpipe.c.
8699 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8700 * po/POTFILES.in: Add lib/subpipe.c.
8701 * src/output.c: Include "subpipe.h".
8702 (m4_invoke): Remove decl.
8703 (scan_skel): New decl.
8704 (output_skeleton): Use pipe rather than temporary file for m4 input.
8705 Check that m4sugar.m4 is readable, to avoid deadlock.
8706 Check for pipe I/O error.
8707 * src/scan-skel.l (readpipe): Remove decl.
8708 (scan_skel): New function, to be used in place of m4_invoke.
8709 Read from stream rather than file.
8710
8711 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8712 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8713 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8714 this generates a more-accurate value anyway.
8715
8716 * lib/timevar.c (timervar_accumulate): Rename locals to
8717 avoid confusion with similarly-named more-global.
8718 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8719
8720 * src/output.c (prepare): Use xstrdup to convert char const *
8721 to char *, to avoid GCC warning.
8722
8723 2002-10-19 Akim Demaille <akim@epita.fr>
8724
8725 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8726 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8727 Use them to have `calc.y' ready for %pure-parser.
8728 * data/yacc.c (YYLEX): Pass a yylex return type to
8729 b4_c_function_call.
8730
8731 2002-10-19 Akim Demaille <akim@epita.fr>
8732
8733 Prototype support of %lex-param and %parse-param.
8734
8735 * src/parse-gram.y: Add the definition of the %lex-param and
8736 %parse-param tokens, plus their rules.
8737 Drop the `_' version of %glr-parser.
8738 Add the "," token.
8739 * src/scan-gram.l (INITIAL): Scan them.
8740 * src/muscle_tab.c: Comment changes.
8741 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8742 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8743 (muscle_entry_s): The `value' member is no longer const.
8744 Adjust all dependencies.
8745 * src/muscle_tab.c (muscle_init): Adjust: use
8746 MUSCLE_INSERT_STRING.
8747 Initialize the obstack earlier.
8748 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8749 (muscle_pair_list_grow): New.
8750 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8751 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8752 * tests/calc.at: Use %locations, not --locations.
8753 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8754
8755 2002-10-19 Akim Demaille <akim@epita.fr>
8756
8757 * src/getargs.c (usage): Take status as argument and exit
8758 accordingly.
8759 Report the traditional `Try ... --help' message when status != 0.
8760 (usage, version): Don't take a FILE * as arg, it is pointless.
8761 (getargs): When there is an incorrect number of arguments, make it
8762 an error, and report it GNUlically thanks to `usage ()'.
8763
8764 2002-10-18 Paul Eggert <eggert@twinsun.com>
8765
8766 * data/glr.c (yyreportParseError): Don't assume that sprintf
8767 yields the length of the printed string, as this is not true
8768 on SunOS 4.1.4. Reported by Peter Klein.
8769
8770 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8771 * tests/conflicts.at (%nonassoc and eof): Likewise.
8772 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8773
8774 2002-10-17 Akim Demaille <akim@epita.fr>
8775
8776 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8777 * src/getargs.c (trace_types, trace_args): Adjust.
8778 * src/reader.c (grammar_current_rule_prec_set)
8779 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8780 Standardize error messages.
8781 And s/@prec/%prec/!
8782 (reader): Use trace_flag to enable scanner/parser debugging,
8783 instead of an adhoc scheme.
8784 * src/scan-gram.l: Remove trailing debugging code.
8785
8786 2002-10-16 Paul Eggert <eggert@twinsun.com>
8787
8788 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8789 MUSCLE_TAB_H.
8790
8791 * NEWS: Officially drop support for building Bison with K&R C,
8792 since it didn't work anyway and it's not worth worrying about.
8793 * Makefile.maint (wget_files): Remove ansi2knr.c.
8794 (ansi2knr.c-url_prefix): Remove.
8795 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8796 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8797 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8798
8799 2002-10-15 Paul Eggert <eggert@twinsun.com>
8800
8801 Stop using the "enum_" trick for K&R-style function definitions;
8802 it confused me, and I was the author! Instead, assume that people
8803 who want to use K&R C compilers (when using these modules in GCC,
8804 perhaps?) will run ansi2knr.
8805
8806 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8807 All uses of "enum_" changed to "enum ".
8808 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8809 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8810
8811 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8812 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8813 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8814 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8815 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8816 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8817 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8818 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8819 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8820 Use function prototypes; this removes the need for declaring
8821 static functions simply to provide their prototypes.
8822 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8823 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8824 bitset_count_, bitset_create, bitset_dump, bitset_first,
8825 bitset_free, bitset_init, bitset_last, bitset_next,
8826 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8827 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8828 bitset_print, bitset_release_memory, bitset_toggle_,
8829 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8830 debug_bitset): Likewise.
8831 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8832 * lib/bitset_stats.c (bitset_log_histogram_print,
8833 bitset_percent_histogram_print, bitset_stats_and,
8834 bitset_stats_and_cmp, bitset_stats_and_or,
8835 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8836 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8837 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8838 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8839 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8840 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8841 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8842 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8843 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8844 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8845 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8846 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8847 bitset_stats_zero): Likewise.
8848 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8849 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8850 bitsetv_dump, debug_bitsetv): Likewise.
8851 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8852 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8853 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8854 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8855 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8856 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8857 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8858 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8859 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8860 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8861 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8862 Likewise.
8863 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8864 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8865 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8866 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8867 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8868 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8869 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8870 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8871 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8872 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8873 lbitset_xor_cmp, lbitset_zero): Likewise.
8874
8875 2002-10-14 Akim Demaille <akim@epita.fr>
8876
8877 Version 1.75.
8878
8879 2002-10-14 Akim Demaille <akim@epita.fr>
8880
8881 * tests/Makefile.am (maintainer-check-posix): New.
8882
8883 2002-10-14 Akim Demaille <akim@epita.fr>
8884
8885 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8886 member.
8887
8888 2002-10-14 Akim Demaille <akim@epita.fr>
8889
8890 * src/tables.c (table_ninf_remap): base -> tab.
8891 Reported by Matt Rosing.
8892
8893 2002-10-14 Paul Eggert <eggert@twinsun.com>
8894
8895 * tests/action.at, tests/calc.at, tests/conflicts.at,
8896 tests/cxx-type.at, tests/headers.at, tests/input.at,
8897 tests/regression.at, tests/synclines.at, tests/torture.at:
8898 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8899 so that the tests still work even if POSIXLY_CORRECT is set.
8900 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
8901
8902 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8903 for portability to K&R hosts. Fix typo: signed char is guaranteed
8904 only to 127, not to 128.
8905 * data/glr.c (yysigned_char): New type.
8906 * data/yacc.c (yysigned_char): Likewise.
8907 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8908
8909 2002-10-13 Paul Eggert <eggert@twinsun.com>
8910
8911 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8912 true due to limited range of data type" warning from GCC.
8913
8914 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8915 by wrapping enum yytokentype's definition inside #ifndef
8916 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8917
8918 2002-10-13 Akim Demaille <akim@epita.fr>
8919
8920 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8921 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8922
8923 2002-10-13 Akim Demaille <akim@epita.fr>
8924
8925 * Makefile.maint: Update from Autoconf 2.54.
8926 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8927
8928 2002-10-13 Akim Demaille <akim@epita.fr>
8929
8930 * src/print.c (print_state): Separate the list of solved conflicts
8931 from the other items.
8932 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8933
8934 2002-10-13 Akim Demaille <akim@epita.fr>
8935
8936 Let nondeterministic skeletons be usable with deterministic
8937 tables.
8938
8939 With the patch, GAWK compiled by GCC without -O2 passes its test
8940 suite using a GLR parser driven by LALR tables. It fails with -O2
8941 because `struct stat' gives two different answers on my machine:
8942 88 (definition of an auto var) and later 96 (memset on this var).
8943 Hence the stack is badly corrumpted. The headers inclusion is to
8944 blame: if I move the awk.h inclusion before GLR's system header
8945 inclusion, the two struct stat have the same size.
8946
8947 * src/tables.c (pack_table): Always create conflict_table.
8948 (token_actions): Always create conflict_list.
8949 * data/glr.c (YYFLAG): Remove, unused.
8950
8951 2002-10-13 Akim Demaille <akim@epita.fr>
8952
8953 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8954 (O0FLAGS): New.
8955 (VALGRIND, GXX): New.
8956 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8957 * tests/bison.in: Run $PREBISON a pre-command.
8958 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8959 (maintainer-check-g++): New.
8960 * Makefile.am (maintainer-check): New.
8961
8962 2002-10-13 Akim Demaille <akim@epita.fr>
8963
8964 * data/glr.c: Formatting changes.
8965 Tweak some trace messages to match yacc.c's.
8966
8967 2002-10-13 Akim Demaille <akim@epita.fr>
8968
8969 GLR parsers sometimes raise parse errors instead of performing the
8970 default reduction.
8971 Reported by Charles-Henry de Boysson.
8972
8973 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
8974 check the length of the traces when %glr.
8975 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8976 GLR's traces.
8977 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8978 Test GLR parsers.
8979 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8980 (yyltype): Remove the yy prefix from the member names.
8981 (yytable): Complete its comment.
8982 (yygetLRActions): Map error action number from YYTABLE from
8983 YYTABLE_NINF to 0.
8984 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8985 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8986 not satisfying as we could compare an YYACTION computed from
8987 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8988 only value for error actions.
8989 (yyreportParseError): In verbose parse error messages, don't issue
8990 `error' in the list of expected tokens.
8991 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8992 next action to perform to match glr.c's decoding.
8993 (yytable): Complete its comment.
8994
8995 2002-10-13 Paul Eggert <eggert@twinsun.com>
8996
8997 Fix problem reported by Henrik Grubbstroem in
8998 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
8999 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9000 because the Bison parser reads the second action before reducing
9001 the first one.
9002 * src/scan-gram.l (rule_length): New static var.
9003 Use it to keep track of the rule length in the scanner, since
9004 we can't expect the parser to be in lock-step sync with the scanner.
9005 (handle_action_dollar, handle_action_at): Use this var.
9006 * tests/actions.at (Exotic Dollars): Test for the problem.
9007
9008 2002-10-12 Paul Eggert <eggert@twinsun.com>
9009
9010 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9011 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9012 Include <sys/time.h> when checking for clock_t and struct tms.
9013 Use same include order as source.
9014 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
9015 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
9016
9017 * lib/timevar.c: Update copyright date and clarify comments.
9018 (get_time) [IN_GCC]: Keep the GCC version for reference.
9019
9020 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9021 GCC version as of today, then merge Bison's changes.
9022 Change "GCC" to "Bison" in copyright notice. timevar.def's
9023 author is Akim, so change that too.
9024
9025 * src/reader.c (grammar_current_rule_check):
9026 Don't worry about the default action if $$ is untyped.
9027 Prevents bogus warnings reported by Jim Gifford in
9028 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
9029
9030 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9031 * data/glr.c, data/lalr1.cc, data/yacc.c:
9032 Output token definitions before the first part of user declarations.
9033 Fixes compatibility problem reported by Jim Gifford for kbd in
9034 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
9035
9036 2002-10-11 Paul Eggert <eggert@twinsun.com>
9037
9038 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9039 (yyparse): here. This undoes some of the 2002-07-25 change.
9040 Compatibility problem reported by Ralf S. Engelschall with
9041 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9042
9043 2002-10-11 Akim Demaille <akim@epita.fr>
9044
9045 * tests/regression.at Characters Escapes): New.
9046 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9047 characters.
9048 Reported by Jan Nieuwenhuizen.
9049
9050 2002-10-11 Akim Demaille <akim@epita.fr>
9051
9052 * po/id.po: New.
9053
9054 2002-10-10 Paul Eggert <eggert@twinsun.com>
9055
9056 Portability fixes for bitsets; this also avoids several GCC
9057 warnings.
9058
9059 * lib/abitset.c: Include <stddef.h>, for offsetof.
9060 * lib/lbitset.c: Likewise.
9061
9062 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9063 properly for vectors of objects. Do not assume that adding a
9064 header size to a multiple of a word size yields a value that is
9065 properly aligned for the whole union.
9066 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9067
9068 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9069 unique names for structures.
9070 * lib/ebitset.c (ebitset_bytes): Likewise.
9071 * lib/lbitset.c (lbitset_bytes): Likewise.
9072
9073 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9074 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9075 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9076 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9077 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9078 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9079 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9080 to improve the type-checking that GCC can do.
9081 * lib/bitset.c (bitset_op4_cmp): Likewise.
9082 * lib/bitset_stats.c (bitset_stats_count,
9083 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9084 bitset_stats_copy, bitset_stats_disjoint_p,
9085 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9086 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9087 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9088 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9089 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9090 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9091 bitset_stats_or_and_cmp): Likewise.
9092 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9093 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9094 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9095 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9096
9097 * lib/abitset.h: Include bitset.h, not bbitset.h.
9098 * lib/ebitset.h: Likewise.
9099 * lib/lbitset.h: Likewise.
9100
9101 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9102 All instances of parameters of type enum bitset_opts are now of
9103 type enum_bitset_opts, to conform to the C Standard, and similarly
9104 for enum_bitset_type.
9105 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9106 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9107
9108 Do not use "struct bitset_struct" to mean different things in
9109 different modules. Not only is this confusing, it violates
9110 the C Standard, which requires that structure types in different
9111 modules must be compatible if one is to be passed to the other.
9112 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9113 All instances of "struct bitset_struct *" replaced with "bitset".
9114 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9115 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9116 struct lbitset_struct, struct bitset_stats_struct): New types.
9117 All uses of struct bitset_struct changed to union bitset_union,
9118 etc.
9119 * lib/abitset.c (struct abitset_struct, abitset,
9120 struct bitset_struct): Remove.
9121 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9122 struct bitset_struct): Remove.
9123 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9124 bitset_struct): Remove.
9125 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9126 Likewise.
9127
9128 Do not call a function of type T using a call that assumes the
9129 function is of a different type U. Standard C requires that a
9130 function must be called with a type that is compatible with its
9131 definition.
9132 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9133 New decls.
9134 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9135 New functions.
9136 * lib/ebitset.c (PFV): Remove.
9137 * lib/lbitset.c (PFV): Likewise.
9138 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9139 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9140 decls.
9141 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9142 (ebitset_vtable): Use them.
9143 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9144 lbitset_xor): New functions.
9145 (lbitset_vtable): Use them.
9146
9147 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9148 Declare.
9149
9150 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9151 GCC warning.
9152 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9153 Use offsetof, for simplicity.
9154
9155 2002-10-06 Paul Eggert <eggert@twinsun.com>
9156
9157 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9158 the same width as int. This reapplies a hunk of the 2002-08-12 patch
9159 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
9160 which was inadvertently undone by the 2002-09-30 patch.
9161 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9162 the same width as int.
9163
9164 2002-10-04 Paul Eggert <eggert@twinsun.com>
9165
9166 Version 1.50.
9167
9168 * configure.ac (AC_INIT), NEWS: Increment version number.
9169
9170 * doc/bison.texinfo: Minor spelling, grammar, and white space
9171 fixes.
9172 (Symbols): Mention that any negative value returned from yylex
9173 signifies end-of-input. Warn about negative chars. Mention
9174 the portable Standard C character set.
9175
9176 The GNU coding standard says CFLAGS and YFLAGS are reserved
9177 for the installer to set.
9178 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9179 * src/Makefile.am (AM_CFLAGS): Likewise.
9180 (AM_YFLAGS): Renamed from YFLAGS.
9181
9182 Fix some MAX and MIN problems.
9183 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9184 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9185 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9186 * src/reader.c (reader): Use it.
9187
9188 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9189 POSIX 1003.1-2001 has removed fgrep.
9190
9191 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9192
9193 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9194 interpreted as signed.
9195 * lib/ebitset.c (ebitset_list): Fix bug.
9196
9197 2002-10-01 Paul Eggert <eggert@twinsun.com>
9198
9199 More fixes for 64-bit hosts and large bitsets.
9200
9201 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9202 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9203 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9204 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9205 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9206 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9207 bitset_count_): Likewise.
9208 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9209 bitset_first, bitset_last): Likewise.
9210 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9211 bitset_stats_list_reverse, bitset_stats_size,
9212 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9213 Likewise.
9214 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9215 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9216 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9217 bitsetv_reflexive_transitive_closure): Likewise.
9218 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9219 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9220 Likewise.
9221 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9222 Likewise.
9223
9224 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9225 Use size_t, not unsigned int, to count bytes.
9226 * lib/abitset.h (abitset_bytes): Likewise.
9227 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9228 Likewise.
9229 * lib/bitset.h (bitset_bytes): Likewise.
9230 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9231 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9232 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9233 * lib/ebitset.c (ebitset_bytes): Likewise.
9234 * lib/ebitset.h (ebitset_bytes): Likewise.
9235 * lib/lbitset.c (lbitset_bytes): Likewise.
9236 * lib/lbitset.h (lbitset_bytes): Likewise.
9237
9238 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9239 abitset_subset_p, abitset_disjoint_p, abitset_and,
9240 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9241 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9242 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9243 abitset_or_and, abitset_or_and_cmp):
9244 Use bitset_windex instead of unsigned int.
9245 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9246 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9247 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9248 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9249 Likewise.
9250 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
9251
9252 * lib/bitset.c (bitset_print):
9253 Use proper printf formats for widths of integer types.
9254 * lib/bitset_stats.c (bitset_percent_histogram_print,
9255 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9256 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9257 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9258 * lib/lbitset.c (lbitset_bytes): Likewise.
9259
9260 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9261 BITSET_SIZE_MAX): New macros.
9262 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9263 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9264 to BITSET_WINDEX_MAX.
9265
9266 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9267 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9268 since we now return the bitset_bindex type (not int).
9269
9270 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9271 when computing sizes.
9272 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9273
9274 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9275 and avoid cast to unsigned.
9276
9277 2002-09-30 Akim Demaille <akim@epita.fr>
9278
9279 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9280 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9281 Updates from Michael Hayes.
9282
9283 2002-09-30 Art Haas <ahaas@neosoft.com>
9284
9285 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9286 invocations.
9287 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9288 defined.
9289
9290 2002-09-27 Akim Demaille <akim@epita.fr>
9291
9292 Version 1.49c.
9293
9294 2002-09-27 Akim Demaille <akim@epita.fr>
9295
9296 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9297 (Because of AC_LIBSOURCE).
9298
9299 2002-09-27 Akim Demaille <akim@epita.fr>
9300
9301 Playing with Autoscan.
9302
9303 * configure.ac: Remove the old LIBOBJ tweaks.
9304 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9305 * lib/strrchr.c: New.
9306 * lib/strtol.c: New, from the Coreutils 4.5.1.
9307
9308 2002-09-27 Akim Demaille <akim@epita.fr>
9309
9310 Playing with Autoscan.
9311
9312 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9313 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9314 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9315 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9316 Coreutils 4.5.1.
9317
9318 2002-09-24 Akim Demaille <akim@epita.fr>
9319
9320 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9321 (Frequently Asked Questions, Parser Stack Overflow): New.
9322
9323 2002-09-13 Akim Demaille <akim@epita.fr>
9324
9325 Playing with autoscan.
9326
9327 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9328 * src/files.c (skeleton_find): Remove, unused.
9329 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9330 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9331
9332 2002-09-13 Akim Demaille <akim@epita.fr>
9333
9334 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9335 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9336
9337 2002-09-13 Akim Demaille <akim@epita.fr>
9338
9339 * configure.ac: Require 2.54.
9340 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9341 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9342 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9343 Remove, provided by Autoconf macros.
9344
9345 2002-09-12 Akim Demaille <akim@epita.fr>
9346
9347 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9348
9349 2002-09-12 Akim Demaille <akim@epita.fr>
9350
9351 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9352 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9353 Reported by Martin Mokrejs.
9354
9355 2002-09-10 Akim Demaille <akim@epita.fr>
9356
9357 * src/parse-gram.y: Associate a human readable string to each
9358 token type.
9359 * tests/regression.at (Invalid inputs): Adjust.
9360
9361 2002-09-10 Gary V. Vaughan <gary@gnu.org>
9362
9363 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9364 with an Autoconf-2.5x style configure.ac.
9365
9366 2002-09-06 Paul Eggert <eggert@twinsun.com>
9367
9368 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9369 exception applies only to yacc.c. This is a modification of a
9370 patch originally suggested by Akim Demaille.
9371
9372 2002-09-06 Akim Demaille <akim@epita.fr>
9373
9374 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9375 here to...
9376 * data/yacc.c: here.
9377
9378 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9379 LocationType.
9380 (b4_ltype): Default to yy::Location from location.hh.
9381
9382 2002-09-04 Jim Meyering <jim@meyering.net>
9383
9384 * data/yacc.c: Guard the declaration of yytoknum also with
9385 `#ifdef YYPRINT', so it is declared only when used.
9386
9387 2002-09-04 Akim Demaille <akim@epita.fr>
9388
9389 * configure.in: Rename as...
9390 * configure.ac: this.
9391 Bump to 1.49c.
9392
9393 2002-09-04 Akim Demaille <akim@epita.fr>
9394
9395 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9396 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9397 translate maintainer only messages.
9398
9399 2002-08-12 Paul Eggert <eggert@twinsun.com>
9400
9401 Version 1.49b.
9402
9403 * Makefile.am (SUBDIRS): Remove intl.
9404 (DISTCLEANFILES): Remove.
9405 * NEWS: Mention that GNU M4 is now required. Clarify what is
9406 meant by "larger grammars". Mention the pt_BR translation.
9407 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9408 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9409 Bump version from 0.11.2 to 0.11.5.
9410 (BISON_PREREQ_STAGE): Remove.
9411 (AM_GNU_GETTEXT): Use external gettext.
9412 (AC_OUTPUT): Remove intl/Makefile.
9413
9414 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9415
9416 * data/glr.c: Include string.h, for strlen.
9417 (yyreportParseError): Use size_t for yysize.
9418 (yy_yypstack): No longer nested inside yypstates, as nested
9419 functions are not portable. Do not assume size_t is the
9420 same width as int.
9421 (yypstates): Do not assume that ptrdiff_t is the same width
9422 as int, and similarly for yyposn and YYINDEX.
9423
9424 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9425
9426 * lib/Makefile.am (INCLUDES): Do not include from the intl
9427 directory, which has been removed.
9428 * src/Makefile.am (INCLUDES): Likewise.
9429
9430 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9431 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9432 New vars.
9433
9434 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9435 * tests/Makefile.am (EXTRA_DIST): Likewise.
9436
9437 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9438 Do not assume that bitset_windex is the same width as unsigned.
9439
9440 * lib/abitset.c (abitset_unused_clear): Do not assume that
9441 bitset_word is the same width as int.
9442 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9443 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9444 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9445 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9446 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9447
9448 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9449 portability to one's complement hosts!).
9450 * lib/ebitset.c (ebitset_op1): Likewise.
9451 * lib/lbitset.c (lbitset_op1): Likewise.
9452
9453 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9454 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9455 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9456 Sync with fileutils.
9457 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9458 lib/gettext.h: Sync with diffutils.
9459
9460 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9461 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9462
9463 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9464 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9465 check for void *.
9466
9467 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9468 size_t; the old version tried to do this but casted improperly.
9469 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9470 (bitset_test): Now returns int, not unsigned long.
9471
9472 * lib/bitset_stats.c: Include "gettext.h".
9473 (_): New macro.
9474 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9475 name locals "index", as it generates unnecessary warnings on some
9476 hosts that have an "index" function.
9477
9478 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9479 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9480 they need translation.
9481 * src/LR0.c (state_list_append, new_itemsets, get_state,
9482 append_states, generate_states): Likewise.
9483 * src/assoc.c (assoc_to_string): Likewise.
9484 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9485 * src/gram.c (grammar_dump): Likewise.
9486 * src/injections.c (injections_compute): Likewise.
9487 * src/lalr.c (lookaheads_print): Likewise.
9488 * src/relation.c (relation_transpose): Likewise.
9489 * src/scan-gram.l: Likewise.
9490 * src/tables.c (table_grow, pack_vector): Likewise.
9491
9492 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9493 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9494 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9495 * m4/mbstate_t.m4: Sync with fileutils.
9496 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9497
9498 * po/LINGUAS: Add pt_BR.
9499 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9500 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9501 lib/timevar.c.
9502 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9503 manual recommends.
9504 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9505
9506 * src/complain.c (strerror_r): Remove decl; not needed.
9507 (strerror): Use same pattern as ../lib/error.c.
9508
9509 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9510
9511 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9512
9513 * src/main.c (main): Cast result of bindtextdomain and textdomain
9514 to void, to avoid a GCC warning when --disable-nls is in effect.
9515
9516 * src/scan-gram.l: Use strings rather than escapes when possible,
9517 to minimize the number of warnings from xgettext.
9518 (handle_action_dollar, handle_action_at): Don't use isdigit,
9519 as it mishandles negative chars and it may not work as expected
9520 outside the C locale.
9521
9522 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9523 this is a GCC extension and is not portable to other compilers.
9524
9525 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9526 Do not include <ctype.h>; no longer needed.
9527 Do not include <malloc.h>; no longer needed (and generates
9528 warnings on OpenBSD 3.0).
9529
9530 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9531 it's not portable.
9532
9533 * tests/regression.at: Do not use 'cc -c input.c -o input';
9534 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9535
9536 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9537 exit status as failure, not just exit status 1. Sun C exits
9538 with status 2 sometimes.
9539
9540 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9541 Use it for the two large tests.
9542
9543 2002-08-02 Akim Demaille <akim@epita.fr>
9544
9545 * src/conflicts.c (conflicts_output): Don't output rules never
9546 reduced here, since anyway that computation doesn't work.
9547 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9548 (rule_useless_p, rule_never_reduced_p): New.
9549 (grammar_rules_partial_print): Use a filter instead of a range.
9550 Display the title only if needed.
9551 (grammar_rules_print): Adjust.
9552 (grammar_rules_never_reduced_report): New.
9553 * src/tables.c (action_row): Move the computation of rules never
9554 reduced to...
9555 (token_actions): here.
9556 * src/main.c (main): Make the parser before making the report, so
9557 that rules never reduced are computed.
9558 Call grammar_rules_never_reduced_report.
9559 * src/print.c (print_results): Report rules never reduced.
9560 * tests/conflicts.at, tests/reduce.at: Adjust.
9561
9562 2002-08-01 Akim Demaille <akim@epita.fr>
9563
9564 Instead of attaching lookaheads and duplicating the rules being
9565 reduced by a state, attach the lookaheads to the reductions.
9566
9567 * src/state.h (state_t): Remove the `lookaheads',
9568 `lookaheads_rule' member.
9569 (reductions_t): Add a `lookaheads' member.
9570 Use a regular array for the `rules'.
9571 * src/state.c (reductions_new): Initialize the lookaheads member
9572 to 0.
9573 (state_rule_lookaheads_print): Adjust.
9574 * src/state.h, src/state.c (state_reductions_find): New.
9575 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9576 (count_rr_conflicts): Adjust.
9577 * src/lalr.c (LArule): Remove.
9578 (add_lookback_edge): Adjust.
9579 (state_lookaheads_count): New.
9580 (states_lookaheads_initialize): Merge into...
9581 (initialize_LA): this.
9582 (lalr_free): Adjust.
9583 * src/main.c (main): Don't free nullable and derives too early: it
9584 is used by --verbose.
9585 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9586
9587 2002-08-01 Akim Demaille <akim@epita.fr>
9588
9589 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9590 `rule_number_t**'.
9591 (set_derives, free_derives): Rename as...
9592 (derives_compute, derives_free): this.
9593 Adjust all dependencies.
9594 * src/nullable.c (set_nullable, free_nullable): Rename as...
9595 (nullable_compute, nullable_free): these.
9596 (rule_list_t): Store rule_t *, not rule_number_t.
9597 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9598 pointers, instead of their numbers.
9599 * src/main.c (main): Call nullable_free, and derives_free earlier,
9600 as they were lo longer used.
9601
9602 2002-08-01 Akim Demaille <akim@epita.fr>
9603
9604 * lib/timevar.c (get_time): Include children time.
9605 * src/lalr.h (LA, LArule): Don't export them: used with the
9606 state_t.
9607 * src/lalr.c (LA, LArule): Static.
9608 * src/lalr.h, src/lalr.c (lalr_free): New.
9609 * src/main.c (main): Call it.
9610 * src/tables.c (pack_vector): Check whether loc is >= to the
9611 table_size, not >.
9612 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9613 (tables_generate): do it, since that's also it which allocates
9614 them.
9615 Don't free LA and LArule, main does.
9616
9617 2002-07-31 Akim Demaille <akim@epita.fr>
9618
9619 Separate parser tables computation and output.
9620
9621 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9622 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9623 (yydefgoto, yydefact, high): Move to...
9624 * src/tables.h, src/tables.c: here.
9625 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9626 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9627 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9628 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9629 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9630 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9631 (action_row, save_row, token_actions, save_column, default_goto)
9632 (goto_actions, sort_actions, matching_state, pack_vector)
9633 (table_ninf_remap, pack_table, prepare_actions): Move to...
9634 * src/tables.c: here.
9635 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9636 * src/output.c (token_actions, output_base, output_conflicts)
9637 (output_check): Merge into...
9638 (prepare_actions): this.
9639 (actions_output): Rename as...
9640 (user_actions_output): this.
9641 * src/main.c (main): Call tables_generate and tables_free.
9642
9643 2002-07-31 Akim Demaille <akim@epita.fr>
9644
9645 Steal GCC's --time-report support.
9646
9647 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9648 stolen/adjusted from GCC.
9649 * m4/stage.m4: Remove time related checks.
9650 * m4/timevar.m4: New.
9651 * configure.in: Adjust.
9652 * src/system.h: Adjust to using timevar.h.
9653 * src/getargs.h, src/getargs.c: Support trace_time for
9654 --trace=time.
9655 * src/main.c (stage): Remove.
9656 (main): Replace `stage' invocations with timevar calls.
9657 * src/output.c: Insert pertinent timevar calls.
9658
9659 2002-07-31 Akim Demaille <akim@epita.fr>
9660
9661 Let --trace have arguments.
9662
9663 * src/getargs.h (enum trace_e): New.
9664 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9665 (long_options, short_options): --trace/-T takes an optional
9666 argument.
9667 Change all the uses of trace_flag to reflect the new flags.
9668 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9669
9670 Strengthen `stage' portability.
9671
9672 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9673 * configure.in: Use it.
9674 Don't check for malloc.h and sys/times.h.
9675 * src/system.h: Include them when appropriate.
9676 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9677 times and struct tms are available.
9678
9679 2002-07-30 Akim Demaille <akim@epita.fr>
9680
9681 In verbose parse error message, don't report `error' as an
9682 expected token.
9683 * tests/actions.at (Printers and Destructors): Adjust.
9684 * tests/calc.at (Calculator $1): Adjust.
9685 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9686 error message, do not report the parser accepts the error token in
9687 that state.
9688
9689 2002-07-30 Akim Demaille <akim@epita.fr>
9690
9691 Normalize conflict related messages.
9692
9693 * src/complain.h, src/complain.c (warn, complain): New.
9694 * src/conflicts.c (conflicts_print): Use them.
9695 (conflict_report_yacc): New, extracted from...
9696 (conflicts_print): here.
9697 * tests/conflicts.at, tests/existing.at: Adjust.
9698
9699 2002-07-30 Akim Demaille <akim@epita.fr>
9700
9701 Report rules which are never reduced by the parser: those hidden
9702 by conflicts.
9703
9704 * src/LR0.c (save_reductions): Don't make the final state too
9705 different: save its reduction (accept) instead of having a state
9706 without any action (no shift or goto, no reduce).
9707 Note: the final state is now a ``regular'' state, i.e., the
9708 parsers now contain `reduce 0' as default reduction.
9709 Nevertheless, since they decide to `accept' when yystate =
9710 final_state, they still will not reduce rule 0.
9711 * src/print.c (print_actions, print_reduction): Adjust.
9712 * src/output.c (action_row): Track reduced rules.
9713 (token_actions): Report rules never reduced.
9714 * tests/conflicts.at, tests/regression.at: Adjust.
9715
9716 2002-07-30 Akim Demaille <akim@epita.fr>
9717
9718 `stage' was accidently included in a previous patch.
9719 Initiate its autoconfiscation.
9720
9721 * configure.in: Look for malloc.h and sys/times.h.
9722 * src/main.c (stage): Adjust.
9723 Report only when trace_flag.
9724
9725 2002-07-29 Akim Demaille <akim@epita.fr>
9726
9727 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9728 state_number_t.
9729 (errs_t): symbol_t*, not symbol_number_t.
9730 (reductions_t): rule_t*, not rule_number_t.
9731 (FOR_EACH_SHIFT): New.
9732 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9733 * src/print.c, src/print_graph.c: Adjust.
9734
9735 2002-07-29 Akim Demaille <akim@epita.fr>
9736
9737 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9738
9739 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9740 (endtoken, accept): these.
9741 * src/reader.c (reader): Set endtoken's default tag to "$end".
9742 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9743 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9744 Adjust.
9745
9746 2002-07-29 Akim Demaille <akim@epita.fr>
9747
9748 * src/reduce.c (reduce_grammar): When the language is empty,
9749 complain about the start symbol, not the axiom.
9750 Use its location.
9751 * tests/reduce.at (Empty Language): New.
9752
9753 2002-07-26 Akim Demaille <akim@epita.fr>
9754
9755 * src/reader.h, src/reader.c (gram_error): ... can't get
9756 yycontrol without making too strong assumptions on the parser
9757 itself.
9758 * src/output.c (prepare_tokens): Use the real 0th value of
9759 token_translations instead of `0'.
9760 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9761 visible here.
9762 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9763 for the time being: %locations ought to provide it to yyerror.
9764
9765 2002-07-25 Akim Demaille <akim@epita.fr>
9766
9767 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9768 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9769 * tests/regression.at (Web2c Actions): Adjust.
9770
9771 2002-07-25 Akim Demaille <akim@epita.fr>
9772
9773 Stop storing rules from 1 to nrules + 1.
9774
9775 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9776 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9777 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9778 Iterate from 0 to nrules.
9779 Use rule_number_as_item_number and item_number_as_rule_number.
9780 Adjust to `derive' now containing possibly 0.
9781 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9782 Handle the `- 1' part in rule numbers from/to item numbers.
9783 * src/conflicts.c (log_resolution): Fix the message which reversed
9784 shift and reduce.
9785 * src/output.c (action_row): Initialize default_rule to -1.
9786 (token_actions): Adjust.
9787 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9788 expected output.
9789 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9790
9791 2002-07-25 Akim Demaille <akim@epita.fr>
9792
9793 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9794 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9795 (b4_c_knr_arg_decl): New.
9796 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9797 yyreport_parse_error.
9798
9799 2002-07-25 Akim Demaille <akim@epita.fr>
9800
9801 * data/yacc.c (yyreport_parse_error): New, extracted from...
9802 (yyparse): here.
9803 (yydestruct, yysymprint): Move above yyparse.
9804 Be K&R compliant.
9805
9806 2002-07-25 Akim Demaille <akim@epita.fr>
9807
9808 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9809 replace...
9810 (b4_sint_type, b4_uint_type): these.
9811 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9812 * tests/regression.at (Web2c Actions): Adjust.
9813
9814 2002-07-25 Akim Demaille <akim@epita.fr>
9815
9816 * src/gram.h (TIEM_NUMBER_MAX): New.
9817 (item_number_of_rule_number, rule_number_of_item_number): Rename
9818 as...
9819 (rule_number_as_item_number, item_number_as_rule_number): these.
9820 Adjust dependencies.
9821 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9822 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9823 (symbol_number_to_vector_number): New.
9824 (order): Of vector_number_t* type.
9825 (base_t, BASE_MAX, BASE_MIN): New.
9826 (froms, tos, width, pos, check): Of base_t type.
9827 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9828 (actrow): Of action_number_t type.
9829 (conflrow): Of unsigned int type.
9830 (table_ninf, base_ninf): New.
9831 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9832 (muscle_insert_int_table, muscle_insert_base_table)
9833 (muscle_insert_rule_number_table): New.
9834 (prepare_tokens): Output `toknum' as int_table.
9835 (action_row): Returns a rule_number_t.
9836 Use ACTION_MIN, not SHRT_MIN.
9837 (token_actions): yydefact is rule_number_t*.
9838 (table_ninf_remap): New.
9839 (pack_table): Use it for `base' and `table'.
9840 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9841 replaced with...
9842 (YYPACT_NINF, YYTABLE_NINF): these.
9843 (yypact, yytable): Compute their types instead of hard-coded
9844 `short'.
9845 * tests/regression.at (Web2c Actions): Adjust.
9846
9847 2002-07-19 Akim Demaille <akim@epita.fr>
9848
9849 * src/scan-gram.l (id): Can start with an underscore.
9850
9851 2002-07-16 Akim Demaille <akim@epita.fr>
9852
9853 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9854 Adjust all former `associativity' dependencies.
9855 * src/symtab.c (symbol_new): Default associativity is `undef', not
9856 `right'.
9857 (symbol_check_alias_consistence): Adjust.
9858
9859 2002-07-09 Akim Demaille <akim@epita.fr>
9860
9861 * doc/bison.texinfo: Properly set the ``header'' part.
9862 Use @dircategory ``GNU programming tools'' as per Texinfo's
9863 documentation.
9864 Use @copying.
9865
9866 2002-07-09 Akim Demaille <akim@epita.fr>
9867
9868 * lib/quotearg.h: Protect against multiple inclusions.
9869 * src/location.h (location_t): Add a `file' member.
9870 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9871 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9872 `error_one_per_line' support.
9873
9874 2002-07-09 Akim Demaille <akim@epita.fr>
9875
9876 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9877 * src/reader.c (lineno): Remove.
9878 Adjust all dependencies.
9879 (get_merge_function): Take a location and use complain_at.
9880 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9881 * tests/regression.at (Invalid inputs, Mixing %token styles):
9882 Adjust.
9883
9884 2002-07-09 Akim Demaille <akim@epita.fr>
9885
9886 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9887 recovery rule, and forbid extensions when --yacc.
9888 (gram_error): Use complain_at.
9889 * src/reader.c (reader): Exit if there were parse errors.
9890
9891 2002-07-09 Akim Demaille <akim@epita.fr>
9892
9893 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9894 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9895 Reported by R Blake <blakers@mac.com>.
9896
9897 2002-07-09 Akim Demaille <akim@epita.fr>
9898
9899 * data/yacc.c: Output the copyright notive in the header.
9900
9901 2002-07-03 Akim Demaille <akim@epita.fr>
9902
9903 * src/output.c (froms, tos): Are state_number_t.
9904 (save_column): sp, sp1, and sp2 are state_number_t.
9905 (prepare): Rename `final' as `final_state_number', `nnts' as
9906 `nterms_number', `nrules' as `rules_number', `nstates' as
9907 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9908 unused.
9909 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9910 * data/lalr1.cc (nsym_): Remove, unused.
9911
9912 2002-07-03 Akim Demaille <akim@epita.fr>
9913
9914 * src/lalr.h, src/lalr.c (goto_number_t): New.
9915 * src/lalr.c (goto_list_t): New.
9916 Propagate them.
9917 * src/nullable.c (rule_list_t): New.
9918 Propagate.
9919 * src/types.h: Remove.
9920
9921 2002-07-03 Akim Demaille <akim@epita.fr>
9922
9923 * src/closure.c (print_fderives): Use rule_rhs_print.
9924 * src/derives.c (print_derives): Use rule_rhs_print.
9925 (rule_list_t): New, replaces `shorts'.
9926 (set_derives): Add comments.
9927 * tests/sets.at (Nullable, Firsts): Adjust.
9928
9929 2002-07-03 Akim Demaille <akim@epita.fr>
9930
9931 * src/output.c (prepare_actions): Free `tally' and `width'.
9932 (prepare_actions): Allocate and free `order'.
9933 * src/symtab.c (symbols_free): Free `symbols'.
9934 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9935 * src/output.c (m4_invoke): Move to...
9936 * src/scan-skel.l: here.
9937 (<<EOF>>): Close yyout, and free its name.
9938
9939 2002-07-03 Akim Demaille <akim@epita.fr>
9940
9941 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9942
9943 * src/LR0.c (new_state): Merge into...
9944 (state_list_append): this.
9945 (new_states): Merge into...
9946 (generate_states): here.
9947 (set_states): Don't ensure a proper `errs' state member here, do it...
9948 * src/conflicts.c (conflicts_solve): here.
9949 * src/state.h, src/state.c: Comment changes.
9950 (state_t): Rename member `shifts' as `transitions'.
9951 Adjust all dependencies.
9952 (errs_new): For consistency, also take the values as argument.
9953 (errs_dup): Remove.
9954 (state_errs_set): New.
9955 (state_reductions_set, state_transitions_set): Assert that no
9956 previous value was assigned.
9957 (state_free): New.
9958 (states_free): Use it.
9959 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9960 temporary storage: use `errs' and `nerrs' as elsewhere.
9961 (set_conflicts): Allocate and free this `errs'.
9962
9963 2002-07-02 Akim Demaille <akim@epita.fr>
9964
9965 * lib/libiberty.h: New.
9966 * lib: Update the bitset implementation from upstream.
9967 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9968 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9969 * src/main.c: Adjust bitset stats calls.
9970
9971 2002-07-01 Paul Eggert <eggert@twinsun.com>
9972
9973 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9974 char, so that negative chars don't collide with $.
9975
9976 2002-06-30 Akim Demaille <akim@epita.fr>
9977
9978 Have the GLR tests be `warning' checked, and fix the warnings.
9979
9980 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9981 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9982 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9983 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9984 (yyaddDeferredAction): static.
9985 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9986 (yyreportParseError): yyprefix is const.
9987 yytokenp is used only when verbose.
9988 (yy__GNUC__): Replace with __GNUC__.
9989 (yypdumpstack): yyi is size_t.
9990 (yypreference): Un-yy local variables and arguments, to avoid
9991 clashes with `yyr1'. Anyway, we are not in the user name space.
9992 (yytname_size): be an int, as is compared with ints.
9993 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9994 Use them.
9995 * tests/cxx-gram.at: Use quotation to protect $1.
9996 Use AT_COMPILE to enable warnings hunts.
9997 Prototype yylex and yyerror.
9998 `Use' argc.
9999 Include `string.h', not `strings.h'.
10000 Produce and prototype stmtMerge only when used.
10001 yylex takes a location.
10002
10003 2002-06-30 Akim Demaille <akim@epita.fr>
10004
10005 We spend a lot of time in quotearg, in particular when --verbose.
10006
10007 * src/symtab.c (symbol_get): Store a quoted version of the key.
10008 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10009 Adjust all callers.
10010
10011 2002-06-30 Akim Demaille <akim@epita.fr>
10012
10013 * src/state.h (reductions_t): Rename member `nreds' as num.
10014 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10015 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10016
10017 2002-06-30 Akim Demaille <akim@epita.fr>
10018
10019 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10020 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10021 (shifts_to): Rename as...
10022 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10023 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10024 (TRANSITION_IS_DISABLED, transitions_to): these.
10025
10026 2002-06-30 Akim Demaille <akim@epita.fr>
10027
10028 * src/print.c (print_shifts, print_gotos): Merge into...
10029 (print_transitions): this.
10030 (print_transitions, print_errs, print_reductions): Align the
10031 lookaheads columns.
10032 (print_core, print_transitions, print_errs, print_state,
10033 print_grammar): Output empty lines separator before, not after.
10034 (state_default_rule_compute): Rename as...
10035 (state_default_rule): this.
10036 * tests/conflicts.at (Defaulted Conflicted Reduction),
10037 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10038 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10039
10040 2002-06-30 Akim Demaille <akim@epita.fr>
10041
10042 Display items as we display rules.
10043
10044 * src/gram.h, src/gram.c (rule_lhs_print): New.
10045 * src/gram.c (grammar_rules_partial_print): Use it.
10046 * src/print.c (print_core): Likewise.
10047 * tests/conflicts.at (Defaulted Conflicted Reduction),
10048 (Unresolved SR Conflicts): Adjust.
10049 (Unresolved SR Conflicts): Adjust and rename as...
10050 (Resolved SR Conflicts): this, as was meant.
10051 * tests/regression.at (Web2c Report): Adjust.
10052
10053 2002-06-30 Akim Demaille <akim@epita.fr>
10054
10055 * src/print.c (state_default_rule_compute): New, extracted from...
10056 (print_reductions): here.
10057 Pessimize, but clarify the code.
10058 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10059
10060 2002-06-30 Akim Demaille <akim@epita.fr>
10061
10062 * src/output.c (action_row): Let default_rule be always a rule
10063 number.
10064
10065 2002-06-30 Akim Demaille <akim@epita.fr>
10066
10067 * src/closure.c (print_firsts, print_fderives, closure):
10068 Use BITSET_EXECUTE.
10069 * src/lalr.c (lookaheads_print): Likewise.
10070 * src/state.c (state_rule_lookaheads_print): Likewise.
10071 * src/print_graph.c (print_core): Likewise.
10072 * src/print.c (print_reductions): Likewise.
10073 * src/output.c (action_row): Likewise.
10074 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10075
10076 2002-06-30 Akim Demaille <akim@epita.fr>
10077
10078 * src/print_graph.c: Use report_flag.
10079
10080 2002-06-30 Akim Demaille <akim@epita.fr>
10081
10082 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10083 to...
10084 * src/relation.h, src/relation.c (traverse, relation_digraph)
10085 (relation_print, relation_transpose): New.
10086
10087 2002-06-30 Akim Demaille <akim@epita.fr>
10088
10089 * src/state.h, src/state.c (shifts_to): New.
10090 * src/lalr.c (build_relations): Use it.
10091
10092 2002-06-30 Akim Demaille <akim@epita.fr>
10093
10094 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10095 (item_number_of_rule_number, rule_number_of_item_number): New.
10096 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10097 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10098 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10099 Propagate their use.
10100 Much remains to be done, in particular wrt `shorts' from types.h.
10101
10102 2002-06-30 Akim Demaille <akim@epita.fr>
10103
10104 * src/symtab.c (symbol_new): Initialize the `printer' member.
10105
10106 2002-06-30 Akim Demaille <akim@epita.fr>
10107
10108 * src/LR0.c (save_reductions): Remove, replaced by...
10109 * src/state.h, src/state.c (state_reductions_set): New.
10110 (reductions, errs): Rename as...
10111 (reductions_t, errs_t): these.
10112 Adjust all dependencies.
10113
10114 2002-06-30 Akim Demaille <akim@epita.fr>
10115
10116 * src/LR0.c (state_list_t, state_list_append): New.
10117 (first_state, last_state): Now symbol_list_t.
10118 (this_state): Remove.
10119 (new_itemsets, append_states, save_reductions): Take a state_t as
10120 argument.
10121 (set_states, generate_states): Adjust.
10122 (save_shifts): Remove, replaced by...
10123 * src/state.h, src/state.c (state_shifts_set): New.
10124 (shifts): Rename as...
10125 (shifts_t): this.
10126 Adjust all dependencies.
10127 * src/state.h (state_t): Remove the `next' member.
10128
10129 2002-06-30 Akim Demaille <akim@epita.fr>
10130
10131 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10132 escaped in slot 0.
10133
10134 2002-06-30 Akim Demaille <akim@epita.fr>
10135
10136 Use hash.h for the state hash table.
10137
10138 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10139 (allocate_storage): Use state_hash_new.
10140 (free_storage): Use state_hash_free.
10141 (new_state, get_state): Adjust.
10142 * src/lalr.h, src/lalr.c (states): Move to...
10143 * src/states.h (state_t): Remove the `link' member, no longer
10144 used.
10145 * src/states.h, src/states.c: here.
10146 (state_hash_new, state_hash_free, state_hash_lookup)
10147 (state_hash_insert, states_free): New.
10148 * src/states.c (state_table, state_compare, state_hash): New.
10149 * src/output.c (output_actions): Do not free states now, since we
10150 still need to know the final_state number in `prepare', called
10151 afterwards. Do it...
10152 * src/main.c (main): here: call states_free after `output'.
10153
10154 2002-06-30 Akim Demaille <akim@epita.fr>
10155
10156 * src/state.h, src/state.c (state_new): New, extracted from...
10157 * src/LR0.c (new_state): here.
10158 * src/state.h (STATE_ALLOC): Move to...
10159 * src/state.c: here.
10160 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10161 * src/state.h, src/state.c: here.
10162
10163 2002-06-30 Akim Demaille <akim@epita.fr>
10164
10165 * src/reader.c (gensym): Rename as...
10166 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10167 (getsym): Rename as...
10168 (symbol_get): this.
10169
10170 2002-06-30 Akim Demaille <akim@epita.fr>
10171
10172 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10173 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10174 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10175 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10176
10177 2002-06-30 Akim Demaille <akim@epita.fr>
10178
10179 Make the test suite pass with warnings checked.
10180
10181 * tests/actions.at (Printers and Destructors): Improve.
10182 Avoid unsigned vs. signed issues.
10183 * tests/calc.at: Don't exercise the scanner here, do it...
10184 * tests/input.at (Torturing the Scanner): here.
10185
10186 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10187
10188 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
10189 reorganize first lines parallel to yacc.c.
10190
10191 2002-06-28 Akim Demaille <akim@epita.fr>
10192
10193 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10194 (b4_token_enum, b4_token_defines): New, factored from...
10195 * data/lalr1.cc, data/yacc.c, glr.c: here.
10196
10197 2002-06-28 Akim Demaille <akim@epita.fr>
10198
10199 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10200 unused variables.
10201 * src/output.c (merger_output): static.
10202
10203 2002-06-28 Akim Demaille <akim@epita.fr>
10204
10205 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
10206 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10207 pacify GCC.
10208 * src/output.c (save_row): Initialize all the variables to pacify GCC.
10209
10210 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10211
10212 Accumulated changelog for new GLR parsing features.
10213
10214 * src/conflicts.c (count_total_conflicts): Change name to
10215 conflicts_total_count.
10216 * src/conflicts.h: Ditto.
10217 * src/output.c (token_actions): Use the new name.
10218 (output_conflicts): Change conflp => conflict_list_heads, and
10219 confl => conflict_list for better readability.
10220 * data/glr.c: Use the new names.
10221 * NEWS: Add self to GLR announcement.
10222
10223 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10224
10225 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10226 Akim Demaille.
10227
10228 * data/bison.glr: Change name to glr.c
10229 * data/glr.c: Renamed from bison.glr.
10230 * data/Makefile.am: Add glr.c
10231
10232 * src/getargs.c:
10233
10234 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
10235 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
10236
10237 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10238
10239 * data/bison.glr: Be sure to restore the
10240 current #line when returning to the skeleton contents after having
10241 exposed the input file's #line.
10242
10243 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10244
10245 * data/bison.glr: Bring up to date with changes to bison.simple.
10246
10247 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10248
10249 * data/bison.glr: Correct definitions that use b4_prefix.
10250 Various reformatting.
10251 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10252 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10253 yytokenp argument; now part of stack.
10254 (yychar): Define to behave as documented.
10255 (yyclearin): Ditto.
10256
10257 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10258
10259 * src/reader.h: Add declaration for free_merger_functions.
10260
10261 * src/reader.c (merge_functions): New variable.
10262 (get_merge_function): New function.
10263 (free_merger_functions): New function.
10264 (readgram): Check for %prec that is not followed by a symbol.
10265 Handle %dprec and %merge declarations.
10266 (packgram): Initialize dprec and merger fields in rules array.
10267
10268 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10269 conflict_list_cnt, conflict_list_free): New variables.
10270 (table_grow): Also grow conflict_table.
10271 (prepare_rules): Output dprec and merger tables.
10272 (conflict_row): New function.
10273 (action_row): Output conflict lists for GLR parser. Don't use
10274 default reduction in conflicted states for GLR parser so that there
10275 are spaces for the conflict lists.
10276 (save_row): Also save conflict information.
10277 (token_actions): Allocate conflict list.
10278 (merger_output): New function.
10279 (pack_vector): Pack conflict table, too.
10280 (output_conflicts): New function to output yyconflp and yyconfl.
10281 (output_check): Allocate conflict_tos.
10282 (output_actions): Output conflict tables, also.
10283 (output_skeleton): Output b4_mergers definition.
10284 (prepare): Output b4_max_rhs_length definition.
10285 Use 'bison.glr' as default skeleton for GLR parsers.
10286
10287 * src/gram.c (glr_parser): New flag.
10288 (grammar_free): Call free_merger_functions.
10289
10290 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10291 all pairs of conflicting reductions, rather than just all tokens
10292 causing conflicts. Needed to size conflict tables.
10293 (conflicts_output): Modify call to count_rr_conflicts for new
10294 interface.
10295 (conflicts_print): Ditto.
10296 (count_total_conflicts): New function.
10297
10298 * src/reader.h (merger_list): New type.
10299 (merge_functions): New variable.
10300
10301 * src/lex.h (tok_dprec, tok_merge): New token types.
10302
10303 * src/gram.h (rule_s): Add dprec and merger fields.
10304 (glr_parser): New flag.
10305
10306 * src/conflicts.h (count_total_conflicts): New function.
10307
10308 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10309
10310 * doc/bison.texinfo (Generalized LR Parsing): New section.
10311 (GLR Parsers): New section.
10312 (Language and Grammar): Mention GLR parsing.
10313 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10314 Correct typo ("tge" -> "the").
10315
10316 * data/bison.glr: New skeleton for GLR parsing.
10317
10318 * tests/cxx-gram.at: New tests for GLR parsing.
10319
10320 * tests/testsuite.at: Include cxx-gram.at.
10321
10322 * tests/Makefile.am: Add cxx-gram.at.
10323
10324 * src/parse-gram.y:
10325
10326 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10327
10328 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
10329
10330 2002-06-27 Akim Demaille <akim@epita.fr>
10331
10332 * src/options.h, src/options.c: Remove.
10333 * src/getargs.c (short_options, long_options): New.
10334
10335 2002-06-27 Akim Demaille <akim@epita.fr>
10336
10337 * data/bison.simple, data/bison.c++: Rename as...
10338 * data/yacc.c, data/lalr1.cc: these.
10339 * doc/bison.texinfo (Environment Variables): Remove.
10340
10341 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10342
10343 * src/getargs.c (report_argmatch): Initialize strtok().
10344
10345 2002-06-20 Akim Demaille <akim@epita.fr>
10346
10347 * data/bison.simple (b4_symbol_actions): New, replaces...
10348 (b4_symbol_destructor, b4_symbol_printer): these.
10349 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10350 user token numbers.
10351
10352 2002-06-20 Akim Demaille <akim@epita.fr>
10353
10354 * data/bison.simple (yydestructor): Rename as...
10355 (yydestruct): this.
10356
10357 2002-06-20 Akim Demaille <akim@epita.fr>
10358
10359 * src/symtab.h, src/symtab.c (symbol_type_set)
10360 (symbol_destructor_set, symbol_precedence_set): The location is
10361 the last argument.
10362 Adjust all callers.
10363
10364 2002-06-20 Akim Demaille <akim@epita.fr>
10365
10366 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10367 internals.
10368 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10369 Takes a location.
10370 * src/symtab.h, src/symtab.c (symbol_class_set)
10371 (symbol_user_token_number_set): Likewise.
10372 Adjust all callers.
10373 Promote complain_at.
10374 * tests/input.at (Type Clashes): Adjust.
10375
10376 2002-06-20 Akim Demaille <akim@epita.fr>
10377
10378 * data/bison.simple (YYLEX): Fix the declaration when
10379 %pure-parser.
10380
10381 2002-06-20 Akim Demaille <akim@epita.fr>
10382
10383 * data/bison.simple (yysymprint): Don't print the token number,
10384 just its name.
10385 * tests/actions.at (Destructors): Rename as...
10386 (Printers and Destructors): this.
10387 Also exercise %printer.
10388
10389 2002-06-20 Akim Demaille <akim@epita.fr>
10390
10391 * data/bison.simple (YYDSYMPRINT): New.
10392 Use it to remove many of the #if YYDEBUG/if (yydebug).
10393
10394 2002-06-20 Akim Demaille <akim@epita.fr>
10395
10396 * src/symtab.h, src/symtab.c (symbol_t): printer and
10397 printer_location are new members.
10398 (symbol_printer_set): New.
10399 * src/parse-gram.y (PERCENT_PRINTER): New token.
10400 Handle its associated rule.
10401 * src/scan-gram.l: Adjust.
10402 (handle_destructor_at, handle_destructor_dollar): Rename as...
10403 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10404 * src/output.c (symbol_printers_output): New.
10405 (output_skeleton): Call it.
10406 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10407 since there are already many grammar files with a user `yyprint'.
10408 Replace the calls to YYPRINT to calls to yysymprint.
10409 * tests/calc.at: Adjust.
10410 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10411 taking advantage of parser very internal details (stack size!).
10412
10413 2002-06-20 Akim Demaille <akim@epita.fr>
10414
10415 * src/scan-gram.l: Complete the scanner with the missing patterns
10416 to pacify Flex.
10417 Use `quote' and `symbol_tag_get' where appropriate.
10418
10419 2002-06-19 Akim Demaille <akim@epita.fr>
10420
10421 * tests/actions.at (Destructors): Augment to test locations.
10422 * data/bison.simple (yydestructor): Pass it the current location
10423 if locations are enabled.
10424 Prototype only when __STDC__ or C++.
10425 Change the argument names to move into the yy name space: there is
10426 user code here.
10427
10428 2002-06-19 Akim Demaille <akim@epita.fr>
10429
10430 * data/bison.simple (b4_pure_if): New.
10431 Use it instead of #ifdef YYPURE.
10432
10433 2002-06-19 Akim Demaille <akim@epita.fr>
10434
10435 * data/bison.simple (b4_location_if): New.
10436 Use it instead of #ifdef YYLSP_NEEDED.
10437
10438 2002-06-19 Akim Demaille <akim@epita.fr>
10439
10440 Prepare @$ in %destructor, but currently don't bind it in the
10441 skeleton, as %location use is not cleaned up yet.
10442
10443 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10444 (handle_action_at): New.
10445 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10446 a braced_code_t and a location as additional arguments.
10447 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10448 unquote one when outputting `b4_dollar_dollar'.
10449 Adjust callers.
10450 * data/bison.simple (b4_eval): Remove.
10451 (b4_symbol_destructor): Adjust.
10452 * tests/input.at (Invalid @n): Adjust.
10453
10454 2002-06-19 Zack Weinberg <zack@codesourcery.com>
10455
10456 * doc/bison.texinfo: Document ability to have multiple
10457 prologue sections.
10458
10459 2002-06-18 Akim Demaille <akim@epita.fr>
10460
10461 * src/files.c (compute_base_names): When computing the output file
10462 names from the input file name, strip the directory part.
10463
10464 2002-06-18 Akim Demaille <akim@epita.fr>
10465
10466 * data/bison.simple.new: Comment changes.
10467 Reported by Andreas Schwab.
10468
10469 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10470
10471 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10472 there are no `label `yyoverflowlab' defined but not used' warnings
10473 when yyoverflow is defined.
10474
10475 2002-06-18 Akim Demaille <akim@epita.fr>
10476
10477 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10478 new member.
10479 (symbol_destructor_set): Adjust.
10480 * src/output.c (symbol_destructors_output): Output the destructor
10481 locations.
10482 Output the symbol name.
10483 * data/bison.simple (b4_symbol_destructor): Adjust.
10484
10485 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10486 and Akim Demaille <akim@epita.fr>
10487
10488 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10489 what's left on the stack when the error recovery hits EOF.
10490 * tests/actions.at (Destructors): Complete to exercise this case.
10491
10492 2002-06-17 Akim Demaille <akim@epita.fr>
10493
10494 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10495 arguments is really empty, not only equal to `[]'.
10496 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10497 member.
10498 (symbol_destructor_set): New.
10499 * src/output.c (symbol_destructors_output): New.
10500 * src/reader.h (brace_code_t, current_braced_code): New.
10501 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10502 (handle_dollar): Rename as...
10503 (handle_action_dollar): this.
10504 (handle_destructor_dollar): New.
10505 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10506 (grammar_declaration): Use it.
10507 * data/bison.simple (yystos): Is always defined.
10508 (yydestructor): New.
10509 * tests/actions.at (Destructors): New.
10510 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10511
10512 2002-06-17 Akim Demaille <akim@epita.fr>
10513
10514 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10515 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10516 rule_length only when needed.
10517 * src/output.c (actions_output, token_definitions_output): Output
10518 the full M4 block.
10519 * src/symtab.c: Don't access directly to the symbol tag, use
10520 symbol_tag_get.
10521 * src/parse-gram.y: Use symbol_list_free.
10522
10523 2002-06-17 Akim Demaille <akim@epita.fr>
10524
10525 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10526 (symbol_list_prepend, get_type_name): Move to...
10527 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10528 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10529 Adjust all callers.
10530 (symbol_list_free): New.
10531 * src/scan-gram.l (handle_dollar): Takes a location.
10532 * tests/input.at (Invalid $n): Adjust.
10533
10534 2002-06-17 Akim Demaille <akim@epita.fr>
10535
10536 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10537 (symbol_list_prepend): New.
10538 * src/parse-gram.y (%union): `list' is a new member.
10539 (symbols.1): New, replaces...
10540 (terms_to_prec.1, nterms_to_type.1): these.
10541 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10542 Take a location as additional argument.
10543 Adjust all callers.
10544
10545 2002-06-15 Akim Demaille <akim@epita.fr>
10546
10547 * src/parse-gram.y: Move %token in the declaration section so that
10548 we don't depend upon CVS Bison.
10549
10550 2002-06-15 Akim Demaille <akim@epita.fr>
10551
10552 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10553 * src/print.c (print_core): Use it.
10554
10555 2002-06-15 Akim Demaille <akim@epita.fr>
10556
10557 * src/conflicts.c (log_resolution): Accept the rule involved in
10558 the sr conflicts instead of the lookahead number that points to
10559 that rule.
10560 (flush_reduce): Accept the current lookahead vector as argument,
10561 instead of the index in LA.
10562 (resolve_sr_conflict): Accept the current number of lookahead
10563 bitset to consider for the STATE, instead of the index in LA.
10564 (set_conflicts): Adjust.
10565 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10566
10567 2002-06-15 Akim Demaille <akim@epita.fr>
10568
10569 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10570 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10571 Adjust all dependencies.
10572 * src/lalr.c (initialize_lookaheads): Split into...
10573 (states_lookaheads_count, states_lookaheads_initialize): these.
10574 (lalr): Adjust.
10575
10576 2002-06-15 Akim Demaille <akim@epita.fr>
10577
10578 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10579 out of...
10580 (grammar_rules_print): here.
10581 * src/reduce.c (reduce_output): Use it.
10582 * tests/reduce.at (Useless Rules, Reduced Automaton)
10583 (Underivable Rules): Adjust.
10584
10585 2002-06-15 Akim Demaille <akim@epita.fr>
10586
10587 Copy BYacc's nice way to report the grammar.
10588
10589 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10590 New.
10591 Don't print the rules' location, it is confusing and useless.
10592 (rule_print): Use grammar_rhs_print.
10593 * src/print.c (print_grammar): Use grammar_rules_print.
10594
10595 2002-06-15 Akim Demaille <akim@epita.fr>
10596
10597 Complete and rationalize `useless thing' warnings.
10598
10599 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10600 (symbol_tag_print): New.
10601 Use them everywhere in place of accessing directly the tag member.
10602 * src/gram.h, src/gram.c (rule_print): New.
10603 Use it where a rule used to be printed `by hand'.
10604 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10605 (reduce_grammar_tables): Report the useless rules.
10606 (reduce_print): Useless things are a warning, not an error.
10607 Report it as such.
10608 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10609 (Reduced Automaton, Underivable Rules): Adjust.
10610 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10611 * tests/conflicts.at (Unresolved SR Conflicts)
10612 (Solved SR Conflicts): Adjust.
10613
10614 2002-06-15 Akim Demaille <akim@epita.fr>
10615
10616 Let symbols have a location.
10617
10618 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10619 (getsym): Adjust.
10620 Adjust all callers.
10621 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10622 Use location_t, not int.
10623 * src/symtab.c (symbol_check_defined): Take advantage of the
10624 location.
10625 * tests/regression.at (Invalid inputs): Adjust.
10626
10627 2002-06-15 Akim Demaille <akim@epita.fr>
10628
10629 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10630 (input): Don't try to initialize yylloc here, do it in the
10631 scanner.
10632 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10633 * src/gram.h (rule_t): Change line and action_line into location
10634 and action_location, of location_t type.
10635 Adjust all dependencies.
10636 * src/location.h, src/location.c (empty_location): New.
10637 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10638 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10639 (grammar_current_rule_symbol_append)
10640 (grammar_current_rule_action_append): Expect a location as argument.
10641 * src/reader.c (grammar_midrule_action): Adjust to attach an
10642 action's location as dummy symbol location.
10643 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10644 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10645 the line numbers.
10646
10647 2002-06-14 Akim Demaille <akim@epita.fr>
10648
10649 Grammar declarations may be found in the grammar section.
10650
10651 * src/parse-gram.y (rules_or_grammar_declaration): New.
10652 (declarations): Each declaration may end with a semicolon, not
10653 just...
10654 (grammar_declaration): `"%union"'.
10655 (grammar): Branch to rules_or_grammar_declaration.
10656
10657 2002-06-14 Akim Demaille <akim@epita.fr>
10658
10659 * src/main.c (main): Invoke scanner_free.
10660
10661 2002-06-14 Akim Demaille <akim@epita.fr>
10662
10663 * src/output.c (m4_invoke): Extracted from...
10664 (output_skeleton): here.
10665 Free tempfile.
10666
10667 2002-06-14 Akim Demaille <akim@epita.fr>
10668
10669 * src/parse-gram.y (directives, directive, gram)
10670 (grammar_directives, precedence_directives, precedence_directive):
10671 Rename as...
10672 (declarations, declaration, grammar, grammar_declaration)
10673 (precedence_declaration, precedence_declarator): these.
10674 (symbol_declaration): New.
10675
10676 2002-06-14 Akim Demaille <akim@epita.fr>
10677
10678 * src/files.c (action_obstack): Remove, unused.
10679 (output_obstack): Remove it, and all its dependencies, as it is no
10680 longer needed.
10681 * src/reader.c (epilogue_set): Build the epilogue in the
10682 muscle_obstack.
10683 * src/output.h, src/output.c (muscle_obstack): Move to...
10684 * src/muscle_tab.h, src/muscle_tab.h: here.
10685 (muscle_init): Initialize muscle_obstack.
10686 (muscle_free): New.
10687 * src/main.c (main): Call it.
10688
10689 2002-06-14 Akim Demaille <akim@epita.fr>
10690
10691 * src/location.h: New, extracted from...
10692 * src/reader.h: here.
10693 * src/Makefile.am (noinst_HEADERS): Merge into
10694 (bison_SOURCES): this.
10695 Add location.h.
10696 * src/parse-gram.y: Use location_t instead of Bison's.
10697 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10698 Use location_t instead of ints.
10699
10700 2002-06-14 Akim Demaille <akim@epita.fr>
10701
10702 * data/bison.simple, data/bison.c++: Be sure to restore the
10703 current #line when returning to the skeleton contents after having
10704 exposed the input file's #line.
10705
10706 2002-06-12 Akim Demaille <akim@epita.fr>
10707
10708 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10709 eager.
10710 * tests/actions.at (Exotic Dollars): New.
10711
10712 2002-06-12 Akim Demaille <akim@epita.fr>
10713
10714 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10715 ['"/] too eagerly.
10716 * tests/input.at (Torturing the Scanner): New.
10717
10718 2002-06-11 Akim Demaille <akim@epita.fr>
10719
10720 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10721 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10722 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10723 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10724 * src/reader.c (reader): Use it.
10725
10726 2002-06-11 Akim Demaille <akim@epita.fr>
10727
10728 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10729 Adjust all callers.
10730 (scanner_last_string_free): New.
10731
10732 2002-06-11 Akim Demaille <akim@epita.fr>
10733
10734 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10735 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10736 (last_string, YY_OBS_FREE): New.
10737 Use them when returning an ID.
10738
10739 2002-06-11 Akim Demaille <akim@epita.fr>
10740
10741 Have Bison grammars parsed by a Bison grammar.
10742
10743 * src/reader.c, src/reader.h (prologue_augment): New.
10744 * src/reader.c (copy_definition): Remove.
10745
10746 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10747 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10748 (grammar_current_rule_prec_set, grammar_current_rule_check)
10749 (grammar_current_rule_symbol_append)
10750 (grammar_current_rule_action_append): Export.
10751 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10752 (symbol_list_action_append): Remove.
10753 Hook the routines from reader.
10754 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10755 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10756
10757 * src/reader.c (read_declarations): Remove, unused.
10758
10759 * src/parse-gram.y: Handle the epilogue.
10760 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10761 (grammar_start_symbol_set): this.
10762 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10763 * src/reader.c (readgram): Remove, unused.
10764 (reader): Adjust to insert eoftoken and axiom where appropriate.
10765
10766 * src/reader.c (copy_dollar): Replace with...
10767 * src/scan-gram.h (handle_dollar): this.
10768 * src/parse-gram.y: Remove `%thong'.
10769
10770 * src/reader.c (copy_at): Replace with...
10771 * src/scan-gram.h (handle_at): this.
10772
10773 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10774 New.
10775
10776 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10777 time being.
10778
10779 * src/reader.h, src/reader.c (grammar_rule_end): New.
10780
10781 * src/parse.y (current_type, current_class): New.
10782 Implement `%nterm', `%token' support.
10783 Merge `%term' into `%token'.
10784 (string_as_id): New.
10785 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10786 type name.
10787
10788 * src/parse-gram.y: Be sure to handle properly the beginning of
10789 rules.
10790
10791 * src/parse-gram.y: Handle %type.
10792 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10793
10794 * src/parse-gram.y: More directives support.
10795 * src/options.c: No longer handle source directives.
10796
10797 * src/parse-gram.y: Fix %output.
10798
10799 * src/parse-gram.y: Handle %union.
10800 Use the prologue locations.
10801 * src/reader.c (parse_union_decl): Remove.
10802
10803 * src/reader.h, src/reader.c (epilogue_set): New.
10804 * src/parse-gram.y: Use it.
10805
10806 * data/bison.simple, data/bison.c++: b4_stype is now either not
10807 defined, then default to int, or to the contents of %union,
10808 without `union' itself.
10809 Adjust.
10810 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10811
10812 * src/output.c (actions_output): Don't output braces, as they are
10813 already handled by the scanner.
10814
10815 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10816 characters to themselves.
10817
10818 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10819 that the epilogue has a proper #line.
10820
10821 * src/parse-gram.y: Handle precedence/associativity.
10822
10823 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10824 a terminal.
10825 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10826 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10827 at all to define terminals that cannot be emitted.
10828
10829 * src/scan-gram.l: Escape M4 characters.
10830
10831 * src/scan-gram.l: Working properly with escapes in user
10832 strings/characters.
10833
10834 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10835 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10836 grammar.
10837 Use more modest sizes, as for the time being the parser does not
10838 release memory, and therefore the process swallows a huge amount
10839 of memory.
10840
10841 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10842 stricter %token grammar.
10843
10844 * src/symtab.h (associativity): Add `undef_assoc'.
10845 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10846 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10847
10848 * tests/regression.at (Invalid %directive): Remove, as it is now
10849 meaningless.
10850 (Invalid inputs): Adjust to the new error messages.
10851 (Token definitions): The new grammar doesn't allow too many
10852 eccentricities.
10853
10854 * src/lex.h, src/lex.c: Remove.
10855 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10856 (copy_character, copy_string2, copy_string, copy_identifier)
10857 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10858 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10859 (parse_action): Remove.
10860 * po/POTFILES.in: Adjust.
10861
10862 2002-06-11 Akim Demaille <akim@epita.fr>
10863
10864 * src/reader.c (parse_action): Don't store directly into the
10865 rule's action member: return the action as a string.
10866 Don't require `rule_length' as an argument: compute it.
10867 (grammar_current_rule_symbol_append)
10868 (grammar_current_rule_action_append): New, eved out from
10869 (readgram): here.
10870 Remove `action_flag', `rulelength', unused now.
10871
10872 2002-06-11 Akim Demaille <akim@epita.fr>
10873
10874 * src/reader.c (grammar_current_rule_prec_set).
10875 (grammar_current_rule_check): New, eved out from...
10876 (readgram): here.
10877 Remove `xaction', `first_rhs': useless.
10878 * tests/input.at (Type clashes): New.
10879 * tests/existing.at (GNU Cim Grammar): Adjust.
10880
10881 2002-06-11 Akim Demaille <akim@epita.fr>
10882
10883 * src/reader.c (grammar_midrule_action): New, Eved out from
10884 (readgram): here.
10885
10886 2002-06-11 Akim Demaille <akim@epita.fr>
10887
10888 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10889 New.
10890 (readgram): Use them as replacement of inlined code, crule and
10891 crule1.
10892
10893 2002-06-11 Akim Demaille <akim@epita.fr>
10894
10895 * src/reader.c (grammar_end, grammar_symbol_append): New.
10896 (readgram): Use them.
10897 Make the use of `p' as local as possible.
10898
10899 2002-06-10 Akim Demaille <akim@epita.fr>
10900
10901 GCJ's parser requires the tokens to be defined before the prologue.
10902
10903 * data/bison.simple: Output the token definition before the user's
10904 prologue.
10905 * tests/regression.at (Braces parsing, Duplicate string)
10906 (Mixing %token styles): Check the output from bison.
10907 (Early token definitions): New.
10908
10909 2002-06-10 Akim Demaille <akim@epita.fr>
10910
10911 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10912 assigning twice the same user number to a token, so that we can
10913 use it in...
10914 * src/lex.c (lex): here.
10915 Also use `symbol_class_set' instead of hand written code.
10916 * src/reader.c (parse_assoc_decl): Likewise.
10917
10918 2002-06-10 Akim Demaille <akim@epita.fr>
10919
10920 * src/symtab.c, src/symtab.c (symbol_class_set)
10921 (symbol_user_token_number_set): New.
10922 * src/reader.c (parse_token_decl): Use them.
10923 Use a switch instead of ifs.
10924 Use a single argument.
10925
10926 2002-06-10 Akim Demaille <akim@epita.fr>
10927
10928 Remove `%thong' support as it is undocumented, unused, duplicates
10929 `%token's job, and creates useless e-mail traffic with people who
10930 want to know what it is, why it is undocumented, unused, and
10931 duplicates `%token's job.
10932
10933 * src/reader.c (parse_thong_decl): Remove.
10934 * src/options.c (option_table): Remove "thong".
10935 * src/lex.h (tok_thong): Remove.
10936
10937 2002-06-10 Akim Demaille <akim@epita.fr>
10938
10939 * src/symtab.c, src/symtab.c (symbol_type_set)
10940 (symbol_precedence_set): New.
10941 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10942 (value_components_used): Remove, unused.
10943
10944 2002-06-09 Akim Demaille <akim@epita.fr>
10945
10946 Move symbols handling code out of the reader.
10947
10948 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10949 (axiom): Move to...
10950 * src/symtab.h, src/symtab.c: here.
10951
10952 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10953 * src/reader.c (startval): Rename as...
10954 * src/symtab.h, src/symtab.c (startsymbol): this.
10955 * src/reader.c: Adjust.
10956
10957 * src/reader.c (symbol_check_defined, symbol_make_alias)
10958 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10959 (token_translations_init)
10960 Move to...
10961 * src/symtab.c: here.
10962 * src/reader.c (packsymbols): Move to...
10963 * src/symtab.h, src/symtab.c (symbols_pack): here.
10964 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10965 argument.
10966
10967 2002-06-03 Akim Demaille <akim@epita.fr>
10968
10969 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10970 then statements.
10971
10972 2002-06-03 Akim Demaille <akim@epita.fr>
10973
10974 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10975 structs with non literals.
10976 * src/scan-skel.l: never-interactive.
10977 * src/conflicts.c (enum conflict_resolution_e): No trailing
10978 comma.
10979 * src/getargs.c (usage): Split long literal strings.
10980 Reported by Hans Aberg.
10981
10982 2002-05-28 Akim Demaille <akim@epita.fr>
10983
10984 * data/bison.c++: Use C++ ostreams.
10985 (cdebug_): New member.
10986
10987 2002-05-28 Akim Demaille <akim@epita.fr>
10988
10989 * src/output.c (output_skeleton): Be sure to allocate enough room
10990 for `/' _and_ for `\0' in full_skeleton.
10991
10992 2002-05-28 Akim Demaille <akim@epita.fr>
10993
10994 * data/bison.c++: Catch up with bison.simple:
10995 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10996 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10997 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10998 and popping traces.
10999
11000 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11001
11002 * src/output.c (output_skeleton): Put an explicit path in front of
11003 the skeleton file name, rather than relying on the -I directory,
11004 to partially alleviate effects of having a skeleton file lying around
11005 in the current directory.
11006
11007 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11008
11009 * src/conflicts.c (log_resolution): Correct typo:
11010 obstack_printf should be obstack_fgrow1.
11011
11012 2002-05-26 Akim Demaille <akim@epita.fr>
11013
11014 * src/state.h (state_t): `solved_conflicts' is a new member.
11015 * src/LR0.c (new_state): Set it to 0.
11016 * src/conflicts.h, src/conflicts.c (print_conflicts)
11017 (free_conflicts, solve_conflicts): Rename as...
11018 (conflicts_print, conflicts_free, conflicts_solve): these.
11019 Adjust callers.
11020 * src/conflicts.c (enum conflict_resolution_e)
11021 (solved_conflicts_obstack): New, used by...
11022 (log_resolution): this.
11023 Adjust to attach the conflict resolution to each state.
11024 Complete the description with the precedence/associativity
11025 information.
11026 (resolve_sr_conflict): Adjust.
11027 * src/print.c (print_state): Output its solved_conflicts.
11028 * tests/conflicts.at (Unresolved SR Conflicts)
11029 (Solved SR Conflicts): Exercise --report=all.
11030
11031 2002-05-26 Akim Demaille <akim@epita.fr>
11032
11033 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11034 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11035 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11036 (token_number_t, item_number_as_token_number)
11037 (token_number_as_item_number, muscle_insert_token_number_table):
11038 Rename as...
11039 (symbol_number_t, item_number_as_symbol_number)
11040 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11041 these, since it is more appropriate.
11042
11043 2002-05-26 Akim Demaille <akim@epita.fr>
11044
11045 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11046 `Error:' lines.
11047 * data/bison.simple (yystos) [YYDEBUG]: New.
11048 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11049 error recovery.
11050 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11051
11052 2002-05-25 Akim Demaille <akim@epita.fr>
11053
11054 * doc/bison.texinfo (Debugging): Split into...
11055 (Tracing): this new section, its former contents, and...
11056 (Understanding): this new section.
11057 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11058 by...
11059 (report_flag): this.
11060 Adjust all dependencies.
11061 (report_args, report_types, report_argmatch): New.
11062 (usage, getargs): Report/support -r, --report.
11063 * src/options.h
11064 (struct option_table_struct): Rename as..,
11065 (struct option_table_s): this.
11066 Rename the `set_flag' member to `flag' to match with getopt_long's
11067 struct.
11068 * src/options.c (option_table): Split verbose into an entry for
11069 %verbose, and another for --verbose.
11070 Support --report/-r, so remove -r from the obsolete --raw.
11071 * src/print.c: Attach full item sets and lookaheads reports to
11072 report_flag instead of trace_flag.
11073 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11074
11075 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11076 and Paul Eggert <eggert@twinsun.com>
11077
11078 * data/bison.simple (yyparse): Correct error handling to conform to
11079 POSIX and yacc. Specifically, after syntax error is discovered,
11080 do not reduce further before shifting the error token.
11081 Clean up the code a bit by removing the labels yyerrdefault,
11082 yyerrhandle, yyerrpop.
11083 * NEWS: Document the above.
11084
11085 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11086
11087 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11088 type; it isn't always big enough, since it doesn't necessarily
11089 include non-terminals.
11090 (yytranslate): Expand definition of yy_token_number_type, so that
11091 the latter can be removed.
11092 (yy_token_number_type): Remove, only one use.
11093 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11094 don't use TokenNumberType as element type.
11095
11096 * tests/regression.at: Modify expected output to agree with change
11097 to yyr1 and yytranslate.
11098
11099 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11100
11101 * src/reader.c (parse_action): Use copy_character instead of
11102 obstack_1grow.
11103
11104 2002-05-13 Akim Demaille <akim@epita.fr>
11105
11106 * tests/regression.at (Token definitions): Prototype yylex and
11107 yyerror.
11108
11109 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11110
11111 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
11112 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11113 32-bit arithmetic.
11114 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11115
11116 2002-05-07 Akim Demaille <akim@epita.fr>
11117
11118 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11119 avoid GCC warnings.
11120
11121 2002-05-07 Akim Demaille <akim@epita.fr>
11122
11123 Kill GCC warnings.
11124
11125 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11126 over the RHS of each rule.
11127 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11128 * src/state.h (state_t): Member `nitems' is unsigned short.
11129 * src/LR0.c (get_state): Adjust.
11130 * src/reader.c (packgram): Likewise.
11131 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11132 `Type'.
11133 (muscle_insert_int_table): Remove, unused.
11134 (prepare_rules): Remove `max'.
11135
11136 2002-05-06 Akim Demaille <akim@epita.fr>
11137
11138 * src/closure.c (print_firsts): Display of the symbol tags.
11139 (bitmatrix_print): Move to...
11140 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11141 here.
11142 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11143
11144 2002-05-06 Akim Demaille <akim@epita.fr>
11145
11146 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11147 hash_do_for_each.
11148
11149 2002-05-06 Akim Demaille <akim@epita.fr>
11150
11151 * src/LR0.c (new_state, get_state): Instead of using the global
11152 `kernel_size' and `kernel_base', have two new arguments:
11153 `core_size' and `core'.
11154 Adjust callers.
11155
11156 2002-05-06 Akim Demaille <akim@epita.fr>
11157
11158 * src/reader.c (packgram): No longer end `ritem' with a 0
11159 sentinel: it is not used.
11160
11161 2002-05-05 Akim Demaille <akim@epita.fr>
11162
11163 New experimental feature: display the lookaheads in the report and
11164 graph.
11165
11166 * src/print (print_core): When --trace-flag, display the rules
11167 lookaheads.
11168 * src/print_graph.c (print_core): Likewise.
11169 Swap the arguments.
11170 Adjust caller.
11171
11172 2002-05-05 Akim Demaille <akim@epita.fr>
11173
11174 * tests/torture.at (Many lookaheads): New test.
11175
11176 2002-05-05 Akim Demaille <akim@epita.fr>
11177
11178 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11179 (GENERATE_MUSCLE_INSERT_TABLE): this.
11180 (output_int_table, output_unsigned_int_table, output_short_table)
11181 (output_token_number_table, output_item_number_table): Replace with...
11182 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11183 (muscle_insert_short_table, muscle_insert_token_number_table)
11184 (muscle_insert_item_number_table): these.
11185 Adjust all callers.
11186 (prepare_tokens): Don't free `translations', since...
11187 * src/reader.h, src/reader.c (grammar_free): do it.
11188 Move to...
11189 * src/gram.h, src/gram.c (grammar_free): here.
11190 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11191 b4_translate_max.
11192
11193 2002-05-05 Akim Demaille <akim@epita.fr>
11194
11195 * src/output.c (output_unsigned_int_table): New.
11196 (prepare_rules): `i' is unsigned.
11197 `prhs', `rline', `r2' are unsigned int.
11198 Rename muscle `rhs_number_max' as `rhs_max'.
11199 Output muscles `prhs_max', `rline_max', and `r2_max'.
11200 Free rline and r1.
11201 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11202 to compute types instead of constant types.
11203 * tests/regression.at (Web2c Actions): Adjust.
11204
11205 2002-05-04 Akim Demaille <akim@epita.fr>
11206
11207 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11208 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11209 Adjust dependencies.
11210 * src/output.c (token_definitions_output): Be sure not to output a
11211 `#define 'a'' when fed with `%token 'a' "a"'.
11212 * tests/regression.at (Token definitions): New.
11213
11214 2002-05-03 Paul Eggert <eggert@twinsun.com>
11215
11216 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11217 for K&R C.
11218
11219 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11220
11221 * Makefile.am (SUBDIRS): Remove intl.
11222 (EXTRA_DIST): Add config/config.rpath.
11223
11224 2002-05-03 Akim Demaille <akim@epita.fr>
11225
11226 * data/bison.simple (m4_if): Don't output empty enums.
11227 And actually, output valid enum definitions :(.
11228
11229 2002-05-03 Akim Demaille <akim@epita.fr>
11230
11231 * configure.bat: Remove, completely obsolete.
11232 * Makefile.am (EXTRA_DIST): Adjust.
11233 Don't distribute config.rpath...
11234 * config/Makefile.am (EXTRA_DIST): Do it.
11235
11236 2002-05-03 Akim Demaille <akim@epita.fr>
11237
11238 * configure.in (GETTEXT_VERSION): New.
11239 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11240
11241 2002-05-03 Akim Demaille <akim@epita.fr>
11242
11243 * data/bison.simple (b4_token_enum): New.
11244 (b4_token_defines): Use it to output tokens both as #define and
11245 enums.
11246 Suggested by Paul Eggert.
11247 * src/output.c (token_definitions_output): Don't output spurious
11248 white spaces.
11249
11250 2002-05-03 Akim Demaille <akim@epita.fr>
11251
11252 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11253
11254 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
11255
11256 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11257 Update the stack class, give a try to deque as the default container.
11258
11259 2002-05-02 Akim Demaille <akim@epita.fr>
11260
11261 * data/bison.simple (yyparse): Do not implement @$ = @1.
11262 (YYLLOC_DEFAULT): Adjust to do it.
11263 * doc/bison.texinfo (Location Default Action): Fix.
11264
11265 2002-05-02 Akim Demaille <akim@epita.fr>
11266
11267 * src/reader.c (parse_braces): Merge into...
11268 (parse_action): this.
11269
11270 2002-05-02 Akim Demaille <akim@epita.fr>
11271
11272 * configure.in (ALL_LINGUAS): Remove.
11273 * po/LINGUAS, hr.po: New.
11274
11275 2002-05-02 Akim Demaille <akim@epita.fr>
11276
11277 Remove the so called hairy (semantic) parsers.
11278
11279 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11280 * src/gram.h, src/gram.c (semantic_parser): Remove.
11281 (rule_t): Remove the guard and guard_line members.
11282 * src/lex.h (token_t): remove tok_guard.
11283 * src/options.c (option_table): Remove %guard and %semantic_parser
11284 support.
11285 * src/output.c, src/output.h (guards_output): Remove.
11286 (prepare): Adjust.
11287 (token_definitions_output): Don't output the `T'
11288 tokens (???).
11289 (output_skeleton): Don't output the guards.
11290 * src/files.c, src/files.c (attrsfile): Remove.
11291 * src/reader.c (symbol_list): Remove the guard and guard_line
11292 members.
11293 Adjust dependencies.
11294 (parse_guard): Remove.
11295 * data/bison.hairy: Remove.
11296 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11297 BISON_HAIRY.
11298
11299 2002-05-02 Akim Demaille <akim@epita.fr>
11300
11301 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11302 (parse_guard): Rename the formal argument `stack_offset' as
11303 `rule_length', which is more readable.
11304 Adjust callers.
11305 (copy_at, copy_dollar): Instead of outputting the hard coded
11306 values of $$, $n and so forth, output invocation to b4_lhs_value,
11307 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
11308 Note: this patch partially drops `semantic-parser' support: it
11309 always does `rule_length - n', where semantic parsers ought to
11310 always use `-n'.
11311 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11312 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11313
11314 2002-05-02 Akim Demaille <akim@epita.fr>
11315
11316 * configure.in (AC_INIT): Bump to 1.49b.
11317 (AM_INIT_AUTOMAKE): Short invocation.
11318
11319 2002-05-02 Akim Demaille <akim@epita.fr>
11320
11321 Version 1.49a.
11322
11323 2002-05-01 Akim Demaille <akim@epita.fr>
11324
11325 * src/skeleton.h: Remove.
11326
11327 2002-05-01 Akim Demaille <akim@epita.fr>
11328
11329 * src/skeleton.h: Fix the #endif.
11330 Reported by Magnus Fromreide.
11331
11332 2002-04-26 Paul Eggert <eggert@twinsun.com>
11333
11334 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11335 Define if we define YYSTYPE and YYLTYPE, respectively.
11336 (YYCOPY): Fix [] quoting problem in the non-GCC case.
11337
11338 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
11339
11340 * src/scan-skel.l: Postprocess quadrigraphs.
11341
11342 * src/reader.c (copy_character): New function, used to output
11343 single characters while replacing `[' and `]' with quadrigraphs, to
11344 avoid troubles with M4 quotes.
11345 (copy_comment): Output characters with copy_character.
11346 (read_additionnal_code): Likewise.
11347 (copy_string2): Likewise.
11348 (copy_definition): Likewise.
11349
11350 * tests/calc.at: Exercise M4 quoting.
11351
11352 2002-04-25 Akim Demaille <akim@epita.fr>
11353
11354 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11355 between `!' and the command.
11356 Reported by Paul Eggert.
11357
11358 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
11359
11360 * tests/calc.at: Exercise prologue splitting.
11361
11362 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11363 `b4_post_prologue' instead of `b4_prologue'.
11364
11365 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11366 muscles.
11367 (output): Free pre_prologue_obstack and post_prologue_obstack.
11368 * src/files.h, src/files.c (attrs_obstack): Remove.
11369 (pre_prologue_obstack, post_prologue_obstack): New.
11370 * src/reader.c (copy_definition): Add a parameter to specify the
11371 obstack to fill, instead of using attrs_obstack unconditionally.
11372 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11373 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11374
11375 2002-04-23 Paul Eggert <eggert@twinsun.com>
11376
11377 * data/bison.simple: Remove unnecessary commentary and white
11378 space differences from 1_29-branch.
11379 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11380
11381 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11382 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11383 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11384 constructors or destructors.
11385
11386 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11387
11388 2002-04-23 Akim Demaille <akim@epita.fr>
11389
11390 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11391 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11392 location with columns.
11393 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11394 All reported by Paul Eggert.
11395
11396 2002-04-22 Akim Demaille <akim@epita.fr>
11397
11398 * src/reduce.c (dump_grammar): Move to...
11399 * src/gram.h, src/gram.c (grammar_dump): here.
11400 Be sure to separate long item numbers.
11401 Don't read the members of a rule's prec if its nil.
11402
11403 2002-04-22 Akim Demaille <akim@epita.fr>
11404
11405 * src/output.c (table_size, table_grow): New.
11406 (MAXTABLE): Remove, replace uses with table_size.
11407 (pack_vector): Instead of dying when the table is too big, grow it.
11408
11409 2002-04-22 Akim Demaille <akim@epita.fr>
11410
11411 * data/bison.simple (yyr1): Its type is that of a token number.
11412 * data/bison.c++ (r1_): Likewise.
11413 * tests/regression.at (Web2c Actions): Adjust.
11414
11415 2002-04-22 Akim Demaille <akim@epita.fr>
11416
11417 * src/reader.c (token_translations_init): 256 is now the default
11418 value for the error token, i.e., it will be assigned another
11419 number if the user assigned 256 to one of her tokens.
11420 (reader): Don't force 256 to error.
11421 * doc/bison.texinfo (Symbols): Adjust.
11422 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11423 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11424 etc. instead of 10, 20, 30 (which was used to `jump' over error
11425 (256) and undefined (2)).
11426
11427 2002-04-22 Akim Demaille <akim@epita.fr>
11428
11429 Propagate more token_number_t.
11430
11431 * src/gram.h (token_number_as_item_number)
11432 (item_number_as_token_number): New.
11433 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11434 Use it to create output_item_number_table and
11435 output_token_number_table.
11436 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11437 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11438 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11439 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11440
11441 2002-04-22 Akim Demaille <akim@epita.fr>
11442
11443 * src/output.h, src/output.c (get_lines_number): Remove.
11444
11445 2002-04-19 Akim Demaille <akim@epita.fr>
11446
11447 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11448 as Lex/Flex'.
11449 (Debugging): More details about enabling the debugging features.
11450 (Table of Symbols): Describe $$, $n, @$, and @n.
11451 Suggested by Tim Josling.
11452
11453 2002-04-19 Akim Demaille <akim@epita.fr>
11454
11455 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11456
11457 2002-04-10 Akim Demaille <akim@epita.fr>
11458
11459 * src/system.h: Rely on HAVE_LIMITS_H.
11460 Suggested by Paul Eggert.
11461
11462 2002-04-09 Akim Demaille <akim@epita.fr>
11463
11464 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11465 full stderr, and strip it according to the bison options, instead
11466 of composing the error message from different bits.
11467 This makes it easier to check for several error messages.
11468 Adjust all the invocations.
11469 Add an invocation exercising the error token.
11470 Add an invocation demonstrating a stupid error message.
11471 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11472 Adjust the tests.
11473 Error message are for stderr, not stdout.
11474
11475 2002-04-09 Akim Demaille <akim@epita.fr>
11476
11477 * src/gram.h, src/gram.c (error_token_number): Remove, use
11478 errtoken->number.
11479 * src/reader.c (reader): Don't specify the user token number (2)
11480 for $undefined, as it uselessly prevents using it.
11481 * src/gram.h (token_number_t): Move to...
11482 * src/symtab.h: here.
11483 (state_t.number): Is a token_number_t.
11484 * src/print.c, src/reader.c: Use undeftoken->number instead of
11485 hard coded 2.
11486 (Even though this 2 is not the same as above: the number of the
11487 undeftoken remains being 2, it is its user token number which
11488 might not be 2).
11489 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11490 `user_token_number_max'.
11491 Output `undef_token_number'.
11492 * data/bison.simple, data/bison.c++: Use them.
11493 Be sure to map invalid yylex return values to
11494 `undef_token_number'. This saves us from gratuitous SEGV.
11495
11496 * tests/conflicts.at (Solved SR Conflicts)
11497 (Unresolved SR Conflicts): Adjust.
11498 * tests/regression.at (Web2c Actions): Adjust.
11499
11500 2002-04-08 Akim Demaille <akim@epita.fr>
11501
11502 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11503 Adding #line.
11504 Remove the duplicate `typedefs'.
11505 (RhsNumberType): Fix the declaration and various other typos.
11506 Use __ofile__.
11507 * data/bison.simple: Use __ofile__.
11508 * src/scan-skel.l: Handle __ofile__.
11509
11510 2002-04-08 Akim Demaille <akim@epita.fr>
11511
11512 * src/gram.h (item_number_t): New, the type of item numbers in
11513 RITEM. Note that it must be able to code symbol numbers as
11514 positive number, and the negation of rule numbers as negative
11515 numbers.
11516 Adjust all dependencies (pretty many).
11517 * src/reduce.c (rule): Remove this `short *' pointer: use
11518 item_number_t.
11519 * src/system.h (MINSHORT, MAXSHORT): Remove.
11520 Include `limits.h'.
11521 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11522 (shortcpy): Remove.
11523 (MAXTABLE): Move to...
11524 * src/output.c (MAXTABLE): here.
11525 (prepare_rules): Use output_int_table to output rhs.
11526 * data/bison.simple, data/bison.c++: Adjust.
11527 * tests/torture.at (Big triangle): Move the limit from 254 to
11528 500.
11529 * tests/regression.at (Web2c Actions): Ajust.
11530
11531 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11532 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11533 passes, but produces negative #line number, once fixed, GCC is
11534 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11535 C), it passes.
11536 * src/state.h (state_h): Code input lines on ints, not shorts.
11537
11538 2002-04-08 Akim Demaille <akim@epita.fr>
11539
11540 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11541 and then the grammar.
11542
11543 2002-04-08 Akim Demaille <akim@epita.fr>
11544
11545 * src/system.h: No longer using strndup.
11546
11547 2002-04-07 Akim Demaille <akim@epita.fr>
11548
11549 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11550 * src/output.c (output_table_data): Return the longest number.
11551 (prepare_tokens): Output `token_number_max').
11552 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11553 New.
11554 Use them to define yy_token_number_type/TokenNumberType.
11555 Use this type for yytranslate.
11556 * tests/torture.at (Big triangle): Push the limit from 124 to
11557 253.
11558 * tests/regression.at (Web2c Actions): Adjust.
11559
11560 2002-04-07 Akim Demaille <akim@epita.fr>
11561
11562 * tests/torture.at (Big triangle): New.
11563 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11564 * tests/existing.at: here.
11565
11566 2002-04-07 Akim Demaille <akim@epita.fr>
11567
11568 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11569 nritems.
11570 Adjust dependencies.
11571
11572 2002-04-07 Akim Demaille <akim@epita.fr>
11573
11574 * src/reader.c: Normalize increments to prefix form.
11575
11576 2002-04-07 Akim Demaille <akim@epita.fr>
11577
11578 * src/reader.c, symtab.c: Remove debugging code.
11579
11580 2002-04-07 Akim Demaille <akim@epita.fr>
11581
11582 Rename all the `bucket's as `symbol_t'.
11583
11584 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11585 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11586 * src/symtab.c, src/symtab.h (bucket): Rename as...
11587 (symbol_t): this.
11588 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11589 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11590 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11591 (buckets_new, buckets_free, buckets_do): Rename as...
11592 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11593 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11594 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11595 (symbols_new, symbols_free, symbols_do): these.
11596
11597 2002-04-07 Akim Demaille <akim@epita.fr>
11598
11599 Use lib/hash for the symbol table.
11600
11601 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11602 EOF.
11603 * src/lex.c (lex): Set the `number' member of new terminals.
11604 * src/reader.c (bucket_check_defined, bucket_make_alias)
11605 (bucket_check_alias_consistence, bucket_translation): New.
11606 (reader, grammar_free, readgram, token_translations_init)
11607 (packsymbols): Adjust.
11608 (reader): Number the predefined tokens.
11609 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11610 for predefined tokens.
11611 * src/symtab.h (bucket): Remove all the hash table related
11612 members.
11613 * src/symtab.c (symtab): Replace by...
11614 (bucket_table): this.
11615 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11616 (buckets_new, buckets_do): New.
11617
11618 2002-04-07 Akim Demaille <akim@epita.fr>
11619
11620 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11621 (start_symbol, max_user_token_number, semantic_parser)
11622 (error_token_number): Initialize.
11623 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11624 Initialize.
11625 (reader): Don't.
11626 (errtoken, eoftoken, undeftoken, axiom): Extern.
11627
11628 2002-04-07 Akim Demaille <akim@epita.fr>
11629
11630 * src/gram.h (rule_s): prec and precsym are now pointers
11631 to the bucket giving the priority/associativity.
11632 Member `associativity' removed: useless.
11633 * src/reduce.c, src/conflicts.c: Adjust.
11634
11635 2002-04-07 Akim Demaille <akim@epita.fr>
11636
11637 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11638 Properly escape the symbols' TAG when outputting them.
11639
11640 2002-04-07 Akim Demaille <akim@epita.fr>
11641
11642 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11643
11644 2002-04-07 Akim Demaille <akim@epita.fr>
11645
11646 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11647 (LArule): this, which is an array to rule_t*.
11648 * src/print.c, src/conflicts.c: Adjust.
11649
11650 2002-04-07 Akim Demaille <akim@epita.fr>
11651
11652 * src/gram.h (rule_t): Rename `number' as `user_number'.
11653 `number' is a new member.
11654 Adjust dependencies.
11655 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11656
11657 2002-04-07 Akim Demaille <akim@epita.fr>
11658
11659 As a result of the previous patch, it is no longer needed
11660 to reorder ritem itself.
11661
11662 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11663
11664 2002-04-07 Akim Demaille <akim@epita.fr>
11665
11666 Be sure never to walk through RITEMS, but use only data related to
11667 the rules themselves. RITEMS should be banished.
11668
11669 * src/output.c (output_token_translations): Rename as...
11670 (prepare_tokens): this.
11671 In addition to `translate', prepare the muscles `tname' and
11672 `toknum', which were handled by...
11673 (output_rule_data): this.
11674 Remove, and move the remainder of its outputs into...
11675 (prepare_rules): this new routines, which also merges content from
11676 (output_gram): this.
11677 (prepare_rules): Be sure never to walk through RITEMS.
11678 (output_stos): Rename as...
11679 (prepare_stos): this.
11680 (output): Always invoke prepare_states, after all, just don't use it
11681 in the output if you don't need it.
11682
11683 2002-04-07 Akim Demaille <akim@epita.fr>
11684
11685 * src/LR0.c (new_state): Display `nstates' as the name of the
11686 newly created state.
11687 Adjust to initialize first_state and last_state if needed.
11688 Be sure to distinguish the initial from the final state.
11689 (new_states): Create the itemset of the initial state, and use
11690 new_state.
11691 * src/closure.c (closure): Now that the initial state has its
11692 items properly set, there is no need for a special case when
11693 creating `ruleset'.
11694
11695 As a result, now the rule 0, reducing to $axiom, is visible in the
11696 outputs. Adjust the test suite.
11697
11698 * tests/conflicts.at (Solved SR Conflicts)
11699 (Unresolved SR Conflicts): Adjust.
11700 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11701 * tests/conflicts.at (S/R in initial): New.
11702
11703 2002-04-07 Akim Demaille <akim@epita.fr>
11704
11705 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11706 the RHS of the rules.
11707 * src/output.c (output_gram): Likewise.
11708
11709 2002-04-07 Akim Demaille <akim@epita.fr>
11710
11711 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11712 bucket.
11713 Adjust all dependencies.
11714 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11715 `number' of the buckets too.
11716 * src/gram.h: Include `symtab.h'.
11717 (associativity): Move to...
11718 * src/symtab.h: here.
11719 No longer include `gram.h'.
11720
11721 2002-04-07 Akim Demaille <akim@epita.fr>
11722
11723 * src/gram.h, src/gram.c (rules_rhs_length): New.
11724 (ritem_longest_rhs): Use it.
11725 * src/gram.h (rule_t): `number' is a new member.
11726 * src/reader.c (packgram): Set it.
11727 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11728 the end of `rules', and count them out of `nrules'.
11729 (reduce_output, dump_grammar): Adjust.
11730 * src/print.c (print_grammar): It is no longer needed to check for
11731 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11732 * tests/reduce.at (Reduced Automaton): New test.
11733
11734 2002-04-07 Akim Demaille <akim@epita.fr>
11735
11736 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11737 lacking `+ 1' to nrules, Bison reported as useless a token if it
11738 was used solely to set the precedence of the last rule...
11739
11740 2002-04-07 Akim Demaille <akim@epita.fr>
11741
11742 * data/bison.c++, data/bison.simple: Don't output the current file
11743 name in #line, to avoid useless diffs between two identical
11744 outputs under different names.
11745
11746 2002-04-07 Akim Demaille <akim@epita.fr>
11747
11748 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11749 Normalize loops to using `< nrules + 1', not `<= nrules'.
11750
11751 2002-04-07 Akim Demaille <akim@epita.fr>
11752
11753 * TODO: Update.
11754
11755 2002-04-07 Akim Demaille <akim@epita.fr>
11756
11757 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11758 bucket.value as bucket.number.
11759
11760 2002-04-07 Akim Demaille <akim@epita.fr>
11761
11762 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11763 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11764 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11765 RHS, instead of being an index in RITEMS.
11766
11767 2002-04-04 Paul Eggert <eggert@twinsun.com>
11768
11769 * doc/bison.texinfo: Update copyright date.
11770 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11771 (Symbols): Warn about running Bison in one character set,
11772 but compiling and/or running in an incompatible one.
11773 Warn about character code 256, too.
11774
11775 2002-04-03 Paul Eggert <eggert@twinsun.com>
11776
11777 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11778 YYERROR_VERBOSE is nonzero, not whether it is defined.
11779
11780 Merge changes from bison-1_29-branch.
11781
11782 2002-03-20 Paul Eggert <eggert@twinsun.com>
11783
11784 Merge fixes from Debian bison_1.34-1.diff.
11785
11786 * configure.in (AC_PREREQ): 2.53.
11787
11788 2002-03-20 Akim Demaille <akim@epita.fr>
11789
11790 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11791
11792 2002-03-19 Paul Eggert <eggert@twinsun.com>
11793
11794 * src/bison.simple (YYCOPY): New macro.
11795 (YYSTACK_RELOCATE): Use it.
11796 Remove Type arg; no longer needed. All callers changed.
11797 (yymemcpy): Remove; no longer needed.
11798
11799 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11800 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11801
11802 2002-03-19 Akim Demaille <akim@epita.fr>
11803
11804 Test and fix the #line outputs.
11805
11806 * tests/atlocal.at (GCC): New.
11807 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11808 (Prologue synch line, %union synch line, Postprologue synch line)
11809 (Action synch line, Epilogue synch line): New tests.
11810 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11811 * data/bison.simple, data/bison.c++: Use it.
11812
11813 2002-03-19 Akim Demaille <akim@epita.fr>
11814
11815 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11816 (Solved SR Conflicts, %expect not enough, %expect right)
11817 (%expect too much): Move to...
11818 * tests/conflicts.at: this new file.
11819
11820 2002-03-19 Akim Demaille <akim@epita.fr>
11821
11822 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11823 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11824 that we can move to enums for instance.
11825 * src/output.c (token_definitions_output): Output a list of
11826 `token-name, token-number' instead of the #define.
11827 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11828
11829 2002-03-14 Akim Demaille <akim@epita.fr>
11830
11831 Use Gettext 0.11.1.
11832
11833 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
11834
11835 * data/bison.c++: Make the user able to add members to the generated
11836 parser by subclassing.
11837
11838 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
11839
11840 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11841 a character.
11842 Reported by Nicolas Tisserand and Nicolas Burrus.
11843
11844 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11845
11846 * src/reader.c: Warn about lacking semi-colons, do not complain.
11847
11848 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11849
11850 * data/bison.c++: Remove a debug line.
11851
11852 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11853
11854 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11855 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11856 provide a default implementation.
11857
11858 2002-03-04 Akim Demaille <akim@epita.fr>
11859
11860 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11861 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11862 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11863 * tests/semantic.at (Parsing Guards): Similarly.
11864 * src/reader.at (readgram): Complain if the last rule is not ended
11865 with a semi-colon.
11866
11867 2002-03-04 Akim Demaille <akim@epita.fr>
11868
11869 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11870 * src/closure.c: here.
11871 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11872 RTC.
11873 * src/warshall.h, src/warshall.c: Remove.
11874 * tests/sets.at (Broken Closure): Adjust.
11875
11876 2002-03-04 Akim Demaille <akim@epita.fr>
11877
11878 * src/output.c (output_skeleton): tempdir is const.
11879 bytes_read is unused.
11880
11881 2002-03-04 Akim Demaille <akim@epita.fr>
11882
11883 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11884 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11885 Update.
11886 From Michael Hayes.
11887
11888 2002-03-04 Akim Demaille <akim@epita.fr>
11889
11890 * src/closure.c (closure): `r' is unused.
11891
11892 2002-03-04 Akim Demaille <akim@epita.fr>
11893
11894 * tests/sets.at (Broken Closure): Add the ending `;'.
11895 * src/reader.at (readgram): Complain if a rule is not ended with a
11896 semi-colon.
11897
11898 2002-03-04 Akim Demaille <akim@epita.fr>
11899
11900 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11901 (count_sr_conflicts): Use bitset_count.
11902 * src/reduce.c (inaccessable_symbols): Ditto.
11903 (bits_size): Remove.
11904 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11905
11906 2002-03-04 Akim Demaille <akim@epita.fr>
11907
11908 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11909 * src/reduce.c: Remove the `bitset_zero's following the
11910 `bitset_create's, as now it is performed by the latter.
11911
11912 2002-03-04 Akim Demaille <akim@epita.fr>
11913
11914 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11915 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11916 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11917 latest sources from Michael.
11918
11919 2002-03-04 Akim Demaille <akim@epita.fr>
11920
11921 * src/output.c (output): Don't free the grammar.
11922 * src/reader.c (grammar_free): New.
11923 * src/main.c (main): Call it and don't free symtab here.
11924
11925 2002-03-04 Akim Demaille <akim@epita.fr>
11926
11927 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11928 before returning.
11929 Reported by Benoit Perrot.
11930
11931 2002-03-04 Akim Demaille <akim@epita.fr>
11932
11933 Use bitset operations when possible, not loops over bits.
11934
11935 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11936 bitset_or.
11937 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11938 * src/reduce.c (useless_nonterminals): Formatting changes.
11939 * src/warshall.c (TC): Use bitset_or.
11940
11941 2002-03-04 Akim Demaille <akim@epita.fr>
11942
11943 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11944 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11945 Ditto.
11946
11947 2002-03-04 Akim Demaille <akim@epita.fr>
11948
11949 * src/lalr.c (F): Now a bitset*.
11950 Adjust all dependencies.
11951
11952 2002-03-04 Akim Demaille <akim@epita.fr>
11953
11954 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11955 Adjust all dependencies.
11956
11957 2002-03-04 Akim Demaille <akim@epita.fr>
11958
11959 * src/L0.c, src/LR0.h (nstates): Be size_t.
11960 Adjust comparisons (signed vs unsigned).
11961 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11962 bitset*.
11963 Adjust all dependencies.
11964
11965 2002-03-04 Akim Demaille <akim@epita.fr>
11966
11967 * src/closure.c (firsts): Now, also a bitset.
11968 Adjust all dependencies.
11969 (varsetsize): Remove, now unused.
11970 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11971
11972 2002-03-04 Akim Demaille <akim@epita.fr>
11973
11974 * src/print.c: Convert to use bitset.h, not hand coded iterations
11975 over ints.
11976
11977 2002-03-04 Akim Demaille <akim@epita.fr>
11978
11979 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11980
11981 2002-03-04 Akim Demaille <akim@epita.fr>
11982
11983 * src/closure.c (ruleset): Be a bitset.
11984 (rulesetsize): Remove.
11985
11986 2002-03-04 Akim Demaille <akim@epita.fr>
11987
11988 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11989 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11990 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11991 * src/closure.c (fderives): Be an array of bitsets.
11992
11993 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
11994
11995 * data/bison.c++: Merge the two generated headers. Insert a copyright
11996 notice in each output file.
11997
11998 2002-02-28 Akim Demaille <akim@epita.fr>
11999
12000 * data/bison.c++: Copy the prologue of bison.simple to fetch
12001 useful M4 definitions, such as b4_header_guard.
12002
12003 2002-02-25 Akim Demaille <akim@epita.fr>
12004
12005 * src/getargs.c (version): Give the name of the authors, and use a
12006 translator friendly scheme for the bgr
12007 copyright notice.
12008
12009 2002-02-25 Akim Demaille <akim@epita.fr>
12010
12011 * src/output.c (header_output): Remove, now handled completely via
12012 M4.
12013
12014 2002-02-25 Akim Demaille <akim@epita.fr>
12015
12016 * m4/m4.m4: New, from CVS Autoconf.
12017 * configure.in: Invoke it.
12018 * src/output.c (output_skeleton): Use its result instead of the
12019 hard coded name.
12020
12021 2002-02-25 Akim Demaille <akim@epita.fr>
12022
12023 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12024 Fileutils 4.1.5.
12025 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12026 * src/output.c (output_skeleton): Use mkstemp to create a real
12027 temporary file.
12028 Move the filling of `skeleton' and its muscle to...
12029 (prepare): here.
12030 (output): Move the definition of the prologue muscle to...
12031 (prepare): here.
12032 * src/system.h (DEFAULT_TMPDIR): New.
12033
12034 2002-02-14 Paul Eggert <eggert@twinsun.com>
12035
12036 Remove the support for C++ namespace cleanliness; it was
12037 causing more problems than it was curing, since it didn't work
12038 properly on some nonstandard C++ compilers. This can wait
12039 for a proper C++ parser.
12040
12041 * NEWS: Document this.
12042 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12043 of C++, as it's treated like C now.
12044 * src/bison.simple (YYSTD): Remove.
12045 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12046 Treat C++ just like Standard C instead of trying to support
12047 namespace cleanliness.
12048
12049 2002-02-14 Akim Demaille <akim@epita.fr>
12050
12051 * tests/regression.at (else): Adjust to Andreas' change.
12052
12053 2002-02-14 Akim Demaille <akim@epita.fr>
12054
12055 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12056
12057 2002-02-13 Andreas Schwab <schwab@suse.de>
12058
12059 * src/output.c (output_rule_data): Don't output NULL, it might
12060 not be defined yet.
12061
12062 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
12063
12064 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12065 (Copyright notice): Update.
12066
12067 2002-02-11 Akim Demaille <akim@epita.fr>
12068
12069 * tests/regression.at (%nonassoc and eof): Don't include
12070 nonportable headers.
12071
12072 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
12073
12074 * data/bison.c++: Correct error recovery. Make the user able to
12075 initialize the starting location.
12076
12077 2002-02-07 Akim Demaille <akim@epita.fr>
12078
12079 * tests/input.at: New.
12080
12081 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12082
12083 * data/bison.c++: Replace some direct m4 expansions by constants. Be
12084 more consistent when naming methods and variables. Put preprocessor
12085 directives around tables only needed for debugging.
12086
12087 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12088
12089 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12090 C++ parsers.
12091 (yy::b4_name::parse): Use print_.
12092
12093 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12094
12095 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12096
12097 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12098
12099 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12100 C++ parsers.
12101 (yy::b4_name::parse): Build verbose error messages, and use error_.
12102
12103 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12104
12105 * data/bison.c++: Fix m4 quoting in comments.
12106
12107 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12108
12109 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12110 not expanded by m4.
12111
12112 2002-02-05 Akim Demaille <akim@epita.fr>
12113
12114 * data/bison.c++: Adjust to the M4 back end.
12115 More is certainly needed.
12116
12117 2002-02-05 Akim Demaille <akim@epita.fr>
12118
12119 Give a try to M4 as a back end.
12120
12121 * lib/readpipe.c: New, from wdiff.
12122 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12123 BISON_HAIRY.
12124 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12125 specific values. Now it is m4 that performs the lookup.
12126 * src/parse-skel.y: Remove.
12127 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12128 * src/output.c (actions_output, guards_output)
12129 (token_definitions_output): No longer keeps track of the output
12130 line number, hence remove the second argument.
12131 (guards_output): Check against the guard member of a rule, not the
12132 action member.
12133 Adjust callers.
12134 (output_skeleton): Don't look for the skeleton location, let m4 do
12135 that.
12136 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12137 file will be used.
12138 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12139 (prepare): Given that for the time being changesyntax is not
12140 usable in M4, rename the muscles using `-' to `_'.
12141 Define `defines_flag', `output_parser_name' and `output_header_name'.
12142 * src/output.h (actions_output, guards_output)
12143 (token_definitions_output): Adjust prototypes.
12144 * src/scan-skel.l: Instead of scanning the skeletons, it now
12145 processes the output of m4: `__oline__' and `#output'.
12146 * data/bison.simple: Adjust to be used by M4(sugar).
12147 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12148 to date.
12149 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12150 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12151 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12152 shamelessly stolen from CVS Autoconf.
12153
12154 2002-02-05 Akim Demaille <akim@epita.fr>
12155
12156 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12157 * configure.in: Check for the declarations of free and malloc.
12158 * src/muscle_tab.c: Adjust.
12159
12160 2002-02-05 Akim Demaille <akim@epita.fr>
12161
12162 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12163 which have no values.
12164
12165 2002-02-05 Akim Demaille <akim@epita.fr>
12166
12167 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12168 * data/: here.
12169
12170 2002-01-29 Paul Eggert <eggert@twinsun.com>
12171
12172 * src/bison.simple (YYSIZE_T): Do not define merely because
12173 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12174 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12175
12176 2002-01-27 Akim Demaille <akim@epita.fr>
12177
12178 Fix `%nonassoc and eof'.
12179
12180 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12181 which were not properly copied! Replace
12182 memcpy (res->errs, src->errs, src->nerrs);
12183 with
12184 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12185 !!!
12186 * tests/regression.at (%nonassoc and eof): Adjust to newest
12187 Autotest: `.' is not in the PATH.
12188
12189 2002-01-27 Akim Demaille <akim@epita.fr>
12190
12191 * tests/sets.at (AT_EXTRACT_SETS): New.
12192 (Nullable): Use it.
12193 (Firsts): New.
12194
12195 2002-01-26 Akim Demaille <akim@epita.fr>
12196
12197 * tests/actions.at, tests/calc.at, tests/headers.at,
12198 * tests/torture.at: Adjust to the newest Autotest which no longer
12199 forces `.' in the PATH.
12200
12201 2002-01-25 Akim Demaille <akim@epita.fr>
12202
12203 * tests/regression.at (%nonassoc and eof): New.
12204 Suggested by Robert Anisko.
12205
12206 2002-01-24 Akim Demaille <akim@epita.fr>
12207
12208 Bison dumps core when trying to complain about broken input files.
12209 Reported by Cris van Pelt.
12210
12211 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12212 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12213 into...
12214 (Invalid inputs): Strengthen: exercise parse_percent_token.
12215
12216 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
12217
12218 * src/Makefile.am: Add bison.c++.
12219 * src/bison.c++: New skeleton.
12220
12221 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
12222
12223 * po/it.po: New.
12224
12225 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12226
12227 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12228
12229 2002-01-20 Marc Autret <marc@gnu.org>
12230
12231 * src/files.c (compute_output_file_names): Fix
12232
12233 2002-01-20 Marc Autret <marc@gnu.org>
12234
12235 * tests/output.at: New test.
12236 * src/files.c (compute_base_names): Don't map extensions when
12237 the YACC flag is set, use defaults.
12238 Reported by Evgeny Stambulchik.
12239
12240 2002-01-20 Marc Autret <marc@gnu.org>
12241
12242 * src/system.h: Need to define __attribute__ away for non-GCC
12243 compilers as well (i.e., the vendor C compiler).
12244 Suggested by Albert Chin-A-Young.
12245
12246 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12247
12248 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12249 canonical definition.
12250 * src/system.h: Use the canonical definition for PARAMS (avoids
12251 a conflict with the macro from lib/hash.h).
12252
12253 2002-01-11 Akim Demaille <akim@epita.fr>
12254
12255 * configure.in: Use AC_FUNC_STRNLEN.
12256 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
12257
12258 2002-01-09 Akim Demaille <akim@epita.fr>
12259
12260 * src/files.c, src/files.h (output_infix): New.
12261 (tab_extension): Remove.
12262 (compute_base_names): Compute the former, drop the latter.
12263 * src/output.c (prepare): Insert the muscles `output-infix', and
12264 `output-suffix'.
12265 * src/parse-skel.y (string, string.1): New.
12266 (section.header): Use it.
12267 (section.yacc): Remove.
12268 (prefix): Remove too.
12269 * src/scan-skel.l: Adjust.
12270 * src/bison.simple, src/bison.hairy: Adjust.
12271
12272 2002-01-09 Akim Demaille <akim@epita.fr>
12273
12274 * configure.in (WERROR_CFLAGS): Compute it.
12275 * src/Makefile.am (CFLAGS): Pass it.
12276 * tests/atlocal.in (CFLAGS): Idem.
12277 * src/files.c: Fix a few warnings.
12278 (get_extension_index): Remove, unused.
12279
12280 2002-01-08 Akim Demaille <akim@epita.fr>
12281
12282 * src/getargs.c (AS_FILE_NAME): New.
12283 (getargs): Use it to convert DOSish file names.
12284 * src/files.c (base_name): Rename as full_base_name to avoid
12285 clashes with `base_name ()'.
12286 (filename_split): New.
12287 (compute_base_names): N-th rewrite, using filename_split.
12288
12289 2002-01-08 Akim Demaille <akim@epita.fr>
12290
12291 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12292 New, stolen from the Fileutils 4.1.
12293 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12294 * configure.in: Check for the presence of memrchr, and of its
12295 prototype.
12296
12297 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12298
12299 * lib/hash.h (__P): Added definition for this macro.
12300 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12301 BUILT_SOURCES, to ensure they are generated first.
12302 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12303 %error-verbose to allow bootstrapping with bison 1.30x.
12304
12305 2002-01-06 Akim Demaille <akim@epita.fr>
12306
12307 * src/reader.c (parse_braces): Don't fetch the next char, the
12308 convention is to fetch on entry.
12309 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12310 'switch' without a following semicolon.
12311 * tests/regression.at (braces parsing): New.
12312
12313 2002-01-06 Akim Demaille <akim@epita.fr>
12314
12315 Bison is dead wrong in its RR conflict reports.
12316
12317 * tests/torture.at (GNU Cim Grammar): New.
12318 * src/conflicts.c (count_rr_conflicts): Fix.
12319
12320 2002-01-06 Akim Demaille <akim@epita.fr>
12321
12322 Creating package.m4 from configure.ac causes too many problems.
12323
12324 * tests/Makefile.am (package.m4): Create it by hand,
12325 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12326
12327 2002-01-06 Akim Demaille <akim@epita.fr>
12328
12329 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12330 skeleton.h.
12331
12332 2002-01-04 Paul Eggert <eggert@twinsun.com>
12333
12334 * doc/bison.texinfo (Debugging):
12335 Remove YYSTDERR; it's no longer defined or used.
12336 Also, s/cstdio.h/cstdio/.
12337
12338 2002-01-03 Akim Demaille <akim@epita.fr>
12339
12340 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12341
12342 2002-01-03 Akim Demaille <akim@epita.fr>
12343
12344 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12345 tracing code to --trace, wait for a better --trace option, with
12346 args.
12347
12348 2002-01-03 Akim Demaille <akim@epita.fr>
12349
12350 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12351 The ISO C++ standard is extremely clear about it: stderr is
12352 considered a macro, not a regular symbol (see table 94 `Header
12353 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12354 Therefore std:: does not apply to it. It still does with fprintf.
12355 Also, s/cstdio.h/cstdio/.
12356
12357 2002-01-03 Akim Demaille <akim@epita.fr>
12358
12359 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12360 for non system headers.
12361
12362 2002-01-02 Akim Demaille <akim@epita.fr>
12363
12364 Equip the skeleton chain with location tracking, runtime trace,
12365 pure parser and scanner.
12366
12367 * src/parse-skel.y: Request a pure parser, locations, and prefix
12368 renaming.
12369 (%union): Having several members with the same type does not help
12370 type mismatches, simplify.
12371 (YYPRINT, yyprint): New.
12372 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12373 (skel_error): this.
12374 Handle locations.
12375 * src/scan-skel.l: Adjust to these changes.
12376 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12377 (LOCATION_PRINT, skel_control_t): New.
12378
12379 2001-12-30 Akim Demaille <akim@epita.fr>
12380
12381 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12382 replace `gb' with BLANKS.
12383 * src/scan-skel.l: Adjust.
12384
12385 2001-12-30 Akim Demaille <akim@epita.fr>
12386
12387 * src/system.h: We don't need nor want bcopy.
12388 Throw away MS-DOS crap: we don't need getpid.
12389 * configure.in: We don't need strndup. It was even causing
12390 problems: because Flex includes the headers *before* us,
12391 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12392 not visible.
12393 * lib/xstrndup.c: New.
12394 * src/scan-skel.l: Use it.
12395 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12396 * src/parse-skel.y: Use %directives instead of #defines.
12397
12398 2001-12-30 Akim Demaille <akim@epita.fr>
12399
12400 * src/skeleton.h: New.
12401 * src/output.c (output_parser, output_master_parser): Remove, dead
12402 code.
12403 * src/output.h (get_lines_number, actions_output, guards_output)
12404 (token_definitions_output): Prototype them.
12405 * src/parse-skel.y: Add the license notice.
12406 Include output.h and skeleton.h.
12407 (process_skeleton): Returns void, and takes a single parameter.
12408 * src/scan-skel.l: Add the license notice.
12409 Include skeleton.h.
12410 Don't use %option yylineno: it seems that then Flex imagines
12411 REJECT has been used, and therefore it won't reallocate its
12412 buffers (which makes no other sense to me than a bug). It results
12413 in warnings for `unused: yy_flex_realloc'.
12414
12415 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
12416
12417 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12418 (MUSCLE_INSERT_PREFIX): ...to there.
12419 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12420 (MUSCLE_INSERT_PREFIX): Move from here...
12421
12422 * src/bison.hairy: Add a section directive. Put braces around muscle
12423 names. This parser skeleton is still broken, but Bison should not
12424 choke on a bad muscle 'syntax'.
12425 * src/bison.simple: Add a section directive. Put braces around muscle
12426 names.
12427
12428 * src/files.h (strsuffix, stringappend): Add declarations.
12429 (tab_extension): Add declaration.
12430 (short_base_name): Add declaration.
12431
12432 * src/files.c (strsuffix, stringappend): No longer static. These
12433 functions are used in the skeleton parser.
12434 (tab_extension): New.
12435 (compute_base_names): Use the computations done in this function
12436 to guess if the generated parsers should have '.tab' in their
12437 names.
12438 (short_base_name): No longer static.
12439
12440 * src/output.c (output_skeleton): New.
12441 (output): Disable call to output_master_parser, and give a try to
12442 a new skeleton handling system.
12443 (guards_output, actions_output): No longer static.
12444 (token_definitions_output, get_lines_number): No longer static.
12445
12446 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12447
12448 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
12449 parse-skel.y.
12450
12451 * src/parse-skel.y: New file.
12452 * src/scan-skel.l: New file.
12453
12454 2001-12-29 Akim Demaille <akim@epita.fr>
12455
12456 %name-prefix is broken.
12457
12458 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12459 Adjust all dependencies.
12460 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12461 %name-prefix.
12462
12463 Renaming yylval but not yylloc is not consistent. Now we do.
12464
12465 * src/bison.simple: Prefix yylloc if used.
12466 * doc/bison.texinfo (Decl Summary): Document that.
12467
12468 2001-12-29 Akim Demaille <akim@epita.fr>
12469
12470 * doc/bison.texinfo: Promote `%long-directive' over
12471 `%long_directive'.
12472 Remove all references to fixed-output-files, yacc is enough.
12473
12474 2001-12-29 Akim Demaille <akim@epita.fr>
12475
12476 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12477 user prologue. These are defaults.
12478 * tests/actions.at (Mid-rule actions): Make sure the user can
12479 define YYDEBUG and YYERROR_VERBOSE.
12480
12481 2001-12-29 Akim Demaille <akim@epita.fr>
12482
12483 * src/output.c (header_output): Don't forget to export YYLTYPE and
12484 yylloc.
12485 * tests/headers.at (export YYLTYPE): New, make sure it does.
12486 * tests/regression.at (%union and --defines, Invalid CPP headers):
12487 Move to...
12488 * tests/headers.at: here.
12489
12490 2001-12-29 Akim Demaille <akim@epita.fr>
12491
12492 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12493
12494 2001-12-29 Akim Demaille <akim@epita.fr>
12495
12496 * tests/actions.at (Mid-rule actions): Output on a single line
12497 instead of several.
12498
12499 2001-12-29 Akim Demaille <akim@epita.fr>
12500
12501 * doc/bison.texinfo: Formatting changes.
12502
12503 2001-12-29 Akim Demaille <akim@epita.fr>
12504
12505 Don't store the token defs in a muscle, just be ready to output it
12506 on command. Now possible via `symbols'. Fixes a memory leak.
12507
12508 * src/output.c (token_definitions_output): New.
12509 (output_parser, header_output): Use it.
12510 * src/reader.c (symbols_save): Remove.
12511
12512 2001-12-29 Akim Demaille <akim@epita.fr>
12513
12514 * src/bison.simple: Do not provide a default for YYSTYPE and
12515 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12516 default.
12517
12518 2001-12-29 Akim Demaille <akim@epita.fr>
12519
12520 Mid-rule actions are simply... ignored!
12521
12522 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12523 the empty-rule associated to the dummy symbol, not to the host
12524 rule.
12525 * tests/actions.at (Mid-rule actions): New.
12526
12527 2001-12-29 Akim Demaille <akim@epita.fr>
12528
12529 Memory leak.
12530
12531 * src/reader.c (reader): Free grammar.
12532
12533 2001-12-29 Akim Demaille <akim@epita.fr>
12534
12535 Memory leak.
12536
12537 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12538 since it allocates it for each state, although only one is needed.
12539 (allocate_storage): Do it here.
12540
12541 2001-12-29 Akim Demaille <akim@epita.fr>
12542
12543 * src/options.h, src/options.c (create_long_option_table): Rename
12544 as...
12545 (long_option_table_new): this, with a clearer prototype.
12546 (percent_table): Remove, unused,
12547 * src/getargs.c (getargs): Adjust.
12548
12549 2001-12-29 Akim Demaille <akim@epita.fr>
12550
12551 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12552 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12553 as states.
12554
12555 2001-12-29 Akim Demaille <akim@epita.fr>
12556
12557 * src/lalr.c (build_relations): Rename `states' as `states1'.
12558 Sorry, I don't understand exactly what it is, no better name...
12559
12560 2001-12-29 Akim Demaille <akim@epita.fr>
12561
12562 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12563 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12564 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12565 as rules.
12566
12567 2001-12-29 Akim Demaille <akim@epita.fr>
12568
12569 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12570 ago.
12571
12572 2001-12-29 Akim Demaille <akim@epita.fr>
12573
12574 * src/reader.c, src/reader.h (user_toknums): Remove.
12575 Adjust all users to use symbols[i]->user_token_number.
12576
12577 2001-12-29 Akim Demaille <akim@epita.fr>
12578
12579 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12580 Adjust all users to use symbols[i]->prec or ->assoc.
12581
12582 2001-12-29 Akim Demaille <akim@epita.fr>
12583
12584 * src/reader.c, src/reader.h (tags): Remove.
12585 Adjust all users to use symbols[i]->tag.
12586
12587 2001-12-29 Akim Demaille <akim@epita.fr>
12588
12589 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12590 and rule_table.
12591 * src/reader.c (packsymbols): Fill this table.
12592 Drop sprec.
12593 * src/conflicts.c (resolve_sr_conflict): Adjust.
12594 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12595 single table.
12596 Use symbols[i]->tag instead of tags[i].
12597
12598 2001-12-29 Akim Demaille <akim@epita.fr>
12599
12600 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12601 In addition, put a comment in there, to replace...
12602 * tests/regression.at (%union and C comments): Remove.
12603
12604 2001-12-29 Akim Demaille <akim@epita.fr>
12605
12606 * tests/regression.at (Web2c Actions): Blindly move the actual
12607 output as expected output. The contents *seem* right to me, but I
12608 can't pretend reading perfectly parser tables... Nonetheless, all
12609 the other tests pass correctly, the table look OK, even though the
12610 presence of `$axiom' is to be noted: AFAICS it is useless (but
12611 harmless).
12612
12613 2001-12-29 Akim Demaille <akim@epita.fr>
12614
12615 * src/reader.c (readgram): Don't add the rule 0 if there were no
12616 rules read. In other words, add it _after_ having performed
12617 grammar sanity checks.
12618 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12619
12620 2001-12-29 Akim Demaille <akim@epita.fr>
12621
12622 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12623 visible, and some states have now a different number.
12624
12625 2001-12-29 Akim Demaille <akim@epita.fr>
12626
12627 * src/reader.c (readgram): Bind the initial rule's lineno to that
12628 of the first rule.
12629 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12630 (Solved SR Conflicts): Adjust rule 0's line number.
12631
12632 2001-12-29 Akim Demaille <akim@epita.fr>
12633
12634 Fix the `GAWK Grammar' failure.
12635
12636 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12637 the reductions of the first state which was mistakenly confused
12638 with the final state because precisely final_state was initialized
12639 to 0.
12640 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12641 now noticed by Bison.
12642 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12643 have a reduction on $default.
12644
12645 2001-12-29 Akim Demaille <akim@epita.fr>
12646
12647 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12648 rule line numbers.
12649 * src/closure.c (print_closure): Likewise.
12650 * src/derives.c (print_derives): Likewise.
12651 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12652 now.
12653
12654 2001-12-29 Akim Demaille <akim@epita.fr>
12655
12656 * src/lalr.c (lookaheads_print): New.
12657 (lalr): Call it when --trace-flag.
12658 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12659 are dumped.
12660
12661 2001-12-29 Akim Demaille <akim@epita.fr>
12662
12663 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12664 when walking through ritem, even via rule->rhs.
12665 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12666 (useful_production, useless_nonterminals): Likewise.
12667 (reduce_grammar_tables): Likewise, plus update nritems.
12668 * src/nullable.c (set_nullable): Likewise.
12669 * src/lalr.c (build_relations): Likewise.
12670 * tests/sets.at (Nullable): Adjust.
12671 Fortunately, now, the $axiom is no longer nullable.
12672
12673 2001-12-29 Akim Demaille <akim@epita.fr>
12674
12675 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12676 the 0-sentinel.
12677 * src/gram.c (ritem_longest_rhs): Likewise.
12678 * src/reduce.c (nonterminals_reduce): Likewise.
12679 * src/print_graph.c (print_graph): Likewise.
12680 * src/output.c (output_rule_data): Likewise.
12681 * src/nullable.c (set_nullable): Likewise.
12682
12683 2001-12-29 Akim Demaille <akim@epita.fr>
12684
12685 * src/output.c: Comment changes.
12686
12687 2001-12-27 Paul Eggert <eggert@twinsun.com>
12688
12689 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12690 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12691 Sparc, as they were causing more porting problems than the
12692 (minor) performance improvement was worth.
12693
12694 Also, catch up with 1.31's YYSTD.
12695
12696 2001-12-27 Akim Demaille <akim@epita.fr>
12697
12698 * src/output.c (output_gram): Rely on nritems, not the
12699 0-sentinel. See below.
12700 Use -1 as separator, not 0.
12701 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12702 Rely on -1 as separator in yyrhs, instead of 0.
12703 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12704 twice `Now at end of input', therefore there are two lines less to
12705 expect.
12706
12707 2001-12-27 Akim Demaille <akim@epita.fr>
12708
12709 * tests/regression.at (Unresolved SR Conflicts):
12710 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12711 below.
12712
12713 2001-12-27 Akim Demaille <akim@epita.fr>
12714
12715 * src/LR0.c (new_state): Recognize the final state by the fact it
12716 is reached by eoftoken.
12717 (insert_start_shifting_state, insert_eof_shifting_state)
12718 (insert_accepting_state, augment_automaton): Remove, since now
12719 these states are automatically computed from the initial state.
12720 (generate_states): Adjust.
12721 * src/print.c: When reporting a rule number to the user, substract
12722 1, so that the axiom rule is rule 0, and the first user rule is 1.
12723 * src/reduce.c: Likewise.
12724 * src/print_graph.c (print_core): For the time being, just as for
12725 the report, depend upon --trace-flags to dump the full set of
12726 items.
12727 * src/reader.c (readgram): Once the grammar read, insert the rule
12728 0: `$axiom: START-SYMBOL $'.
12729 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12730 number of the states has changed (the final state is no longer
12731 necessarily the last), catch up.
12732
12733 2001-12-27 Akim Demaille <akim@epita.fr>
12734
12735 Try to make the use of the eoftoken valid. Given that its value
12736 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12737 is used instead of > 0 where appropriate, (ii), depend upon nritems
12738 instead of the 0-sentinel.
12739
12740 * src/gram.h, src/gram.c (nritems): New.
12741 Expected to be duplication of nitems, but for the time being...
12742 * src/reader.c (packgram): Assert nritems and nitems are equal.
12743 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12744 * src/closure.c (print_closure, print_fderives): Likewise.
12745 * src/gram.c (ritem_print): Likewise.
12746 * src/print.c (print_core, print_grammar): Likewise.
12747 * src/print_graph.c: Likewise.
12748
12749 2001-12-27 Akim Demaille <akim@epita.fr>
12750
12751 * src/main.c (main): If there are complains after grammar
12752 reductions, then output the report anyway if requested, then die.
12753 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12754 * src/reader.c (eoftoken): New.
12755 (parse_token_decl): If the token being defined has value `0', it
12756 is the eoftoken.
12757 (packsymbols): No longer hack `tags' to insert `$' by hand.
12758 Be sure to preserve the value of the eoftoken.
12759 (reader): Make sure eoftoken is defined.
12760 Initialize nsyms to 0: now eoftoken is created just like the others.
12761 * src/print.c (print_grammar): Don't special case the eof token.
12762 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12763 lie anyway, albeit pleasant.
12764 * tests/calc.at: Exercise error messages with eoftoken.
12765 Change the grammar so that empty input is invalid.
12766 Adjust expectations.
12767 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12768
12769 2001-12-27 Akim Demaille <akim@epita.fr>
12770
12771 * configure.in: Check the protos of strchr ans strspn.
12772 Replace strchr if needed.
12773 * src/system.h: Provide the protos of strchr, strspn and memchr if
12774 missing.
12775 * lib/strchr.c: New.
12776 * src/reader.c (symbols_save): Use strchr.
12777
12778 2001-12-27 Akim Demaille <akim@epita.fr>
12779
12780 * src/print.c, src/print_graph.c (escape): New.
12781 Use it to quote the TAGS outputs.
12782 * src/print_graph.c (print_state): Now errors are in red, and
12783 reductions in green.
12784 Prefer high to wide: output the state number on a line of its own.
12785
12786 2001-12-27 Akim Demaille <akim@epita.fr>
12787
12788 * src/state.h, src/state.c (reductions_new): New.
12789 * src/LR0.c (set_state_table): Let all the states have a
12790 `reductions', even if reduced to 0.
12791 (save_reductions): Adjust.
12792 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12793 * src/print.c (print_reductions, print_actions): Adjust.
12794 * src/output.c (action_row): Adjust.
12795
12796 2001-12-27 Akim Demaille <akim@epita.fr>
12797
12798 * src/state.h, src/state.c (errs_new, errs_dup): New.
12799 * src/LR0.c (set_state_table): Let all the states have an errs,
12800 even if reduced to 0.
12801 * src/print.c (print_errs, print_reductions): Adjust.
12802 * src/output.c (output_actions, action_row): Adjust.
12803 * src/conflicts.c (resolve_sr_conflict): Adjust.
12804
12805 2001-12-27 Akim Demaille <akim@epita.fr>
12806
12807 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12808
12809 2001-12-27 Akim Demaille <akim@epita.fr>
12810
12811 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12812 * src/print.c: here.
12813 (lookaheadset, shiftset): New, used as additional storage by
12814 print_reductions.
12815 (print_results): Adjust.
12816 (print_shifts, print_gotos, print_errs): New, extracted from...
12817 (print_actions): here.
12818 * src/print_graph.c (print_actions): Remove dead code.
12819
12820 2001-12-27 Akim Demaille <akim@epita.fr>
12821
12822 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12823 `$n' and `@n'.
12824
12825 2001-12-27 Akim Demaille <akim@epita.fr>
12826
12827 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12828 (build_relations): Adjust.
12829
12830 2001-12-27 Akim Demaille <akim@epita.fr>
12831
12832 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12833 duplication.
12834
12835 2001-12-27 Akim Demaille <akim@epita.fr>
12836
12837 * src/reader.c (packgram): Catch nitems overflows.
12838
12839 2001-12-27 Akim Demaille <akim@epita.fr>
12840
12841 * src/files.c, src/files.h (guard_obstack): Remove.
12842 * src/output.c (output): Adjust.
12843 * src/reader.c (parse_braces): New, factoring...
12844 (copy_action, copy_guard): these two which are renamed as...
12845 (parse_action, parse_guard): these.
12846 As a voluntary consequence, using braces around guards is now
12847 mandatory.
12848
12849 2001-12-27 Akim Demaille <akim@epita.fr>
12850
12851 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12852 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12853 members.
12854 (symbol_list_new): Adjust.
12855 (copy_action): action_line is the first line, not the last.
12856 (copy_guard): Just as for actions, store the `action' only, not
12857 the switch/case/break flesh.
12858 Don't parse the user action that might follow the guard, let...
12859 (readgram): do it, i.e., now, there can be an action after a
12860 guard.
12861 In other words the guard is just explicitly optional.
12862 (packgram): Adjust.
12863 * src/output.c (guards_output): New.
12864 (output_parser): Call it when needed.
12865 (output): Also free the guard and attrs obstacks.
12866 * src/files.c, src/files.h (obstack_save): Remove.
12867 (output_files): Remove.
12868 As a result, if one needs the former `.act' file, using an
12869 appropriate skeleton which requires actions and guards is now
12870 required.
12871 * src/main.c (main): Adjust.
12872 * tests/semantic.at: New.
12873 * tests/regression.at: Use `input.y' as input file name.
12874 Avoid 8+3 problems by requiring input.c when the test needs the
12875 parser.
12876
12877 2001-12-27 Akim Demaille <akim@epita.fr>
12878
12879 * src/reader.c (symbol_list_new): Be sure to initialize all the
12880 fields.
12881
12882 2001-12-27 Akim Demaille <akim@epita.fr>
12883
12884 All the hacks using a final pseudo state are now useless.
12885
12886 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12887 * src/lalr.c (nLA): New.
12888 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12889 instead of lookaheadsp from the pseudo state (nstate + 1).
12890
12891 2001-12-27 Akim Demaille <akim@epita.fr>
12892
12893 * src/output.c (action_row, token_actions): Use a state_t instead
12894 of a integer, and nlookaheads instead of the following state's
12895 lookaheadsp.
12896
12897 2001-12-27 Akim Demaille <akim@epita.fr>
12898
12899 * src/conflicts.c (log_resolution, flush_shift)
12900 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12901 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12902 (conflicts_print, print_reductions): Use a state_t instead of an
12903 integer when referring to a state.
12904 As much as possible, depend upon nlookaheads, instead of the
12905 `lookaheadsp' member of the following state (since lookaheads of
12906 successive states are successive, the difference between state n + 1
12907 and n served as the number of lookaheads for state n).
12908 * src/lalr.c (add_lookback_edge): Likewise.
12909 * src/print.c (print_core, print_actions, print_state)
12910 (print_results): Likewise.
12911 * src/print_graph.c (print_core, print_actions, print_state)
12912 (print_graph): Likewise.
12913 * src/conflicts.h: Adjust.
12914
12915 2001-12-27 Akim Demaille <akim@epita.fr>
12916
12917 * src/bison.hairy: Formatting/comment changes.
12918 ANSIfy.
12919 Remove `register' indications.
12920 Add plenty of `static'.
12921
12922 2001-12-27 Akim Demaille <akim@epita.fr>
12923
12924 * src/output.c (prepare): Drop the muscle `ntbase' which
12925 duplicates ntokens.
12926 * src/bison.simple: Formatting/comment changes.
12927 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12928 is an undocumented synonym.
12929
12930 2001-12-22 Akim Demaille <akim@epita.fr>
12931
12932 * src/output.c (output_table_data): Change the prototype to use
12933 `int' for array ranges: some invocations do pass an int, not a
12934 short.
12935 Reported by Wayne Green.
12936
12937 2001-12-22 Akim Demaille <akim@epita.fr>
12938
12939 Some actions of web2c.y are improperly triggered.
12940 Reported by Mike Castle.
12941
12942 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12943 * tests/regression.at (Web2c): Rename as...
12944 (Web2c Report): this.
12945 (Web2c Actions): New.
12946
12947 2001-12-22 Akim Demaille <akim@epita.fr>
12948
12949 Reductions in web2c.y are improperly reported.
12950 Reported by Mike Castle.
12951
12952 * src/conflicts.c (print_reductions): Fix.
12953 * tests/regression.at (Web2c): New.
12954
12955 2001-12-18 Akim Demaille <akim@epita.fr>
12956
12957 Some host fail on `assert (!"foo")', which expands to
12958 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12959 Reported by Nelson Beebee.
12960
12961 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12962 `#define it_succeeded 0' and `assert (it_succeeded)'.
12963
12964 2001-12-17 Marc Autret <autret_m@epita.fr>
12965
12966 * src/bison.simple: Don't hard code the skeleton line and filename.
12967 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12968 New line counter 'skeleton_line' (skeleton-line muscle).
12969
12970 2001-12-17 Paul Eggert <eggert@twinsun.com>
12971
12972 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12973 YYDEBUG must be defined to a nonzero value.
12974
12975 * src/bison.simple (yytname): Do not assume that the user defines
12976 YYDEBUG to a properly parenthesized expression.
12977
12978 2001-12-17 Akim Demaille <akim@epita.fr>
12979
12980 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12981 nlookaheads is a new member.
12982 Adjust all users.
12983 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12984 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12985 state.
12986
12987 2001-12-17 Akim Demaille <akim@epita.fr>
12988
12989 * src/files.h, src/files.c (open_files, close_files): Remove.
12990 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12991 let...
12992 * src/reader.c (reader): Do it.
12993
12994 2001-12-17 Akim Demaille <akim@epita.fr>
12995
12996 * src/conflicts.c (print_reductions): Formatting changes.
12997
12998 2001-12-17 Akim Demaille <akim@epita.fr>
12999
13000 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13001 (flush_reduce): New.
13002 (resolve_sr_conflict): Adjust.
13003
13004 2001-12-17 Akim Demaille <akim@epita.fr>
13005
13006 * src/output.c (output_obstack): Be static and rename as...
13007 (format_obstack): this, to avoid any confusion with files.c's
13008 output_obstack.
13009 * src/reader.h (muscle_obstack): Move to...
13010 * src/output.h: here, since it's defined in output.c.
13011
13012 2001-12-17 Akim Demaille <akim@epita.fr>
13013
13014 * src/output.c (action_row, save_column, default_goto)
13015 (sort_actions, matching_state, pack_vector): Better variable
13016 locality.
13017
13018 2001-12-17 Akim Demaille <akim@epita.fr>
13019
13020 * src/output.c: Various formatting changes.
13021
13022 2001-12-17 Akim Demaille <akim@epita.fr>
13023
13024 * src/files.c (output_files): Free the output_obstack.
13025 * src/main.c (main): Call print and print_graph conditionally.
13026 * src/print.c (print): Work unconditionally.
13027 * src/print_graph.c (print_graph): Work unconditionally.
13028 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13029
13030 2001-12-16 Marc Autret <autret_m@epita.fr>
13031
13032 * src/output.c (actions_output): Fix. When we use %no-lines,
13033 there is one less line per action.
13034
13035 2001-12-16 Marc Autret <autret_m@epita.fr>
13036
13037 * src/bison.simple: Remove a useless #line directive.
13038 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13039 * src/output.c (get_lines_number): New.
13040 (output_parser): Adjust, now takes care about the lines of a
13041 output muscles.
13042 Fix line numbering.
13043 (actions_output): Computes the number of lines taken by actions.
13044 (output_master_parser): Insert new skeleton which is the name of
13045 the output parser file name.
13046
13047 2001-12-15 Marc Autret <autret_m@epita.fr>
13048
13049 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13050
13051 2001-12-15 Marc Autret <autret_m@epita.fr>
13052
13053 * src/output.c (output_gram): Keep track of the hairy one.
13054
13055 2001-12-15 Akim Demaille <akim@epita.fr>
13056
13057 Make `make distcheck' work.
13058
13059 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13060 system.h which uses libgettext.h.
13061
13062 2001-12-15 Akim Demaille <akim@epita.fr>
13063
13064 * src/nullable.c (set_nullable): Useless rules must be skipped,
13065 otherwise, since we range over their symbols, we might look at a
13066 nonterminal which no longer ``exists'', i.e., it is not counted in
13067 `nvars', hence we overflow our arrays.
13068
13069 2001-12-15 Akim Demaille <akim@epita.fr>
13070
13071 The header can also be produced directly, without any obstack!
13072 Yahoo!
13073
13074 * src/files.c, src/files.h (defines_obstack): Remove.
13075 (compute_header_macro): Global.
13076 (defines_obstack_save): Remove.
13077 * src/reader.c (parse_union_decl): No longer output to
13078 defines_obstack: its content can be found in the `stype' muscle
13079 anyway.
13080 (output_token_translations): Merge into...
13081 (symbols_output): this.
13082 Rename as...
13083 (symbols_save): this.
13084 (reader): Adjust.
13085 * src/output.c (header_output): New.
13086 (output): Call it.
13087
13088 2001-12-15 Akim Demaille <akim@epita.fr>
13089
13090 * src/reader.c (parse_union_decl): Instead of handling two obstack
13091 simultaneously, use one to define the `stype' muscle, and use the
13092 value of the latter to fill defines_obstack.
13093 (copy_comment): Remove.
13094 (copy_comment2): Work for a single obstack.
13095 Rename as...
13096 (copy_comment): this.
13097
13098 2001-12-15 Akim Demaille <akim@epita.fr>
13099
13100 * src/lex.c, src/lex.h (xgetc): No longer static.
13101 * src/reader.c (parse_union_decl): Revamp.
13102
13103 2001-12-15 Akim Demaille <akim@epita.fr>
13104
13105 Still making progress in separating Bison into (i) input, (ii)
13106 process, (iii) output: now we can directly output the parser file
13107 without using table_obstack at all.
13108
13109 * src/files.c, src/files.h (table_obstack): Bye bye.
13110 (parser_file_name): New.
13111 * src/files.c (compute_output_file_names): Compute it.
13112 * src/output.c (actions_output, output_parser)
13113 (output_master_parser): To a file instead of an obstack.
13114
13115 2001-12-15 Akim Demaille <akim@epita.fr>
13116
13117 Attach actions to rules, instead of pre-outputting them to
13118 actions_obstack.
13119
13120 * src/gram.h (rule_t): action and action_line are new members.
13121 * src/reader.c (symbol_list): Likewise.
13122 (copy_action): Save the actions within the rule.
13123 (packgram): Save them in rule_table.
13124 * src/output.c (actions_output): New.
13125 (output_parser): Use it on `%%actions'.
13126 (output_rule_data): Don't free rule_table.
13127 (output): Do it.
13128 (prepare): Don't save the `action' muscle.
13129 * src/bison.simple: s/%%action/%%actions/.
13130
13131 2001-12-15 Akim Demaille <akim@epita.fr>
13132
13133 * src/reader.c (copy_action): When --yacc, don't append a `;'
13134 to the user action: let it fail if lacking.
13135 Suggested by Arnold Robbins and Tom Tromey.
13136
13137 2001-12-14 Akim Demaille <akim@epita.fr>
13138
13139 * src/lex.c (literalchar): Simply return the char you decoded, non
13140 longer mess around with obstacks and int pointers.
13141 Adjust all callers.
13142
13143 2001-12-14 Akim Demaille <akim@epita.fr>
13144
13145 * src/lex.c (literalchar): Don't escape the special characters,
13146 just decode them, and keep them as char (before, eol was output as
13147 the 2 char string `\n' etc.).
13148 * src/output.c (output_rule_data): Use quotearg to output the
13149 token strings.
13150
13151 2001-12-13 Paul Eggert <eggert@twinsun.com>
13152
13153 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13154 Do not infringe on the global user namespace when using C++.
13155 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13156 All uses of `fprintf' and `stderr' changed.
13157
13158 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13159
13160 2001-12-13 Akim Demaille <akim@epita.fr>
13161
13162 The computation of nullable is broken: it doesn't handle empty
13163 RHS's properly.
13164
13165 * tests/torture.at (GNU AWK Grammar): New.
13166 * tests/sets.at (Nullable): New.
13167 * src/nullable.c (set_nullable): Instead of blindly looping over
13168 `ritems', loop over the rules, and then over their rhs's.
13169
13170 Work around Autotest bugs.
13171
13172 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13173 frame, because Autotest understand lines starting with a `+' as
13174 traces from the shell. Then, they are not processed properly.
13175 Admittedly an Autotest bug, but we don't have time to wait for
13176 Autotest to catch up.
13177 * tests/regression.at (Broken Closure): Adjust to the new table
13178 frames.
13179 Move to...
13180 * tests/sets.at: here.
13181
13182 2001-12-13 Akim Demaille <akim@epita.fr>
13183
13184 * src/closure.c (closure): Use nrules instead of playing tricks
13185 with BITS_PER_WORD.
13186
13187 2001-12-13 Akim Demaille <akim@epita.fr>
13188
13189 * src/print.c (print_actions): Output the handling of `$' as the
13190 traces do: shifting the token EOF. Before EOF was treated as a
13191 nonterminal.
13192 * tests/regression.at: Adjust some tests.
13193 * src/print_graph.c (print_core): Complete the set of items via
13194 closure. The next-to-final and final states are still unsatisfying,
13195 but that's to be addressed elsewhere.
13196 No longer output the rule numbers, but do output the state number.
13197 A single loop for the shifts + gotos is enough, but picked a
13198 distinct color for each.
13199 (print_graph): Initialize and finalize closure.
13200
13201 2001-12-13 Akim Demaille <akim@epita.fr>
13202
13203 * src/reader.c (readgram): Remove dead code, an strip useless
13204 braces.
13205 (get_type): Remove, unused.
13206
13207 2001-12-12 Akim Demaille <akim@epita.fr>
13208
13209 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13210 on that of lib/error.c.
13211
13212 2001-12-12 Akim Demaille <akim@epita.fr>
13213
13214 Some hosts don't like `/' in includes.
13215
13216 * src/system.h: Include libgettext.h without qualifying the path.
13217 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13218 $(top_srcdir).
13219
13220 2001-12-11 Marc Autret <autret_m@epita.fr>
13221
13222 * src/output.c (output_parser): Remove useless muscle.
13223
13224 2001-12-11 Marc Autret <autret_m@epita.fr>
13225
13226 * src/bison.simple: Remove #line just before %%epilogue. It
13227 is now handled in ...
13228 * src/reader.c (read_additionnal_code): Add the output of a
13229 #line for the epilogue.
13230
13231 2001-12-10 Marc Autret <autret_m@epita.fr>
13232
13233 * src/reader.c (copy_definition): Re-use CPP-outed code which
13234 replace precedent remove.
13235 * src/bison.simple: Remove #line before %%prologue because
13236 %%input-line is wrong at this time.
13237
13238 2001-12-10 Marc Autret <autret_m@epita.fr>
13239
13240 * src/reader.c (symbols_output): Clean up.
13241 * src/output.c (output_gram, output): Clean up.
13242
13243 2001-12-10 Akim Demaille <akim@epita.fr>
13244
13245 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13246 * src/LR0.c (set_state_table): here.
13247 * src/lalr.c (lalr): Call it.
13248
13249 2001-12-10 Akim Demaille <akim@epita.fr>
13250
13251 * src/state.h (shifts): Remove the `number' member: shifts are
13252 attached to state, hence no longer need to be labelled with a
13253 state number.
13254
13255 2001-12-10 Akim Demaille <akim@epita.fr>
13256
13257 Now that states have a complete set of members, the linked list of
13258 shifts is useless: just fill directly the state's shifts member.
13259
13260 * src/state.h (shifts): Remove the `next' member.
13261 * src/LR0.c (first_state, last_state): Remove.
13262 Adjust the callers.
13263 (augment_automaton): Don't look for the shifts that must be added
13264 a shift on EOF: it is those of the state we looked for! But now,
13265 since shifts are attached, it is no longer needed to looking
13266 merely by its id: its number.
13267
13268 2001-12-10 Akim Demaille <akim@epita.fr>
13269
13270 * src/LR0.c (augment_automaton): Better variable locality.
13271 Remove an impossible branch: if there is a state corresponding to
13272 the start symbol being shifted, then there is shift for the start
13273 symbol from the initial state.
13274
13275 2001-12-10 Akim Demaille <akim@epita.fr>
13276
13277 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13278 only when appropriate: when insert_start_shifting_state' is not
13279 invoked.
13280 * tests/regression.at (Rule Line Numbers): Adjust.
13281
13282 2001-12-10 Akim Demaille <akim@epita.fr>
13283
13284 * src/LR0.c (augment_automaton): Now that all states have shifts,
13285 merge the two cases addition shifts to the initial state.
13286
13287 2001-12-10 Akim Demaille <akim@epita.fr>
13288
13289 * src/lalr.c (set_state_table): Move to...
13290 * src/LR0.c: here.
13291 * src/lalr.c (lalr): Don't call it...
13292 * src/LR0.c (generate_states): do it.
13293 * src/LR0.h (first_state): Remove, only the table is used.
13294
13295 2001-12-10 Akim Demaille <akim@epita.fr>
13296
13297 * src/LR0.h (first_shift, first_reduction): Remove.
13298 * src/lalr.c: Don't use first_shift: find shifts through the
13299 states.
13300
13301 2001-12-10 Akim Demaille <akim@epita.fr>
13302
13303 * src/LR0.c: Attach shifts to states as soon as they are
13304 computed.
13305 * src/lalr.c (set_state_table): Instead of assigning shifts to
13306 state, just assert that the mapping was properly done.
13307
13308 2001-12-10 Akim Demaille <akim@epita.fr>
13309
13310 * src/LR0.c (insert_start_shift): Rename as...
13311 (insert_start_shifting_state): this.
13312 (insert_eof_shifting_state, insert_accepting_state): New.
13313 (augment_automaton): Adjust.
13314 Better locality of the variables.
13315 When looking if the start_symbol is shifted from the initial
13316 state, using `while (... symbol != start_symbol ...)' sounds
13317 better than `while (... symbol < start_symbol ...)': If fail
13318 to see how the order between symbols could be relevant!
13319
13320 2001-12-10 Akim Demaille <akim@epita.fr>
13321
13322 * src/getargs.h: Don't declare `spec_name_prefix' and
13323 `spec_file_prefix', declared by src/files.h.
13324 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13325 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13326 * src/output.c (prepare): Adjust.
13327 * src/reader.c (symbols_output): Likewise.
13328 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13329
13330 2001-12-10 Akim Demaille <akim@epita.fr>
13331
13332 * src/muscle_tab.c (muscle_init): NULL is a better default than
13333 `"0"'.
13334
13335 2001-12-10 Akim Demaille <akim@epita.fr>
13336
13337 * src/reader.c (reader): Calling symbols_output once is enough.
13338
13339 2001-12-10 Akim Demaille <akim@epita.fr>
13340
13341 Now that states have a complete set of members, the linked list of
13342 reductions is useless: just fill directly the state's reductions
13343 member.
13344
13345 * src/state.h (struct reductions): Remove member `number' and
13346 `next'.
13347 * src/LR0.c (first_reduction, last_reduction): Remove.
13348 (save_reductions): Don't link the new reductions, store them in
13349 this_state.
13350 * src/lalr.c (set_state_table): No need to attach reductions to
13351 states, it's already done.
13352 * src/output.c (output_actions): No longer free the shifts, then
13353 the reductions, then the states: free all the states and their
13354 members.
13355
13356 2001-12-10 Akim Demaille <akim@epita.fr>
13357
13358 * src/options.c (OPTN, DRTV, BOTH): New.
13359 (option_table): Use them.
13360
13361 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13362 the job of system.h.
13363 * src/options.c: Don't include stdio.h and xalloc.h for the same
13364 reasons.
13365
13366 2001-12-10 Akim Demaille <akim@epita.fr>
13367
13368 * src/output.c (output, prepare): Make sure the values of the
13369 muscles `action' and `prologue' are 0-terminated.
13370
13371 2001-12-10 Akim Demaille <akim@epita.fr>
13372
13373 Clean up GCC warnings.
13374
13375 * src/reader.c (copy_action): `buf' is not used.
13376 (parse_skel_decl): Be static.
13377 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13378 * src/options.h (create_long_option_table): Have a real prototype.
13379 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13380 (hash_delete_at): Return const void *.
13381 Adjust casts to preserve the const.
13382
13383 2001-12-10 Akim Demaille <akim@epita.fr>
13384
13385 * configure.in: Require 2.52g.
13386 M4 is not needed, but AUTOM4TE is.
13387 * m4/m4.m4: Remove.
13388 * tests/Makefile.am: Adjust.
13389
13390 2001-12-10 Akim Demaille <akim@epita.fr>
13391
13392 One structure for states is enough, even though theoretically
13393 there are LR(0) states and LALR(1) states.
13394
13395 * src/lalr.h (state_t): Remove.
13396 (state_table): Be state_t **, not state_t *.
13397 * src/state.h (core, CORE_ALLOC): Rename as...
13398 (state_t, STATE_ALLOC): this.
13399 Add the LALR(1) members: shifts, reductions, errs.
13400 * src/LR0.c (state_table): Rename as...
13401 (state_hash): this, to avoid name clashes with the global
13402 `state_table'.
13403 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13404 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13405
13406 2001-12-10 Akim Demaille <akim@epita.fr>
13407
13408 Bison dumps core on bash.y.
13409 Reported by Pascal Bart.
13410
13411 * src/warshall.c (bitmatrix_print): New.
13412 (TC): Use it.
13413 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
13414 j must be the outer loop.
13415 * tests/regression.at (Broken Closure): New.
13416
13417 2001-12-05 Akim Demaille <akim@epita.fr>
13418
13419 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13420 its argument.
13421 Reported by Peter Hamorsky.
13422
13423 2001-12-05 Akim Demaille <akim@epita.fr>
13424
13425 * src/conflicts.c (err_table): Remove.
13426 (resolve_sr_conflict): Adjust.
13427 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13428 Rename as...
13429 (state_t.reductions, state_t.shifts): this.
13430
13431 2001-12-05 Akim Demaille <akim@epita.fr>
13432
13433 * src/reduce.c (reduce_grammar_tables): No longer disable the
13434 removal of useless rules via CPP but via `if (0)', so that the
13435 compiler still check the code is valid.
13436 For instance, it should have noticed `rline' no longer exists: use
13437 the `line' member of rule_t.
13438 * src/gram.c (dummy, rline): Remove, unused.
13439
13440 2001-12-05 Akim Demaille <akim@epita.fr>
13441
13442 * src/output.c (pack_vector): Use assert, not berror.
13443 * src/main.c (berror): Remove, unused.
13444
13445 2001-12-05 Akim Demaille <akim@epita.fr>
13446
13447 New experimental feature: if --verbose --trace output all the
13448 items of a state, not only its kernel.
13449
13450 * src/print.c (print_core): If `trace_flag', then invoke closure
13451 before outputting the items of the state (print_core is no longer
13452 a correct name them).
13453 (print_results): Invoke new_closure/free_closure if needed.
13454
13455 2001-12-05 Akim Demaille <akim@epita.fr>
13456
13457 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13458 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13459 (nitemset): for consistency with the rest of the project.
13460
13461 2001-12-05 Akim Demaille <akim@epita.fr>
13462
13463 * src/closure.c (print_closure): Improve.
13464 (closure): Use it for printing input and output.
13465
13466 2001-12-05 Akim Demaille <akim@epita.fr>
13467
13468 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13469 indexed by nonterminals.
13470
13471 2001-12-05 Akim Demaille <akim@epita.fr>
13472
13473 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13474 what it was!).
13475 * src/warshall.h: Remove accidental duplication of the content.
13476
13477 2001-12-05 Akim Demaille <akim@epita.fr>
13478
13479 * src/closure.c (set_fderives): De-obfuscate.
13480
13481 2001-12-05 Akim Demaille <akim@epita.fr>
13482
13483 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13484
13485 2001-12-05 Akim Demaille <akim@epita.fr>
13486
13487 * src/closure.c (set_firsts): De-obfuscate.
13488
13489 2001-12-05 Akim Demaille <akim@epita.fr>
13490
13491 * src/output.c (action_row): De-obfuscate
13492 using the good o' techniques: arrays not pointers, variable
13493 locality, BITISSET, RESETBIT etc.
13494
13495 2001-12-05 Akim Demaille <akim@epita.fr>
13496
13497 Pessimize the code to simplify it: from now on, all the states
13498 have a valid SHIFTS, which NSHIFTS is possibly 0.
13499
13500 * src/LR0.c (shifts_new): Be global and move to..
13501 * src/state.c, src/state.h: here.
13502 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13503 * src/print_graph: Adjust.
13504
13505 2001-12-05 Akim Demaille <akim@epita.fr>
13506
13507 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13508 * src/conflicts.c: Use it.
13509 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13510 incorrectly ``simplified''.
13511
13512 2001-12-05 Akim Demaille <akim@epita.fr>
13513
13514 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13515 using the good o' techniques: arrays not pointers, variable
13516 locality, BITISSET, RESETBIT etc.
13517
13518 2001-12-05 Akim Demaille <akim@epita.fr>
13519
13520 * src/state.h (SHIFT_SYMBOL): New.
13521 * src/conflicts.c: Use it to deobfuscate.
13522
13523 2001-12-05 Akim Demaille <akim@epita.fr>
13524
13525 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13526 (print_reductions): De-obfuscate using the good o' techniques:
13527 arrays not pointers, variable locality, BITISSET.
13528
13529 2001-12-05 Akim Demaille <akim@epita.fr>
13530
13531 * src/conflicts.c (print_reductions): Arrays, not pointers.
13532 Use BITISSET.
13533
13534 2001-12-05 Akim Demaille <akim@epita.fr>
13535
13536 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13537
13538 2001-12-05 Akim Demaille <akim@epita.fr>
13539
13540 * src/conflicts.c (print_reductions): Improve variable locality.
13541
13542 2001-12-05 Akim Demaille <akim@epita.fr>
13543
13544 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13545
13546 2001-12-05 Akim Demaille <akim@epita.fr>
13547
13548 * src/conflicts.c (print_reductions): Improve variable locality.
13549
13550 2001-12-05 Akim Demaille <akim@epita.fr>
13551
13552 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13553 * src/lalr.c: Use them.
13554
13555 2001-12-05 Akim Demaille <akim@epita.fr>
13556
13557 * src/LR0.c (augment_automaton): Formatting changes.
13558 Better variable locality.
13559
13560 2001-12-05 Akim Demaille <akim@epita.fr>
13561
13562 * src/lalr.c (matrix_print): New.
13563 (transpose): Use it.
13564 Use arrays instead of pointers.
13565
13566 2001-12-05 Akim Demaille <akim@epita.fr>
13567
13568 * src/lalr.c (maxrhs): Move to...
13569 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13570 * src/lalr.c (build_relations): Adjust.
13571
13572 2001-12-05 Akim Demaille <akim@epita.fr>
13573
13574 * src/lalr.c (transpose): Free the memory allocated to the
13575 argument, as it is replaced by the results by the unique caller.
13576 (build_relations): Merely invoke transpose: it handles the memory
13577 deallocation.
13578 Improve variable locality.
13579 Avoid variables used as mere abbreviations.
13580 (compute_lookaheads): Use arrays instead of pointers.
13581
13582 2001-12-05 Akim Demaille <akim@epita.fr>
13583
13584 * src/lalr.c (initialize_F): Improve variable locality.
13585 Avoid variables used as mere abbreviations.
13586
13587 2001-12-05 Akim Demaille <akim@epita.fr>
13588
13589 * src/derives.c (print_derives): Display the ruleno.
13590 * src/lalr.c (initialize_F, transpose): Better variable locality
13591 to improve readability.
13592 Avoid variables used as mere abbreviations.
13593
13594 2001-12-05 Akim Demaille <akim@epita.fr>
13595
13596 * src/lalr.c (traverse): Use arrays instead of pointers.
13597
13598 2001-12-05 Akim Demaille <akim@epita.fr>
13599
13600 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13601 the handling of squeue.
13602 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13603
13604 2001-12-05 Akim Demaille <akim@epita.fr>
13605
13606 Because useless nonterminals are now kept alive (instead of being
13607 `destroyed'), we now sometimes examine them, and store information
13608 related to them. Hence we need to know their number, and adjust
13609 memory allocations.
13610
13611 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13612 static.
13613 * src/LR0.c (allocate_itemsets): The memory allocated to
13614 `symbol_count' was used for two different purpose: once to count
13615 the number of occurrences of each symbol, and later reassigned to
13616 `shift_symbol', containing the symbol that can be shifted from a
13617 given state.
13618 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13619 only, and...
13620 (new_itemsets): Allocate `shift_symbol' here.
13621 (allocate_itemsets): symbol_count includes useless nonterminals.
13622 Make room for them.
13623 (free_storage): Use `free', not `XFREE', for pointers that cannot
13624 be null.
13625
13626 2001-12-05 Akim Demaille <akim@epita.fr>
13627
13628 * src/nullable.c (set_nullable): Deobfuscate the handling of
13629 ritem.
13630 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13631
13632 2001-12-05 Akim Demaille <akim@epita.fr>
13633
13634 * src/gram.c, src/gram.h (ritem_print): New.
13635 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13636 (This useless function was defined only to work around VMS linkers
13637 that can't handle compilation units with variables only).
13638 * src/reduce.c (dump_grammar): Use it to trace the construction of
13639 ritem.
13640
13641 2001-12-04 Paul Eggert <eggert@twinsun.com>
13642
13643 * src/bison.simple (union yyalloc): Change member names
13644 to be the same as the stack names.
13645 (yyparse): yyptr is now union yyalloc *, not char *.
13646 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13647 and may generate better code on some machines.
13648 (yystpcpy): Use prototype if __STDC__ is defined, not just
13649 if __cplusplus is defined.
13650
13651 2001-11-30 Akim Demaille <akim@epita.fr>
13652
13653 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13654 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13655 Gettext doesn't compile cleanly, and dies with -Werror.
13656 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13657 Include WARNING_CFLAGS here.
13658 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13659 before being defined.
13660
13661 2001-11-27 Paul Eggert <eggert@twinsun.com>
13662
13663 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13664 First arg is int, not unsigned.
13665 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13666 (SIZE_MAX, UINT_MAX): New macros.
13667 (quotearg_n_options): Abort if N is negative.
13668 Avoid overflow check on hosts where size_t is 64 bits and int
13669 is 32 bits, as overflow is impossible there.
13670 Fix off-by-one typo that caused unnecessary reallocation.
13671
13672 2001-11-29 Paul Eggert <eggert@twinsun.com>
13673
13674 Name space cleanup in generated parser.
13675
13676 * doc/bison.texinfo (Bison Parser): Discuss system headers
13677 and their effect on the user name space.
13678
13679 * src/bison.simple:
13680 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13681 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13682 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13683
13684 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13685 on user names when possible.
13686
13687 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13688 Simplify test for whather <alloca.h> exists.
13689
13690 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13691
13692 (<stdio.h>): Include if YYDEBUG.
13693
13694 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13695 ! defined (yyoverflow) && ! defined (yymemcpy).
13696
13697 (yymemcpy, yyparse): Rename local variables as needed so that
13698 they all begin with 'yy'.
13699
13700 (yystrlen, yystpcpy): New functions.
13701
13702 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13703 All uses changed.
13704
13705 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13706 instead of relying on string.h functions. Use YYSTACK_ALLOC
13707 and YYSTACK_FREE instead of malloc and free.
13708
13709 2001-11-30 Akim Demaille <akim@epita.fr>
13710
13711 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13712 before their first uses.
13713 (YYBISON, YYPURE): Move to the top of the output.
13714
13715 2001-11-30 Akim Demaille <akim@epita.fr>
13716
13717 * tests/reduce.at (Useless Nonterminals): Fix.
13718
13719 2001-11-30 Akim Demaille <akim@epita.fr>
13720
13721 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13722 if body instead of `;' to pacify GCC's warnings.
13723
13724 2001-11-30 Akim Demaille <akim@epita.fr>
13725
13726 Instead of mapping the LHS of unused rules to -1, keep the LHS
13727 valid, but flag the rules as invalid.
13728
13729 * src/gram.h (rule_t): `useful' is a new member.
13730 * src/print.c (print_grammar): Adjust.
13731 * src/derives.c (set_derives): Likewise.
13732 * src/reader.c (packgram, reduce_output): Likewise.
13733 * src/reduce.c (reduce_grammar_tables): Likewise.
13734 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13735
13736 2001-11-30 Akim Demaille <akim@epita.fr>
13737
13738 * src/reduce.c (reduce_output): Formatting changes.
13739 * src/print.c (print_results, print_grammar): Likewise.
13740 * tests/regression.at (Rule Line Numbers)
13741 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13742
13743 2001-11-30 Akim Demaille <akim@epita.fr>
13744
13745 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13746 useless nonterminals, move them at the end of the symbol arrays.
13747 (reduce_output): Adjust.
13748 * tests/reduce.at (Useless Nonterminals): Adjust.
13749
13750 2001-11-30 Akim Demaille <akim@epita.fr>
13751
13752 * src/reduce.c: Various comment/formatting changes.
13753 (nonterminals_reduce): New, extracted from...
13754 (reduce_grammar_tables): here.
13755 (reduce_grammar): Call nonterminals_reduce.
13756
13757 2001-11-29 Paul Eggert <eggert@twinsun.com>
13758
13759 * src/bison.simple (YYSTACK_REALLOC): Remove.
13760 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13761 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13762 New macros.
13763 (union yyalloc): New type.
13764 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13765 an arbitrary restriction on hosts where size_t is wider than int.
13766
13767 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13768 a parser stack overflow. Allocate just one block of memory for all
13769 three stacks, instead of allocating three blocks; this typically is
13770 faster and reduces fragmentation.
13771
13772 Do not limit the number of items in the stack to a value that fits
13773 in 'int', as this is an arbitrary limit on hosts with 64-bit
13774 size_t and 32-bit int.
13775
13776 2001-11-29 Marc Autret <autret_m@epita.fr>
13777
13778 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13779 of defining YYERROR_VERBOSE.
13780 [AT_DATA]: $4 is now out of C declarations in the prologue.
13781
13782 2001-11-28 Marc Autret <autret_m@epita.fr>
13783
13784 * src/reader.c (parse_dquoted_param): New.
13785 (parse_skel_decl): Use it.
13786 * src/lex.h: Add its prototype.
13787 * src/lex.c (literalchar): Become not static.
13788
13789 2001-11-28 Marc Autret <autret_m@epita.fr>
13790
13791 * src/output.h: And put its extern declaration here.
13792 * src/output.c (error_verbose): Define here.
13793 (prepare): Echo name modification.
13794 * src/getargs.h: Clean its extern declaration.
13795 * src/getargs.c (error_verbose_flag): Remove.
13796 (getargs): Remove case 'e'.
13797 * src/options.c (option_table): 'error-verbose' is now seen as simple
13798 percent option.
13799 Include output.h.
13800
13801 * src/reader.c (read_declarations): Remove case tok_include.
13802 (parse_include_decl): Remove.
13803 * src/lex.h (token_t): Remove tok_include.
13804 * src/options.c (option_table): 'include' is now a simple command line
13805 option.
13806
13807 2001-11-28 Marc Autret <autret_m@epita.fr>
13808
13809 * src/bison.simple: Adjust muscle names.
13810 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13811 * src/output.c (prepare): s/_/-/ for the muscles names.
13812 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13813
13814 2001-11-28 Marc Autret <autret_m@epita.fr>
13815
13816 * src/bison.simple: Fix debug.
13817 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13818
13819 2001-11-28 Akim Demaille <akim@epita.fr>
13820
13821 * src/LR0.c (shifts_new): New.
13822 (save_shifts, insert_start_shift, augment_automaton): Use it.
13823
13824 2001-11-28 Akim Demaille <akim@epita.fr>
13825
13826 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13827 keep ruleno only.
13828
13829 2001-11-28 Akim Demaille <akim@epita.fr>
13830
13831 * src/closure.c (closure): Instead of looping over word in array
13832 then bits in words, loop over bits in array.
13833
13834 2001-11-28 Akim Demaille <akim@epita.fr>
13835
13836 * src/closure.c (closure): No longer optimize the special case
13837 where all the bits of `ruleset[r]' are set to 0, to make the code
13838 clearer.
13839
13840 2001-11-28 Akim Demaille <akim@epita.fr>
13841
13842 * src/closure.c (closure): `r' and `c' are new variables, used to
13843 de-obfuscate accesses to RULESET and CORE.
13844
13845 2001-11-28 Akim Demaille <akim@epita.fr>
13846
13847 * src/reduce.c (reduce_print): Use ngettext.
13848 (dump_grammar): Improve the trace accuracy.
13849
13850 2001-11-28 Akim Demaille <akim@epita.fr>
13851
13852 * src/reduce.c (dump_grammar): Don't translate trace messages.
13853
13854 2001-11-28 Akim Demaille <akim@epita.fr>
13855
13856 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13857 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13858 as all tags are free'ed afterwards.
13859 From Enrico Scholz.
13860
13861 2001-11-27 Paul Eggert <eggert@twinsun.com>
13862
13863 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13864 use alloca when we didn't want to, and vice versa.
13865
13866 2001-11-27 Marc Autret <autret_m@epita.fr>
13867
13868 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13869 initialization.
13870 * src/output.c (prepare): Remove its update.
13871
13872 2001-11-27 Marc Autret <autret_m@epita.fr>
13873
13874 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13875 Use %error-verbose.
13876
13877 2001-11-27 Marc Autret <autret_m@epita.fr>
13878
13879 * src/bison.simple: Remove YYERROR_VERBOSE using.
13880 Use %%error_verbose.
13881 (yyparse): Likewise.
13882 * src/output.c (prepare): Give its final value.
13883 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13884 * src/getargs.h: Add its extern declaration.
13885 * src/getargs.c (error_verbose_flag): New int.
13886 (getargs): Update to catch new case.
13887 * src/options.c (option_table): 'error-verbose' is a new option.
13888 (shortopts): Update.
13889
13890 2001-11-27 Akim Demaille <akim@epita.fr>
13891
13892 * src/system.h: Use intl/libgettext.h.
13893 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13894
13895 2001-11-27 Akim Demaille <akim@epita.fr>
13896
13897 * tests/torture.at (Exploding the Stack Size with Malloc):
13898 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13899
13900 2001-11-27 Akim Demaille <akim@epita.fr>
13901
13902 * src/files.c: Include error.h.
13903 Reported by Hans Aberg.
13904
13905 2001-11-26 Marc Autret <autret_m@epita.fr>
13906
13907 * src/reader.c (parse_include_decl): New, not yet implemented.
13908 (read_declarations): Add case tok_include.
13909 * src/getargs.h (include): Add its extern definition.
13910 * src/getargs.c (include): New const char *.
13911 (getargs): Add case '-I'.
13912 * src/options.c (option_table): Add include as command line and
13913 percent option.
13914 * src/lex.h (token_t): Add tok_include.
13915
13916 2001-11-26 Akim Demaille <akim@epita.fr>
13917
13918 * src/reader.c (readgram): Make sure rules for mid-rule actions
13919 have a lineno equal to that of their host rule.
13920 Reported by Hans Aberg.
13921 * tests/regression.at (Rule Line Numbers): New.
13922
13923 2001-11-26 Akim Demaille <akim@epita.fr>
13924
13925 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13926 size_ts.
13927
13928 2001-11-26 Akim Demaille <akim@epita.fr>
13929
13930 * src/complain.c, src/complain.h (error): Remove, provided by
13931 lib/error.[ch].
13932
13933 2001-11-26 Akim Demaille <akim@epita.fr>
13934
13935 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13936 issue an error message.
13937 * tests/regression.at (Invalid %directive): New.
13938 Reported by Hans Aberg.
13939
13940 2001-11-26 Akim Demaille <akim@epita.fr>
13941
13942 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13943 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13944
13945 2001-11-26 Akim Demaille <akim@epita.fr>
13946
13947 * src/conflicts.c (conflicts_print): Don't complain at all when
13948 there are no reduce/reduce conflicts, and as many shift/reduce
13949 conflicts as expected.
13950 * tests/regression.at (%expect right): Adjust.
13951
13952 2001-11-23 Akim Demaille <akim@epita.fr>
13953
13954 * lib/alloca.c: Update, from fileutils.
13955
13956 2001-11-23 Akim Demaille <akim@epita.fr>
13957
13958 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13959
13960 2001-11-23 Akim Demaille <akim@epita.fr>
13961
13962 * src/system.h: Include alloca.h.
13963 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13964
13965 2001-11-23 Akim Demaille <akim@epita.fr>
13966
13967 * src/print_graph.c (print_actions): Remove `rule', unused.
13968 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13969 pacify GCC's signed < unsigned warnings.
13970 * src/closure.c (itemsetsize): Likewise.
13971 * src/reader.c (symbol_list_new): Static.
13972
13973 2001-11-23 Akim Demaille <akim@epita.fr>
13974
13975 Attaching lineno to buckets is stupid, since only one copy of each
13976 symbol is kept, only the line of the first occurrence is kept too.
13977
13978 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13979 * src/reader.c (rline_allocated): Remove, unused.
13980 (symbol_list): Have a `line' member.
13981 (symbol_list_new): New.
13982 (readgram): Use it.
13983 * src/print.c (print_grammar): Output the rule line numbers.
13984 * tests/regression.at (Solved SR Conflicts)
13985 (Unresolved SR Conflicts): Adjust.
13986 Reported by Hans Aberg.
13987
13988 2001-11-22 Marc Autret <autret_m@epita.fr>
13989
13990 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13991
13992 2001-11-22 Marc Autret <autret_m@epita.fr>
13993
13994 * src/muscle_tab.c (muscle_init): Remove initialization of
13995 skeleton muscle.
13996 * src/output.c (output_master_parser): Do it here.
13997
13998 2001-11-20 Akim Demaille <akim@epita.fr>
13999
14000 * po/sv.po: New.
14001 * configure.in (ALL_LINGUAS): Adjust.
14002 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14003 longer contains strings to translate.
14004
14005 2001-11-19 Akim Demaille <akim@epita.fr>
14006
14007 * src/conflicts.c (conflicts_print): Add a missing \n.
14008
14009 2001-11-19 Akim Demaille <akim@epita.fr>
14010
14011 * src/nullable.c (nullable_print): New.
14012 (set_nullable): Call it when tracing.
14013 Better locality of variables.
14014
14015 2001-11-19 Akim Demaille <akim@epita.fr>
14016
14017 * src/print.c (print_actions): Better locality of variables.
14018
14019 2001-11-19 Akim Demaille <akim@epita.fr>
14020
14021 * src/derives.c (print_derives): Fix and enrich.
14022 * src/closure.c (print_fderives): Likewise.
14023
14024 2001-11-19 Akim Demaille <akim@epita.fr>
14025
14026 * src/closure.c (itemsetend): Remove, replaced with...
14027 (itemsetsize): new.
14028
14029 2001-11-19 Akim Demaille <akim@epita.fr>
14030
14031 * src/LR0.c (kernel_end): Remove, replaced with...
14032 (kernel_size): new.
14033
14034 2001-11-19 Akim Demaille <akim@epita.fr>
14035
14036 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14037 to clarify.
14038
14039 2001-11-19 Akim Demaille <akim@epita.fr>
14040
14041 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14042
14043 2001-11-19 Akim Demaille <akim@epita.fr>
14044
14045 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14046 trace messages.
14047 * src/LR0.c: Likewise.
14048 (allocate_itemsets): Use arrays instead of pointers to clarify.
14049
14050 2001-11-19 Akim Demaille <akim@epita.fr>
14051
14052 * src/getargs.c (statistics_flag): Replace with...
14053 (trace_flag): New.
14054 (longopts): Accept --trace instead of --statistics.
14055 * src/getargs.h, src/options.c: Adjust.
14056 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14057 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14058
14059 2001-11-19 Akim Demaille <akim@epita.fr>
14060
14061 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
14062 pointers to clarify the code.
14063 (save_reductions, save_shifts): Factor common parts of alternatives.
14064
14065 2001-11-19 Akim Demaille <akim@epita.fr>
14066
14067 * src/LR0.c (new_state, get_state): Complete TRACE code.
14068 * src/closure.c: Include `reader.h' to get `tags', needed by the
14069 trace code.
14070 Rename the conditional DEBUG as TRACE.
14071 Output consistently TRACEs to stderr, not stdout.
14072 * src/derives.c: Likewise.
14073 * src/reduce.c: (inaccessable_symbols): Using if is better style
14074 than goto.
14075 Use `#if TRACE' instead of `#if 0' for tracing code.
14076
14077 2001-11-19 Akim Demaille <akim@epita.fr>
14078
14079 * src/system.h (LIST_FREE, shortcpy): New.
14080 * src/LR0.c: Use them.
14081 * src/output.c (free_itemsets, free_reductions, free_shifts):
14082 Remove, replaced by LIST_FREE.
14083
14084 2001-11-19 Akim Demaille <akim@epita.fr>
14085
14086 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14087 (REDUCTIONS_ALLOC): New.
14088 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14089 allocation.
14090
14091 2001-11-19 Akim Demaille <akim@epita.fr>
14092
14093 * src/LR0.c (new_state): Complete trace code.
14094 * src/nullable.c (set_nullable): Don't translate traces.
14095
14096 2001-11-19 Akim Demaille <akim@epita.fr>
14097
14098 * src/print_graph.c (print_core): Better locality of variables.
14099 * src/print.c (print_core): Likewise.
14100
14101 2001-11-19 Akim Demaille <akim@epita.fr>
14102
14103 * src/vcg.c: You do the output, so you are responsible of the
14104 handling of VCG syntax, in particular: use quotearg.
14105 * src/print_graph.c: Don't.
14106 (print_actions): Don't output the actions as part of the nodes,
14107 since that's the job of the edges.
14108 (print_state): Don't output by hand: fill the node description,
14109 and ask for its output.
14110
14111 2001-11-19 Akim Demaille <akim@epita.fr>
14112
14113 * src/bison.simple (yyparse): When verbosely reporting an error,
14114 no longer put additional quotes around token names.
14115 * tests/calc.at: Adjust.
14116
14117 2001-11-19 Akim Demaille <akim@epita.fr>
14118
14119 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14120 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14121 * src/output.c: Adjust.
14122
14123 2001-11-19 Akim Demaille <akim@epita.fr>
14124
14125 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14126 (rule_t): this.
14127 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14128
14129 2001-11-19 Akim Demaille <akim@epita.fr>
14130
14131 * src/gram.h (rule_t): New.
14132 (rule_table): New.
14133 (rrhs, rlhs): Remove, part of state_t.
14134 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14135 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14136 * src/reader.c, src/reduce.c: Adjust.
14137
14138 2001-11-19 Akim Demaille <akim@epita.fr>
14139
14140 * src/reader.c (symbols_output): New, extracted from...
14141 (packsymbols): Here.
14142 (reader): Call it.
14143
14144 2001-11-19 Akim Demaille <akim@epita.fr>
14145
14146 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14147 (maxrhs): this new function.
14148
14149 2001-11-19 Akim Demaille <akim@epita.fr>
14150
14151 * src/lalr.c (F): New macro to access the variable F.
14152 Adjust.
14153
14154 2001-11-19 Akim Demaille <akim@epita.fr>
14155
14156 * src/lalr.h (LA): New macro to access the variable LA.
14157 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14158 * src/lalr.c: Adjust.
14159
14160 2001-11-19 Akim Demaille <akim@epita.fr>
14161
14162 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14163 (set_state_table): handle the `lookaheads' members.
14164
14165 2001-11-19 Akim Demaille <akim@epita.fr>
14166
14167 * src/lalr.h (lookaheads): Removed array, whose contents is now
14168 a member of...
14169 (state_t): this structure.
14170 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14171 Adjust.
14172
14173 2001-11-19 Akim Demaille <akim@epita.fr>
14174
14175 * src/lalr.h (consistent): Removed array, whose contents is now
14176 a member of...
14177 (state_t): this structure.
14178 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14179 Adjust.
14180
14181 2001-11-19 Akim Demaille <akim@epita.fr>
14182
14183 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14184 contents are now members of...
14185 (state_t): this structure.
14186 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14187 Adjust.
14188
14189 2001-11-19 Akim Demaille <akim@epita.fr>
14190
14191 * src/lalr.h (state_t): New.
14192 (state_table): Be a state_t * instead of a core **.
14193 (accessing_symbol): Remove, part of state_t.
14194 * src/lalr.c: Adjust.
14195 (set_accessing_symbol): Merge into...
14196 (set_state_table): this.
14197 * src/print_graph.c, src/conflicts.c: Adjust.
14198
14199 2001-11-14 Akim Demaille <akim@epita.fr>
14200
14201 * tests/calc.at, tests/output.at, tests/regression.at,
14202 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14203 now the tests are run in private dirs, therefore AC_CLEANUP and
14204 family can be simplified to 0-ary.
14205 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14206 use abs. path to find config.h.
14207 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14208 stderr, there can be way too much random noise.
14209 Instead pass -Werror to GCC and rely on the exit status.
14210 Reported by Wolfram Wagner.
14211
14212 2001-11-14 Akim Demaille <akim@epita.fr>
14213
14214 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14215 defined only if yyoverflow is defined, to avoid `warning: unused
14216 variable `yyvs1''.
14217 Reported by The Test Suite.
14218
14219 2001-11-14 Akim Demaille <akim@epita.fr>
14220
14221 * src/print.c: Include reduce.h.
14222 Reported by Hans Aberg.
14223
14224 2001-11-14 Akim Demaille <akim@epita.fr>
14225
14226 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14227 Revert a previous patch: these are really const.
14228 * src/conflicts.c (conflict_report): Additional useless pair of
14229 braces to pacify GCC's warnings for `if () if () {} else {}'.
14230 * src/lex.c (parse_percent_token): Replace equal_offset with
14231 arg_offset.
14232 arg is const.
14233 Be sure to strdup `arg' when used, since there is no reason for
14234 token_buffer not to change.
14235
14236 2001-11-14 Akim Demaille <akim@epita.fr>
14237
14238 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14239 definition.
14240 * src/main.c (main): Use them.
14241 Suggested by Hans Aberg.
14242
14243 2001-11-12 Akim Demaille <akim@epita.fr>
14244
14245 * src/system.h (ngettext): Now that we use ngettext, be sure to
14246 provide a default definition when NLS are not used.
14247
14248 2001-11-12 Akim Demaille <akim@epita.fr>
14249
14250 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14251 Use @kbd to denote user input.
14252 (Language and Grammar): ANSIfy the example.
14253 Adjust its layout for info/notinfo.
14254 (Location Tracking Calc): Output error messages to stderr.
14255 Output locations in a more GNUtically correct way.
14256 Fix a couple of Englishos.
14257 Adjust @group/@end group pairs.
14258
14259 2001-11-12 Akim Demaille <akim@epita.fr>
14260
14261 %expect was not functioning at all.
14262
14263 * src/conflicts.c (expected_conflicts): Set to -1.
14264 (conflict_report): Use ngettext.
14265 (conflicts_print): Check %expect and make its violation an error.
14266 * doc/bison.texinfo (Expect Decl): Adjust.
14267 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14268 * tests/regression.at (%expect not enough, %expect right)
14269 (%expect too much): New.
14270
14271 2001-11-12 Akim Demaille <akim@epita.fr>
14272
14273 * tests/regression.at (Conflicts): Rename as...
14274 (Unresolved SR Conflicts): this.
14275 (Solved SR Conflicts): New.
14276
14277 2001-11-12 Akim Demaille <akim@epita.fr>
14278
14279 * src/reduce.c (print_results): Rename as...
14280 (reduce_output): This.
14281 Output to OUT, passed as argument, instead of output_obstack.
14282 (dump_grammar): Likewise.
14283 (reduce_free): New.
14284 Also free V1.
14285 (reduce_grammar): No longer call reduce_output, since...
14286 * src/print.c (print_results): do it.
14287 * src/main.c (main): Call reduce_free;
14288
14289 2001-11-12 Akim Demaille <akim@epita.fr>
14290
14291 * src/conflicts.c (print_reductions): Accept OUT as argument.
14292 Output to it, not to output_obstack.
14293 * src/print.c (print_actions): Adjust.
14294
14295 2001-11-12 Akim Demaille <akim@epita.fr>
14296
14297 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14298 the result instead of using...
14299 (src_total, rrc_total, src_count, rrc_count): Remove.
14300 (any_conflicts): Remove.
14301 (print_conflicts): Split into...
14302 (conflicts_print, conflicts_output): New.
14303 * src/conflicts.h: Adjust.
14304 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
14305 * src/print.c (print_grammar): Issue `\n' between two rules.
14306 * tests/regression.at (Conflicts): New.
14307 Reported by Tom Lane.
14308
14309 2001-11-12 Akim Demaille <akim@epita.fr>
14310
14311 * tests/regression.at (Invalid input): Remove, duplicate with
14312 ``Invalid input: 1''.
14313
14314 2001-11-12 Akim Demaille <akim@epita.fr>
14315
14316 * tests/torture.at (AT_DATA_STACK_TORTURE)
14317 (Exploding the Stack Size with Alloca)
14318 (Exploding the Stack Size with Malloc): New.
14319
14320 2001-11-12 Akim Demaille <akim@epita.fr>
14321
14322 * src/bison.simple (YYSTACK_REALLOC): New.
14323 (yyparse) [!yyoverflow]: Use it and free the old stack.
14324 Reported by Per Allansson.
14325
14326 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
14327
14328 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14329 define CPP macro, which substitute YYSTYPE by yystype.
14330 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14331 with yyltype/YYLTYPE. This allows inclusion of the generated
14332 header within the parser if the compiler, such as GGC, accepts
14333 multiple equivalent #defines.
14334 From Akim.
14335
14336 2001-11-05 Akim Demaille <akim@epita.fr>
14337
14338 * src/reader.c (symbols_output): New, extracted from...
14339 (packsymbols): here.
14340 (reader): Adjust.
14341
14342 2001-11-05 Akim Demaille <akim@epita.fr>
14343
14344 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14345
14346 2001-11-05 Akim Demaille <akim@epita.fr>
14347
14348 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14349 pattern.
14350
14351 2001-11-05 Akim Demaille <akim@epita.fr>
14352
14353 * src/options.h (struct option_table_struct): set_flags is void*.
14354 * src/options.c (longopts): Support `--output' and `%output'.
14355 (usage): Adjust.
14356 * src/lex.h (tok_setopt): Remove, replaced with...
14357 (tok_intopt, tok_stropt): these new guys.
14358 * src/lex.c (getopt.h): Not needed.
14359 (token_buffer, unlexed_token_buffer): Not const.
14360 (percent_table): Promote `-' over `_' in directive names.
14361 Active `%name-prefix', `file-prefix', and `output'.
14362 (parse_percent_token): Accept possible arguments to directives.
14363 Promote `-' over `_' in directive names.
14364
14365 2001-11-04 Akim Demaille <akim@epita.fr>
14366
14367 * doc/bison.texinfo (Decl Summary): Split the list into
14368 `directives for grammars' and `directives for bison'.
14369 Sort'em.
14370 Add description of `%name-prefix', `file-prefix', and `output'.
14371 Promote `-' over `_' in directive names.
14372 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14373 Simplify the description of `--name-prefix'.
14374 Promote `-' over `_' in directive names.
14375 Promote `--output' over `--output-file'.
14376 Fix the description of `--defines'.
14377 * tests/output.at: Exercise %file-prefix and %output.
14378
14379 2001-11-02 Akim Demaille <akim@epita.fr>
14380
14381 * doc/refcard.tex: Update.
14382
14383 2001-11-02 Akim Demaille <akim@epita.fr>
14384
14385 * src/symtab.h (SUNDEF): New.
14386 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14387 stand for `uninitialized', instead of 0.
14388 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14389 * src/lex.c (lex): Adjust.
14390
14391 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14392 Number it 0.
14393 Let yylex return it instead of a plain 0.
14394 Reported by Dick Streefland.
14395
14396 2001-11-02 Akim Demaille <akim@epita.fr>
14397
14398 * tests/regression.at (Mixing %token styles): New test.
14399
14400 2001-11-02 Akim Demaille <akim@epita.fr>
14401
14402 * src/reader.c (parse_thong_decl): Formatting changes.
14403 (token_translations_init): New, extracted from...
14404 (packsymbols): Here.
14405 Adjust.
14406
14407 2001-11-01 Akim Demaille <akim@epita.fr>
14408
14409 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14410 Check that `9foo.y' produces correct cpp guards.
14411 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14412 guards.
14413 Reported by Wwp.
14414
14415 2001-11-01 Akim Demaille <akim@epita.fr>
14416
14417 * tests/regression.at (Invalid input: 2): New.
14418 * src/lex.c (unlexed_token_buffer): New.
14419 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14420 too.
14421 Reported by Wwp.
14422
14423 2001-11-01 Akim Demaille <akim@epita.fr>
14424
14425 * tests/calc.at: Catch up with 1.30.
14426 * configure.in: Bump to 1.49a.
14427 Adjust to newer Autotest.
14428
14429 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
14430
14431 * src/conflicts.c: Move global variables rrc_total and src_total ...
14432 (print_conflicts): here.
14433 * src/output.c (output): Free global variable user_toknums.
14434 * src/lex.c (token_obstack): Become static.
14435
14436 2001-10-18 Akim Demaille <akim@epita.fr>
14437
14438 * tests/atlocal.in (GCC): Add.
14439 * tests/calc.at: s/m4_match/m4_bmatch/.
14440 s/m4_patsubst/m4_bpatsubst/.
14441 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14442 * configure.in: AC_SUBST(GCC).
14443
14444 2001-10-14 Marc Autret <autret_m@epita.fr>
14445
14446 * src/options.c (create_long_option_table): Fix.
14447
14448 2001-10-10 Akim Demaille <akim@epita.fr>
14449
14450 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14451
14452 2001-10-04 Akim Demaille <akim@epita.fr>
14453
14454 * src/reader.c (parse_union_decl): Push the caracters in
14455 union_obstack, not attrs_obstack.
14456
14457 2001-10-04 Akim Demaille <akim@epita.fr>
14458
14459 Merge in the branch 1.29.
14460
14461 * src/reader.c (packsymbols): Use a temporary obstack for
14462 `%%tokendef', since output_stack is already used elsewhere.
14463
14464 2001-10-02 Akim Demaille <akim@epita.fr>
14465
14466 Bump 1.29d.
14467
14468 2001-10-02 Akim Demaille <akim@epita.fr>
14469
14470 Version 1.29c.
14471
14472 2001-10-02 Akim Demaille <akim@epita.fr>
14473
14474 * tests/regression.at (Invalid CPP headers): New.
14475 From Alexander Belopolsky.
14476 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14477
14478 2001-10-02 Akim Demaille <akim@epita.fr>
14479
14480 * tests/regression.at (Invalid input): New.
14481 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14482 Reported by Shura.
14483
14484 2001-10-02 Akim Demaille <akim@epita.fr>
14485
14486 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14487
14488 2001-10-02 Akim Demaille <akim@epita.fr>
14489
14490 * src/output.c (output_parser): Assert `skeleton'.
14491 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14492 systems.
14493 From Shura.
14494
14495 2001-10-01 Marc Autret <autret_m@epita.fr>
14496
14497 * src/lex.h: Echo modifications.
14498 * src/lex.c (unlex): Parameter is now token_t.
14499 From Hans Aberg.
14500
14501 2001-10-01 Marc Autret <autret_m@epita.fr>
14502
14503 * src/main.c: Include lex.h.
14504 From Hans Aberg.
14505
14506 2001-09-29 Akim Demaille <akim@epita.fr>
14507
14508 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14509
14510 2001-09-28 Akim Demaille <akim@epita.fr>
14511
14512 * tests/testsuite.at: Update to newer Autotest.
14513 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14514
14515 2001-09-27 Akim Demaille <akim@epita.fr>
14516
14517 Position independent wrapper.
14518
14519 * tests/bison: Remove.
14520 * tests/bison.in: New.
14521 * configure.in: Adjust.
14522
14523 2001-09-27 Paul Eggert <eggert@twinsun.com>
14524
14525 Port quotearg fixes from tar 1.13.24.
14526
14527 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14528 tm to be declared.
14529 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14530 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14531
14532 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14533 * m4/mbrtowc.m4: New file.
14534 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14535 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14536
14537 2001-09-27 Akim Demaille <akim@epita.fr>
14538
14539 Bump to 1.29c.
14540
14541 2001-09-27 Akim Demaille <akim@epita.fr>
14542
14543 Version 1.29b.
14544
14545 2001-09-25 Akim Demaille <akim@epita.fr>
14546
14547 * src/system.h: Include `xalloc.h'.
14548 Remove it from the C files.
14549 * src/files.c (output_files): Free the obstacks.
14550 * src/lex.c (init_lex): Rename as...
14551 (lex_init): this.
14552 (lex_free): New.
14553 * src/main.c (main): Use it.
14554
14555 2001-09-24 Marc Autret <autret_m@epita.fr>
14556
14557 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14558 to output informations in fout (FILE*).
14559 (open_graph, close_graph): Likewise.
14560 (output_graph, output_edge, output_node): Likewise.
14561 * src/vcg.h: Update function prototypes.
14562 * src/print_graph.c (print_graph): Open output graph file.
14563 (print_actions): Adjust.
14564 * src/files.h: Remove extern declaration.
14565 * src/files.c: Remove graph_obstack declaration.
14566 (open_files): Remove graph_obstack initialization.
14567 (output_files): Remove graph_obstack saving.
14568
14569 2001-09-24 Marc Autret <autret_m@epita.fr>
14570
14571 * src/files.c (compute_output_file_names): Fix.
14572
14573 2001-09-24 Marc Autret <autret_m@epita.fr>,
14574 Akim Demaille <akim@epita.fr>
14575
14576 * src/reader.c (reader): Remove call to free_symtab ().
14577 * src/main.c (main): Call it here.
14578 Include symtab.h.
14579 * src/conflicts.c (initialize_conflicts): Rename as...
14580 (solve_conflicts): this.
14581 * src/print.c (print_core, print_actions, print_state)
14582 (print_grammar): Dump to a file instead a `output_obstack'.
14583 (print_results): Dump `output_obstack', and then proceed with the
14584 FILE *.
14585 * src/files.c (compute_output_file_names, close_files): New.
14586 (output_files): Adjust.
14587 * src/main.c (main): Adjust.
14588
14589 2001-09-23 Marc Autret <autret_m@epita.fr>
14590
14591 * src/files.c (compute_header_macro): Computes header macro name
14592 from spec_defines_file when given.
14593
14594 2001-09-23 Marc Autret <autret_m@epita.fr>
14595
14596 * src/files.c (output_files): Add default extensions.
14597
14598 2001-09-22 Akim Demaille <akim@epita.fr>
14599
14600 * src/conflicts.c (finalize_conflicts): Rename as...
14601 (free_conflicts): this.
14602
14603 2001-09-22 Akim Demaille <akim@epita.fr>
14604
14605 * src/gram.c (gram_free): Rename back as...
14606 (dummy): this.
14607 (output_token_translations): Free `token_translations'.
14608 * src/symtab.c (free_symtab): Free the tag field.
14609
14610 2001-09-22 Akim Demaille <akim@epita.fr>
14611
14612 Remove `translations' as it is always set to true.
14613
14614 * src/gram.h: Adjust.
14615 * src/reader.c (packsymbols, parse_token_decl): Adjust
14616 * src/print.c (print_grammar): Adjust.
14617 * src/output.c (output_token_translations): Adjust.
14618 * src/lex.c (lex): Adjust.
14619 * src/gram.c: Be sure the set pointers to NULL.
14620 (dummy): Rename as...
14621 (gram_free): this.
14622
14623 2001-09-22 Akim Demaille <akim@epita.fr>
14624
14625 * configure.in: Invoke AM_LIB_DMALLOC.
14626 * src/system.h: Use dmalloc.
14627 * src/LR0.c: Be sure to have pointers initialized to NULL.
14628 (allocate_itemsets): Allocate kernel_items only if needed.
14629
14630 2001-09-22 Akim Demaille <akim@epita.fr>
14631
14632 * configure.in: Bump to 1.29b.
14633 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14634 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14635 need xmalloc.c in calc.y.
14636 From Pascal Bart.
14637
14638 2001-09-21 Akim Demaille <akim@epita.fr>
14639
14640 Version 1.29a.
14641 * Makefile.maint, config/config.guess, config/config.sub,
14642 * config/missing: Update from masters.
14643 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14644 upon package.m4.
14645 * configure.in (ALL_LINGUAS): Add `tr'.
14646
14647 2001-09-21 Akim Demaille <akim@epita.fr>
14648
14649 * tests/Makefile.am (package.m4): Move to...
14650 ($(srcdir)/$(TESTSUITE)): here.
14651
14652 2001-09-20 Akim Demaille <akim@epita.fr>
14653
14654 * src/complain.c: No longer try to be standalone: use system.h.
14655 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14656 * src/complain.h: Likewise.
14657 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14658 Remove the unused variable `n'.
14659 From Albert Chin-A-Young.
14660
14661 2001-09-18 Marc Autret <autret_m@epita.fr>
14662
14663 * doc/bison.1: Update.
14664 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14665 descriptions.
14666 (Option Cross Key): Update.
14667 Add --graph.
14668
14669 2001-09-18 Marc Autret <autret_m@epita.fr>
14670
14671 * tests/regression.at: New test (comment in %union).
14672
14673 2001-09-18 Marc Autret <autret_m@epita.fr>
14674
14675 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14676 do that.
14677 Reported by Keith Browne.
14678
14679 2001-09-18 Marc Autret <autret_m@epita.fr>
14680
14681 * tests/output.at: Add tests for --defines and --graph.
14682
14683 2001-09-18 Marc Autret <autret_m@epita.fr>
14684
14685 * tests/output.at: Removes tests of %{header,src}_extension features.
14686
14687 2001-09-18 Akim Demaille <akim@epita.fr>
14688
14689 * tests/Makefile.am (package.m4): New.
14690 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14691 (_AT_CHECK_CALC_ERROR): Likewise.
14692 Factor the `, ' part of verbose error messages.
14693
14694 2001-09-18 Marc Autret <autret_m@epita.fr>
14695
14696 * src/getargs.c (longopts): Declare --defines and --graph as options
14697 with optional arguments.
14698 * src/files.h: Add extern declarations.
14699 * src/files.c (spec_graph_file, spec_defines_file): New.
14700 (output_files): Update.
14701 Remove CPP-outed code.
14702
14703 2001-09-18 Marc Autret <autret_m@epita.fr>
14704
14705 Turn off %{source,header}_extension feature.
14706
14707 * src/files.c (compute_exts_from_gf): Update.
14708 (compute_exts_from_src): Update.
14709 (output_files): CPP-out useless code.
14710 * src/files.h: Remove {header,source}_extension extern declarations.
14711 * src/reader.c (parse_dquoted_param): CPP-out.
14712 (parse_header_extension_decl): Remove.
14713 (parse_source_extension_decl): Remove.
14714 (read_declarations): Remove cases tok_{hdrext,srcext}.
14715 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14716 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14717
14718 2001-09-10 Akim Demaille <akim@epita.fr>
14719
14720 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14721 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14722 (AT_CHECK_OUTPUT): this.
14723 Merely check ls' exit status, its output is useless.
14724
14725 2001-09-10 Akim Demaille <akim@epita.fr>
14726
14727 * tests/calc.at: Use m4_match.
14728 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14729
14730 2001-09-10 Marc Autret <autret_m@epita.fr>,
14731 Akim Demaille <akim@epita.fr>
14732
14733 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14734 enum color_e.
14735 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14736 to `normal'.
14737 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14738 * src/lex.h: Adjust prototype.
14739 (token_t): Add `tok_undef'.
14740 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14741 (parse_percent_token): Now returns token_t.
14742 Add default statement in switch.
14743 (lex): Separate `c' as an input variable, from the token_t result
14744 part.
14745 (unlexed): Is a token_t.
14746
14747 2001-09-10 Akim Demaille <akim@epita.fr>
14748
14749 * configure.in: Bump to 1.29a.
14750
14751 2001-09-07 Akim Demaille <akim@epita.fr>
14752
14753 Version 1.29.
14754
14755 2001-08-30 Akim Demaille <akim@epita.fr>
14756
14757 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14758 * m4/atconfig.m4: Remove.
14759 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14760 * tests/bison: New.
14761 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14762 m4_if, m4_patsubst, and m4_regexp.
14763 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14764 `input' file instead of echo.
14765
14766 2001-08-29 Akim Demaille <akim@epita.fr>
14767
14768 Bump to 1.28e.
14769
14770 2001-08-29 Akim Demaille <akim@epita.fr>
14771
14772 Version 1.28d.
14773
14774 2001-08-29 Paul Eggert <eggert@twinsun.com>
14775
14776 * src/bison.simple (yyparse): Don't take the address of an
14777 item before the start of an array, as that doesn't conform to
14778 the C Standard.
14779
14780 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14781
14782 * doc/bison.texinfo (Location Tracking Calc): New node.
14783
14784 2001-08-29 Paul Eggert <eggert@twinsun.com>
14785
14786 * src/output.c (output): Do not define const, as this now
14787 causes more problems than it cures.
14788
14789 2001-08-29 Akim Demaille <akim@epita.fr>
14790
14791 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14792 the nodes.
14793 Be sure to tag the `detailmenu'.
14794
14795 2001-08-29 Akim Demaille <akim@epita.fr>
14796
14797 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14798 download in a tmp dir.
14799
14800 2001-08-28 Marc Autret <autret_m@epita.fr>
14801
14802 * config/depcomp: New file.
14803
14804 2001-08-28 Marc Autret <autret_m@epita.fr>
14805
14806 * doc/bison.1 (mandoc): Adjust.
14807 From Juan Manuel Guerrero.
14808
14809 2001-08-28 Marc Autret <autret_m@epita.fr>
14810
14811 * src/print_graph.c (print_state): Fix.
14812
14813 2001-08-27 Marc Autret <autret_m@epita.fr>
14814
14815 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14816 char * members.
14817 Echo modifications to the functions prototypes.
14818 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14819
14820 2001-08-27 Marc Autret <autret_m@epita.fr>
14821
14822 * src/vcg.c: Include `xalloc.h'.
14823 (add_colorentry): New.
14824 (add_classname): New.
14825 (add_infoname): New.
14826 * src/vcg.h: Add new prototypes.
14827
14828 2001-08-27 Akim Demaille <akim@epita.fr>
14829
14830 * Makefile.maint: Sync. again with CVS Autoconf.
14831
14832 2001-08-27 Akim Demaille <akim@epita.fr>
14833
14834 * Makefile.maint: Formatting changes.
14835 (po-update, cvs-update, update): New targets.
14836 (AMTAR): Remove.
14837
14838 2001-08-27 Akim Demaille <akim@epita.fr>
14839
14840 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14841 * Makefile.maint: Sync. with CVS Autoconf.
14842
14843 2001-08-27 Marc Autret <autret_m@epita.fr>
14844
14845 * src/vcg.h (struct infoname_s): New.
14846 (struct colorentry_s): New.
14847 (graph_s): New fields {vertical,horizontal}_order in structure.
14848 Add `infoname' field.
14849 Add `colorentry' field;
14850 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14851 (G_HORIZONTAL_ORDER): New.
14852 (G_INFONAME): New.
14853 (G_COLORENTRY): New.
14854 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14855 Add output of `infoname'.
14856 Add output of `colorentry'.
14857
14858 2001-08-27 Marc Autret <autret_m@epita.fr>
14859
14860 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14861 This one shadowed a global parameter.
14862
14863 2001-08-24 Marc Autret <autret_m@epita.fr>
14864
14865 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14866 instead of `unsigned'.
14867 (print_state): Do not call obstack_object_size () in obstack_grow ()
14868 to avoid macro variables shadowing.
14869
14870 2001-08-23 Marc Autret <autret_m@epita.fr>
14871
14872 * src/lex.c (percent_table): Typo: s/naem/name/.
14873 Add graph option.
14874 Normalize new options declarations.
14875
14876 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14877
14878 * tests/suite.at: Exercise %header_extension and %source_extension.
14879
14880 2001-08-16 Marc Autret <autret_m@epita.fr>
14881
14882 * src/reader.c (parse_dquoted_param): New.
14883 (parse_header_extension_decl): Use it.
14884 (parse_source_extension_decl): Likewise.
14885
14886 2001-08-16 Marc Autret <autret_m@epita.fr>
14887
14888 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14889 (get_xxxx_str): Use assert () instead of complain ().
14890 Remove return invokations in default cases.
14891 (get_decision_str): Modify default behaviour. Remove second argument.
14892 Echo modifications on calls.
14893 (output_graph): Fix.
14894
14895 2001-08-16 Marc Autret <autret_m@epita.fr>
14896
14897 * src/getargs.c (usage): Update with ``-g, --graph''.
14898
14899 2001-08-16 Marc Autret <autret_m@epita.fr>
14900
14901 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14902 (Option Cross Key): Likewise.
14903 * doc/bison.1: Update.
14904
14905 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
14906
14907 * src/output.c (output_master_parser): Don't finish action_obstack.
14908 (output_parser): Don't care about the muscle action, here.
14909 (prepare): Copy the action_obstack in the action muscle.
14910 (output): Free action_obstack.
14911
14912 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14913
14914 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14915 will contain `%union' declaration.
14916 (parse_union_decl): Delete #line directive output.
14917 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14918 informations about %union.
14919 (parse_union_decl): Copy the union_obstack in the muscle stype.
14920 * src/bison.simple: Add new #line directive.
14921 Add typdef %%stype YYSTYPE.
14922
14923 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14924
14925 * src/bison.simple: Add new `#line' directive.
14926
14927 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
14928
14929 * src/bison.simple: New `#line' directive.
14930 * src/output.c (output_parser): Support new dynamic muscle input_line.
14931
14932 2001-09-22 Marc Autret <autret_m@epita.fr>
14933
14934 * src/output.c (output_master_parser): New.
14935 (output_parser): Be more re-entrant.
14936
14937 2001-09-21 Marc Autret <autret_m@epita.fr>
14938
14939 * src/reader.c (copy_definition, parse_union_decl): Update and use
14940 `linef' muscle.
14941 (copy_action): Likewise.
14942 Use obstack_1grow ().
14943 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14944
14945 2001-09-21 Marc Autret <autret_m@epita.fr>
14946
14947 * src/options.c (option_table): Adjust.
14948 * src/lex.c (parse_percent_token): Fix.
14949
14950 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14951
14952 * src/options.c (symtab.h): Include it, need by lex.h.
14953
14954 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14955
14956 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14957 is now an option_table_struct*.
14958 (option_strcmp): New function option_strcmp.
14959 (parse_percent_token): Call option_strcmp.
14960 * src/getargs.c (xalloc.h, options.h): Include it.
14961 (getargs): Call create_long_option_table.
14962 (getargs): Free longopts at the end of the function.
14963 (shortopts): Move in options.c.
14964 * src/options.c (create_long_option_table): New function. Convert
14965 information from option_table to option structure.
14966 * src/reader.c (options.h): Include it.
14967
14968 * src/Makefile.am: Adjust.
14969 * src/options.c (option_table): Create from longopts and percent_table.
14970 * src/getargs.c (longopts): Delete.
14971 * src/lex.c (struct percent_table_struct): Delete.
14972 (percent_table): Delete.
14973 (options.h): Include it.
14974 * src/options.c: Create.
14975 * src/options.h: Create.
14976 Declare enum opt_access_e.
14977 Define struct option_table_struct.
14978
14979 2001-09-20 Marc Autret <autret_m@epita.fr>
14980
14981 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14982 sections of Bison.
14983
14984 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
14985
14986 * src/bison.simple: s/%%filename/%%skeleton.
14987 * src/muscle_tab.c (getargs.h): Include it.
14988 (muscle_init): Insert new muscle skeleton.
14989
14990 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
14991
14992 * src/output.c (output_parser): Delete unused variable actions_dumped.
14993
14994 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
14995
14996 * src/output.c (output): Delete call to reader_output_yylsp.
14997 * src/reader.c (reader): Likewise.
14998 * src/reader.h: Delete declaration of reader_output_yylsp.
14999
15000 2001-09-02 Marc Autret <autret_m@epita.fr>
15001
15002 * src/reader.c: Include muscle_tab.h.
15003 (parse_union_decl): Update.
15004 (parse_macro_decl): Rename parse_muscle_decl.
15005 Update to use renamed functions and variable.
15006 (read_declarations, copy_action, read_additionnal_code, : Updated
15007 with correct variables and functions names.
15008 (packsymbols, reader): Likewise.
15009
15010 * src/reader.h (muscle_obstack): Extern declaration update.
15011
15012 * src/output.c: Include muscle_tab.h
15013 In all functions using macro_insert, change by using muscle_insert ().
15014 (macro_obstack): Rename muscle_obstack.
15015 Echo modifications in the whole file.
15016 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15017 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15018 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15019
15020 * src/muscle_tab.h: Update double inclusion macros.
15021 (macro_entry_s): Rename muscle_entry_s.
15022 Update prototypes.
15023
15024 * src/muscle_tab.c: Include muscle_tab.h.
15025 Rename macro_tabble to muscle_table.
15026 (mhash1, mhash2, mcmp): Use muscle_entry.
15027 (macro_init): Rename muscle_init. Update.
15028 (macro_insert): Rename muscle_insert. Update.
15029 (macro_find): Rename muscle_find. Update.
15030
15031 * src/main.c: Include muscle_tab.h.
15032 (main): Call muscle_init ().
15033 * src/Makefile.am (bison_SOURCES): Echo modifications.
15034
15035 2001-09-02 Marc Autret <autret_m@epita.fr>
15036
15037 Now the files macro_tab.[ch] are named muscle_tab.[ch].
15038
15039 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15040
15041 2001-09-02 Marc Autret <autret_m@epita.fr>
15042
15043 * src/macrotab.c, src/macrotab.h: Remove.
15044
15045 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
15046
15047 * src/reader.c (copy_guard): Use muscle to specify the `#line'
15048 filename.
15049
15050 2001-09-01 Marc Autret <autret_m@epita.fr>
15051
15052 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15053 to an explicit value to activate the feature. We do it here.
15054
15055 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15056
15057 * src/output.c (prepare): Delete the `filename' muscule insertion.
15058 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15059 (parse_union_decl): Likewise.
15060 * src/macrotab.c (macro_init): Initialize filename by infile.
15061
15062 2001-08-31 Marc Autret <autret_m@epita.fr>
15063
15064 * src/bison.simple (YYLSP_NEEDED): New definition.
15065 * src/output.c (prepare): Add macro insertion of `locations_flag'
15066
15067 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15068
15069 * src/output.c (prepare): Delete insertion of previous muscles,
15070 and insert the `prefix' muscles.
15071 * src/macrotab.c (macro_init): Likewise.
15072 (macro_init): Initialization prefix directive by `yy'.
15073 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
15074 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15075 yylval, yydebug, yyerror, yynerrs and yyparse.
15076 New directive `#define' to substitute yydebug, ... with option
15077 name_prefix.
15078
15079 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15080
15081 * src/main.c (main): Standardize.
15082 * src/output.c (output_table_data, output_parser): Likewise.
15083 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15084
15085 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15086
15087 * src/reader.c (read_additionnal_code): Rename %%user_code to
15088 %%epilogue.
15089 * src/output.c (output): Rename %%declarations to %%prologue.
15090 * src/bison.simple: Echo modifications.
15091
15092 2001-08-31 Marc Autret <autret_m@epita.fr>
15093
15094 * src/reader.c (readgram): CleanUp.
15095 (output_token_defines): Likewise.
15096 (packsymbols): Likewise.
15097 (reader): Likewise.
15098 * src/output.c (output): CPP-out useless code.
15099
15100 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15101
15102 * src/reader.c (reader): Delete obsolete call to function
15103 output_trailers and output_headers.
15104 * src/output.h: Remove obsolete functions prototypes of output_headers
15105 and output_trailers.
15106
15107 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
15108
15109 * src/main.c: Include macrotab.h.
15110 * src/macrotab.h (macro_entry_s): Constify fields.
15111 Adjust functions prototypes.
15112 * src/macrotab.c (macro_insert): Constify key and value.
15113 (macro_find): Constify key.
15114 (macro_insert): Include 'xalloc.h'
15115 (macro_insert): Use XMALLOC.
15116 (macro_find): Constify return value.
15117 * src/output.c (output_table_data): Rename table to table_data.
15118 (output_parser): Constify macro_key, macro_value.
15119
15120 2001-08-30 Marc Autret <autret_m@epita.fr>
15121
15122 * src/reader.c (parse_skel_decl): New.
15123 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
15124 * src/lex.h (token_t): New token `tok_skel'.
15125 * src/lex.c (percent_table): Add skeleton option entry.
15126 Standardize.
15127
15128 2001-08-29 Marc Autret <autret_m@epita.fr>
15129
15130 * src/bison.simple: Add %%user_code directive at the end.
15131 * src/reader.c (read_additionnal_code): New.
15132 (reader): Use it.
15133 * src/output.c (output_program): Remove.
15134 (output): Update.
15135
15136 2001-08-28 Marc Autret <autret_m@epita.fr>
15137
15138 * src/output.c (output_actions): Clean up.
15139 (output_gram): CPP-out useless code.
15140 * src/reader.c (reader): Clean up, CPP-out useless code.
15141
15142 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
15143
15144 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
15145 directive.
15146 * src/bison.simple: Add `%%definitions'.
15147
15148 2001-08-28 Marc Autret <autret_m@epita.fr>
15149
15150 * config/depcomp: New file.
15151
15152 2001-08-27 Paul Eggert <eggert@twinsun.com>
15153
15154 * src/bison.simple (yyparse): Don't take the address of an
15155 item before the start of an array, as that doesn't conform to
15156 the C Standard.
15157
15158 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15159
15160 * src/output.c (output): Remove the initialization of the macro
15161 obstack. It was done too late here.
15162
15163 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15164 completely wrong.
15165 (reader): Initialize the macro obstack here, since we need it to grow
15166 '%define' directives.
15167
15168 * src/reader.h: Declare the macro obstack as extern.
15169
15170 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15171
15172 * src/output.c (output_parser): Fix. Store single '%' characters in
15173 the output obstack instead of throwing them away.
15174
15175 2001-08-27 Akim Demaille <akim@epita.fr>
15176
15177 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15178
15179 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15180
15181 * lib/Makefile.am: Adjust.
15182
15183 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15184
15185 * src/bison.simple: Update and add '%%' directives.
15186
15187 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15188
15189 * src/reader.c (reader): Remove calls to 'output_headers' and
15190 'output_trailers'. Remove some C output.
15191 (readgram): Disable a piece of code that was writing a default
15192 definition for 'YYSTYPE'.
15193 (reader_output_yylsp): Remove.
15194 (packsymbols): Output token defintions to a macro.
15195 (copy_definition): Disable C output.
15196
15197 * src/reader.c (parse_macro_decl): New function used to parse macro
15198 declarations.
15199 (copy_string2): Put the body of copy_string into this new function.
15200 Add a parameter to let the caller choose whether he wants to copy the
15201 string delimiters or not.
15202 (copy_string): Be a simple call to copy_string2 with the last argument
15203 bound to true.
15204 (read_declarations): Add case for macro definition.
15205 (copy_identifier): New.
15206 (parse_macro_decl): Read macro identifiers using copy_identifier
15207 rather than lex.
15208
15209 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15210
15211 * src/output.c (prepare): Add prefixed names.
15212 (output_parser): Output semantic actions.
15213 (output_parser): Fix bug on '%%line' directives.
15214
15215 * src/output.c (output_headers): Remove. The C code printed by this
15216 function should now be in the skeletons.
15217 (output_trailers): Remove.
15218 (output): Disable call to 'reader_output_yylsp'.
15219 (output_rule_data): Do not output tables to the table obstack.
15220
15221 * src/output.c: Remove some C dedicated output.
15222 Improve the use of macro and output obstacks.
15223 (output_defines): Remove.
15224
15225 * src/output.c (output_token_translations): Associate 'translate'
15226 table with a macro. No output to the table obstack.
15227 (output_gram): Same for 'rhs' and 'prhs'.
15228 (output_stos): Same for 'stos'.
15229 (output_rule_data): Same for 'r1' and 'r2'.
15230 (token_actions): Same for 'defact'.
15231 (goto_actions): Same for 'defgoto'.
15232 (output_base): Same for 'pact' and 'pgoto'.
15233 (output_table): Same for 'table'.
15234 (output_check): Same for 'check'.
15235
15236 * src/output.c (output_table_data): New function.
15237 (output_short_table): Remove.
15238 (output_short_or_char_table): Remove.
15239
15240 * src/output.c (output_parser): Replace most of the skeleton copy code
15241 with something new. Skeletons are now processed character by character
15242 rather than line by line, and Bison looks for '%%' macros. This is the
15243 first step in making Bison's output process (a lot) more flexible.
15244 (output_parser): Use the macro table.
15245
15246 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15247
15248 * src/main.c (main): Initialize the macro table.
15249
15250 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15251
15252 * src/lex.c (percent_table): Add tok_define.
15253 * src/lex.h: Add tok_define.
15254
15255 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15256
15257 * src/macrotab.c: New file.
15258 * src/macrotab.h: New file.
15259 * src/Makefile.am: Update.
15260
15261 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15262
15263 * lib/hash.c: New file.
15264 * lib/hash.h: New file.
15265 * lib/Makefile.am: Update.
15266
15267 2001-08-15 Akim Demaille <akim@epita.fr>
15268
15269 Version 1.28c.
15270
15271 2001-08-15 Marc Autret <autret_m@epita.fr>
15272
15273 * src/reader.c (readgram): Indent output macro YYSTYPE.
15274 (packsymbols): Likewise.
15275 (output_token_defines): Likewise.
15276 * src/files.c: Standardize.
15277 (compute_header_macro): New.
15278 (defines_obstack_save): New. Use compute_header_macro.
15279 (output_files): Update. Use defines_obstack_save.
15280
15281 2001-08-15 Akim Demaille <akim@epita.fr>
15282
15283 * doc/bison.texinfo (Table of Symbols): Document
15284 YYSTACK_USE_ALLOCA.
15285
15286 2001-08-15 Akim Demaille <akim@epita.fr>
15287
15288 * missing: Update from CVS Automake.
15289 * config/config.guess, config/config.sub, config/texinfo.tex:
15290 Update from gnu.org.
15291
15292 2001-08-15 Akim Demaille <akim@epita.fr>
15293
15294 * Makefile.maint: Sync with CVS Autoconf.
15295
15296 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
15297
15298 * doc/bison.texinfo: Include GNU Free Documentation License from
15299 `fdl.texi'.
15300 * doc/fdl.texi: Add to package.
15301
15302 2001-08-14 Marc Autret <autret_m@epita.fr>
15303
15304 Turn on %{source,header}_extension features.
15305
15306 * src/lex.c (percent_table): Un-CPP out header_extension and
15307 source_extension.
15308 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
15309 (compute_exts_from_src): Remove conditions. It restores priorities
15310 between options.
15311
15312 2001-08-14 Marc Autret <autret_m@epita.fr>
15313
15314 * src/files.c (compute_base_names): Add extensions computing when
15315 `--file-prefix' used.
15316 Standardize function calls.
15317
15318 2001-08-13 Marc Autret <autret_m@epita.fr>
15319
15320 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
15321 defining it (defined but null disables alloca).
15322
15323 2001-08-13 Marc Autret <autret_m@epita.fr>
15324
15325 * src/bison.simple (_yy_memcpy): CPP reformat.
15326
15327 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
15328
15329 * tests/atconfig.in (CPPFLAGS): Fix.
15330
15331 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
15332
15333 * doc/bison.texinfo: Include GNU General Public License from
15334 `gpl.texi'.
15335 * doc/gpl.texi: Add to package.
15336
15337 2001-08-10 Marc Autret <autret_m@epita.fr>
15338
15339 * src/print_graph.h: Fix.
15340 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15341
15342 2001-08-10 Akim Demaille <akim@epita.fr>
15343
15344 * src/system.h: Provide default declarations for stpcpy, strndup,
15345 and strnlen.
15346
15347 2001-08-10 Robert Anisko <anisko_r@epita.fr>
15348
15349 * doc/bison.texinfo (Locations): Update @$ stuff.
15350
15351 2001-08-09 Robert Anisko <anisko_r@epita.fr>
15352
15353 * src/bison.simple (YYLLOC_DEFAULT): Update.
15354 (yyparse): Adjust.
15355
15356 2001-08-08 Marc Autret <autret_m@epita.fr>
15357
15358 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
15359 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15360 Reported by Fabrice Bauzac.
15361
15362 2001-08-08 Marc Autret <autret_m@epita.fr>
15363
15364 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15365 * src/vcg.c (output_node): Fix.
15366 * src/vcg.h: Cleanup.
15367 * src/print_graph.c: Add comments.
15368 (node_output_size): New global variable. Simplify the formatting of
15369 the VCG graph output.
15370 (print_actions): Unused code is now used. It notifies the final state
15371 and no action states in the VCG graph. It also give the reduce actions.
15372 The `shift and goto' edges are red and the `go to state' edges are
15373 blue.
15374 Get the current node name and node_obstack by argument.
15375 (node_obstack): New variable.
15376 (print_state): Manage node_obstack.
15377 (print_core): Use node_obstack given by argument.
15378 A node is not only computed here but in print_actions also.
15379 (print_graph): CPP out useless code instead of commenting it.
15380
15381 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
15382
15383 * tests/atconfig.in (CPPFLAGS): Fix.
15384
15385 2001-08-07 Akim Demaille <akim@epita.fr>
15386
15387 * src/print_graph.c (quote): New.
15388 (print_core): Use it.
15389
15390 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
15391
15392 * src/vcg.c (complain.h): Include it.
15393 Unepitaize `return' invocations.
15394 [NDEBUG] (main): Remove.
15395 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
15396 * src/files.c (open_files): Initialize graph_obstack.
15397 * src/print_graph.c (print_actions): CPP out useless code.
15398 (print_core): Don't output the last `\n' in labels.
15399 Use `quote'.
15400 * src/files.c (output_files): Output the VCG file.
15401 * src/main.c (main): Invoke print_graph ();
15402
15403 2001-08-06 Marc Autret <autret_m@epita.fr>
15404
15405 Automaton VCG graph output.
15406 Using option ``-g'' or long option ``--graph'', you can generate
15407 a gram_filename.vcg file containing a VCG description of the LALR (1)
15408 automaton of your grammar.
15409
15410 * src/main.c: Call to print_graph() function.
15411 * src/getargs.h: Update.
15412 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15413 (graph_flag): New flag.
15414 (longopts): Update.
15415 (getargs): Add case `g'.
15416 * src/files.c (graph_obstack): New obstack struct.
15417 (open_files): Initialize new obstack.
15418 (output_files): Saves graph_obstack if required.
15419 * src/files.h (graph_obstack): New extern declaration.
15420 * src/Makefile.am: Add new source files.
15421
15422 2001-08-06 Marc Autret <autret_m@epita.fr>
15423
15424 * src/print_graph.c, src/print_graph.h (graph): New.
15425 * src/vcg.h: New file.
15426 * src/vcg.c: New file, VCG graph handling.
15427
15428 2001-08-06 Marc Autret <autret_m@epita.fr>
15429
15430 Add of %source_extension and %header_extension which specify
15431 the source or/and the header output file extension.
15432
15433 * src/files.c (compute_base_names): Remove initialisation of
15434 src_extension and header_extension.
15435 (compute_exts_from_gf): Update.
15436 (compute_exts_from_src): Update.
15437 (output_files): Update.
15438 * src/reader.c (parse_header_extension_decl): New.
15439 (parse_source_extension_decl): New.
15440 (read_declarations): New case statements for the new tokens.
15441 * src/lex.c (percent_table): Add entries for %source_extension
15442 and %header_extension.
15443 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15444
15445 2001-08-06 Marc Autret <autret_m@epita.fr>
15446
15447 * configure.in: Bump to 1.28c.
15448 * doc/bison.texinfo: Texinfo thingies.
15449
15450 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
15451
15452 * tests/atconfig.in (CPPFLAGS): Add.
15453 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15454
15455 2001-08-03 Akim Demaille <akim@epita.fr>
15456
15457 Version 1.28b.
15458
15459 2001-08-03 Akim Demaille <akim@epita.fr>
15460
15461 * tests/Makefile.am (check-local): Ship testsuite.
15462 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15463 Include `string.h'.
15464
15465 2001-08-03 Akim Demaille <akim@epita.fr>
15466
15467 * configure.in: Try using -Wformat when compiling.
15468
15469 2001-08-03 Akim Demaille <akim@epita.fr>
15470
15471 * configure.in: Bump to 1.28b.
15472
15473 2001-08-03 Akim Demaille <akim@epita.fr>
15474
15475 * src/complain.c: Adjust strerror_r portability issues.
15476
15477 2001-08-03 Akim Demaille <akim@epita.fr>
15478
15479 Version 1.28a.
15480
15481 2001-08-03 Akim Demaille <akim@epita.fr>
15482
15483 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15484 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15485 * src/getargs.c: Include complain.h.
15486 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15487 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15488
15489 2001-08-03 Akim Demaille <akim@epita.fr>
15490
15491 * src/reader.c (readgram): Display hidden chars in error messages.
15492
15493 2001-08-03 Akim Demaille <akim@epita.fr>
15494
15495 Update to gettext 0.10.39.
15496
15497 2001-08-03 Akim Demaille <akim@epita.fr>
15498
15499 * lib/strspn.c: New.
15500
15501 2001-08-01 Marc Autret <autret_m@epita.fr>
15502
15503 * doc/bison.texinfo: Update.
15504 * doc/bison.1 (mandoc): Update.
15505 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15506 * src/files.c: Support output files extensions computing.
15507 (src_extension): New static variable.
15508 (header_extension): New static variable.
15509 (tr): New function.
15510 (get_extension_index): New function, gets the index of an extension
15511 filename in a string.
15512 (compute_exts_from_gf): New function, computes extensions from the
15513 grammar file extension.
15514 (compute_exts_from_src): New functions, computes extensions from the
15515 C source file extension, file given by ``-o'' option.
15516 (compute_base_names): Update.
15517 (output_files): Update.
15518
15519 2001-08-01 Robert Anisko <anisko_r@epita.fr>
15520
15521 * doc/bison.texi: Document @$.
15522 (Locations): New section.
15523
15524 2001-07-18 Akim Demaille <akim@epita.fr>
15525
15526 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15527 * config/prev-version.txt, config/move-if-change: New.
15528 * Makefile.am: Adjust.
15529
15530 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
15531
15532 * src/bison.simple (yyparse): Suppress warning `comparaison
15533 between signed and unsigned'.
15534
15535 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
15536
15537 * src/getargs.h (raw_flag): Remove.
15538 * src/getargs.c: Die on `-r'/`--raw'.
15539 * src/lex.c (parse_percent_token): Die on `%raw'.
15540 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15541 * tests/calc.at: Suppress test with option `--raw'.
15542
15543 2001-07-14 Akim Demaille <akim@epita.fr>
15544
15545 * config/: New.
15546 * configure.in: Require Autoconf 2.50.
15547 Update to gettext 0.10.38.
15548
15549 2001-03-16 Akim Demaille <akim@epita.fr>
15550
15551 * doc/bison.texinfo: ANSIfy the examples.
15552
15553 2001-03-16 Akim Demaille <akim@epita.fr>
15554
15555 * getargs.c (skeleton): New variable.
15556 (longopts): --skeleton is a new option.
15557 (shortopts, getargs): -S is a new option.
15558 * getargs.h: Declare skeleton.
15559 * output.c (output_parser): Use it.
15560
15561 2001-03-16 Akim Demaille <akim@epita.fr>
15562
15563 * m4/strerror_r.m4: New.
15564 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15565 * lib/error.h, lib/error.c: Update.
15566
15567 2001-03-16 Akim Demaille <akim@epita.fr>
15568
15569 * src/getargs.c (longopts): Clean up.
15570
15571 2001-02-21 Akim Demaille <akim@epita.fr>
15572
15573 * src/reader.c (gensym): `gensym_count' is your own.
15574 Use a static buf to create the symbol name, as token_buffer is no
15575 longer a buffer.
15576
15577 2001-02-08 Akim Demaille <akim@epita.fr>
15578
15579 * src/conflicts.c (conflict_report): Be sure not to append to res
15580 between two calls, which could happen if both first sprintf were
15581 skipped, but not the first cp += strlen.
15582
15583 2001-02-08 Akim Demaille <akim@epita.fr>
15584
15585 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15586 New, from fileutils 4.0.37.
15587 * configure.in: Require Autoconf 2.49c. I took some time before
15588 making this decision. This is the only way out for portability
15589 issues in Bison, it would mean way too much duplicate effort to
15590 import in Bison features implemented in 2.49c since 2.13.
15591 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15592
15593 2001-02-02 Akim Demaille <akim@epita.fr>
15594
15595 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
15596 * lib/xalloc.h, lib/xmalloc.c: Update.
15597
15598 2001-01-19 Akim Demaille <akim@epita.fr>
15599
15600 Get rid of the ad hoc handling of token_buffer in the scanner: use
15601 the obstacks.
15602
15603 * src/lex.c (token_obstack): New.
15604 (init_lex): Initialize it. No longer call...
15605 (grow_token_buffer): this. Remove it.
15606 Adjust all the places which used it to use the obstack.
15607
15608 2001-01-19 Akim Demaille <akim@epita.fr>
15609
15610 * src/lex.h: Rename all the tokens:
15611 s/\bENDFILE\b/tok_eof/g;
15612 s/\bIDENTIFIER\b/tok_identifier/g;
15613 etc.
15614 Let them be enums, not #define, to ease debugging.
15615 Adjust all the code.
15616
15617 2001-01-18 Akim Demaille <akim@epita.fr>
15618
15619 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15620 * src/lex.c (maxtoken, grow_token_buffer): Static.
15621
15622 2001-01-18 Akim Demaille <akim@epita.fr>
15623
15624 Since we now use obstacks, more % directives can be enabled.
15625
15626 * src/lex.c (percent_table): Also accept `%yacc',
15627 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15628 `%debug'.
15629 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15630 instead of returning a token.
15631 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15632 * src/reader.c (read_declarations): Adjust.
15633 * src/files.c (open_files): Don't call `compute_base_names', don't
15634 compute `attrsfile' since they depend upon data which might be
15635 *in* the input file now.
15636 (output_files): Do it here.
15637 * src/output.c (output_headers): Document the fact that this patch
15638 introduces a guaranteed SEGV for semantic parsers.
15639 * doc/bison.texinfo: Document them.
15640 * tests/suite.at: Exercise these %options.
15641
15642 2000-12-20 Akim Demaille <akim@epita.fr>
15643
15644 Also handle the output file (--verbose) with obstacks.
15645
15646 * files.c (foutput): Remove.
15647 (output_obstack): New.
15648 Adjust all dependencies.
15649 * src/conflicts.c: Return a string.
15650 * src/system.h (obstack_grow_string): Rename as...
15651 (obstack_sgrow): this. Be ready to work with non literals.
15652 (obstack_fgrow4): New.
15653
15654 2000-12-20 Akim Demaille <akim@epita.fr>
15655
15656 * src/files.c (open_files): Fix the computation of short_base_name
15657 in the case of `-o foo.tab.c'.
15658
15659 2000-12-20 Akim Demaille <akim@epita.fr>
15660
15661 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15662 (copy_dollar): Now that everything uses obstacks, get rid of the
15663 FILE * parameters.
15664
15665 2000-12-20 Akim Demaille <akim@epita.fr>
15666
15667 * src/files.c (open_files): Actually the `.output' file is based
15668 on the short_base_name, not base_name.
15669 * tests/suite.at (Checking output file names): Adjust.
15670
15671 2000-12-20 Akim Demaille <akim@epita.fr>
15672
15673 * src/bison.s1: Remove, we now use directly...
15674 * src/bison.simple: this.
15675 * src/Makefile.am: Use pkgdata instead of data.
15676
15677 2000-12-20 Akim Demaille <akim@epita.fr>
15678
15679 * src/files.c (guard_obstack): New.
15680 (open_files): Initialize it.
15681 (output_files): Dump it...
15682 * src/files.h: Export it.
15683 * src/reader.c (copy_guard): Use it.
15684
15685 2000-12-19 Akim Demaille <akim@epita.fr>
15686
15687 * src/files.c (outfile, defsfile, actfile): Removed as global
15688 vars.
15689 (open_files): Don't compute them.
15690 (output_files): Adjust.
15691 (base_name, short_base_name): Be global.
15692 Adjust dependencies.
15693
15694 2000-12-19 Akim Demaille <akim@epita.fr>
15695
15696 * src/files.c (strsuffix): New.
15697 (stringappend): Be just like strcat but allocate.
15698 (base_names): Eve out from open_files.
15699 Try to simplify the rather hairy computation of base_name and
15700 short_base_name.
15701 (open_files): Use it.
15702 * tests/suite.at (Checking output file names): New test.
15703
15704 2000-12-19 Akim Demaille <akim@epita.fr>
15705
15706 * src/system.h (obstack_grow_literal_string): Rename as...
15707 (obstack_grow_string): this.
15708 * src/output.c (output_parser): Recognize `%% actions' instead of
15709 `$'.
15710 * src/bison.s1: s/$/%% actions/.
15711 * src/bison.hairy: Likewise.
15712
15713 2000-12-19 Akim Demaille <akim@epita.fr>
15714
15715 * src/output.c (output_parser): Compute the `#line' lines when
15716 there are.
15717 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15718 Suggested by Hans Aberg.
15719
15720 2000-12-19 Akim Demaille <akim@epita.fr>
15721
15722 Let the handling of the skeleton files be local to the procedures
15723 that use it.
15724
15725 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15726 longer static.
15727 (fparser, open_extra_files): Remove.
15728 (open_files, output_files): Don't take care of fparser.
15729 * src/files.h: Adjust.
15730 * src/output.c (output_parser): Open and close the file to the
15731 skeleton.
15732 * src/reader.c (read_declarations): When %semantic_parser, open
15733 fguard.
15734
15735 2000-12-19 Akim Demaille <akim@epita.fr>
15736
15737 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15738 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15739
15740 2000-12-19 Akim Demaille <akim@epita.fr>
15741
15742 * src/files.c (open_files): Yipee! We no longer need all the code
15743 looking for `/tmp' since we have no tmp file.
15744
15745 2000-12-19 Akim Demaille <akim@epita.fr>
15746
15747 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15748 New macros.
15749 * src/files.c (open_files): Less dependency on MSDOS etc.
15750
15751 2000-12-14 Akim Demaille <akim@epita.fr>
15752
15753 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15754 Provide a default definition.
15755 Use it when executing the default @ action.
15756 * src/reader.c (reader_output_yylsp): No longer include
15757 `timestamp' and `text' in the default YYLTYPE.
15758
15759 2000-12-12 Akim Demaille <akim@epita.fr>
15760
15761 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15762 (copy_guard): Quote the file names.
15763 Reported by Laurent Mascherpa.
15764
15765 2000-12-12 Akim Demaille <akim@epita.fr>
15766
15767 * src/output.c (output_headers, output_program, output): Be sure
15768 to escape special characters when outputting filenames.
15769 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15770 (output_headers): Don't depend on them, Use ACTSTR.
15771
15772 2000-11-17 Akim Demaille <akim@epita.fr>
15773
15774 * lib/obstack.h: Formatting changes.
15775 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15776 prevents type checking.
15777 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15778 cast the value to (void *): assigning a `foo *' to a `void *'
15779 variable is valid.
15780 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15781 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15782 append characters.
15783
15784 2000-11-17 Akim Demaille <akim@epita.fr>
15785
15786 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15787 as...
15788 (suite.m4, regression.m4, calc.m4): these.
15789 * tests/atgeneral.m4: Update from CVS Autoconf.
15790
15791 2000-11-17 Akim Demaille <akim@epita.fr>
15792
15793 * tests/regression.m4 (%union and --defines): New test,
15794 demonstrating a current bug in the obstack implementation.
15795
15796 2000-11-17 Akim Demaille <akim@epita.fr>
15797
15798 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15799 macros.
15800 Use them to declare the variables which are global or local to
15801 `yyparse'.
15802
15803 2000-11-17 Akim Demaille <akim@epita.fr>
15804
15805 * acconfig.h: Remove, no longer used.
15806
15807 2000-11-07 Akim Demaille <akim@epita.fr>
15808
15809 * src: s/Copyright (C)/Copyright/g.
15810
15811 2000-11-07 Akim Demaille <akim@epita.fr>
15812
15813 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15814 defining.
15815 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15816
15817 2000-11-07 Akim Demaille <akim@epita.fr>
15818
15819 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15820 Merge in a single CPP if/else.
15821
15822 2000-11-07 Akim Demaille <akim@epita.fr>
15823
15824 * src/output.c (output): Remove useless variables.
15825 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15826 argument `data' for consistency with the prototypes.
15827 Qualify it `const'.
15828 (obstack_copy, obstack_copy0): Rename the second argument as
15829 `address' for consistency. Qualify it `const'.
15830 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15831 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15832 `const' their input argument (`data' or `address').
15833 Adjust the corresponding macros to include `const' in casts.
15834
15835 2000-11-03 Akim Demaille <akim@epita.fr>
15836
15837 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15838 s/PFILE1/BISON_HAIRY/.
15839 Adjust dependencies.
15840
15841 2000-11-03 Akim Demaille <akim@epita.fr>
15842
15843 For some reason, this was not applied.
15844
15845 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15846 `unlink': it's no longer used.
15847
15848 2000-11-03 Akim Demaille <akim@epita.fr>
15849
15850 * src/files.c (skeleton_find): New function, eved out of...
15851 (open_files, open_extra_files): here.
15852
15853 2000-11-03 Akim Demaille <akim@epita.fr>
15854
15855 Don't use `atexit'.
15856
15857 * src/files.c (obstack_save): New function.
15858 (done): Rename as...
15859 (output_files): this.
15860 Use `obstack_save'.
15861 * src/main.c (main): Don't use `atexit' to register `done', since
15862 it no longer has to remove tmp files, just call `output_files'
15863 when there are no errors.
15864
15865 2000-11-02 Akim Demaille <akim@epita.fr>
15866
15867 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15868 `unlink': it's no longer used.
15869 * src/files.h: Formatting changes.
15870
15871 2000-11-02 Akim Demaille <akim@epita.fr>
15872
15873 Remove the last uses of mktemp and unlink/delete.
15874
15875 * src/files.c (fdefines, ftable): Removed.
15876 (defines_ostack, table_obstack): New.
15877 Adjust dependencies of the former into uses of the latter.
15878 * src/output.c (output_short_or_char_table, output_short_table):
15879 Convert to using obstacks.
15880 * src/reader.c (copy_comment2): Accept one FILE * and two
15881 obstacks.
15882 (output_token_defines, reader_output_yylsp): Use obstacks.
15883 * src/system.h (obstack_fgrow3): New.
15884 * po/POTFILES.in: Adjust.
15885
15886 2000-11-01 Akim Demaille <akim@epita.fr>
15887
15888 Change each use of `fattrs' into a use of `attrs_obstack'.
15889
15890 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15891 * src/files.c (fattrs): Remove.
15892 (attrs_obstack): New.
15893 Adjust all dependencies.
15894 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15895
15896 2000-11-01 Akim Demaille <akim@epita.fr>
15897
15898 Introduce obstacks.
15899 Change each use of `faction' into a use of `action_obstack'.
15900
15901 * lib/obstack.h, lib/obstack.c: New files.
15902 * src/files.c (faction): Remove.
15903 (action_obstack): New.
15904 Adjust all dependencies.
15905
15906 2000-10-20 Akim Demaille <akim@epita.fr>
15907
15908 * lib/quote.h (PARAMS): New macro. Use it.
15909
15910 2000-10-16 Akim Demaille <akim@epita.fr>
15911
15912 * src/output.c (output_short_or_char_table): New function.
15913 (output_short_table, output_token_translations): Use it.
15914 (goto_actions): Use output_short_table.
15915
15916 2000-10-16 Akim Demaille <akim@epita.fr>
15917
15918 * src/symtab.c (bucket_new): New function.
15919 (getsym): Use it.
15920
15921 * src/output.c (output_short_table): New argument to display the
15922 comment associated with the table.
15923 Adjust dependencies.
15924 (output_gram): Use it.
15925 (output_rule_data): Nicer output layout for YYTNAME.
15926
15927 2000-10-16 Akim Demaille <akim@epita.fr>
15928
15929 * src/lex.c (read_typename): New function.
15930 (lex): Use it.
15931 * src/reader.c (copy_dollar): Likewise.
15932
15933 2000-10-16 Akim Demaille <akim@epita.fr>
15934
15935 * src/reader.c (copy_comment2): Expect the input stream to be on
15936 the `/' which is suspected to open a comment, instead of being
15937 called after `//' or `/*' was read.
15938 (copy_comment, copy_definition, parse_union_decl, copy_action)
15939 (copy_guard): Adjust.
15940
15941 2000-10-16 Akim Demaille <akim@epita.fr>
15942
15943 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15944 `read_signed_integer'.
15945
15946 2000-10-16 Akim Demaille <akim@epita.fr>
15947
15948 * src/reader.c (copy_dollar): New function.
15949 (copy_guard, copy_action): Use it.
15950
15951 2000-10-16 Akim Demaille <akim@epita.fr>
15952
15953 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15954 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15955 New files, from Fileutils 4.0.27.
15956 * src/main.c (printable_version): Remove.
15957 * src/lex.c, src/reader.c: Use `quote'.
15958
15959 2000-10-04 Akim Demaille <akim@epita.fr>
15960
15961 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15962
15963 2000-10-04 Akim Demaille <akim@epita.fr>
15964
15965 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15966
15967 2000-10-04 Akim Demaille <akim@epita.fr>
15968
15969 When a literal string is used to define two different tokens,
15970 `bison -v' segfaults.
15971 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15972
15973 * tests/regression.m4: New file.
15974 Include the core of the sample provided by Piotr Gackiewicz.
15975 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15976 properly.
15977
15978 2000-10-04 Akim Demaille <akim@epita.fr>
15979
15980 * src/reader.c (parse_expect_decl): Keep `count' within the size
15981 of `buffer'.
15982 From Neil Booth.
15983
15984 2000-10-02 Paul Eggert <eggert@twinsun.com>
15985
15986 * bison.s1 (yyparse): Assign the default value
15987 unconditionally, to avoid a GCC warning and make the parser a
15988 tad smaller.
15989
15990 2000-10-02 Akim Demaille <akim@epita.fr>
15991
15992 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15993 options.
15994
15995 2000-10-02 Akim Demaille <akim@epita.fr>
15996
15997 * src/derives.c, src/print.c, src/reduce.c: To ease the
15998 translation, move some `\n' out of the translated strings.
15999
16000 2000-10-02 Akim Demaille <akim@epita.fr>
16001
16002 The location tracking mechanism is precious for parse error
16003 messages. Nevertheless, it is enabled only when `@n' is used in
16004 the grammar, which is a different issue (you can use it in error
16005 message, but not in the grammar per se). Therefore, there should
16006 be another means to enable it.
16007
16008 * src/getargs.c (getargs): Support `--locations'.
16009 (usage): Report it.
16010 * src/getargs.h (locationsflag): Export it.
16011 * src/lex.c (percent_table): Support `%locations'.
16012 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16013 with `locationsflag'.
16014 * doc/bison.texinfo: Document `--locations' and `%locations'.
16015 Sort the options.
16016 * tests/calc.m4: Test it.
16017
16018 For regularity of the names, replace each
16019 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16020 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16021 In addition replace each `flag' with `_flag'.
16022
16023 2000-10-02 Akim Demaille <akim@epita.fr>
16024
16025 Also test parse error messages, including with YYERROR_VERBOSE.
16026
16027 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16028 associative).
16029 Use it to check the computations.
16030 Use it to check `nonassoc' is honored.
16031 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16032 `--yyerror-verbose'.
16033 (_AT_CHECK_CALC): Adjust to this option.
16034 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16035
16036 2000-10-02 Akim Demaille <akim@epita.fr>
16037
16038 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16039 the latter demonstrates a flaw in the handling of non debugging
16040 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16041 was used in order to simplify:
16042
16043 #if YYDEBUG
16044 if (yydebug)
16045 {
16046 ...
16047 }
16048 #endif
16049
16050 into
16051
16052 if (yydebug)
16053 {
16054 ...
16055 }
16056
16057 unfortunately this leads to a CPP conflict when
16058 `--name-prefix=foo' is used since it produces `#define yydebug
16059 foodebug'.
16060
16061 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16062 (YYDPRINTF): New macro.
16063 Spread its use.
16064 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16065 the bison options.
16066 Also test `--verbose', `--defines' and `--name-prefix'.
16067
16068 2000-10-02 Akim Demaille <akim@epita.fr>
16069
16070 Improve the readability of the produced parsers.
16071
16072 * src/bison.s1: Formatting changes.
16073 Improve the comment related to the `$' mark.
16074 (yydefault): Don't fall through to `yyresume': `goto' there.
16075 * src/output.c (output_parser): When the `$' is met, skip the end
16076 of its line.
16077 New variable, `number_of_dollar_signs', to check there's exactly
16078 one `$' in the parser skeleton.
16079
16080 2000-10-02 Akim Demaille <akim@epita.fr>
16081
16082 * lib/xstrdup.c: New file, from the fileutils.
16083 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16084 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16085 instead of strlen + xmalloc + strcpy.
16086 * src/symtab.c (copys): Remove, use xstrdup instead.
16087
16088 2000-10-02 Akim Demaille <akim@epita.fr>
16089
16090 * src/gram.h (associativity): New enum type which replaces the
16091 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16092 `right_assoc', `left_assoc' and `non_assoc'.
16093 Adjust all dependencies.
16094 * src/reader.c: Formatting changes.
16095 (LTYPESTR): Don't define it, use it as a literal in
16096 `reader_output_yylsp'.
16097 * src/symtab.h (symbol_class): New enum type which replaces the
16098 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16099 `sunknown', `stoken and `snterm'.
16100
16101 2000-10-02 Akim Demaille <akim@epita.fr>
16102
16103 * src/getargs.c (fixed_outfiles): Rename as...
16104 (yaccflag): for consistency and accuracy.
16105 Adjust dependencies.
16106
16107 2000-10-02 Akim Demaille <akim@epita.fr>
16108
16109 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16110 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16111 difficult and introduced a lot of core dump. It turns out that
16112 Bison used an implementation of `xmalloc' based on `calloc', and
16113 at various places it does depend upon the initialization to 0. I
16114 have not tried to isolate the pertinent places, and all the former
16115 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16116 someone should address this issue.
16117
16118 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16119 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16120 files.
16121 Adjust dependencies.
16122 * src/warshall.h: New file.
16123 Propagate.
16124
16125 2000-10-02 Akim Demaille <akim@epita.fr>
16126
16127 Various anti-`extern in *.c' changes.
16128
16129 * src/system.h: Include `assert.h'.
16130
16131 2000-10-02 Akim Demaille <akim@epita.fr>
16132
16133 * src/state.h (nstates, final_state, first_state, first_shift)
16134 (first_reduction): Move their exportation from here...
16135 * src/LR0.h: to here.
16136 Adjust dependencies.
16137 * src/getargs.c (statisticsflag): New variable.
16138 Add support for `--statistics'.
16139 Adjust dependencies.
16140
16141 Remove a lot of now useless `extern' statements in most files.
16142
16143 2000-10-02 Akim Demaille <akim@epita.fr>
16144
16145 * src/LR0.h: New file.
16146 Propagate its use.
16147
16148 2000-10-02 Akim Demaille <akim@epita.fr>
16149
16150 * src/print.h: New file.
16151 Propagate its use.
16152 * src/print.c: Formatting and ordering changes.
16153 (verbose, terse): Replace with...
16154 (print_results): this new function.
16155 Adjust dependencies.
16156
16157 2000-10-02 Akim Demaille <akim@epita.fr>
16158
16159 * src/conflicts.c (conflict_report): New function.
16160 (conflict_log, verbose_conflict_log): Replace with...
16161 (print_conflicts): this function.
16162 Adjust dependencies.
16163 * src/conflicts.h: New file.
16164 Propagate its inclusion.
16165
16166 2000-10-02 Akim Demaille <akim@epita.fr>
16167
16168 * src/nullable.h: New file.
16169 Propagate its inclusion.
16170 * src/nullable.c: Formatting changes.
16171
16172 2000-10-02 Akim Demaille <akim@epita.fr>
16173
16174 * src/reduce.h: New file.
16175 Propagate its inclusion.
16176 * src/reduce.c: Topological sort and other formatting changes.
16177 (bool, TRUE, FALSE): Move their definition to...
16178 * src/system.h: here.
16179
16180 2000-10-02 Akim Demaille <akim@epita.fr>
16181
16182 * src/files.c: Formatting changes.
16183 (tryopen, tryclose, openfiles): Rename as...
16184 (xfopen, xfclose, open_files): this.
16185 (stringappend): static.
16186 * src/files.h: Complete the list of exported symbols.
16187 Propagate its use.
16188
16189 2000-10-02 Akim Demaille <akim@epita.fr>
16190
16191 * src/reader.h: New file.
16192 Propagate its use instead of tedious list of `extern' and
16193 prototypes.
16194 * src/reader.c: Formatting changes, topological sort,
16195 s/register//.
16196
16197 2000-10-02 Akim Demaille <akim@epita.fr>
16198
16199 * src/lex.h: Prototype `lex.c' exported functions.
16200 * src/reader.c: Adjust.
16201 * src/lex.c: Formatting changes.
16202 (safegetc): Rename as...
16203 (xgetc): this.
16204
16205 2000-10-02 Akim Demaille <akim@epita.fr>
16206
16207 * src/lalr.h: New file.
16208 Propagate its inclusion instead of prototypes and `extern'.
16209 * src/lalr.c: Formatting changes, topological sorting etc.
16210
16211 2000-10-02 Akim Demaille <akim@epita.fr>
16212
16213 * src/output.c (token_actions): Introduce a temporary array,
16214 YYDEFACT, that makes it possible for this function to use
16215 output_short_table.
16216
16217 2000-10-02 Akim Demaille <akim@epita.fr>
16218
16219 `user_toknums' is output as a `short[]' in `output.c', while it is
16220 defined as a `int[]' in `reader.c'. For consistency with the
16221 other output tables, `user_toknums' is now defined as a table of
16222 shorts.
16223
16224 * src/reader.c (user_toknums): Be a short table instead of an int
16225 table.
16226 Adjust dependencies.
16227
16228 Factor the short table outputs.
16229
16230 * src/output.c (output_short_table): New function.
16231 * src/output.c (output_gram, output_stos, output_rule_data)
16232 (output_base, output_table, output_check): Use it.
16233
16234 2000-10-02 Akim Demaille <akim@epita.fr>
16235
16236 * src/output.c (output): Topological sort of the functions, in
16237 order to get rid of the `static' prototypes.
16238 No longer use `register'.
16239 * src/output.h: New file.
16240 Propagate its inclusion in files explicitly prototyping functions
16241 from output.c.
16242
16243 2000-09-21 Akim Demaille <akim@epita.fr>
16244
16245 * src/atgeneral.m4: Update from Autoconf.
16246
16247 2000-09-21 Akim Demaille <akim@epita.fr>
16248
16249 * src/closure.h: New file.
16250 * src/closure.c: Formatting changes, topological sort over the
16251 functions, use of closure.h.
16252 (initialize_closure, finalize_closure): Rename as...
16253 (new_closure, free_closure): these. Adjust dependencies.
16254 * src/LR0.c: Formatting changes, topological sort, use of
16255 cloture.h.
16256 (initialize_states): Rename as...
16257 (new_states): this.
16258 * src/Makefile.am (noinst_HEADERS): Adjust.
16259
16260 2000-09-20 Akim Demaille <akim@epita.fr>
16261
16262 * src/acconfig.h: Don't protect config.h against multiple
16263 inclusion.
16264 Don't define PARAMS.
16265 * src/system.h: Define PARAMS.
16266 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16267 purpose of config.h. system.h must not try to fix wrong
16268 definitions in config.h.
16269
16270 2000-09-20 Akim Demaille <akim@epita.fr>
16271
16272 * src/derives.h: New file.
16273 * src/main.c, src/derives.h: Use it.
16274 Formatting changes.
16275 * src/Makefile.am (noinst_HEADERS): Adjust.
16276
16277 2000-09-20 Akim Demaille <akim@epita.fr>
16278
16279 * tests/atgeneral.m4: Update from Autoconf.
16280 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16281 (AT_CHECK_CALC): New macros.
16282 Use these macros to test bison with options `', `--raw',
16283 `--debug', `--yacc', `--yacc --debug'.
16284
16285 2000-09-19 Akim Demaille <akim@epita.fr>
16286
16287 * src/output.c: Formatting changes.
16288 * src/machine.h: Remove, leaving its contents in...
16289 * src/system.h: here.
16290 Include stdio.h.
16291 Adjust all dependencies on stdio.h and machine.h.
16292 * src/getargs.h: New file.
16293 Let all `extern' declarations about getargs.c be replaced with
16294 inclusion of `getargs.h'.
16295 * src/Makefile.am (noinst_HEADERS): Adjust.
16296
16297 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16298 scope.
16299 (yyerror): Returns void, not int.
16300 * doc/bison.texinfo: Formatting changes.
16301
16302 2000-09-19 Akim Demaille <akim@epita.fr>
16303
16304 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16305 portable.
16306
16307 2000-09-18 Akim Demaille <akim@epita.fr>
16308
16309 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16310 * src/Makefile.am (INCLUDES): Don't.
16311 Be ready to fetch headers in lib/.
16312
16313 2000-09-18 Akim Demaille <akim@epita.fr>
16314
16315 * doc/bison.texinfo: Update the copyright.
16316 ANSIfy and GNUify the examples.
16317 Remove the old menu.
16318
16319 2000-09-18 Akim Demaille <akim@epita.fr>
16320
16321 First set of tests: use the `calc' example from the documentation.
16322
16323 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16324 is defined only when YYDEBUG is.
16325 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16326 * src/files.c (tryopen, tryclose): Formatting changes.
16327 Move to the top and be static.
16328 * src/reader.c (read_signed_integer): Likewise.
16329 * tests/calc.m4: New file.
16330 * Makefile.am, suite.m4: Adjust.
16331 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16332
16333 2000-09-18 Akim Demaille <akim@epita.fr>
16334
16335 Add support for an Autotest test suite for Bison.
16336
16337 * m4/m4.m4, m4/atconfig.m4: New files.
16338 * m4/Makefile.am (EXTRA_DIST): Adjust.
16339 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16340 files.
16341 * src/getargs.c: Display a more standard --version message.
16342 * src/reader.c (reader): Formatting changes.
16343 No longer depend upon VERSION_STRING.
16344 * configure.in: No longer use `dnl'.
16345 Set up the test suite and the new directory `tests/.
16346 (VERSION_STRING): Remove.
16347
16348 2000-04-14 Akim Demaille <akim@epita.fr>
16349
16350 * src/reader.c (copy_comment2): New function, same as former
16351 `copy_comment', but outputs into two FILE *.
16352 (copy_comment): Use it.
16353 (parse_union_decl): Use it.
16354 (get_type, parse_start_decl): Use the same `invalid' message.
16355 (parse_start_decl, parse_union_decl): Use the same `multiple'
16356 message.
16357 (parse_union_decl, copy_guard, copy_action): Use the same
16358 `unmatched' message.
16359 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16360
16361 2000-03-31 Akim Demaille <akim@epita.fr>
16362
16363 * src/files.c (tryopen, tryclose): Move to the top.
16364 Be static.
16365
16366 2000-03-31 Akim Demaille <akim@epita.fr>
16367
16368 * src/main.c (main): Don't call `done', exit does it.
16369
16370 2000-03-31 Akim Demaille <akim@epita.fr>
16371
16372 * allocate.c: s/return (foo)/return foo/.
16373 * lalr.c: Likewise.
16374 * LR0.c: Likewise.
16375 * output.c: Likewise.
16376 * reader.c: Likewise.
16377 * symtab.c: Likewise.
16378 * vmsgetargs.c: Likewise.
16379
16380 2000-03-31 Akim Demaille <akim@epita.fr>
16381
16382 Clean up the error reporting functions.
16383
16384 * src/report.c: New file.
16385 * src/report.h: Likewise.
16386 * src/Makefile.am: Adjust.
16387 * m4/error.m4: New file.
16388 * m4/Makefile.am: Adjust.
16389 * configure.in (jm_PREREQ_ERROR): Call it.
16390 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16391 Remove.
16392 (fatal, fatals): Remove. All callers use complain.c::fatal.
16393 (warn, warni, warns, warnss, warnss): Remove. All callers use
16394 complain.c::complain.
16395 (toomany): Remove, use fatal instead.
16396 * src/files.c (done): No argument, use complain_message_count.
16397 * src/main.c (main): Register `done' to `atexit'.
16398
16399 * src/getargs.c (usage): More `fputs', less `fprintf'.
16400
16401 2000-03-28 Akim Demaille <akim@epita.fr>
16402
16403 * lib/: New directory.
16404 * Makefile.am (SUBDIRS): Adjust.
16405 * configure.in: Adjust.
16406 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16407 useless.
16408 * src/alloca.c: Moved to lib/.
16409 * src/getopt.c: Likewise.
16410 * src/getopt1.c: Likewise.
16411 * src/getopt.h: Likewise.
16412 * src/ansi2knr.c: Likewise.
16413 * src/ansi2knr.1: Likewise.
16414 * src/Makefile.am: Adjust.
16415 * lib/Makefile.am: New file.
16416
16417 2000-03-28 Akim Demaille <akim@epita.fr>
16418
16419 * src/getargs.c (usage): Refresh the help message.
16420
16421 2000-03-17 Akim Demaille <akim@epita.fr>
16422
16423 * src/getopt1.c: Updated from textutils 2.0e
16424 * src/getopt.c: Likewise.
16425 * src/getopt.h: Likewise.
16426
16427 2000-03-17 Akim Demaille <akim@epita.fr>
16428
16429 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16430 the file name, not the whole `#line LINE FILE'.
16431
16432 2000-03-17 Akim Demaille <akim@epita.fr>
16433
16434 On syntax errors, report the token on which we choked.
16435
16436 * src/bison.s1 (yyparse): In the label yyerrlab, when
16437 YYERROR_VERBOSE, add yychar in msg.
16438
16439 2000-03-17 Akim Demaille <akim@epita.fr>
16440
16441 * src/reader.c (copy_at): New function.
16442 (copy_guard): Use it.
16443 (copy_action): Use it.
16444
16445 2000-03-17 Akim Demaille <akim@epita.fr>
16446
16447 Be kind to translators, save some useless translations.
16448
16449 * src/main.c (banner): New function.
16450 (fatal_banner): Use it.
16451 (warn_banner): Use it.
16452
16453 2000-03-17 Akim Demaille <akim@epita.fr>
16454
16455 * src/reader.c (copy_definition): Use copy_string and
16456 copy_comment. Removed now unused `match', `ended',
16457 `cplus_comment'.
16458 (copy_comment, copy_string): Moved, to be visible from
16459 copy_definition.
16460
16461 2000-03-17 Akim Demaille <akim@epita.fr>
16462
16463 * src/reader.c (copy_string): Declare `static inline'. No
16464 problems with inline, since it is checked by configure.
16465 (copy_comment): Likewise.
16466
16467 2000-03-17 Akim Demaille <akim@epita.fr>
16468
16469 * src/reader.c (packsymbols): Formatting changes.
16470
16471 2000-03-17 Akim Demaille <akim@epita.fr>
16472
16473 * src/reader.c (copy_comment): New function, factored out from:
16474 (copy_action): Use it. Removed now unused `match', `ended',
16475 `cplus_comment'.
16476 (copy_guard): Likewise.
16477
16478 2000-03-17 Akim Demaille <akim@epita.fr>
16479
16480 * src/reader.c (copy_string): New function, factored out from:
16481 (copy_action): Use it.
16482 (copy_guard): Likewise.
16483
16484 2000-03-17 Akim Demaille <akim@epita.fr>
16485
16486 Change the handling of @s so that they behave exactly like $s.
16487 There is now a pseudo variable @$ (readble and writable), location
16488 of the lhs of the rule (by default ranging from the location of
16489 the first symbol of the rhs, to the location of the last symbol,
16490 or, if the rhs is empty, YYLLOC).
16491
16492 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16493 yyval.
16494 (yyparse): When providing a default semantic action, provide a
16495 default location action.
16496 (after the $): No longer change `*YYLSP', just stack YYLOC the
16497 same way you stack YYVAL.
16498 * src/reader.c (read_declarations): Use warns.
16499 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16500 (copy_action, case '@'): Likewise.
16501 Use a standard error message, to save useless work from
16502 translators.
16503
16504 2000-03-17 Akim Demaille <akim@epita.fr>
16505
16506 * src/bison.s1: Formatting and cosmetics changes.
16507 * src/reader.c: Likewise.
16508 Update the Copyright notice.
16509
16510 2000-03-17 Akim Demaille <akim@epita.fr>
16511
16512 * src/bison.s1 (#line): All set to `#line' only, since the
16513 Makefile now handles them.
16514
16515 2000-03-16 Akim Demaille <akim@epita.fr>
16516
16517 * src/output.c (output_rule_data): Output the documentation of
16518 some of the tables.
16519 (Copyright notice): Update.
16520 Formatting changes.
16521
16522 2000-03-16 Akim Demaille <akim@epita.fr>
16523
16524 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16525 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16526 One `#if YYDEBUG' remains, since it uses variables which are
16527 defined only if `YYDEBUG != 0'.
16528
16529 2000-03-16 Akim Demaille <akim@epita.fr>
16530
16531 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16532 and related variables so that the similarities are highlighted.
16533
16534 2000-03-16 Akim Demaille <akim@epita.fr>
16535
16536 * src/bison.s1: Properly indent CPP directives.
16537
16538 2000-03-16 Akim Demaille <akim@epita.fr>
16539
16540 * src/bison.s1: Properly indent the `alloca' CPP section.
16541
16542 2000-03-16 Akim Demaille <akim@epita.fr>
16543
16544 Do not hard code values of directories in `configure.in'.
16545 Update the `configure' tool chain.
16546
16547 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16548 src/makefile.am.
16549 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16550 (AC_OUTPUT): Add m4/Makefile.
16551 Bump to bison 1.28a, 1.29 has never been released.
16552 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16553 handled via src/Makefile.am.
16554 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16555 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16556 autoheader.
16557 * Makefile.am (SUBDIRS): Add m4.
16558 (ACLOCAL_AM_FLAGS): New variable.
16559 (AUTOMAKE_OPTIONS): Add check-news.
16560 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16561 the proper line number and file name.
16562 (DEFS): Propagate the location of bison library files and of the
16563 locale files.
16564 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16565 builddir.
16566 * acinclude.m4: Remove, replaced by the directory m4.
16567 * m4/Makefile.am (EXTRA_DIST): New variable.
16568 * m4/gettext.m4: New file, from the fileutils.
16569 * m4/lcmessage.m4: Likewise
16570 * m4/progtest.m4: Likewise.
16571 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16572
16573 2000-03-10 Akim Demaille <akim@epita.fr>
16574
16575 * src/closure.c:
16576 Formatting changes of various comments.
16577 Respect the GNU coding standards at various places.
16578 Don't use `_()' when no translation is needed.
16579
16580 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16581
16582 * src/files.c:
16583 OS/2 honors TMPDIR environment variable.
16584
16585 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16586
16587 * doc/bison.texinfo: Tweaked spelling and grammar.
16588 Updated ISBN.
16589 Removed reference to price of printed copy.
16590 Mention BISON_SIMPLE and BISON_HAIRY.
16591
16592 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16593
16594 * configure.in, NEWS:
16595 Bison 1.29 released.
16596
16597 1999-10-27 Jesse Thilo <jthilo@gnu.org>
16598
16599 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16600 Added reference card.
16601
16602 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16603
16604 * po/ru.po: Added Russian translation.
16605
16606 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16607
16608 * configure.in: Added Russian translation.
16609
16610 1999-07-06 Jesse Thilo <jthilo@gnu.org>
16611
16612 * configure.in, NEWS, README:
16613 Released version 1.28.
16614
16615 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16616
16617 * src/system.h:
16618 Squashed redefinition warning on some systems.
16619
16620 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16621 Have configure build version string instead of relying on ANSI string
16622 concatentation.
16623
16624 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16625
16626 * po/POTFILES.in: Got rid of version.c.
16627
16628 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16629
16630 * acconfig.h, configure.in:
16631 Have configure build version string instead of relying on ANSI string
16632 concatentation.
16633
16634 1999-06-08 Jesse Thilo <jthilo@gnu.org>
16635
16636 * doc/bison.1:
16637 Dropped mention of `+' for long-named options.
16638
16639 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16640
16641 * src/files.c: Added <unistd.h> for unlink().
16642
16643 * src/Makefile.am, src/system.h:
16644 I18n fixes.
16645
16646 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16647
16648 * README: Added a FAQ list.
16649
16650 * configure.in, acconfig.h:
16651 I18n fixes.
16652
16653 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16654
16655 * doc/FAQ, doc/Makefile.am:
16656 Added a FAQ list.
16657
16658 1999-05-19 Jesse Thilo <jthilo@gnu.org>
16659
16660 * src/alloc.h, src/symtab.h, src/version.c:
16661 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16662
16663 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16664
16665 * src/.cvsignore, src/Makefile.am:
16666 Reorganized: sources in `src', documentation in `doc'.
16667
16668 * src/lex.c (literalchar):
16669 fixed the code for escaping double quotes (thanks
16670 Jonathan Czisny.)
16671
16672 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16673
16674 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16675 Adjusted paths to reflect directory reorganization.
16676
16677 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16678
16679 * doc/.cvsignore, doc/Makefile.am:
16680 Reorganized: sources in `src', documentation in `doc'.
16681
16682 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16683
16684 * configure.in:
16685 Updated AC_INIT file to reflect directory reorganization.
16686
16687 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16688 Reorganized: sources in `src', documentation in `doc'.
16689
16690 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16691
16692 * src/allocate.c:
16693 Don't declare calloc() and realloc() if not necessary.
16694
16695 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16696
16697 * configure.in, acconfig.h, acinclude.m4:
16698 Don't declare calloc() and realloc() if not necessary.
16699
16700 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16701
16702 * po/.cvsignore: Added i18n support.
16703
16704 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16705
16706 * acconfig.h, configure.in, Makefile.am:
16707 Added i18n support.
16708
16709 1999-03-22 Jesse Thilo <jthilo@gnu.org>
16710
16711 * src/bison.s1: Fixed #line numbers.
16712
16713 1999-03-15 Jesse Thilo <jthilo@gnu.org>
16714
16715 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16716 Added PO files from Translation Project.
16717
16718 1999-03-03 Jesse Thilo <jthilo@gnu.org>
16719
16720 * Makefile.am:
16721 Added support for non-ANSI compilers (ansi2knr).
16722
16723 1999-02-16 Jesse Thilo <jthilo@gnu.org>
16724
16725 * configure.in: Bumped version number to 1.27.
16726
16727 * Makefile.am:
16728 Added `bison.simple' to list of files removed by `make distclean'.
16729
16730 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16731
16732 * src/files.c, src/files.h:
16733 Defined locations of parser files in config.h instead of Makefile.
16734
16735 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16736
16737 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16738 Defined locations of parser files in config.h instead of Makefile.
16739
16740 1999-02-09 Jesse Thilo <jthilo@gnu.org>
16741
16742 * Makefile.am:
16743 Removed inappropriate use of $< macro.
16744
16745 1999-02-05 Jesse Thilo <jthilo@gnu.org>
16746
16747 * po/Makefile.in.in, po/POTFILES.in:
16748 Add `po' directory skeleton.
16749
16750 1999-01-27 Jesse Thilo <jthilo@gnu.org>
16751
16752 * README: Document help-bison list.
16753
16754 * configure.in: Add check for mkstemp().
16755
16756 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16757
16758 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16759 Hush a few compiler warnings.
16760
16761 * src/files.c:
16762 Add tryclose(), which verifies that fclose was successful.
16763 Hush a couple of compiler warnings.
16764
16765 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16766
16767 * Makefile.am, OChangeLog:
16768 ChangeLog is now automatically generated. Include the old version as
16769 OChangeLog.
16770
16771 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16772
16773 * 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:
16774 Update FSF address.
16775
16776 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16777
16778 * doc/bison.texinfo: Fix formatting glitch.
16779
16780 * doc/bison.texinfo: Update FSF address.
16781
16782 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16783
16784 * acconfig.h: Update FSF address.
16785
16786 1999-01-08 Jesse Thilo <jthilo@gnu.org>
16787
16788 * src/system.h:
16789 Don't define PACKAGE here, since config.h defines it.
16790
16791 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16792
16793 * src/reader.c: Update copyright date.
16794
16795 * src/main.c:
16796 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16797 favor of output directly to stderr (avoids buffer overruns).
16798
16799 * src/reader.c: Some checks for premature EOF.
16800
16801 * 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:
16802 Use prototypes if the compiler understands them.
16803
16804 * src/files.c: Honor TMPDIR on Unix hosts.
16805 Use prototypes if the compiler understands them.
16806
16807 * src/reader.c:
16808 Fix a couple of buffer overrun bugs.
16809 Use prototypes if the compiler understands them.
16810
16811 * src/system.h: Include unistd.h and ctype.h.
16812 Use #ifdef instead of #if for NLS symbols.
16813
16814 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16815
16816 * doc/bison.texinfo:
16817 Delete comment "consider using @set for edition number, etc..." since
16818 we now are doing so.
16819
16820 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16821
16822 * configure.in:
16823 Use prototypes if the compiler understands them.
16824
16825 * NEWS: Document 1.26 highlights.
16826
16827 * Makefile.am: Require Automake 1.3 or later.
16828
16829 * acconfig.h:
16830 Use prototypes if the compiler understands them.
16831
16832 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16833
16834 * src/version.c:
16835 Use VERSION symbol from automake for version number.
16836
16837 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16838
16839 * acconfig.h, configure.in, version.cin:
16840 Use VERSION symbol from automake for version number.
16841
16842 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16843
16844 * Makefile.am:
16845 Distribute original version of simple parser (bison.s1), not built
16846 version (bison.simple).
16847
16848 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16849
16850 * doc/bison.texinfo: Add info dir entry.
16851
16852 * doc/bison.texinfo:
16853 Let automake put version number into documentation.
16854
16855 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16856
16857 * src/bison.cld, src/build.com, src/vmshlp.mar:
16858 Add non-RCS files from /gd/gnu/bison.
16859
16860 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16861
16862 * doc/bison.1:
16863 Document the BISON_HAIRY and BISON_SIMPLE variables.
16864
16865 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16866
16867 * src/version.c: Build version.c automatically.
16868
16869 * src/reader.c:
16870 Fix token numbering (used to start at 258, not 257).
16871
16872 * src/system.h: Include config.h.
16873
16874 * src/getargs.c: Update bug report address.
16875
16876 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16877 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16878
16879 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16880
16881 * Makefile.am:
16882 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16883
16884 * configure.in, version.cin:
16885 Build version.c automatically.
16886
16887 * AUTHORS: Add AUTHORS file.
16888
16889 * README: Update bug report address.
16890
16891 * bison.simple:
16892 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16893
16894 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16895 Add automake stuff.
16896
16897 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16898
16899 * doc/bison.texinfo: Clean up some formatting.
16900
16901 1998-05-05 Richard Stallman <rms@gnu.org>
16902
16903 * doc/bison.texinfo:
16904 Explain better why to make a pure parser.
16905
16906 1998-01-05 Richard Stallman <rms@gnu.org>
16907
16908 * src/files.c (openfiles):
16909 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16910 find a temporary directory, if possible. Do not unlink files while
16911 they are open.
16912
16913 1997-08-25 Richard Stallman <rms@gnu.org>
16914
16915 * src/reader.c (stack_offset;):
16916 Change some warni to warns.
16917
16918 * src/lex.c (literalchar): Use warns, not warni.
16919
16920 1997-06-28 Richard Stallman <rms@gnu.org>
16921
16922 * src/bison.s1: Add a Bison version comment.
16923
16924 * src/main.c (fatal, warn, berror):
16925 Use program_name.
16926
16927 1997-06-28 Richard Stallman <rms@gnu.org>
16928
16929 * Makefile.in (bison_version): New variable.
16930 (dist): Use that variable.
16931 (bison.s1): Substitute the Bison version into bison.simple.
16932
16933 * bison.simple: Add a Bison version comment.
16934
16935 1997-06-18 Richard Stallman <rms@gnu.org>
16936
16937 * src/main.c (fatal, warn, berror):
16938 Make error messages standard.
16939 (toomany): Improve error message text.
16940
16941 * 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:
16942 new.h renamed to alloc.h.
16943
16944 1997-06-18 Richard Stallman <rms@gnu.org>
16945
16946 * Makefile.in: new.h renamed to alloc.h.
16947
16948 1997-05-24 Richard Stallman <rms@gnu.org>
16949
16950 * src/lex.c (literalchar):
16951 Fix the code for escaping \, " and '.
16952
16953 (lex): Avoid trouble when there are many chars
16954 to discard in a char literal with just several chars in it.
16955
16956 1997-05-17 Richard Stallman <rms@gnu.org>
16957
16958 * src/bison.s1:
16959 Use malloc, if using alloca is troublesome.
16960 (YYSTACK_USE_ALLOCA): New flag macro.
16961 Define it for some systems and compilers.
16962 (YYSTACK_ALLOC): New macro.
16963 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16964 If it was malloc'd, free it.
16965
16966 1997-05-17 Richard Stallman <rms@gnu.org>
16967
16968 * bison.simple:
16969 Use malloc, if using alloca is troublesome.
16970 (YYSTACK_USE_ALLOCA): New flag macro.
16971 Define it for some systems and compilers.
16972 (YYSTACK_ALLOC): New macro.
16973 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16974 If it was malloc'd, free it.
16975
16976 1997-04-23 Richard Stallman <rms@gnu.org>
16977
16978 * src/bison.s1:
16979 (alloca) [__hpux]: Always define as __builtin_alloca.
16980
16981 1997-04-23 Richard Stallman <rms@gnu.org>
16982
16983 * bison.simple:
16984 (alloca) [__hpux]: Always define as __builtin_alloca.
16985
16986 1997-04-22 Richard Stallman <rms@gnu.org>
16987
16988 * src/bison.s1:
16989 [__hpux]: Include alloca.h (right for HPUX 10)
16990 instead of declaring alloca (right for HPUX 9).
16991
16992 * src/bison.s1 (__yy_memcpy):
16993 Declare arg `count' as unsigned int.
16994 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16995
16996 1997-04-22 Richard Stallman <rms@gnu.org>
16997
16998 * bison.simple:
16999 [__hpux]: Include alloca.h (right for HPUX 10)
17000 instead of declaring alloca (right for HPUX 9).
17001
17002 * bison.simple (__yy_memcpy):
17003 Declare arg `count' as unsigned int.
17004 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17005
17006 1997-01-03 Richard Stallman <rms@gnu.org>
17007
17008 * src/allocate.c: [__STDC__ or _MSC_VER]:
17009 Declare calloc and realloc to return void *.
17010
17011 1997-01-02 Richard Stallman <rms@gnu.org>
17012
17013 * src/system.h:
17014 [_MSC_VER]: Include stdlib.h and process.h.
17015 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17016
17017 * src/main.c (main): Return FAILURE as a value.
17018 (printable_version): Declare arg as int, not char.
17019
17020 1997-01-02 Richard Stallman <rms@gnu.org>
17021
17022 * Makefile.in (dist):
17023 Explicitly check for symlinks, and copy them.
17024
17025 1996-12-19 Richard Stallman <rms@gnu.org>
17026
17027 * src/files.c:
17028 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17029
17030 1996-12-18 Paul Eggert <eggert@gnu.org>
17031
17032 * src/bison.s1 (yyparse):
17033 If __GNUC__ and YYPARSE_PARAM are both defined,
17034 declare yyparse to have a void * argument.
17035
17036 1996-12-18 Paul Eggert <eggert@gnu.org>
17037
17038 * bison.simple (yyparse):
17039 If __GNUC__ and YYPARSE_PARAM are both defined,
17040 declare yyparse to have a void * argument.
17041
17042 1996-12-17 Richard Stallman <rms@gnu.org>
17043
17044 * src/reduce.c (nbits): Add some casts.
17045
17046 1996-08-12 Richard Stallman <rms@gnu.org>
17047
17048 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17049
17050 1996-08-12 Richard Stallman <rms@gnu.org>
17051
17052 * bison.simple: Test _MSDOS as well as _MSDOS_.
17053
17054 1996-07-31 Richard Stallman <rms@gnu.org>
17055
17056 * src/bison.s1:
17057 [__sun && __i386]: Include alloca.h.
17058
17059 1996-07-31 Richard Stallman <rms@gnu.org>
17060
17061 * bison.simple:
17062 [__sun && __i386]: Include alloca.h.
17063
17064 1996-07-30 Richard Stallman <rms@gnu.org>
17065
17066 * src/bison.s1: Comment change.
17067
17068 * src/bison.s1: Test _MSDOS_, not MSDOS.
17069
17070 1996-07-30 Richard Stallman <rms@gnu.org>
17071
17072 * bison.simple: Comment change.
17073
17074 * bison.simple: Test _MSDOS_, not MSDOS.
17075
17076 1996-06-01 Richard Stallman <rms@gnu.org>
17077
17078 * 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:
17079 Insert `_' macro around many string constants.
17080
17081 * src/main.c:
17082 Insert `_' macro around many string constants.
17083
17084 (main): Call setlocale, bindtextdomain and textdomain.
17085
17086 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17087 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17088 [ENABLE_NLS]: Include libintl.h.
17089 [ENABLE_NLS] (gettext): Define.
17090 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17091 (N_, PACKAGE, LOCALEDIR): New macros.
17092
17093 1996-06-01 Richard Stallman <rms@gnu.org>
17094
17095 * POTFILES.in: New file.
17096
17097 * Makefile.in (allocate.o):
17098 Define target explicitly.
17099
17100 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17101 (LDFLAGS): Set to @LDFLAGS@.
17102 (configure): Run autoconf only if preceding `cd' succeeds.
17103 (bison.s1): Redirect output to temporary file then move the
17104 temporary to the target, rather than redirecting directly to bison.s1.
17105 (clean): Remove config.status and config.log.
17106 (distclean): Don't remove config.status here.
17107
17108 1996-05-12 Richard Stallman <rms@gnu.org>
17109
17110 * src/bison.s1:
17111 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17112
17113 1996-05-12 Richard Stallman <rms@gnu.org>
17114
17115 * bison.simple:
17116 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17117
17118 1996-05-11 Richard Stallman <rms@gnu.org>
17119
17120 * src/bison.s1 (__yy_memcpy):
17121 Really reorder the args, as was supposedly done on Feb 14 1995.
17122 (yyparse): Calls changed accordingly.
17123
17124 1996-05-11 Richard Stallman <rms@gnu.org>
17125
17126 * Makefile.in (dist): Don't use $(srcdir).
17127
17128 * bison.simple (__yy_memcpy):
17129 Really reorder the args, as was supposedly done on Feb 14 1995.
17130 (yyparse): Calls changed accordingly.
17131
17132 1996-01-27 Richard Stallman <rms@gnu.org>
17133
17134 * src/output.c (output_rule_data):
17135 Test YYERROR_VERBOSE in the conditional
17136 around the definition of ttyname.
17137
17138 1995-12-29 Richard Stallman <rms@gnu.org>
17139
17140 * src/bison.s1:
17141 Fix line numbers in #line commands.
17142
17143 1995-12-29 Richard Stallman <rms@gnu.org>
17144
17145 * bison.simple:
17146 Fix line numbers in #line commands.
17147
17148 1995-12-27 Richard Stallman <rms@gnu.org>
17149
17150 * src/bison.s1 (YYPARSE_PARAM_DECL):
17151 In C++, make it always null.
17152 (YYPARSE_PARAM_ARG): New macro.
17153 (yyparse): Use YYPARSE_PARAM_ARG.
17154
17155 1995-12-27 Richard Stallman <rms@gnu.org>
17156
17157 * bison.simple (YYPARSE_PARAM_DECL):
17158 In C++, make it always null.
17159 (YYPARSE_PARAM_ARG): New macro.
17160 (yyparse): Use YYPARSE_PARAM_ARG.
17161
17162 1995-11-29 Richard Stallman <rms@gnu.org>
17163
17164 * doc/bison.texinfo:
17165 Describe literal string tokens, %raw, %no_lines, %token_table.
17166
17167 1995-11-29 Daniel Hagerty <hag@gnu.org>
17168
17169 * doc/bison.texinfo: Fixed update date
17170
17171 1995-10-16 Richard Stallman <rms@gnu.org>
17172
17173 * src/version.c: Version 1.25.
17174
17175 1995-10-16 Richard Stallman <rms@gnu.org>
17176
17177 * NEWS: *** empty log message ***
17178
17179 1995-10-16 Richard Stallman <rms@gnu.org>
17180
17181 * doc/bison.1, doc/bison.rnh:
17182 Add new options.
17183
17184 1995-10-15 Richard Stallman <rms@gnu.org>
17185
17186 * src/vmsgetargs.c, src/getargs.c:
17187 Added -n, -k, and -raw switches.
17188 (noparserflag, toknumflag, rawtoknumflag): New variables.
17189
17190 * src/symtab.h (SALIAS):
17191 New #define for adding aliases to %token.
17192 (struct bucket): Added `alias' field.
17193
17194 * src/reduce.c (reduce_grammar):
17195 Revise error message.
17196 (print_notices): Remove final `.' from error message.
17197
17198 * src/reader.c (reader_output_yylsp):
17199 New function.
17200 (readgram): Use `#if 0' around code that accepted %command
17201 inside grammar rules: The documentation doesn't allow it,
17202 and it will fail since the %command processors scan for the next %.
17203 (parse_token_decl): Extended the %token
17204 declaration to allow a multi-character symbol as an alias.
17205 (parse_thong_decl): New function.
17206 (read_declarations): Added %thong declarations.
17207 (read_declarations): Handle NOOP to deal with allowing
17208 % declarations as another means to specify the flags.
17209 (readgram): Allow %prec prior to semantics embedded in a rule.
17210 (skip_to_char, read_declarations, copy_definition)
17211 (parse_token_decl, parse_start_decl, parse_type_decl)
17212 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17213 (get_type_name, copy_guard, copy_action, readgram)
17214 (get_type, packsymbols): Revised most error messages.
17215 Changed `fatal' to `warnxxx' to avoid aborting for error.
17216 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17217 (read_declarations): Improve the error message for
17218 an invalid character. Do not abort.
17219 (read_declarations, copy_guard, copy_action): Use
17220 printable_version to avoid unprintable characters in printed output.
17221 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17222 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17223 Allow the type of a non-terminal can be given
17224 more than once, as long as all specifications give the same type.
17225
17226 * src/output.c:
17227 (output_headers, output_trailers, output, output_gram)
17228 (output_rule_data): Implement noparserflag variable.
17229 Implement toknumflag variable.
17230 (output): Call reader_output_yylsp to output LTYPESTR.
17231
17232 * src/main.c (main):
17233 If reader sees an error, don't process the grammar.
17234 (fatals): Updated to not use VARARGS1.
17235 (printable_version, int_to_string, warn, warni, warns, warnss)
17236 (warnsss): New error reporting functions. Avoid abort for error.
17237
17238 * src/lex.h:
17239 Added THONG and NOOP for alias processing.
17240 Added SETOPT for the new code that allows setting options with %flags.
17241
17242 * src/lex.c:
17243 Include getopt.h. Add some extern decls.
17244 (safegetc): New function to deal with EOF gracefully.
17245 (literalchar); new function to deal with reading \ escapes.
17246 (lex): Use literalchar.
17247 (lex): Implemented "..." tokens.
17248 (literalchar, lex, parse_percent_token): Made tokenbuffer
17249 always contain the token. This includes growing the token
17250 buffer while reading an integer.
17251 (parse_percent_token): Replaced if-else statement with percent_table.
17252 (parse_percent_token): Added % declarations as another
17253 way to specify the flags -n, -l, and -r. Also added hooks for
17254 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17255 major changes to files.c.
17256 (lex) Retain in the incoming stream a character following
17257 an incorrect '/'.
17258 (skip_white_space, lex): Revised most error messages
17259 and changed fatal to warn to avoid aborting.
17260 (percent_table): Added %thong declarations.
17261
17262 * src/gram.h: Comment changes.
17263
17264 * src/files.c (openfiles, open_extra_files, done):
17265 Add faction flag
17266 and actfile file. Handle noparserflag. Both for -n switch.
17267
17268 * src/conflicts.c (resolve_sr_conflict):
17269 Remove use of alloca.
17270
17271 1995-06-01 Jim Meyering <meyering@gnu.org>
17272
17273 * doc/bison.texinfo: *** empty log message ***
17274
17275 1995-05-06 Richard Stallman <rms@gnu.org>
17276
17277 * src/bison.s1: Comment change.
17278
17279 1995-05-06 Richard Stallman <rms@gnu.org>
17280
17281 * bison.simple: Comment change.
17282
17283 1995-05-03 Richard Stallman <rms@gnu.org>
17284
17285 * src/version.c: Version now 1.24.
17286
17287 * src/bison.s1: Change distribution terms.
17288
17289 * src/version.c: Version now 1.23.
17290
17291 1995-05-03 Richard Stallman <rms@gnu.org>
17292
17293 * doc/bison.texinfo:
17294 Rewrite "Conditions for Using Bison".
17295 Update version to 1.24.
17296
17297 1995-05-03 Richard Stallman <rms@gnu.org>
17298
17299 * bison.simple: Change distribution terms.
17300
17301 1995-02-23 Richard Stallman <rms@gnu.org>
17302
17303 * src/files.c: Test __VMS_POSIX as well as VMS.
17304
17305 1995-02-14 Jim Meyering <meyering@gnu.org>
17306
17307 * src/bison.s1 (__yy_memcpy):
17308 Renamed from __yy_bcopy to avoid
17309 confusion. Reverse FROM and TO arguments to be consistent with
17310 those of memcpy.
17311
17312 1995-02-14 Jim Meyering <meyering@gnu.org>
17313
17314 * bison.simple (__yy_memcpy):
17315 Renamed from __yy_bcopy to avoid
17316 confusion. Reverse FROM and TO arguments to be consistent with
17317 those of memcpy.
17318
17319 1994-11-10 David J. MacKenzie <djm@gnu.org>
17320
17321 * NEWS: reformat
17322
17323 * NEWS: New file.
17324
17325 * Makefile.in (DISTFILES): Include NEWS.
17326
17327 * Makefile.in (DISTFILES):
17328 Include install-sh, not install.sh.
17329
17330 * configure.in: Update to Autoconf v2 macro names.
17331
17332 1994-10-05 David J. MacKenzie <djm@gnu.org>
17333
17334 * Makefile.in: fix typo
17335
17336 * Makefile.in (prefix, exec_prefix):
17337 Let configure set them.
17338
17339 1994-09-28 David J. MacKenzie <djm@gnu.org>
17340
17341 * Makefile.in: Set datadir to $(prefix)/share.
17342
17343 1994-09-15 Richard Stallman <rms@gnu.org>
17344
17345 * src/bison.s1:
17346 Update copyright notice and GPL version.
17347
17348 1994-09-15 Richard Stallman <rms@gnu.org>
17349
17350 * bison.simple:
17351 Update copyright notice and GPL version.
17352
17353 1994-07-12 Richard Stallman <rms@gnu.org>
17354
17355 * src/reduce.c, src/reader.c:
17356 entered into RCS
17357
17358 1994-05-05 David J. MacKenzie <djm@gnu.org>
17359
17360 * Makefile.in: entered into RCS
17361
17362 1994-03-26 Richard Stallman <rms@gnu.org>
17363
17364 * src/bison.s1: entered into RCS
17365
17366 1994-03-26 Richard Stallman <rms@gnu.org>
17367
17368 * bison.simple: entered into RCS
17369
17370 1994-03-25 Richard Stallman <rms@gnu.org>
17371
17372 * src/main.c: entered into RCS
17373
17374 1994-03-24 Richard Stallman <rms@gnu.org>
17375
17376 * src/conflicts.c: entered into RCS
17377
17378 1994-01-02 Richard Stallman <rms@gnu.org>
17379
17380 * Makefile.in: *** empty log message ***
17381
17382 1993-11-21 Richard Stallman <rms@gnu.org>
17383
17384 * src/bison.s1: *** empty log message ***
17385
17386 1993-11-21 Richard Stallman <rms@gnu.org>
17387
17388 * doc/bison.texinfo: entered into RCS
17389
17390 * doc/bison.texinfo: *** empty log message ***
17391
17392 1993-11-21 Richard Stallman <rms@gnu.org>
17393
17394 * bison.simple: *** empty log message ***
17395
17396 1993-10-25 David J. MacKenzie <djm@gnu.org>
17397
17398 * doc/bison.texinfo: *** empty log message ***
17399
17400 1993-10-19 Richard Stallman <rms@gnu.org>
17401
17402 * src/bison.s1: *** empty log message ***
17403
17404 1993-10-19 Richard Stallman <rms@gnu.org>
17405
17406 * bison.simple: *** empty log message ***
17407
17408 1993-10-14 Richard Stallman <rms@gnu.org>
17409
17410 * src/bison.s1: *** empty log message ***
17411
17412 1993-10-14 Richard Stallman <rms@gnu.org>
17413
17414 * bison.simple: *** empty log message ***
17415
17416 1993-09-14 David J. MacKenzie <djm@gnu.org>
17417
17418 * doc/bison.texinfo: *** empty log message ***
17419
17420 1993-09-13 Noah Friedman <friedman@gnu.org>
17421
17422 * Makefile.in: *** empty log message ***
17423
17424 1993-09-10 Richard Stallman <rms@gnu.org>
17425
17426 * src/conflicts.c: *** empty log message ***
17427
17428 * src/system.h: entered into RCS
17429
17430 1993-09-10 Richard Stallman <rms@gnu.org>
17431
17432 * doc/bison.1: entered into RCS
17433
17434 1993-09-06 Noah Friedman <friedman@gnu.org>
17435
17436 * src/version.c: entered into RCS
17437
17438 1993-09-06 Noah Friedman <friedman@gnu.org>
17439
17440 * Makefile.in: *** empty log message ***
17441
17442 1993-07-30 David J. MacKenzie <djm@gnu.org>
17443
17444 * Makefile.in: *** empty log message ***
17445
17446 1993-07-24 Richard Stallman <rms@gnu.org>
17447
17448 * src/bison.s1: *** empty log message ***
17449
17450 1993-07-24 Richard Stallman <rms@gnu.org>
17451
17452 * bison.simple: *** empty log message ***
17453
17454 1993-07-08 David J. MacKenzie <djm@gnu.org>
17455
17456 * Makefile.in: *** empty log message ***
17457
17458 1993-07-04 Richard Stallman <rms@gnu.org>
17459
17460 * src/bison.s1: *** empty log message ***
17461
17462 1993-07-04 Richard Stallman <rms@gnu.org>
17463
17464 * bison.simple: *** empty log message ***
17465
17466 1993-06-26 David J. MacKenzie <djm@gnu.org>
17467
17468 * src/getargs.c: entered into RCS
17469
17470 1993-06-26 David J. MacKenzie <djm@gnu.org>
17471
17472 * doc/bison.texinfo: *** empty log message ***
17473
17474 * doc/bison.1: New file.
17475
17476 1993-06-25 Richard Stallman <rms@gnu.org>
17477
17478 * src/getargs.c: New file.
17479
17480 1993-06-16 Richard Stallman <rms@gnu.org>
17481
17482 * src/bison.s1: *** empty log message ***
17483
17484 1993-06-16 Richard Stallman <rms@gnu.org>
17485
17486 * bison.simple: *** empty log message ***
17487
17488 1993-06-03 Richard Stallman <rms@gnu.org>
17489
17490 * src/bison.s1: New file.
17491
17492 1993-06-03 Richard Stallman <rms@gnu.org>
17493
17494 * doc/bison.texinfo: *** empty log message ***
17495
17496 1993-06-03 Richard Stallman <rms@gnu.org>
17497
17498 * bison.simple: New file.
17499
17500 1993-05-19 Richard Stallman <rms@gnu.org>
17501
17502 * doc/bison.texinfo: New file.
17503
17504 1993-05-07 Noah Friedman <friedman@gnu.org>
17505
17506 * Makefile.in: *** empty log message ***
17507
17508 1993-04-28 Noah Friedman <friedman@gnu.org>
17509
17510 * src/reader.c: *** empty log message ***
17511
17512 1993-04-23 Noah Friedman <friedman@gnu.org>
17513
17514 * src/alloc.h: entered into RCS
17515
17516 1993-04-20 David J. MacKenzie <djm@gnu.org>
17517
17518 * src/version.c: *** empty log message ***
17519
17520 * src/files.c, src/allocate.c:
17521 entered into RCS
17522
17523 * src/reader.c: *** empty log message ***
17524
17525 * src/lex.c: entered into RCS
17526
17527 * src/conflicts.c: New file.
17528
17529 * src/symtab.c: entered into RCS
17530
17531 * src/alloc.h: New file.
17532
17533 * src/LR0.c: entered into RCS
17534
17535 1993-04-18 Noah Friedman <friedman@gnu.org>
17536
17537 * src/reader.c: New file.
17538
17539 * src/version.c: *** empty log message ***
17540
17541 1993-04-18 Noah Friedman <friedman@gnu.org>
17542
17543 * Makefile.in: *** empty log message ***
17544
17545 1993-04-17 Noah Friedman <friedman@gnu.org>
17546
17547 * Makefile.in: *** empty log message ***
17548
17549 1993-04-15 Richard Stallman <rms@gnu.org>
17550
17551 * src/main.c, src/files.c:
17552 New file.
17553
17554 1993-04-15 Noah Friedman <friedman@gnu.org>
17555
17556 * configure.in: entered into RCS
17557
17558 * configure.in: *** empty log message ***
17559
17560 * configure.in: New file.
17561
17562 1993-04-14 Richard Stallman <rms@gnu.org>
17563
17564 * Makefile.in: New file.
17565
17566 1993-04-13 Richard Stallman <rms@gnu.org>
17567
17568 * src/version.c: New file.
17569
17570 1993-03-25 Richard Stallman <rms@gnu.org>
17571
17572 * src/output.c: entered into RCS
17573
17574 1992-09-25 Richard Stallman <rms@gnu.org>
17575
17576 * configure.bat: entered into RCS
17577
17578 1992-06-22 Richard Stallman <rms@gnu.org>
17579
17580 * src/vmsgetargs.c: entered into RCS
17581
17582 1992-06-22 Richard Stallman <rms@gnu.org>
17583
17584 * doc/bison.rnh: entered into RCS
17585
17586 1992-04-20 David J. MacKenzie <djm@gnu.org>
17587
17588 * README: entered into RCS
17589
17590 1992-01-22 Richard Stallman <rms@gnu.org>
17591
17592 * src/machine.h: entered into RCS
17593
17594 1991-12-21 Richard Stallman <rms@gnu.org>
17595
17596 * src/lalr.c, src/closure.c:
17597 entered into RCS
17598
17599 1991-12-20 Richard Stallman <rms@gnu.org>
17600
17601 * src/state.h: entered into RCS
17602
17603 1991-12-18 Richard Stallman <rms@gnu.org>
17604
17605 * src/print.c, src/nullable.c, src/derives.c:
17606 entered into RCS
17607
17608 1991-11-03 David J. MacKenzie <djm@gnu.org>
17609
17610 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17611 entered into RCS
17612
17613 1988-09-09 Richard Stallman <rms@gnu.org>
17614
17615 * src/bison.hairy: entered into RCS
17616
17617 1987-12-16 Richard Stallman <rms@gnu.org>
17618
17619 * REFERENCES: entered into RCS
17620
17621
17622 -----
17623
17624 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
17625 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17626 Software Foundation, Inc.
17627
17628 Copying and distribution of this file, with or without
17629 modification, are permitted provided the copyright notice and this
17630 notice are preserved.
17631
17632 $Id$